diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-12 06:43:37 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-12 06:43:37 +0000 |
commit | 82731497a237bf9b1e1d78d7ee889067b1a0adfa (patch) | |
tree | b4a2d3a10adeb44d5bbc5dc486102af3c1aff3a7 | |
parent | 429bfa9aad1cdb548c537b090f6993ffdffdfc28 (diff) | |
download | ATCD-82731497a237bf9b1e1d78d7ee889067b1a0adfa.tar.gz |
CE stuff
-rw-r--r-- | ace/Acceptor.cpp | 48 | ||||
-rw-r--r-- | ace/Acceptor.h | 26 | ||||
-rw-r--r-- | ace/Connector.cpp | 18 | ||||
-rw-r--r-- | ace/Connector.h | 6 | ||||
-rw-r--r-- | ace/Stream.cpp | 30 | ||||
-rw-r--r-- | ace/Svc_Handler.cpp | 16 | ||||
-rw-r--r-- | ace/Svc_Handler.h | 4 | ||||
-rw-r--r-- | ace/Synch.h | 2 | ||||
-rw-r--r-- | ace/Synch.i | 5 |
9 files changed, 83 insertions, 72 deletions
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp index 13b2543fce2..ade8a94f61b 100644 --- a/ace/Acceptor.cpp +++ b/ace/Acceptor.cpp @@ -115,19 +115,19 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void) // Hook called by the explicit dynamic linking facility. template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int -ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, char *[]) +ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ASYS_TCHAR *[]) { ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init"); return -1; } template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int -ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp, +ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info"); - char buf[BUFSIZ]; - char addr_str[BUFSIZ]; + ASYS_TCHAR buf[BUFSIZ]; + ASYS_TCHAR addr_str[BUFSIZ]; ACE_PEER_ACCEPTOR_ADDR addr; if (this->acceptor ().get_local_addr (addr) == -1) @@ -135,10 +135,10 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp, else if (addr.addr_to_string (addr_str, sizeof addr_str) == -1) return -1; - ACE_OS::sprintf (buf, "%s\t %s %s", - "ACE_Acceptor", + ACE_OS::sprintf (buf, ASYS_TEXT ("%s\t %s %s"), + ASYS_TEXT ("ACE_Acceptor"), addr_str, - "# acceptor factory\n"); + ASYS_TEXT ("# acceptor factory\n")); if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) return -1; @@ -422,8 +422,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s, ACE_Concurrency_Strategy<SVC_HANDLER> *con_s, ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s, - const char service_name[], - const char service_description[]) + const ASYS_TCHAR *service_name, + const ASYS_TCHAR *service_description) { ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open"); @@ -491,8 +491,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor - (const char service_name[], - const char service_description[]) + (const ASYS_TCHAR service_name[], + const ASYS_TCHAR service_description[]) : creation_strategy_ (0), delete_creation_strategy_ (0), accept_strategy_ (0), @@ -522,8 +522,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s, ACE_Concurrency_Strategy<SVC_HANDLER> *con_s, ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s, - const char service_name[], - const char service_description[]) + const ASYS_TCHAR service_name[], + const ASYS_TCHAR service_description[]) { ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor"); @@ -642,13 +642,13 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_signal (int, sig } template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int -ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp, +ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Strategy_Acceptor::info"); - char buf[BUFSIZ]; - char service_addr_str[BUFSIZ]; + ASYS_TCHAR buf[BUFSIZ]; + ASYS_TCHAR service_addr_str[BUFSIZ]; ACE_PEER_ACCEPTOR_ADDR addr; if (this->acceptor ().get_local_addr (addr) == -1) @@ -771,7 +771,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE (this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL); if (this->peer_acceptor_.close () == -1) - ACE_ERROR ((LM_ERROR, "close\n")); + ACE_ERROR ((LM_ERROR, ASYS_TEXT ("close\n"))); } return 0; } @@ -960,7 +960,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE // Hook called by the explicit dynamic linking facility. template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int -ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, char *[]) +ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ASYS_TCHAR *[]) { ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init"); return -1; @@ -974,12 +974,12 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void) } template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int -ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp, +ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info"); - char buf[BUFSIZ]; - char addr_str[BUFSIZ]; + ASYS_TCHAR buf[BUFSIZ]; + ASYS_TCHAR addr_str[BUFSIZ]; ACE_PEER_ACCEPTOR_ADDR addr; if (this->peer_acceptor_.get_local_addr (addr) == -1) @@ -987,10 +987,10 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp, else if (addr.addr_to_string (addr_str, sizeof addr_str) == -1) return -1; - ACE_OS::sprintf (buf, "%s\t %s %s", - "ACE_Oneshot_Acceptor", + ACE_OS::sprintf (buf, ASYS_TEXT ("%s\t %s %s"), + ASYS_TEXT ("ACE_Oneshot_Acceptor"), addr_str, - "#oneshot acceptor factory\n"); + ASYS_TEXT ("#oneshot acceptor factory\n")); if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) return -1; diff --git a/ace/Acceptor.h b/ace/Acceptor.h index 73d7deba727..d1c4149210c 100644 --- a/ace/Acceptor.h +++ b/ace/Acceptor.h @@ -131,14 +131,14 @@ protected: // activates SVC_HANDLERs. // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); + virtual int init (int argc, ASYS_TCHAR *argv[]); // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. virtual int fini (void); // Calls <handle_close>. - virtual int info (char **buf, size_t) const; + virtual int info (ASYS_TCHAR **buf, size_t) const; // Default version returns address info in <buf>. // = Service management hooks. @@ -176,8 +176,8 @@ class ACE_Strategy_Acceptor : public ACE_Acceptor <SVC_HANDLER, ACE_PEER_ACCEPTO // particular concurrency mechanism. public: // = Initialization and termination methods. - ACE_Strategy_Acceptor (const char service_name[] = 0, - const char service_description[] = 0); + ACE_Strategy_Acceptor (const ASYS_TCHAR service_name[] = 0, + const ASYS_TCHAR service_description[] = 0); // Default constructor. ACE_Strategy_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr, @@ -186,8 +186,8 @@ public: ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0, ACE_Concurrency_Strategy<SVC_HANDLER> * = 0, ACE_Scheduling_Strategy<SVC_HANDLER> * = 0, - const char service_name[] = 0, - const char service_description[] = 0); + const ASYS_TCHAR service_name[] = 0, + const ASYS_TCHAR service_description[] = 0); // Initialize the appropriate strategies for creation, passive // connection acceptance, and concurrency, and then register <this> // with the Reactor and listen for connection requests at the @@ -199,8 +199,8 @@ public: ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0, ACE_Concurrency_Strategy<SVC_HANDLER> * = 0, ACE_Scheduling_Strategy<SVC_HANDLER> * = 0, - const char service_name[] = 0, - const char service_description[] = 0); + const ASYS_TCHAR *service_name = 0, + const ASYS_TCHAR *service_description = 0); // Initialize the appropriate strategies for creation, passive // connection acceptance, and concurrency, and then register <this> // with the Reactor and listen for connection requests at the @@ -238,7 +238,7 @@ protected: virtual int fini (void); // Calls <handle_close> when dynamically unlinked. - virtual int info (char **buf, size_t) const; + virtual int info (ASYS_TCHAR **buf, size_t) const; // Default version returns address info in <buf>. // = The following three methods define the <Acceptor>'s strategies @@ -320,10 +320,10 @@ protected: // = Service information objects. - char *service_name_; + ASYS_TCHAR *service_name_; // Name of the service. - char *service_description_; + ASYS_TCHAR *service_description_; // Description of the service. u_short service_port_; @@ -435,7 +435,7 @@ protected: // Called when an acceptor times out... // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); + virtual int init (int argc, ASYS_TCHAR *argv[]); // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. @@ -443,7 +443,7 @@ protected: // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. - virtual int info (char **, size_t) const; + virtual int info (ASYS_TCHAR **, size_t) const; // Default version returns address info in <buf>. // = Service management hooks. diff --git a/ace/Connector.cpp b/ace/Connector.cpp index 600ccc10713..600ef893c40 100644 --- a/ace/Connector.cpp +++ b/ace/Connector.cpp @@ -232,8 +232,8 @@ ACE_Connector<SH, PR_CO_2>::cleanup_AST (ACE_HANDLE handle, { // Error, entry not found in map. errno = ENOENT; - ACE_ERROR_RETURN ((LM_ERROR, "%p %d not found in map\n", - "find", handle), -1); + ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p %d not found in map\n"), + ASYS_TEXT ("find"), handle), -1); } // Try to remove from ACE_Timer_Queue but if it's not there we @@ -398,7 +398,7 @@ template <class SH, PR_CO_1> int ACE_Connector<SH, PR_CO_2>::connect_n (size_t n, SH *sh[], PR_AD remote_addrs[], - char failed_svc_handlers[], + ASYS_TCHAR *failed_svc_handlers, const ACE_Synch_Options &synch_options) { int result = 0; @@ -586,7 +586,7 @@ ACE_Connector<SH, PR_CO_2>::fini (void) // Hook called by the explicit dynamic linking facility. template <class SH, PR_CO_1> int -ACE_Connector<SH, PR_CO_2>::init (int, char *[]) +ACE_Connector<SH, PR_CO_2>::init (int, ASYS_TCHAR *[]) { ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::init"); return -1; @@ -607,15 +607,15 @@ ACE_Connector<SH, PR_CO_2>::resume (void) } template <class SH, PR_CO_1> int -ACE_Connector<SH, PR_CO_2>::info (char **strp, size_t length) const +ACE_Connector<SH, PR_CO_2>::info (ASYS_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::info"); - char buf[BUFSIZ]; + ASYS_TCHAR buf[BUFSIZ]; ACE_OS::sprintf (buf, - "%s\t %s", - "ACE_Connector", - "# connector factory\n"); + ASYS_TEXT ("%s\t %s"), + ASYS_TEXT ("ACE_Connector"), + ASYS_TEXT ("# connector factory\n")); if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) return -1; diff --git a/ace/Connector.h b/ace/Connector.h index af2c3884d9b..099fe9568ad 100644 --- a/ace/Connector.h +++ b/ace/Connector.h @@ -148,7 +148,7 @@ public: virtual int connect_n (size_t n, SVC_HANDLER *svc_handlers[], ACE_PEER_CONNECTOR_ADDR remote_addrs[], - char failed_svc_handlers[] = 0, + ASYS_TCHAR *failed_svc_handlers = 0, const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults); // Initiate connection of <n> <svc_handlers> to peers at // <remote_addrs> using <synch_options>. Returns -1 if failure @@ -225,14 +225,14 @@ protected: // some platforms only). // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); + virtual int init (int argc, ASYS_TCHAR *argv[]); // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. virtual int fini (void); // Calls <handle_close> to shutdown the Connector gracefully. - virtual int info (char **, size_t) const; + virtual int info (ASYS_TCHAR **, size_t) const; // Default version returns address info in <buf>. // = Demultiplexing hooks. diff --git a/ace/Stream.cpp b/ace/Stream.cpp index ae4d1457c5d..bf8e7db06de 100644 --- a/ace/Stream.cpp +++ b/ace/Stream.cpp @@ -255,20 +255,20 @@ ACE_Stream<ACE_SYNCH_USE>::open (void *a, { h1 = new ACE_Stream_Head<ACE_SYNCH_USE>; h2 = new ACE_Stream_Head<ACE_SYNCH_USE>; - head = new ACE_Module<ACE_SYNCH_USE> ("ACE_Stream_Head", - h1, h2, - a, - M_DELETE); + head = new ACE_Module<ACE_SYNCH_USE> (ASYS_TEXT ("ACE_Stream_Head"), + h1, h2, + a, + M_DELETE); } if (tail == 0) { t1 = new ACE_Stream_Tail<ACE_SYNCH_USE>; t2 = new ACE_Stream_Tail<ACE_SYNCH_USE>; - tail = new ACE_Module<ACE_SYNCH_USE> ("ACE_Stream_Tail", - t1, t2, - a, - M_DELETE); + tail = new ACE_Module<ACE_SYNCH_USE> (ASYS_TEXT ("ACE_Stream_Tail"), + t1, t2, + a, + M_DELETE); } // Make sure *all* the allocation succeeded! @@ -490,27 +490,29 @@ ACE_Stream<ACE_SYNCH_USE>::unlink (void) template <ACE_SYNCH_DECL> ACE_Stream<ACE_SYNCH_USE>::ACE_Stream (void * a, - ACE_Module<ACE_SYNCH_USE> *head, - ACE_Module<ACE_SYNCH_USE> *tail) + ACE_Module<ACE_SYNCH_USE> *head, + ACE_Module<ACE_SYNCH_USE> *tail) : linked_us_ (0), final_close_ (this->lock_) { ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::ACE_Stream"); if (this->open (a, head, tail) == -1) - ACE_ERROR ((LM_ERROR, "ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n", + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n"), head->name (), tail->name ())); } #if 0 ACE_Stream<ACE_SYNCH_USE>::ACE_Stream (void *a, - ACE_Multiplexor &muxer, - ACE_Module<ACE_SYNCH_USE> *head) + ACE_Multiplexor &muxer, + ACE_Module<ACE_SYNCH_USE> *head) : linked_us_ (0), final_close_ (this->lock_) { ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::ACE_Stream"); if (this->open (a, muxer, head) == -1) - ACE_ERROR ((LM_ERROR, "ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n", + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n"), head->name ())); } #endif diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp index 60ca1350589..c1e3f3671c2 100644 --- a/ace/Svc_Handler.cpp +++ b/ace/Svc_Handler.cpp @@ -88,15 +88,15 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open (void *) { ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open"); #if defined (DEBUGGING) - char buf[BUFSIZ]; + ASYS_TCHAR buf[BUFSIZ]; ACE_PEER_STREAM_ADDR client_addr; if (this->peer_.get_remote_addr (client_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("get_remote_addr")), -1); if (client_addr.addr_to_string (buf, sizeof buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", - "can't obtain peer's address"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), + ASYS_TEXT ("can't obtain peer's address")), -1); ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("connected to %s on fd %d\n"), buf, this->peer_.get_handle ())); @@ -104,8 +104,8 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open (void *) if (this->reactor () && this->reactor ()->register_handler (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", - "unable to register client handler"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p"), + ASYS_TEXT ("unable to register client handler")), -1); return 0; } @@ -209,9 +209,11 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::close (unsigned long) } template <PR_ST_1, ACE_SYNCH_DECL> int -ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init (int, char *[]) +ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init (int argc, ASYS_TCHAR *argv[]) { ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init"); + ACE_UNUSED_ARG (argc); + ACE_UNUSED_ARG (argv); return -1; } @@ -223,7 +225,7 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::fini (void) } template <PR_ST_1, ACE_SYNCH_DECL> int -ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info (char **, size_t) const +ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info (ASYS_TCHAR **, size_t) const { ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info"); return -1; diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h index bb3e29f571f..e834db497de 100644 --- a/ace/Svc_Handler.h +++ b/ace/Svc_Handler.h @@ -65,7 +65,7 @@ public: // it will be closed. // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); + virtual int init (int argc, ASYS_TCHAR *argv[]); // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. @@ -73,7 +73,7 @@ public: // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. - virtual int info (char **info_string, size_t length) const; + virtual int info (ASYS_TCHAR **info_string, size_t length) const; // Default version does no work and returns -1. Must be overloaded // by application developer to do anything meaningful. diff --git a/ace/Synch.h b/ace/Synch.h index 02e2ab61891..bbdce139546 100644 --- a/ace/Synch.h +++ b/ace/Synch.h @@ -46,6 +46,8 @@ class ACE_Export ACE_Lock // calls and (2) objects with virtual functions can't be placed // into shared memory. public: + ACE_Lock (void); + // CE needs a default ctor here. virtual ~ACE_Lock (void); // Noop virtual destructor diff --git a/ace/Synch.i b/ace/Synch.i index 81726151395..722fd92044e 100644 --- a/ace/Synch.i +++ b/ace/Synch.i @@ -1,6 +1,11 @@ /* -*- C++ -*- */ // $Id$ +ACE_INLINE +ACE_Lock::ACE_Lock (void) +{ +} + ACE_INLINE int ACE_File_Lock::acquire_read (short whence, off_t start, off_t len) { |