From 69fbc8c0fd63df717afb6e9552785eb096f58bed Mon Sep 17 00:00:00 2001 From: dhinton Date: Thu, 11 Sep 2003 00:36:27 +0000 Subject: ChangeLogTag:Thu Sep 4 01:25:53 UTC 2003 Don Hinton --- ChangeLog | 20 + ace/OS.cpp | 424 ++++----- ace/OS.h | 1981 +++++++++++++++++++++--------------------- ace/OS.i | 1166 +++++++++++++------------ ace/OS_Dirent.cpp | 29 +- ace/OS_Dirent.h | 35 +- ace/OS_Dirent.inl | 30 +- ace/OS_Memory.cpp | 11 +- ace/OS_Memory.h | 18 +- ace/OS_Memory.inl | 5 +- ace/OS_String.cpp | 186 ++-- ace/OS_String.h | 230 +++-- ace/OS_String.inl | 224 ++--- ace/OS_TLI.h | 58 +- ace/OS_TLI.inl | 88 +- ace/os_include/os_pthread.h | 3 +- ace/os_include/sys/os_stat.h | 2 +- 17 files changed, 2287 insertions(+), 2223 deletions(-) diff --git a/ChangeLog b/ChangeLog index e891dbad94d..64dbb90ed01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +Thu Sep 4 01:25:53 UTC 2003 Don Hinton + + * ace/OS.{h,cpp,i}: + * ace/OS_String.{h,cpp,i}: + * ace/OS_Dirent.{h,cpp,inl}: + * ace/OS_Memory.{h,cpp,inl}: + * ace/OS_TLI.{h,cpp,inl}: + Converted the ACE_OS* classes to namespaces. Moved ACE_event_t + below ACE_OS. Replaced friend class ACE_OS declarations with + the actual methods needing access to protected or private + methods and variables in various classses. Made static + variables externs defined in OS.cpp. + + * ace/os_include/os_pthread.h: + Removed friend class ACE_OS from ACE_sema_t and changed + protected to public. + + * ace/os_include/sys/os_stat.h: + Added "/**/" to #include . + Wed Sep 3 17:01:02 2003 Balachandran Natarajan * ace/UUID.cpp (ACE_Utils): diff --git a/ace/OS.cpp b/ace/OS.cpp index d18a5bce379..ba31d83882e 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -24,18 +24,23 @@ ACE_RCSID(ace, OS, "$Id$") #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) # if defined (ACE_HAS_WINCE) -const wchar_t *ACE_OS::day_of_week_name[] = {ACE_LIB_TEXT ("Sun"), ACE_LIB_TEXT ("Mon"), - ACE_LIB_TEXT ("Tue"), ACE_LIB_TEXT ("Wed"), - ACE_LIB_TEXT ("Thu"), ACE_LIB_TEXT ("Fri"), - ACE_LIB_TEXT ("Sat")}; -const wchar_t *ACE_OS::month_name[] = {ACE_LIB_TEXT ("Jan"), ACE_LIB_TEXT ("Feb"), - ACE_LIB_TEXT ("Mar"), ACE_LIB_TEXT ("Apr"), - ACE_LIB_TEXT ("May"), ACE_LIB_TEXT ("Jun"), - ACE_LIB_TEXT ("Jul"), ACE_LIB_TEXT ("Aug"), - ACE_LIB_TEXT ("Sep"), ACE_LIB_TEXT ("Oct"), - ACE_LIB_TEXT ("Nov"), ACE_LIB_TEXT ("Dec") }; - -static const ACE_TCHAR *ACE_OS_CTIME_R_FMTSTR = ACE_LIB_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); +const wchar_t *ACE_OS::day_of_week_name[] = { + ACE_LIB_TEXT ("Sun"), ACE_LIB_TEXT ("Mon"), + ACE_LIB_TEXT ("Tue"), ACE_LIB_TEXT ("Wed"), + ACE_LIB_TEXT ("Thu"), ACE_LIB_TEXT ("Fri"), + ACE_LIB_TEXT ("Sat") +}; +const wchar_t *ACE_OS::month_name[] = { + ACE_LIB_TEXT ("Jan"), ACE_LIB_TEXT ("Feb"), + ACE_LIB_TEXT ("Mar"), ACE_LIB_TEXT ("Apr"), + ACE_LIB_TEXT ("May"), ACE_LIB_TEXT ("Jun"), + ACE_LIB_TEXT ("Jul"), ACE_LIB_TEXT ("Aug"), + ACE_LIB_TEXT ("Sep"), ACE_LIB_TEXT ("Oct"), + ACE_LIB_TEXT ("Nov"), ACE_LIB_TEXT ("Dec") +}; + +static const ACE_TCHAR *ACE_OS_CTIME_R_FMTSTR = + ACE_LIB_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); # endif /* ACE_HAS_WINCE */ # if defined (ACE_WIN32) @@ -223,9 +228,11 @@ ACE_OS_Recursive_Thread_Mutex_Guard::~ACE_OS_Recursive_Thread_Mutex_Guard () ACE_OS_Object_Manager::ACE_TSS_BASE_LOCK]); +namespace ACE_OS { + # if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) int -ACE_OS::netdb_acquire (void) +netdb_acquire (void) { return ACE_OS::thread_mutex_lock ((ACE_thread_mutex_t *) ACE_OS_Object_Manager::preallocated_object[ @@ -233,7 +240,7 @@ ACE_OS::netdb_acquire (void) } int -ACE_OS::netdb_release (void) +netdb_release (void) { return ACE_OS::thread_mutex_unlock ((ACE_thread_mutex_t *) ACE_OS_Object_Manager::preallocated_object[ @@ -246,7 +253,8 @@ ACE_OS::netdb_release (void) # define ACE_TSS_BASE_GUARD #endif /* ! ACE_MT_SAFE */ -ACE_EXIT_HOOK ACE_OS::exit_hook_ = 0; +ACE_EXIT_HOOK exit_hook_ = 0; +}; /* namespace ACE_OS */ ACE_Cleanup_Info::ACE_Cleanup_Info (void) : object_ (0), @@ -410,9 +418,11 @@ ACE_Countdown_Time::~ACE_Countdown_Time (void) this->stop (); } +namespace ACE_OS { + #if defined (ACE_HAS_POWERPC_TIMER) && defined (ghs) void -ACE_OS::readPPCTimeBase (u_long &most, u_long &least) +readPPCTimeBase (u_long &most, u_long &least) { ACE_OS_TRACE ("ACE_OS::readPPCTimeBase"); @@ -432,7 +442,7 @@ ACE_OS::readPPCTimeBase (u_long &most, u_long &least) } #elif defined (ACE_HAS_POWERPC_TIMER) && defined (__GNUG__) void -ACE_OS::readPPCTimeBase (u_long &most, u_long &least) +readPPCTimeBase (u_long &most, u_long &least) { ACE_OS_TRACE ("ACE_OS::readPPCTimeBase"); @@ -459,7 +469,7 @@ ACE_OS::readPPCTimeBase (u_long &most, u_long &least) // string literals, and some compilers, e.g., g++, don't handle those // efficiently in unused inline functions. int -ACE_OS::uname (ACE_utsname *name) +uname (ACE_utsname *name) { ACE_OS_TRACE ("ACE_OS::uname"); # if defined (ACE_WIN32) @@ -674,7 +684,7 @@ ACE_OS::uname (ACE_utsname *name) #if defined (VXWORKS) struct hostent * -ACE_OS::gethostbyname (const char *name) +gethostbyname (const char *name) { ACE_OS_TRACE ("ACE_OS::gethostbyname"); @@ -703,7 +713,7 @@ ACE_OS::gethostbyname (const char *name) } struct hostent * -ACE_OS::gethostbyaddr (const char *addr, int length, int type) +gethostbyaddr (const char *addr, int length, int type) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr"); @@ -740,9 +750,9 @@ ACE_OS::gethostbyaddr (const char *addr, int length, int type) } struct hostent * -ACE_OS::gethostbyaddr_r (const char *addr, int length, int type, - hostent *result, ACE_HOSTENT_DATA buffer, - int *h_errnop) +gethostbyaddr_r (const char *addr, int length, int type, + hostent *result, ACE_HOSTENT_DATA buffer, + int *h_errnop) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr_r"); if (length != 4 || type != AF_INET) @@ -790,9 +800,9 @@ ACE_OS::gethostbyaddr_r (const char *addr, int length, int type, } struct hostent * -ACE_OS::gethostbyname_r (const char *name, hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop) +gethostbyname_r (const char *name, hostent *result, + ACE_HOSTENT_DATA buffer, + int *h_errnop) { ACE_OS_TRACE ("ACE_OS::gethostbyname_r"); @@ -842,8 +852,8 @@ ACE_OS::gethostbyname_r (const char *name, hostent *result, int ACE_THR_JOIN_DELAY = 5; int -ACE_OS::thr_join (ACE_hthread_t thr_handle, - ACE_THR_FUNC_RETURN *status) +thr_join (ACE_hthread_t thr_handle, + ACE_THR_FUNC_RETURN *status) { // We can't get the status of the thread if (status != 0) @@ -893,9 +903,9 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, } int -ACE_OS::thr_join (ACE_thread_t waiter_id, - ACE_thread_t *thr_id, - ACE_THR_FUNC_RETURN *status) +thr_join (ACE_thread_t waiter_id, + ACE_thread_t *thr_id, + ACE_THR_FUNC_RETURN *status) { thr_id = 0; return ACE_OS::thr_join (taskNameToId (waiter_id), status); @@ -903,7 +913,7 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, #endif /* VXWORKS */ void -ACE_OS::ace_flock_t::dump (void) const +ace_flock_t::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_OS_TRACE ("ACE_OS::ace_flock_t::dump"); @@ -928,7 +938,7 @@ ACE_OS::ace_flock_t::dump (void) const } void -ACE_OS::mutex_lock_cleanup (void *mutex) +mutex_lock_cleanup (void *mutex) { ACE_OS_TRACE ("ACE_OS::mutex_lock_cleanup"); #if defined (ACE_HAS_THREADS) @@ -944,7 +954,8 @@ ACE_OS::mutex_lock_cleanup (void *mutex) } #if defined (ACE_USES_WCHAR) -void ACE_OS::checkUnicodeFormat (FILE* fp) +void +checkUnicodeFormat (FILE* fp) { if (fp != 0) { @@ -975,8 +986,8 @@ void ACE_OS::checkUnicodeFormat (FILE* fp) #if defined (ACE_WIN32) FILE * -ACE_OS::fopen (const ACE_TCHAR *filename, - const ACE_TCHAR *mode) +fopen (const ACE_TCHAR *filename, + const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fopen"); int hmode = _O_TEXT; @@ -1033,7 +1044,7 @@ ACE_OS::fopen (const ACE_TCHAR *filename, // they use varargs. int -ACE_OS::fprintf (FILE *fp, const char *format, ...) +fprintf (FILE *fp, const char *format, ...) { ACE_OS_TRACE ("ACE_OS::fprintf"); int result = 0; @@ -1046,7 +1057,7 @@ ACE_OS::fprintf (FILE *fp, const char *format, ...) #if defined (ACE_HAS_WCHAR) int -ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...) +fprintf (FILE *fp, const wchar_t *format, ...) { ACE_OS_TRACE ("ACE_OS::fprintf"); @@ -1068,7 +1079,7 @@ ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...) #endif /* ACE_HAS_WCHAR */ int -ACE_OS::printf (const char *format, ...) +printf (const char *format, ...) { ACE_OS_TRACE ("ACE_OS::printf"); int result; @@ -1080,7 +1091,7 @@ ACE_OS::printf (const char *format, ...) } int -ACE_OS::sprintf (char *buf, const char *format, ...) +sprintf (char *buf, const char *format, ...) { // ACE_OS_TRACE ("ACE_OS::sprintf"); @@ -1094,7 +1105,7 @@ ACE_OS::sprintf (char *buf, const char *format, ...) #if defined (ACE_HAS_WCHAR) int -ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) +sprintf (wchar_t *buf, const wchar_t *format, ...) { ACE_OS_TRACE ("ACE_OS::sprintf"); @@ -1132,7 +1143,7 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) #endif /* ACE_HAS_WCHAR */ int -ACE_OS::snprintf (char *buf, size_t maxlen, const char *format, ...) +snprintf (char *buf, size_t maxlen, const char *format, ...) { // ACE_OS_TRACE ("ACE_OS::snprintf"); #if defined (ACE_HAS_SNPRINTF) @@ -1169,7 +1180,7 @@ ACE_OS::snprintf (char *buf, size_t maxlen, const char *format, ...) #if defined (ACE_HAS_WCHAR) int -ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...) +snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...) { // ACE_OS_TRACE ("ACE_OS::snprintf"); #if (defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) || defined (ACE_WIN32) @@ -1209,7 +1220,7 @@ ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...) #endif /* ACE_HAS_WCHAR */ char * -ACE_OS::gets (char *str, int n) +gets (char *str, int n) { ACE_OS_TRACE ("ACE_OS::gets"); int c; @@ -1243,7 +1254,7 @@ ACE_OS::gets (char *str, int n) } int -ACE_OS::execl (const char * /* path */, const char * /* arg0 */, ...) +execl (const char * /* path */, const char * /* arg0 */, ...) { ACE_OS_TRACE ("ACE_OS::execl"); #if defined (ACE_WIN32) || defined (VXWORKS) @@ -1256,7 +1267,7 @@ ACE_OS::execl (const char * /* path */, const char * /* arg0 */, ...) } int -ACE_OS::execle (const char * /* path */, const char * /* arg0 */, ...) +execle (const char * /* path */, const char * /* arg0 */, ...) { ACE_OS_TRACE ("ACE_OS::execle"); #if defined (ACE_WIN32) || defined (VXWORKS) @@ -1269,7 +1280,7 @@ ACE_OS::execle (const char * /* path */, const char * /* arg0 */, ...) } int -ACE_OS::execlp (const char * /* file */, const char * /* arg0 */, ...) +execlp (const char * /* file */, const char * /* arg0 */, ...) { ACE_OS_TRACE ("ACE_OS::execlp"); #if defined (ACE_WIN32) || defined (VXWORKS) @@ -1282,7 +1293,7 @@ ACE_OS::execlp (const char * /* file */, const char * /* arg0 */, ...) } int -ACE_OS::scheduling_class (const char *class_name, ACE_id_t &id) +scheduling_class (const char *class_name, ACE_id_t &id) { #if defined (ACE_HAS_PRIOCNTL) // Get the priority class ID. @@ -1312,8 +1323,8 @@ ACE_OS::scheduling_class (const char *class_name, ACE_id_t &id) } int -ACE_OS::set_scheduling_params (const ACE_Sched_Params &sched_params, - ACE_id_t id) +set_scheduling_params (const ACE_Sched_Params &sched_params, + ACE_id_t id) { #if defined (ACE_HAS_PRIOCNTL) // Set priority class, priority, and quantum of this LWP or process as @@ -1407,7 +1418,7 @@ ACE_OS::set_scheduling_params (const ACE_Sched_Params &sched_params, } int -ACE_OS::thr_setprio (const ACE_Sched_Priority prio) +thr_setprio (const ACE_Sched_Priority prio) { // Set the thread priority on the current thread. ACE_hthread_t my_thread_id; @@ -1446,8 +1457,8 @@ ACE_OS::thr_setprio (const ACE_Sched_Priority prio) } int -ACE_OS::sched_params (const ACE_Sched_Params &sched_params, - ACE_id_t id) +sched_params (const ACE_Sched_Params &sched_params, + ACE_id_t id) { ACE_OS_TRACE ("ACE_OS::sched_params"); # if defined (CHORUS) @@ -1598,16 +1609,16 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, // as structures... Under no circumstances should these be given // initial values. // Note: these three objects require static construction. -ACE_thread_t ACE_OS::NULL_thread; -ACE_hthread_t ACE_OS::NULL_hthread; +ACE_thread_t NULL_thread; +ACE_hthread_t NULL_hthread; #if defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) - ACE_thread_key_t ACE_OS::NULL_key = ACE_static_cast (ACE_thread_key_t, -1); + ACE_thread_key_t NULL_key = ACE_static_cast (ACE_thread_key_t, -1); #else /* ! ACE_HAS_TSS_EMULATION */ - ACE_thread_key_t ACE_OS::NULL_key; + ACE_thread_key_t NULL_key; #endif /* ! ACE_HAS_TSS_EMULATION */ #if defined (CHORUS) -KnCap ACE_OS::actorcaps_[ACE_CHORUS_MAX_ACTORS]; +KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS]; // This is used to map an actor's id into a KnCap for killing and // waiting actors. #endif /* CHORUS */ @@ -1617,9 +1628,10 @@ KnCap ACE_OS::actorcaps_[ACE_CHORUS_MAX_ACTORS]; // = Static initialization. // Keeps track of whether we've initialized the WinSock DLL. -int ACE_OS::socket_initialized_; +int socket_initialized_; #endif /* WIN32 */ +} /* namespace ACE_OS */ #if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) @@ -2461,8 +2473,9 @@ ACE_TSS_Emulation::tss_close () #endif /* WIN32 || ACE_HAS_TSS_EMULATION */ +namespace ACE_OS { void -ACE_OS::cleanup_tss (const u_int main_thread) +cleanup_tss (const u_int main_thread) { #if defined (ACE_HAS_TSS_EMULATION) || defined (ACE_WIN32) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) // Call TSS destructors for current thread. @@ -2500,6 +2513,7 @@ ACE_OS::cleanup_tss (const u_int main_thread) #endif /* ACE_HAS_TSS_EMULATION */ } } +} /* namespace ACE_OS */ #if !defined(ACE_WIN32) && defined (__IBMCPP__) && (__IBMCPP__ >= 400) #define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ @@ -2578,16 +2592,17 @@ ace_cleanup_destroyer (ACE_Cleanup *object, void *param) object->cleanup (param); } +namespace ACE_OS { int -ACE_OS::thr_create (ACE_THR_FUNC func, - void *args, - long flags, - ACE_thread_t *thr_id, - ACE_hthread_t *thr_handle, - long priority, - void *stack, - size_t stacksize, - ACE_Base_Thread_Adapter *thread_adapter) +thr_create (ACE_THR_FUNC func, + void *args, + long flags, + ACE_thread_t *thr_id, + ACE_hthread_t *thr_handle, + long priority, + void *stack, + size_t stacksize, + ACE_Base_Thread_Adapter *thread_adapter) { ACE_OS_TRACE ("ACE_OS::thr_create"); @@ -3439,7 +3454,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, } void -ACE_OS::thr_exit (ACE_THR_FUNC_RETURN status) +thr_exit (ACE_THR_FUNC_RETURN status) { ACE_OS_TRACE ("ACE_OS::thr_exit"); #if defined (ACE_HAS_THREADS) @@ -3514,7 +3529,7 @@ ACE_OS::thr_exit (ACE_THR_FUNC_RETURN status) } int -ACE_OS::lwp_getparams (ACE_Sched_Params &sched_params) +lwp_getparams (ACE_Sched_Params &sched_params) { # if defined (ACE_HAS_STHREADS) || defined (sun) // Get the class TS and RT class IDs. @@ -3572,7 +3587,7 @@ ACE_OS::lwp_getparams (ACE_Sched_Params &sched_params) } int -ACE_OS::lwp_setparams (const ACE_Sched_Params &sched_params) +lwp_setparams (const ACE_Sched_Params &sched_params) { # if defined (ACE_HAS_STHREADS) || defined (sun) ACE_Sched_Params lwp_params (sched_params); @@ -3586,7 +3601,7 @@ ACE_OS::lwp_setparams (const ACE_Sched_Params &sched_params) # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) int -ACE_OS::thr_setspecific (ACE_OS_thread_key_t key, void *data) +thr_setspecific (ACE_OS_thread_key_t key, void *data) { // ACE_OS_TRACE ("ACE_OS::thr_setspecific"); # if defined (ACE_HAS_THREADS) @@ -3617,7 +3632,7 @@ ACE_OS::thr_setspecific (ACE_OS_thread_key_t key, void *data) # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ int -ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data) +thr_setspecific (ACE_thread_key_t key, void *data) { // ACE_OS_TRACE ("ACE_OS::thr_setspecific"); #if defined (ACE_HAS_THREADS) @@ -3683,7 +3698,7 @@ ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data) } int -ACE_OS::thr_keyfree (ACE_thread_key_t key) +thr_keyfree (ACE_thread_key_t key) { ACE_OS_TRACE ("ACE_OS::thr_keyfree"); # if defined (ACE_HAS_THREADS) @@ -3723,7 +3738,7 @@ ACE_OS::thr_keyfree (ACE_thread_key_t key) # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) int -ACE_OS::thr_keycreate (ACE_OS_thread_key_t *key, +thr_keycreate (ACE_OS_thread_key_t *key, # if defined (ACE_HAS_THR_C_DEST) ACE_THR_C_DEST dest, # else @@ -3778,13 +3793,13 @@ ACE_OS::thr_keycreate (ACE_OS_thread_key_t *key, # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ int -ACE_OS::thr_keycreate (ACE_thread_key_t *key, +thr_keycreate (ACE_thread_key_t *key, # if defined (ACE_HAS_THR_C_DEST) - ACE_THR_C_DEST dest, + ACE_THR_C_DEST dest, # else - ACE_THR_DEST dest, + ACE_THR_DEST dest, # endif /* ACE_HAS_THR_C_DEST */ - void *inst) + void *inst) { // ACE_OS_TRACE ("ACE_OS::thr_keycreate"); #if defined (ACE_HAS_THREADS) @@ -3867,7 +3882,7 @@ ACE_OS::thr_keycreate (ACE_thread_key_t *key, } int -ACE_OS::thr_key_used (ACE_thread_key_t key) +thr_key_used (ACE_thread_key_t key) { # if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) ACE_TSS_Cleanup::instance ()->key_used (key); @@ -3879,7 +3894,7 @@ ACE_OS::thr_key_used (ACE_thread_key_t key) } int -ACE_OS::thr_key_detach (void *inst) +thr_key_detach (void *inst) { # if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) if (ACE_TSS_Cleanup::lockable ()) @@ -3897,9 +3912,9 @@ ACE_OS::thr_key_detach (void *inst) } void -ACE_OS::unique_name (const void *object, - ACE_TCHAR *name, - size_t length) +unique_name (const void *object, + ACE_TCHAR *name, + size_t length) { // The process ID will provide uniqueness between processes on the // same machine. The "this" pointer of the will provide @@ -3917,9 +3932,9 @@ ACE_OS::unique_name (const void *object, } int -ACE_OS::argv_to_string (ACE_TCHAR **argv, - ACE_TCHAR *&buf, - int substitute_env_args) +argv_to_string (ACE_TCHAR **argv, + ACE_TCHAR *&buf, + int substitute_env_args) { if (argv == 0 || argv[0] == 0) return 0; @@ -3984,10 +3999,10 @@ ACE_OS::argv_to_string (ACE_TCHAR **argv, } int -ACE_OS::string_to_argv (ACE_TCHAR *buf, - int &argc, - ACE_TCHAR **&argv, - int substitute_env_args) +string_to_argv (ACE_TCHAR *buf, + int &argc, + ACE_TCHAR **&argv, + int substitute_env_args) { // Reset the number of arguments argc = 0; @@ -4116,7 +4131,7 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf, // separated by spaces. pid_t -ACE_OS::fork_exec (ACE_TCHAR *argv[]) +fork_exec (ACE_TCHAR *argv[]) { # if defined (ACE_WIN32) ACE_TCHAR *buf; @@ -4194,10 +4209,10 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) } ssize_t -ACE_OS::read_n (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bt) +read_n (ACE_HANDLE handle, + void *buf, + size_t len, + size_t *bt) { size_t temp; size_t &bytes_transferred = bt == 0 ? temp : *bt; @@ -4222,10 +4237,10 @@ ACE_OS::read_n (ACE_HANDLE handle, // system call on UNIX and the call on Win32). ssize_t -ACE_OS::write_n (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bt) +write_n (ACE_HANDLE handle, + const void *buf, + size_t len, + size_t *bt) { size_t temp; size_t &bytes_transferred = bt == 0 ? temp : *bt; @@ -4252,7 +4267,7 @@ ACE_OS::write_n (ACE_HANDLE handle, // thread-safe. int -ACE_OS::writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) +writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) { ACE_OS_TRACE ("ACE_OS::writev_emulation"); @@ -4298,9 +4313,9 @@ ACE_OS::writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) // thread-safe. ssize_t -ACE_OS::readv_emulation (ACE_HANDLE handle, - ACE_READV_TYPE *iov, - int n) +readv_emulation (ACE_HANDLE handle, + ACE_READV_TYPE *iov, + int n) { ACE_OS_TRACE ("ACE_OS::readv_emulation"); @@ -4366,7 +4381,7 @@ ftruncate (ACE_HANDLE handle, long len) # if defined (ACE_LACKS_MKTEMP) ACE_TCHAR * -ACE_OS::mktemp (ACE_TCHAR *s) +mktemp (ACE_TCHAR *s) { ACE_OS_TRACE ("ACE_OS::mktemp"); if (s == 0) @@ -4415,7 +4430,7 @@ ACE_OS::mktemp (ACE_TCHAR *s) # endif /* ACE_LACKS_MKTEMP */ int -ACE_OS::socket_init (int version_high, int version_low) +socket_init (int version_high, int version_low) { # if defined (ACE_WIN32) if (ACE_OS::socket_initialized_ == 0) @@ -4449,7 +4464,7 @@ ACE_OS::socket_init (int version_high, int version_low) } int -ACE_OS::socket_fini (void) +socket_fini (void) { # if defined (ACE_WIN32) if (ACE_OS::socket_initialized_ != 0) @@ -4715,6 +4730,7 @@ spaef (FUNCPTR entry, ...) return ret; } # endif /* VXWORKS */ +} /* namespace ACE_OS */ # if !defined (ACE_HAS_SIGINFO_T) siginfo_t::siginfo_t (ACE_HANDLE handle) @@ -4730,8 +4746,9 @@ siginfo_t::siginfo_t (ACE_HANDLE *handles) } # endif /* ACE_HAS_SIGINFO_T */ +namespace ACE_OS { pid_t -ACE_OS::fork (const ACE_TCHAR *program_name) +fork (const ACE_TCHAR *program_name) { ACE_OS_TRACE ("ACE_OS::fork"); # if defined (ACE_LACKS_FORK) @@ -4753,6 +4770,7 @@ ACE_OS::fork (const ACE_TCHAR *program_name) return pid; # endif /* ACE_WIN32 */ } +} /* namespace ACE_OS */ void ACE_Cleanup::cleanup (void *) @@ -4889,10 +4907,11 @@ ACE_Thread_ID::operator!= (const ACE_Thread_ID &rhs) const return !(*this == rhs); } +namespace ACE_OS { // All other platforms have this inlined in OS.i #if defined (ACE_PSOS) char * -ACE_OS::inet_ntoa (const struct in_addr addr) +inet_ntoa (const struct in_addr addr) { ACE_OS_TRACE ("ACE_OS::inet_ntoa"); @@ -4909,7 +4928,7 @@ ACE_OS::inet_ntoa (const struct in_addr addr) #endif /* defined (ACE_PSOS) */ int -ACE_OS::inet_aton (const char *host_name, struct in_addr *addr) +inet_aton (const char *host_name, struct in_addr *addr) { #if defined (ACE_LACKS_INET_ATON) ACE_UINT32 ip_addr = ACE_OS::inet_addr (host_name); @@ -4940,7 +4959,7 @@ ACE_OS::inet_aton (const char *host_name, struct in_addr *addr) } struct tm * -ACE_OS::localtime_r (const time_t *t, struct tm *res) +localtime_r (const time_t *t, struct tm *res) { ACE_OS_TRACE ("ACE_OS::localtime_r"); #if defined (ACE_HAS_REENTRANT_FUNCTIONS) @@ -5023,10 +5042,10 @@ ACE_OS::localtime_r (const time_t *t, struct tm *res) } ssize_t -ACE_OS::pread (ACE_HANDLE handle, - void *buf, - size_t nbytes, - off_t offset) +pread (ACE_HANDLE handle, + void *buf, + size_t nbytes, + off_t offset) { # if defined (ACE_HAS_P_READ_WRITE) # if defined (ACE_WIN32) @@ -5148,10 +5167,10 @@ ACE_OS::pread (ACE_HANDLE handle, } ssize_t -ACE_OS::pwrite (ACE_HANDLE handle, - const void *buf, - size_t nbytes, - off_t offset) +pwrite (ACE_HANDLE handle, + const void *buf, + size_t nbytes, + off_t offset) { # if defined (ACE_HAS_P_READ_WRITE) # if defined (ACE_WIN32) @@ -5267,10 +5286,10 @@ ACE_OS::pwrite (ACE_HANDLE handle, } ACE_HANDLE -ACE_OS::open (const char *filename, - int mode, - int perms, - LPSECURITY_ATTRIBUTES sa) +open (const char *filename, + int mode, + int perms, + LPSECURITY_ATTRIBUTES sa) { ACE_OS_TRACE ("ACE_OS::open"); @@ -5415,10 +5434,10 @@ ACE_OS::open (const char *filename, #if defined (ACE_HAS_WCHAR) ACE_HANDLE -ACE_OS::open (const wchar_t *filename, - int mode, - int perms, - LPSECURITY_ATTRIBUTES sa) +open (const wchar_t *filename, + int mode, + int perms, + LPSECURITY_ATTRIBUTES sa) { #if defined (ACE_WIN32) // @@ (brunsch) Yuck, maybe there is a way to combine the code @@ -5512,7 +5531,7 @@ ACE_OS::open (const wchar_t *filename, # if defined (ACE_LACKS_DIFFTIME) double -ACE_OS::difftime (time_t t1, time_t t0) +difftime (time_t t1, time_t t0) { /* return t1 - t0 in seconds */ struct tm tms[2], *ptms[2], temp; @@ -5645,7 +5664,7 @@ ACE_OS::difftime (time_t t1, time_t t0) # if defined (ACE_HAS_WINCE) ACE_TCHAR * -ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) +ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) { // buflen must be at least 26 wchar_t long. if (buflen < 26) // Again, 26 is a magic number. @@ -5680,7 +5699,7 @@ ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) # endif /* ACE_HAS_WINCE */ time_t -ACE_OS::mktime (struct tm *t) +mktime (struct tm *t) { ACE_OS_TRACE ("ACE_OS::mktime"); # if defined (ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME) @@ -5711,10 +5730,10 @@ ACE_OS::mktime (struct tm *t) # if !defined (ACE_HAS_THREADS) || defined (ACE_LACKS_RWLOCK_T) int -ACE_OS::rwlock_init (ACE_rwlock_t *rw, - int type, - const ACE_TCHAR *name, - void *arg) +rwlock_init (ACE_rwlock_t *rw, + int type, + const ACE_TCHAR *name, + void *arg) { // ACE_OS_TRACE ("ACE_OS::rwlock_init"); # if defined (ACE_HAS_THREADS) && defined (ACE_LACKS_RWLOCK_T) @@ -5790,7 +5809,7 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw, // to avoid use before definition if they were inline. int -ACE_OS::cond_destroy (ACE_cond_t *cv) +cond_destroy (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_destroy"); # if defined (ACE_HAS_THREADS) @@ -5810,39 +5829,39 @@ ACE_OS::cond_destroy (ACE_cond_t *cv) // @@ The following functions could be inlined if i could figure where // to put it among the #ifdefs! int -ACE_OS::condattr_init (ACE_condattr_t &attributes, - int type) +condattr_init (ACE_condattr_t &attributes, + int type) { attributes.type = type; return 0; } int -ACE_OS::condattr_destroy (ACE_condattr_t &) +condattr_destroy (ACE_condattr_t &) { return 0; } int -ACE_OS::cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const char *name, void *arg) +cond_init (ACE_cond_t *cv, + ACE_condattr_t &attributes, + const char *name, void *arg) { return ACE_OS::cond_init (cv, attributes.type, name, arg); } #if defined (ACE_HAS_WCHAR) int -ACE_OS::cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const wchar_t *name, void *arg) +cond_init (ACE_cond_t *cv, + ACE_condattr_t &attributes, + const wchar_t *name, void *arg) { return ACE_OS::cond_init (cv, attributes.type, name, arg); } #endif /* ACE_HAS_WCHAR */ int -ACE_OS::cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) +cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) { ACE_OS_TRACE ("ACE_OS::cond_init"); # if defined (ACE_HAS_THREADS) @@ -5872,7 +5891,7 @@ ACE_OS::cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) #if defined (ACE_HAS_WCHAR) int -ACE_OS::cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) +cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) { ACE_OS_TRACE ("ACE_OS::cond_init"); # if defined (ACE_HAS_THREADS) @@ -5902,7 +5921,7 @@ ACE_OS::cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) #endif /* ACE_HAS_WCHAR */ int -ACE_OS::cond_signal (ACE_cond_t *cv) +cond_signal (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_signal"); # if defined (ACE_HAS_THREADS) @@ -5927,7 +5946,7 @@ ACE_OS::cond_signal (ACE_cond_t *cv) } int -ACE_OS::cond_broadcast (ACE_cond_t *cv) +cond_broadcast (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_broadcast"); # if defined (ACE_HAS_THREADS) @@ -5974,8 +5993,8 @@ ACE_OS::cond_broadcast (ACE_cond_t *cv) } int -ACE_OS::cond_wait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex) +cond_wait (ACE_cond_t *cv, + ACE_mutex_t *external_mutex) { ACE_OS_TRACE ("ACE_OS::cond_wait"); # if defined (ACE_HAS_THREADS) @@ -6068,9 +6087,9 @@ ACE_OS::cond_wait (ACE_cond_t *cv, } int -ACE_OS::cond_timedwait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex, - ACE_Time_Value *timeout) +cond_timedwait (ACE_cond_t *cv, + ACE_mutex_t *external_mutex, + ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::cond_timedwait"); # if defined (ACE_HAS_THREADS) @@ -6256,9 +6275,9 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, # if defined (ACE_HAS_WTHREADS) int -ACE_OS::cond_timedwait (ACE_cond_t *cv, - ACE_thread_mutex_t *external_mutex, - ACE_Time_Value *timeout) +cond_timedwait (ACE_cond_t *cv, + ACE_thread_mutex_t *external_mutex, + ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::cond_timedwait"); # if defined (ACE_HAS_THREADS) @@ -6349,8 +6368,8 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, } int -ACE_OS::cond_wait (ACE_cond_t *cv, - ACE_thread_mutex_t *external_mutex) +cond_wait (ACE_cond_t *cv, + ACE_thread_mutex_t *external_mutex) { ACE_OS_TRACE ("ACE_OS::cond_wait"); # if defined (ACE_HAS_THREADS) @@ -6421,7 +6440,7 @@ ACE_OS::cond_wait (ACE_cond_t *cv, #endif /* ACE_LACKS_COND_T */ void -ACE_OS::exit (int status) +exit (int status) { ACE_OS_TRACE ("ACE_OS::exit"); @@ -6448,6 +6467,8 @@ ACE_OS::exit (int status) #endif /* ACE_HAS_WINCE */ } +} /* namespace ACE_OS */ + # if defined (ACE_PSOS) // bit masks and shifts for prying info out of the pSOS time encoding @@ -7110,6 +7131,7 @@ ACE_OS_Object_Manager_Manager::~ACE_OS_Object_Manager_Manager (void) static ACE_OS_Object_Manager_Manager ACE_OS_Object_Manager_Manager_instance; #endif /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER */ +namespace ACE_OS { // You may be asking yourself, why are we doing this? Well, in winbase.h, // MS didn't follow their normal Api_FunctionA and Api_FunctionW style, // so we have to #undef their define to get access to the unicode version. @@ -7120,7 +7142,7 @@ static ACE_OS_Object_Manager_Manager ACE_OS_Object_Manager_Manager_instance; #endif /* ACE_WIN32 && UNICODE !ACE_USES_TCHAR */ ACE_TCHAR * -ACE_OS::getenvstrings (void) +getenvstrings (void) { #if defined (ACE_LACKS_ENV) ACE_NOTSUP_RETURN (0); @@ -7137,7 +7159,7 @@ ACE_OS::getenvstrings (void) #if defined (ACE_HAS_STRPTIME) char * -ACE_OS::strptime (char *buf, const char *format, struct tm *tm) +strptime (char *buf, const char *format, struct tm *tm) { #if !defined (ACE_HAS_WINCE) #if defined (ACE_LACKS_NATIVE_STRPTIME) @@ -7379,12 +7401,12 @@ ACE_OS::strptime (char *buf, const char *format, struct tm *tm) # if defined (ACE_LACKS_NATIVE_STRPTIME) int -ACE_OS::strptime_getnum (char *buf, - int *num, - int *bi, - int *fi, - int min, - int max) +strptime_getnum (char *buf, + int *num, + int *bi, + int *fi, + int min, + int max) { int i = 0, tmp = 0; @@ -7413,10 +7435,10 @@ ACE_OS::strptime_getnum (char *buf, #if !defined (ACE_HAS_WINCE) ACE_HANDLE -ACE_OS::accept (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen, - const ACE_Accept_QoS_Params &qos_params) +accept (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen, + const ACE_Accept_QoS_Params &qos_params) { # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) ACE_SOCKCALL_RETURN (::WSAAccept ((ACE_SOCKET) handle, @@ -7435,10 +7457,10 @@ ACE_OS::accept (ACE_HANDLE handle, } ACE_HANDLE -ACE_OS::join_leaf (ACE_HANDLE socket, - const sockaddr *name, - int namelen, - const ACE_QoS_Params &qos_params) +join_leaf (ACE_HANDLE socket, + const sockaddr *name, + int namelen, + const ACE_QoS_Params &qos_params) { # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -7470,15 +7492,15 @@ ACE_OS::join_leaf (ACE_HANDLE socket, } int -ACE_OS::ioctl (ACE_HANDLE socket, - u_long io_control_code, - void *in_buffer_p, - u_long in_buffer, - void *out_buffer_p, - u_long out_buffer, - u_long *bytes_returned, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func) +ioctl (ACE_HANDLE socket, + u_long io_control_code, + void *in_buffer_p, + u_long in_buffer, + void *out_buffer_p, + u_long out_buffer, + u_long *bytes_returned, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) { # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) ACE_SOCKCALL_RETURN (::WSAIoctl ((ACE_SOCKET) socket, @@ -7508,14 +7530,14 @@ ACE_OS::ioctl (ACE_HANDLE socket, int -ACE_OS::ioctl (ACE_HANDLE socket, - u_long io_control_code, - ACE_QoS &ace_qos, - u_long *bytes_returned, - void *buffer_p, - u_long buffer, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func) +ioctl (ACE_HANDLE socket, + u_long io_control_code, + ACE_QoS &ace_qos, + u_long *bytes_returned, + void *buffer_p, + u_long buffer, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) { # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -7652,10 +7674,10 @@ ACE_OS::ioctl (ACE_HANDLE socket, } int -ACE_OS::connect (ACE_HANDLE handle, - const sockaddr *addr, - int addrlen, - const ACE_QoS_Params &qos_params) +connect (ACE_HANDLE handle, + const sockaddr *addr, + int addrlen, + const ACE_QoS_Params &qos_params) { ACE_OS_TRACE ("ACE_OS::connect"); # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -7677,7 +7699,7 @@ ACE_OS::connect (ACE_HANDLE handle, #endif // ACE_HAS_WINCE long -ACE_OS::num_processors (void) +num_processors (void) { ACE_OS_TRACE ("ACE_OS::num_processors"); @@ -7693,7 +7715,7 @@ ACE_OS::num_processors (void) } long -ACE_OS::num_processors_online (void) +num_processors_online (void) { ACE_OS_TRACE ("ACE_OS::num_processors_online"); @@ -7721,7 +7743,7 @@ ACE_OS::num_processors_online (void) #endif int -ACE_OS::getmacaddress (struct macaddr_node_t *node) +getmacaddress (struct macaddr_node_t *node) { ACE_OS_TRACE ("ACE_OS::getmacaddress"); @@ -7871,3 +7893,5 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) ACE_NOTSUP_RETURN (-1); #endif } + +}; /* namespace ACE_OS */ diff --git a/ace/OS.h b/ace/OS.h index fcf875c0699..844cf8d9126 100644 --- a/ace/OS.h +++ b/ace/OS.h @@ -792,7 +792,6 @@ public: class ACE_OS_Export ACE_cond_t { public: - friend class ACE_OS; /// Returns the number of waiters. long waiters (void) const; @@ -854,7 +853,6 @@ struct ACE_OS_Export ACE_mutexattr_t struct ACE_OS_Export ACE_rwlock_t { protected: - friend class ACE_OS; ACE_mutex_t lock_; // Serialize access to internal state. @@ -1089,8 +1087,6 @@ typedef unsigned int ACE_thread_key_t; // Wrapper for NT events on pSOS. class ACE_OS_Export ACE_event_t { - friend class ACE_OS; - protected: /// Protect critical section. @@ -1290,32 +1286,6 @@ typedef ACE_UINT64 ACE_hrtime_t; // The "null" device on UNIX. # define ACE_DEV_NULL "/dev/null" -/** - * @class ACE_event_t - * - * @brief Wrapper for NT events on UNIX. - */ -class ACE_OS_Export ACE_event_t -{ - friend class ACE_OS; -protected: - /// Protect critical section. - ACE_mutex_t lock_; - - /// Keeps track of waiters. - ACE_cond_t condition_; - - /// Specifies if this is an auto- or manual-reset event. - int manual_reset_; - - /// "True" if signaled. - int is_signaled_; - - /// Number of waiting threads. - unsigned long waiting_threads_; -}; - - # if defined (ACE_VXWORKS) && ACE_VXWORKS <= 0x540 // Work around a lack of ANSI prototypes for these functions on VxWorks. unsigned long inet_addr (const char *); @@ -2170,10 +2140,13 @@ typedef u_long ACE_SOCK_GROUP; #endif /* (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */ +// forward decl's +class ACE_event_t; + /** - * @class ACE_OS + * @namespace ACE_OS * - * @brief This class defines an OS independent programming API that + * @brief This namespace defines an OS independent programming API that * shields developers from nonportable aspects of writing * efficient system programs on Win32, POSIX and other versions * of UNIX, and various real-time operating systems. @@ -2187,17 +2160,8 @@ typedef u_long ACE_SOCK_GROUP; * in this directory for complete information on the meaning of * the various macros. */ -class ACE_OS_Export ACE_OS - : public ACE_OS_Dirent, - public ACE_OS_String, - public ACE_OS_Memory, - public ACE_OS_TLI +namespace ACE_OS { - - ACE_CLASS_IS_NAMESPACE (ACE_OS); -public: - friend class ACE_Timeout_Manager; - # if defined (CHORUS) && !defined (CHORUS_4) // We must format this code as follows to avoid confusing OSE. enum ACE_HRTimer_Op @@ -2249,27 +2213,27 @@ public: # if defined (ACE_WIN32) // = Default Win32 Security Attributes definition. - static LPSECURITY_ATTRIBUTES default_win32_security_attributes (LPSECURITY_ATTRIBUTES); + LPSECURITY_ATTRIBUTES default_win32_security_attributes (LPSECURITY_ATTRIBUTES); // = Win32 OS version determination function. /// Return the win32 OSVERSIONINFO structure. - static const OSVERSIONINFO &get_win32_versioninfo (void); + const OSVERSIONINFO &get_win32_versioninfo (void); // = A pair of functions for modifying ACE's Win32 resource usage. /// Return the handle of the module containing ACE's resources. By /// default, for a DLL build of ACE this is a handle to the ACE DLL /// itself, and for a static build it is a handle to the executable. - static HINSTANCE get_win32_resource_module (void); + HINSTANCE get_win32_resource_module (void); /// Allow an application to modify which module contains ACE's /// resources. This is mainly useful for a static build of ACE where /// the required resources reside somewhere other than the executable. - static void set_win32_resource_module (HINSTANCE); + void set_win32_resource_module (HINSTANCE); # endif /* ACE_WIN32 */ // = A set of wrappers for miscellaneous operations. - static int atoi (const char *s); + int atoi (const char *s); struct macaddr_node_t { unsigned char node[6]; @@ -2278,84 +2242,84 @@ public: /** * Get the first adapter found on the machine. */ - static int getmacaddress (struct macaddr_node_t *node); + int getmacaddress (struct macaddr_node_t *node); # if defined (ACE_HAS_WCHAR) - static int atoi (const wchar_t *s); + int atoi (const wchar_t *s); # endif /* ACE_HAS_WCHAR */ #if defined (atop) #undef atop #endif /* atop */ - static void *atop (const char *s); + void *atop (const char *s); # if defined (ACE_HAS_WCHAR) - static void *atop (const wchar_t *s); + void *atop (const wchar_t *s); # endif /* ACE_HAS_WCHAR */ /// This method computes the largest integral value not greater than x. - static double floor (double x); + double floor (double x); /// This method computes the smallest integral value not less than x. - static double ceil (double x); + double ceil (double x); - static char *getenv (const char *symbol); + char *getenv (const char *symbol); # if defined (ACE_HAS_WCHAR) && defined (ACE_WIN32) - static wchar_t *getenv (const wchar_t *symbol); + wchar_t *getenv (const wchar_t *symbol); # endif /* ACE_HAS_WCHAR && ACE_WIN32 */ - static int putenv (const ACE_TCHAR *string); - static ACE_TCHAR *strenvdup (const ACE_TCHAR *str); - static ACE_TCHAR *getenvstrings (void); - - static int getopt (int argc, - char *const *argv, - const char *optstring); - static int argv_to_string (ACE_TCHAR **argv, - ACE_TCHAR *&buf, - int substitute_env_args = 1); - static int string_to_argv (ACE_TCHAR *buf, - int &argc, - ACE_TCHAR **&argv, - int substitute_env_args = 1); - static long sysconf (int); + int putenv (const ACE_TCHAR *string); + ACE_TCHAR *strenvdup (const ACE_TCHAR *str); + ACE_TCHAR *getenvstrings (void); + + int getopt (int argc, + char *const *argv, + const char *optstring); + int argv_to_string (ACE_TCHAR **argv, + ACE_TCHAR *&buf, + int substitute_env_args = 1); + int string_to_argv (ACE_TCHAR *buf, + int &argc, + ACE_TCHAR **&argv, + int substitute_env_args = 1); + long sysconf (int); //@{ @name A set of wrappers for condition variables. - static int condattr_init (ACE_condattr_t &attributes, - int type = ACE_DEFAULT_SYNCH_TYPE); - static int condattr_destroy (ACE_condattr_t &attributes); - static int cond_broadcast (ACE_cond_t *cv); - static int cond_destroy (ACE_cond_t *cv); - static int cond_init (ACE_cond_t *cv, - short type = ACE_DEFAULT_SYNCH_TYPE, - const char *name = 0, - void *arg = 0); - static int cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const char *name = 0, - void *arg = 0); + int condattr_init (ACE_condattr_t &attributes, + int type = ACE_DEFAULT_SYNCH_TYPE); + int condattr_destroy (ACE_condattr_t &attributes); + int cond_broadcast (ACE_cond_t *cv); + int cond_destroy (ACE_cond_t *cv); + int cond_init (ACE_cond_t *cv, + short type = ACE_DEFAULT_SYNCH_TYPE, + const char *name = 0, + void *arg = 0); + int cond_init (ACE_cond_t *cv, + ACE_condattr_t &attributes, + const char *name = 0, + void *arg = 0); # if defined (ACE_HAS_WCHAR) - static int cond_init (ACE_cond_t *cv, - short type, - const wchar_t *name, - void *arg = 0); - static int cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const wchar_t *name, - void *arg = 0); + int cond_init (ACE_cond_t *cv, + short type, + const wchar_t *name, + void *arg = 0); + int cond_init (ACE_cond_t *cv, + ACE_condattr_t &attributes, + const wchar_t *name, + void *arg = 0); # endif /* ACE_HAS_WCHAR */ - static int cond_signal (ACE_cond_t *cv); - static int cond_timedwait (ACE_cond_t *cv, - ACE_mutex_t *m, - ACE_Time_Value *); - static int cond_wait (ACE_cond_t *cv, - ACE_mutex_t *m); + int cond_signal (ACE_cond_t *cv); + int cond_timedwait (ACE_cond_t *cv, + ACE_mutex_t *m, + ACE_Time_Value *); + int cond_wait (ACE_cond_t *cv, + ACE_mutex_t *m); # if defined (ACE_WIN32) && defined (ACE_HAS_WTHREADS) - static int cond_timedwait (ACE_cond_t *cv, - ACE_thread_mutex_t *m, - ACE_Time_Value *); - static int cond_wait (ACE_cond_t *cv, - ACE_thread_mutex_t *m); + int cond_timedwait (ACE_cond_t *cv, + ACE_thread_mutex_t *m, + ACE_Time_Value *); + int cond_wait (ACE_cond_t *cv, + ACE_thread_mutex_t *m); # endif /* ACE_WIN32 && ACE_HAS_WTHREADS */ //@} @@ -2365,82 +2329,82 @@ public: #if defined(cuserid) # undef cuserid #endif /* cuserid */ - static char *cuserid (char *user, - size_t maxlen = ACE_MAX_USERID); + char *cuserid (char *user, + size_t maxlen = ACE_MAX_USERID); # if defined (ACE_HAS_WCHAR) - static wchar_t *cuserid (wchar_t *user, - size_t maxlen = ACE_MAX_USERID); + wchar_t *cuserid (wchar_t *user, + size_t maxlen = ACE_MAX_USERID); # endif /* ACE_HAS_WCHAR */ # endif /* ACE_LACKS_CUSERID */ //@} //@{ @name Wrappers to obtain configuration info - static int uname (ACE_utsname *name); - static long sysinfo (int cmd, - char *buf, - long count); - static int hostname (char *name, - size_t maxnamelen); + int uname (ACE_utsname *name); + long sysinfo (int cmd, + char *buf, + long count); + int hostname (char *name, + size_t maxnamelen); #if defined (ACE_HAS_WCHAR) - static int hostname (wchar_t *name, - size_t maxnamelen); + int hostname (wchar_t *name, + size_t maxnamelen); #endif /* ACE_HAS_WCHAR */ //@} //@{ @name A set of wrappers for explicit dynamic linking. - static int dlclose (ACE_SHLIB_HANDLE handle); + int dlclose (ACE_SHLIB_HANDLE handle); - static ACE_TCHAR *dlerror (void); - static ACE_SHLIB_HANDLE dlopen (const ACE_TCHAR *filename, - int mode = ACE_DEFAULT_SHLIB_MODE); - static void *dlsym (ACE_SHLIB_HANDLE handle, - const ACE_TCHAR *symbol); + ACE_TCHAR *dlerror (void); + ACE_SHLIB_HANDLE dlopen (const ACE_TCHAR *filename, + int mode = ACE_DEFAULT_SHLIB_MODE); + void *dlsym (ACE_SHLIB_HANDLE handle, + const ACE_TCHAR *symbol); //@} //@{ @name A set of wrappers for stdio file operations. - static int last_error (void); - static void last_error (int); - static int set_errno_to_last_error (void); - static int set_errno_to_wsa_last_error (void); - static int fclose (FILE *fp); - static int fcntl (ACE_HANDLE handle, - int cmd, - long arg = 0); - static int fdetach (const char *file); - - static int fsync (ACE_HANDLE handle); + int last_error (void); + void last_error (int); + int set_errno_to_last_error (void); + int set_errno_to_wsa_last_error (void); + int fclose (FILE *fp); + int fcntl (ACE_HANDLE handle, + int cmd, + long arg = 0); + int fdetach (const char *file); + + int fsync (ACE_HANDLE handle); # if defined (ACE_USES_WCHAR) // If fp points to the Unicode format file, the file pointer will be moved right next // to the Unicode header (2 types). Otherwise, file pointer will be at the beginning. - static void checkUnicodeFormat (FILE* fp); + void checkUnicodeFormat (FILE* fp); # endif // ACE_USES_WCHAR - static FILE *fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode); - static FILE *freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream); + FILE *fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode); + FILE *freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream); # if defined (fdopen) # undef fdopen # endif /* fdopen */ - static FILE *fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode); - static ACE_TCHAR *fgets (ACE_TCHAR *buf, int size, FILE *fp); - static int stat (const ACE_TCHAR *file, ACE_stat *); - static int truncate (const ACE_TCHAR *filename, off_t length); - - static int fprintf (FILE *fp, const char *format, ...); - static int sprintf (char *buf, const char *format, ...); - static int snprintf (char *buf, size_t maxlen, const char *format, ...); - static int vsprintf (char *buffer, const char *format, va_list argptr); - static int printf (const char *format, ...); + FILE *fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode); + ACE_TCHAR *fgets (ACE_TCHAR *buf, int size, FILE *fp); + int stat (const ACE_TCHAR *file, ACE_stat *); + int truncate (const ACE_TCHAR *filename, off_t length); + + int fprintf (FILE *fp, const char *format, ...); + int sprintf (char *buf, const char *format, ...); + int snprintf (char *buf, size_t maxlen, const char *format, ...); + int vsprintf (char *buffer, const char *format, va_list argptr); + int printf (const char *format, ...); # if defined (ACE_HAS_WCHAR) - static int sprintf (wchar_t *buf, const wchar_t *format, ...); - static int snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format,...); - static int fprintf (FILE *fp, const wchar_t *format, ...); - static int vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr); + int sprintf (wchar_t *buf, const wchar_t *format, ...); + int snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format,...); + int fprintf (FILE *fp, const wchar_t *format, ...); + int vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr); # endif /* ACE_HAS_WCHAR */ - static void perror (const ACE_TCHAR *s); + void perror (const ACE_TCHAR *s); // The old gets () which directly maps to the evil, unprotected // gets () has been deprecated. If you really need gets (), @@ -2451,25 +2415,25 @@ public: // Otherwise, reads up to n-1 bytes (not including the newline), // then swallows rest up to newline // then swallows newline - static char *gets (char *str, int n = 0); - static int puts (const ACE_TCHAR *s); - static int fputs (const ACE_TCHAR *s, - FILE *stream); + char *gets (char *str, int n = 0); + int puts (const ACE_TCHAR *s); + int fputs (const ACE_TCHAR *s, + FILE *stream); - static int fflush (FILE *fp); - static size_t fread (void *ptr, - size_t size, - size_t nelems, - FILE *fp); + int fflush (FILE *fp); + size_t fread (void *ptr, + size_t size, + size_t nelems, + FILE *fp); - static int fgetc (FILE* fp); + int fgetc (FILE* fp); #if !defined (ACE_LACKS_CLEARERR) #if defined (clearerr) #define __ace_clearerr clearerr #undef clearerr #endif /* defined (clearerr) */ - static void clearerr (FILE* fp); + void clearerr (FILE* fp); #if defined (clearerr) #define clearerr __ace_clearerr #undef __ace_clearerr @@ -2477,118 +2441,118 @@ public: #endif /* !ACE_LACKS_CLEARERR */ #if defined (ACE_HAS_WCHAR) - static wint_t fgetwc (FILE* fp); - static wint_t ungetwc (wint_t c, FILE* fp); + wint_t fgetwc (FILE* fp); + wint_t ungetwc (wint_t c, FILE* fp); #endif /* ACE_HAS_WCHAR */ - static int fseek (FILE *fp, - long offset, - int ptrname); - static long ftell (FILE* fp); - static int fgetpos (FILE* fp, fpos_t* pos); - static int fsetpos (FILE* fp, fpos_t* pos); - static int fstat (ACE_HANDLE, - ACE_stat *); - static int lstat (const char *, - ACE_stat *); - static int ftruncate (ACE_HANDLE, - off_t); - static size_t fwrite (const void *ptr, - size_t size, - size_t nitems, - FILE *fp); - static void rewind (FILE *fp); + int fseek (FILE *fp, + long offset, + int ptrname); + long ftell (FILE* fp); + int fgetpos (FILE* fp, fpos_t* pos); + int fsetpos (FILE* fp, fpos_t* pos); + int fstat (ACE_HANDLE, + ACE_stat *); + int lstat (const char *, + ACE_stat *); + int ftruncate (ACE_HANDLE, + off_t); + size_t fwrite (const void *ptr, + size_t size, + size_t nitems, + FILE *fp); + void rewind (FILE *fp); //@} //@{ @name Wrappers for searching and sorting. - static void *bsearch (const void *key, - const void *base, - size_t nel, - size_t size, - ACE_COMPARE_FUNC); - static void qsort (void *base, - size_t nel, - size_t width, - ACE_COMPARE_FUNC); + void *bsearch (const void *key, + const void *base, + size_t nel, + size_t size, + ACE_COMPARE_FUNC); + void qsort (void *base, + size_t nel, + size_t width, + ACE_COMPARE_FUNC); //@} //@{ @name A set of wrappers for file locks. - static int flock_init (ACE_OS::ace_flock_t *lock, - int flags = 0, - const ACE_TCHAR *name = 0, - mode_t perms = 0); - static int flock_destroy (ACE_OS::ace_flock_t *lock, - int unlink_file = 1); + int flock_init (ace_flock_t *lock, + int flags = 0, + const ACE_TCHAR *name = 0, + mode_t perms = 0); + int flock_destroy (ace_flock_t *lock, + int unlink_file = 1); # if defined (ACE_WIN32) - static void adjust_flock_params (ACE_OS::ace_flock_t *lock, - short whence, - off_t &start, - off_t &len); + void adjust_flock_params (ace_flock_t *lock, + short whence, + off_t &start, + off_t &len); # endif /* ACE_WIN32 */ - static int flock_rdlock (ACE_OS::ace_flock_t *lock, - short whence = 0, - off_t start = 0, - off_t len = 0); - static int flock_tryrdlock (ACE_OS::ace_flock_t *lock, - short whence = 0, - off_t start = 0, - off_t len = 0); - static int flock_trywrlock (ACE_OS::ace_flock_t *lock, - short whence = 0, - off_t start = 0, - off_t len = 0); - static int flock_unlock (ACE_OS::ace_flock_t *lock, - short whence = 0, - off_t start = 0, - off_t len = 0); - static int flock_wrlock (ACE_OS::ace_flock_t *lock, - short whence = 0, - off_t start = 0, - off_t len = 0); + int flock_rdlock (ace_flock_t *lock, + short whence = 0, + off_t start = 0, + off_t len = 0); + int flock_tryrdlock (ace_flock_t *lock, + short whence = 0, + off_t start = 0, + off_t len = 0); + int flock_trywrlock (ace_flock_t *lock, + short whence = 0, + off_t start = 0, + off_t len = 0); + int flock_unlock (ace_flock_t *lock, + short whence = 0, + off_t start = 0, + off_t len = 0); + int flock_wrlock (ace_flock_t *lock, + short whence = 0, + off_t start = 0, + off_t len = 0); //@} //@{ @name A set of wrappers for low-level process operations. - static int atexit (ACE_EXIT_HOOK func); - static int execl (const char *path, - const char *arg0, ...); - static int execle (const char *path, - const char *arg0, ...); - static int execlp (const char *file, - const char *arg0, ...); - static int execv (const char *path, - char *const argv[]); - static int execvp (const char *file, - char *const argv[]); - static int execve (const char *path, - char *const argv[], - char *const envp[]); - static void _exit (int status = 0); - static void exit (int status = 0); - static void abort (void); - static pid_t fork (void); - - static int getpagesize (void); - static int allocation_granularity (void); - - static gid_t getgid (void); - static int setgid (gid_t); - static pid_t getpid (void); - static pid_t getpgid (pid_t pid); - static pid_t getppid (void); - static uid_t getuid (void); - static int setuid (uid_t); - static pid_t setsid (void); - static int setpgid (pid_t pid, pid_t pgid); - static int setreuid (uid_t ruid, uid_t euid); - static int setregid (gid_t rgid, gid_t egid); - static int system (const ACE_TCHAR *s); + int atexit (ACE_EXIT_HOOK func); + int execl (const char *path, + const char *arg0, ...); + int execle (const char *path, + const char *arg0, ...); + int execlp (const char *file, + const char *arg0, ...); + int execv (const char *path, + char *const argv[]); + int execvp (const char *file, + char *const argv[]); + int execve (const char *path, + char *const argv[], + char *const envp[]); + void _exit (int status = 0); + void exit (int status = 0); + void abort (void); + pid_t fork (void); + + int getpagesize (void); + int allocation_granularity (void); + + gid_t getgid (void); + int setgid (gid_t); + pid_t getpid (void); + pid_t getpgid (pid_t pid); + pid_t getppid (void); + uid_t getuid (void); + int setuid (uid_t); + pid_t setsid (void); + int setpgid (pid_t pid, pid_t pgid); + int setreuid (uid_t ruid, uid_t euid); + int setregid (gid_t rgid, gid_t egid); + int system (const ACE_TCHAR *s); //@} //@{ /// Forks and exec's a process in a manner that works on Solaris and /// NT. argv[0] must be the full path name to the executable. - static pid_t fork (const ACE_TCHAR *program_name); - static pid_t fork_exec (ACE_TCHAR *argv[]); + pid_t fork (const ACE_TCHAR *program_name); + pid_t fork_exec (ACE_TCHAR *argv[]); //@} /** @@ -2599,10 +2563,10 @@ public: * to wait on the project doesn't always work correctly * if the waited process has already terminated. */ - static pid_t waitpid (pid_t pid, - ACE_exitcode *status = 0, - int wait_options = 0, - ACE_HANDLE handle = 0); + pid_t waitpid (pid_t pid, + ACE_exitcode *status = 0, + int wait_options = 0, + ACE_HANDLE handle = 0); /** * Calls <::WaitForSingleObject> on Win32 and @@ -2613,39 +2577,39 @@ public: * to wait on the project doesn't always work correctly * if the waited process has already terminated. */ - static pid_t wait (pid_t pid, - ACE_exitcode *status, - int wait_options = 0, - ACE_HANDLE handle = 0); + pid_t wait (pid_t pid, + ACE_exitcode *status, + int wait_options = 0, + ACE_HANDLE handle = 0); /// Calls OS <::wait> function, so it's only portable to UNIX/POSIX /// platforms. - static pid_t wait (int * = 0); + pid_t wait (int * = 0); //@{ @name A set of wrappers for timers and resource stats. - static u_int alarm (u_int secs); - static u_int ualarm (u_int usecs, - u_int interval = 0); - static u_int ualarm (const ACE_Time_Value &tv, - const ACE_Time_Value &tv_interval = ACE_Time_Value::zero); - static ACE_hrtime_t gethrtime (const ACE_HRTimer_Op = ACE_HRTIMER_GETTIME); + u_int alarm (u_int secs); + u_int ualarm (u_int usecs, + u_int interval = 0); + u_int ualarm (const ACE_Time_Value &tv, + const ACE_Time_Value &tv_interval = ACE_Time_Value::zero); + ACE_hrtime_t gethrtime (const ACE_HRTimer_Op = ACE_HRTIMER_GETTIME); # if defined (ACE_HAS_POWERPC_TIMER) && (defined (ghs) || defined (__GNUG__)) - static void readPPCTimeBase (u_long &most, - u_long &least); + void readPPCTimeBase (u_long &most, + u_long &least); # endif /* ACE_HAS_POWERPC_TIMER && (ghs or __GNUG__) */ - static int clock_gettime (clockid_t, - struct timespec *); - static ACE_Time_Value gettimeofday (void); - static int getrusage (int who, - struct rusage *rusage); - static int getrlimit (int resource, - struct rlimit *rl); - static int setrlimit (int resource, - ACE_SETRLIMIT_TYPE *rl); - static int sleep (u_int seconds); - static int sleep (const ACE_Time_Value &tv); - static int nanosleep (const struct timespec *requested, - struct timespec *remaining = 0); + int clock_gettime (clockid_t, + struct timespec *); + ACE_Time_Value gettimeofday (void); + int getrusage (int who, + struct rusage *rusage); + int getrlimit (int resource, + struct rlimit *rl); + int setrlimit (int resource, + ACE_SETRLIMIT_TYPE *rl); + int sleep (u_int seconds); + int sleep (const ACE_Time_Value &tv); + int nanosleep (const struct timespec *requested, + struct timespec *remaining = 0); # if defined (ACE_HAS_BROKEN_R_ROUTINES) # undef ctime_r @@ -2658,120 +2622,120 @@ public: //@{ @name A set of wrappers for operations on time. // Get the current time. - static time_t mktime (struct tm *timeptr); + time_t mktime (struct tm *timeptr); // wrapper for time zone information. - static void tzset (void); + void tzset (void); # if defined (timezone) # undef timezone # endif /* timezone */ - static long timezone (void); + long timezone (void); # if defined (difftime) # undef difftime # endif /* difftime */ - static double difftime (time_t t1, - time_t t0); - static time_t time (time_t *tloc = 0); - static struct tm *localtime (const time_t *clock); - static struct tm *localtime_r (const time_t *clock, - struct tm *res); - static struct tm *gmtime (const time_t *clock); - static struct tm *gmtime_r (const time_t *clock, - struct tm *res); - static char *asctime (const struct tm *tm); - static char *asctime_r (const struct tm *tm, - char *buf, int buflen); - static ACE_TCHAR *ctime (const time_t *t); - static ACE_TCHAR *ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen); - static size_t strftime (char *s, - size_t maxsize, - const char *format, - const struct tm *timeptr); + double difftime (time_t t1, + time_t t0); + time_t time (time_t *tloc = 0); + struct tm *localtime (const time_t *clock); + struct tm *localtime_r (const time_t *clock, + struct tm *res); + struct tm *gmtime (const time_t *clock); + struct tm *gmtime_r (const time_t *clock, + struct tm *res); + char *asctime (const struct tm *tm); + char *asctime_r (const struct tm *tm, + char *buf, int buflen); + ACE_TCHAR *ctime (const time_t *t); + ACE_TCHAR *ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen); + size_t strftime (char *s, + size_t maxsize, + const char *format, + const struct tm *timeptr); //@} //@{ @name A set of wrappers for System V message queues. - static int msgctl (int msqid, - int cmd, - struct msqid_ds *); - static int msgget (key_t key, - int msgflg); - static int msgrcv (int int_id, - void *buf, - size_t len, - long type, - int flags); - static int msgsnd (int int_id, - const void *buf, - size_t len, - int flags); + int msgctl (int msqid, + int cmd, + struct msqid_ds *); + int msgget (key_t key, + int msgflg); + int msgrcv (int int_id, + void *buf, + size_t len, + long type, + int flags); + int msgsnd (int int_id, + const void *buf, + size_t len, + int flags); //@} //@{ @name A set of wrappers for memory mapped files. - static int madvise (caddr_t addr, - size_t len, - int map_advice); - static void *mmap (void *addr, - size_t len, - int prot, - int flags, - ACE_HANDLE handle, - off_t off = 0, - ACE_HANDLE *file_mapping = 0, - LPSECURITY_ATTRIBUTES sa = 0, - const ACE_TCHAR *file_mapping_name = 0); - static int mprotect (void *addr, - size_t len, - int prot); - static int msync (void *addr, - size_t len, - int sync); - static int munmap (void *addr, - size_t len); + int madvise (caddr_t addr, + size_t len, + int map_advice); + void *mmap (void *addr, + size_t len, + int prot, + int flags, + ACE_HANDLE handle, + off_t off = 0, + ACE_HANDLE *file_mapping = 0, + LPSECURITY_ATTRIBUTES sa = 0, + const ACE_TCHAR *file_mapping_name = 0); + int mprotect (void *addr, + size_t len, + int prot); + int msync (void *addr, + size_t len, + int sync); + int munmap (void *addr, + size_t len); //@} //@{ @name A set of wrappers for recursive mutex locks. - static int recursive_mutex_init (ACE_recursive_thread_mutex_t *m, - const ACE_TCHAR *name = 0, - ACE_mutexattr_t *arg = 0, - LPSECURITY_ATTRIBUTES sa = 0); - static int recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m); - static int recursive_mutex_lock (ACE_recursive_thread_mutex_t *m); - static int recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m); - static int recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m); + int recursive_mutex_init (ACE_recursive_thread_mutex_t *m, + const ACE_TCHAR *name = 0, + ACE_mutexattr_t *arg = 0, + LPSECURITY_ATTRIBUTES sa = 0); + int recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m); + int recursive_mutex_lock (ACE_recursive_thread_mutex_t *m); + int recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m); + int recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m); // These two methods are primarily in support of // ACE_Condition and should probably not // be called outside that context. - static int recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, - ACE_recursive_mutex_state &state); - static void recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, - ACE_recursive_mutex_state &state); + int recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, + ACE_recursive_mutex_state &state); + void recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, + ACE_recursive_mutex_state &state); //@} //@{ @name A set of wrappers for mutex locks. - static int mutex_init (ACE_mutex_t *m, - int type = ACE_DEFAULT_SYNCH_TYPE, - const char *name = 0, - ACE_mutexattr_t *arg = 0, - LPSECURITY_ATTRIBUTES sa = 0); + int mutex_init (ACE_mutex_t *m, + int type = ACE_DEFAULT_SYNCH_TYPE, + const char *name = 0, + ACE_mutexattr_t *arg = 0, + LPSECURITY_ATTRIBUTES sa = 0); #if defined (ACE_HAS_WCHAR) - static int mutex_init (ACE_mutex_t *m, - int type, - const wchar_t *name, - ACE_mutexattr_t *arg = 0, - LPSECURITY_ATTRIBUTES sa = 0); + int mutex_init (ACE_mutex_t *m, + int type, + const wchar_t *name, + ACE_mutexattr_t *arg = 0, + LPSECURITY_ATTRIBUTES sa = 0); #endif /* ACE_HAS_WCHAR */ - static int mutex_destroy (ACE_mutex_t *m); + int mutex_destroy (ACE_mutex_t *m); /// Win32 note: Abandoned mutexes are not treated differently. 0 is /// returned since the calling thread does get the ownership. - static int mutex_lock (ACE_mutex_t *m); + int mutex_lock (ACE_mutex_t *m); /// This method is only implemented for Win32. For abandoned /// mutexes, is set to 1 and 0 is returned. - static int mutex_lock (ACE_mutex_t *m, - int &abandoned); + int mutex_lock (ACE_mutex_t *m, + int &abandoned); /** * This method attempts to acquire a lock, but gives up if the lock @@ -2782,8 +2746,8 @@ public: * Note that the mutex should not be a recursive one, i.e., it * should only be a standard mutex or an error checking mutex. */ - static int mutex_lock (ACE_mutex_t *m, - const ACE_Time_Value &timeout); + int mutex_lock (ACE_mutex_t *m, + const ACE_Time_Value &timeout); /** * If == 0, calls . Otherwise, @@ -2794,108 +2758,108 @@ public: * mutex should not be a recursive one, i.e., it should only be a * standard mutex or an error checking mutex. */ - static int mutex_lock (ACE_mutex_t *m, - const ACE_Time_Value *timeout); + int mutex_lock (ACE_mutex_t *m, + const ACE_Time_Value *timeout); /// Win32 note: Abandoned mutexes are not treated differently. 0 is /// returned since the calling thread does get the ownership. - static int mutex_trylock (ACE_mutex_t *m); + int mutex_trylock (ACE_mutex_t *m); /// This method is only implemented for Win32. For abandoned /// mutexes, is set to 1 and 0 is returned. - static int mutex_trylock (ACE_mutex_t *m, - int &abandoned); + int mutex_trylock (ACE_mutex_t *m, + int &abandoned); - static int mutex_unlock (ACE_mutex_t *m); + int mutex_unlock (ACE_mutex_t *m); //@} //@{ @name A set of wrappers for mutex locks that only work within a single process. - static int thread_mutex_init (ACE_thread_mutex_t *m, - int type = ACE_DEFAULT_SYNCH_TYPE, - const char *name = 0, - ACE_mutexattr_t *arg = 0); + int thread_mutex_init (ACE_thread_mutex_t *m, + int type = ACE_DEFAULT_SYNCH_TYPE, + const char *name = 0, + ACE_mutexattr_t *arg = 0); #if defined (ACE_HAS_WCHAR) - static int thread_mutex_init (ACE_thread_mutex_t *m, - int type, - const wchar_t *name, - ACE_mutexattr_t *arg = 0); + int thread_mutex_init (ACE_thread_mutex_t *m, + int type, + const wchar_t *name, + ACE_mutexattr_t *arg = 0); #endif /* ACE_HAS_WCHAR */ - static int thread_mutex_destroy (ACE_thread_mutex_t *m); - static int thread_mutex_lock (ACE_thread_mutex_t *m); - static int thread_mutex_lock (ACE_thread_mutex_t *m, - const ACE_Time_Value &timeout); - static int thread_mutex_lock (ACE_thread_mutex_t *m, - const ACE_Time_Value *timeout); - static int thread_mutex_trylock (ACE_thread_mutex_t *m); - static int thread_mutex_unlock (ACE_thread_mutex_t *m); + int thread_mutex_destroy (ACE_thread_mutex_t *m); + int thread_mutex_lock (ACE_thread_mutex_t *m); + int thread_mutex_lock (ACE_thread_mutex_t *m, + const ACE_Time_Value &timeout); + int thread_mutex_lock (ACE_thread_mutex_t *m, + const ACE_Time_Value *timeout); + int thread_mutex_trylock (ACE_thread_mutex_t *m); + int thread_mutex_unlock (ACE_thread_mutex_t *m); //@} //@{ @name A set of wrappers for low-level file operations. - static int access (const char *path, int amode); + int access (const char *path, int amode); #if defined (ACE_HAS_WCHAR) - static int access (const wchar_t *path, int amode); + int access (const wchar_t *path, int amode); #endif /* ACE_HAS_WCHAR */ - static int close (ACE_HANDLE handle); - static ACE_HANDLE creat (const ACE_TCHAR *filename, - mode_t mode); - static ACE_HANDLE dup (ACE_HANDLE handle); - static int dup2 (ACE_HANDLE oldfd, - ACE_HANDLE newfd); - static int fattach (int handle, - const char *path); - static long filesize (ACE_HANDLE handle); - static long filesize (const ACE_TCHAR *handle); - static int getmsg (ACE_HANDLE handle, - struct strbuf *ctl, - struct strbuf - *data, int *flags); - static int getpmsg (ACE_HANDLE handle, - struct strbuf *ctl, - struct strbuf - *data, - int *band, - int *flags); + int close (ACE_HANDLE handle); + ACE_HANDLE creat (const ACE_TCHAR *filename, + mode_t mode); + ACE_HANDLE dup (ACE_HANDLE handle); + int dup2 (ACE_HANDLE oldfd, + ACE_HANDLE newfd); + int fattach (int handle, + const char *path); + long filesize (ACE_HANDLE handle); + long filesize (const ACE_TCHAR *handle); + int getmsg (ACE_HANDLE handle, + struct strbuf *ctl, + struct strbuf + *data, int *flags); + int getpmsg (ACE_HANDLE handle, + struct strbuf *ctl, + struct strbuf + *data, + int *band, + int *flags); /// UNIX-style . - static int ioctl (ACE_HANDLE handle, - int cmd, - void * = 0); + int ioctl (ACE_HANDLE handle, + int cmd, + void * = 0); #if !defined (ACE_HAS_WINCE) /// QoS-enabled . - static int ioctl (ACE_HANDLE socket, - u_long io_control_code, - void *in_buffer_p, - u_long in_buffer, - void *out_buffer_p, - u_long out_buffer, - u_long *bytes_returned, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func); + int ioctl (ACE_HANDLE socket, + u_long io_control_code, + void *in_buffer_p, + u_long in_buffer, + void *out_buffer_p, + u_long out_buffer, + u_long *bytes_returned, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func); /// QoS-enabled when the I/O control code is either /// SIO_SET_QOS or SIO_GET_QOS. - static int ioctl (ACE_HANDLE socket, - u_long io_control_code, - ACE_QoS &ace_qos, - u_long *bytes_returned, - void *buffer_p = 0, - u_long buffer = 0, - ACE_OVERLAPPED *overlapped = 0, - ACE_OVERLAPPED_COMPLETION_FUNC func = 0); + int ioctl (ACE_HANDLE socket, + u_long io_control_code, + ACE_QoS &ace_qos, + u_long *bytes_returned, + void *buffer_p = 0, + u_long buffer = 0, + ACE_OVERLAPPED *overlapped = 0, + ACE_OVERLAPPED_COMPLETION_FUNC func = 0); #endif // ACE_HAS_WINCE - static int isastream (ACE_HANDLE handle); - static int isatty (int handle); + int isastream (ACE_HANDLE handle); + int isatty (int handle); #if defined (ACE_WIN32) - static int isatty (ACE_HANDLE handle); + int isatty (ACE_HANDLE handle); #endif /* ACE_WIN32 */ - static off_t lseek (ACE_HANDLE handle, - off_t offset, - int whence); + off_t lseek (ACE_HANDLE handle, + off_t offset, + int whence); #if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64) - static ACE_LOFF_T llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence); + ACE_LOFF_T llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence); #endif /* ACE_HAS_LLSEEK */ // It used to be that the argument default was 0 on all @@ -2921,32 +2885,32 @@ public: /// the end prior to each write, as specified by POSIX. This /// is generally good enough for typical situations, but it is ``not /// quite right'' in its semantics. - static ACE_HANDLE open (const char *filename, - int mode, - int perms = ACE_DEFAULT_OPEN_PERMS, - LPSECURITY_ATTRIBUTES sa = 0); + ACE_HANDLE open (const char *filename, + int mode, + int perms = ACE_DEFAULT_OPEN_PERMS, + LPSECURITY_ATTRIBUTES sa = 0); #if defined (ACE_HAS_WCHAR) - static ACE_HANDLE open (const wchar_t *filename, - int mode, - int perms = ACE_DEFAULT_OPEN_PERMS, - LPSECURITY_ATTRIBUTES sa = 0); + ACE_HANDLE open (const wchar_t *filename, + int mode, + int perms = ACE_DEFAULT_OPEN_PERMS, + LPSECURITY_ATTRIBUTES sa = 0); #endif /* ACE_HAS_WCHAR */ - static int putmsg (ACE_HANDLE handle, - const struct strbuf *ctl, - const struct strbuf *data, - int flags); - static int putpmsg (ACE_HANDLE handle, - const struct strbuf *ctl, - const struct strbuf *data, - int band, - int flags); - static ssize_t read (ACE_HANDLE handle, - void *buf, - size_t len); - static ssize_t read (ACE_HANDLE handle, - void *buf, - size_t len, - ACE_OVERLAPPED *); + int putmsg (ACE_HANDLE handle, + const struct strbuf *ctl, + const struct strbuf *data, + int flags); + int putpmsg (ACE_HANDLE handle, + const struct strbuf *ctl, + const struct strbuf *data, + int band, + int flags); + ssize_t read (ACE_HANDLE handle, + void *buf, + size_t len); + ssize_t read (ACE_HANDLE handle, + void *buf, + size_t len, + ACE_OVERLAPPED *); /** * Receive bytes into from (uses the * call, which uses the system call on UNIX @@ -2955,31 +2919,31 @@ public: * read will be returned to the caller through. * */ - static ssize_t read_n (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bytes_transferred = 0); - - static int readlink (const char *path, - char *buf, - size_t bufsiz); - static ssize_t pread (ACE_HANDLE handle, - void *buf, - size_t nbyte, - off_t offset); - static int recvmsg (ACE_HANDLE handle, - struct msghdr *msg, - int flags); - static int sendmsg (ACE_HANDLE handle, - const struct msghdr *msg, - int flags); - static ssize_t write (ACE_HANDLE handle, - const void *buf, - size_t nbyte); - static ssize_t write (ACE_HANDLE handle, - const void *buf, - size_t nbyte, - ACE_OVERLAPPED *); + ssize_t read_n (ACE_HANDLE handle, + void *buf, + size_t len, + size_t *bytes_transferred = 0); + + int readlink (const char *path, + char *buf, + size_t bufsiz); + ssize_t pread (ACE_HANDLE handle, + void *buf, + size_t nbyte, + off_t offset); + int recvmsg (ACE_HANDLE handle, + struct msghdr *msg, + int flags); + int sendmsg (ACE_HANDLE handle, + const struct msghdr *msg, + int flags); + ssize_t write (ACE_HANDLE handle, + const void *buf, + size_t nbyte); + ssize_t write (ACE_HANDLE handle, + const void *buf, + size_t nbyte, + ACE_OVERLAPPED *); /** * Send bytes from to (uses the @@ -2988,220 +2952,220 @@ public: * EOF occurs, 0 is returned. Whatever data has been transmitted * will be returned to the caller through . */ - static ssize_t write_n (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bytes_transferred = 0); - - static ssize_t pwrite (ACE_HANDLE handle, - const void *buf, - size_t nbyte, - off_t offset); - static ssize_t readv (ACE_HANDLE handle, - iovec *iov, - int iovlen); - static ssize_t writev (ACE_HANDLE handle, - const iovec *iov, - int iovcnt); - static ssize_t recvv (ACE_HANDLE handle, - iovec *iov, - int iovlen); - static ssize_t sendv (ACE_HANDLE handle, - const iovec *iov, - int iovcnt); + ssize_t write_n (ACE_HANDLE handle, + const void *buf, + size_t len, + size_t *bytes_transferred = 0); + + ssize_t pwrite (ACE_HANDLE handle, + const void *buf, + size_t nbyte, + off_t offset); + ssize_t readv (ACE_HANDLE handle, + iovec *iov, + int iovlen); + ssize_t writev (ACE_HANDLE handle, + const iovec *iov, + int iovcnt); + ssize_t recvv (ACE_HANDLE handle, + iovec *iov, + int iovlen); + ssize_t sendv (ACE_HANDLE handle, + const iovec *iov, + int iovcnt); //@} //@{ @name A set of wrappers for event demultiplexing and IPC. - static int select (int width, - fd_set *rfds, - fd_set *wfds = 0, - fd_set *efds = 0, - const ACE_Time_Value *tv = 0); - static int select (int width, - fd_set *rfds, - fd_set *wfds, - fd_set *efds, - const ACE_Time_Value &tv); - static int poll (struct pollfd *pollfds, - u_long len, - const ACE_Time_Value *tv = 0); - static int poll (struct pollfd *pollfds, - u_long len, - const ACE_Time_Value &tv); - static int pipe (ACE_HANDLE handles[]); - - static ACE_HANDLE shm_open (const ACE_TCHAR *filename, - int mode, - int perms = 0, - LPSECURITY_ATTRIBUTES sa = 0); - static int shm_unlink (const ACE_TCHAR *path); + int select (int width, + fd_set *rfds, + fd_set *wfds = 0, + fd_set *efds = 0, + const ACE_Time_Value *tv = 0); + int select (int width, + fd_set *rfds, + fd_set *wfds, + fd_set *efds, + const ACE_Time_Value &tv); + int poll (struct pollfd *pollfds, + u_long len, + const ACE_Time_Value *tv = 0); + int poll (struct pollfd *pollfds, + u_long len, + const ACE_Time_Value &tv); + int pipe (ACE_HANDLE handles[]); + + ACE_HANDLE shm_open (const ACE_TCHAR *filename, + int mode, + int perms = 0, + LPSECURITY_ATTRIBUTES sa = 0); + int shm_unlink (const ACE_TCHAR *path); //@} //@{ @name A set of wrappers for directory operations. - static mode_t umask (mode_t cmask); + mode_t umask (mode_t cmask); #if !defined (ACE_LACKS_CHDIR) - static int chdir (const char *path); + int chdir (const char *path); #if defined (ACE_HAS_WCHAR) - static int chdir (const wchar_t *path); + int chdir (const wchar_t *path); #endif /* ACE_HAS_WCHAR */ #endif /* ACE_LACKS_CHDIR */ - static int mkdir (const ACE_TCHAR *path, - mode_t mode = ACE_DEFAULT_DIR_PERMS); - static int mkfifo (const ACE_TCHAR *file, - mode_t mode = ACE_DEFAULT_FILE_PERMS); - static ACE_TCHAR *mktemp (ACE_TCHAR *t); - static ACE_HANDLE mkstemp (ACE_TCHAR *t); - static ACE_TCHAR *getcwd (ACE_TCHAR *, size_t); - static int rename (const ACE_TCHAR *old_name, - const ACE_TCHAR *new_name, - int flags = -1); - static int unlink (const ACE_TCHAR *path); - static ACE_TCHAR *tempnam (const ACE_TCHAR *dir = 0, - const ACE_TCHAR *pfx = 0); + int mkdir (const ACE_TCHAR *path, + mode_t mode = ACE_DEFAULT_DIR_PERMS); + int mkfifo (const ACE_TCHAR *file, + mode_t mode = ACE_DEFAULT_FILE_PERMS); + ACE_TCHAR *mktemp (ACE_TCHAR *t); + ACE_HANDLE mkstemp (ACE_TCHAR *t); + ACE_TCHAR *getcwd (ACE_TCHAR *, size_t); + int rename (const ACE_TCHAR *old_name, + const ACE_TCHAR *new_name, + int flags = -1); + int unlink (const ACE_TCHAR *path); + ACE_TCHAR *tempnam (const ACE_TCHAR *dir = 0, + const ACE_TCHAR *pfx = 0); //@} //@{ @name A set of wrappers for random number operations. - static int rand (void); - static int rand_r (ACE_RANDR_TYPE &seed); - static void srand (u_int seed); + int rand (void); + int rand_r (ACE_RANDR_TYPE &seed); + void srand (u_int seed); //@} //@{ @name A set of wrappers for readers/writer locks. - static int rwlock_init (ACE_rwlock_t *rw, - int type = ACE_DEFAULT_SYNCH_TYPE, - const ACE_TCHAR *name = 0, - void *arg = 0); - static int rwlock_destroy (ACE_rwlock_t *rw); - static int rw_rdlock (ACE_rwlock_t *rw); - static int rw_wrlock (ACE_rwlock_t *rw); - static int rw_tryrdlock (ACE_rwlock_t *rw); - static int rw_trywrlock (ACE_rwlock_t *rw); - static int rw_trywrlock_upgrade (ACE_rwlock_t *rw); - static int rw_unlock (ACE_rwlock_t *rw); + int rwlock_init (ACE_rwlock_t *rw, + int type = ACE_DEFAULT_SYNCH_TYPE, + const ACE_TCHAR *name = 0, + void *arg = 0); + int rwlock_destroy (ACE_rwlock_t *rw); + int rw_rdlock (ACE_rwlock_t *rw); + int rw_wrlock (ACE_rwlock_t *rw); + int rw_tryrdlock (ACE_rwlock_t *rw); + int rw_trywrlock (ACE_rwlock_t *rw); + int rw_trywrlock_upgrade (ACE_rwlock_t *rw); + int rw_unlock (ACE_rwlock_t *rw); //@} //@{ @name A set of wrappers for auto-reset and manual events. - static int event_init (ACE_event_t *event, - int manual_reset = 0, - int initial_state = 0, - int type = ACE_DEFAULT_SYNCH_TYPE, - const char *name = 0, - void *arg = 0, - LPSECURITY_ATTRIBUTES sa = 0); + int event_init (ACE_event_t *event, + int manual_reset = 0, + int initial_state = 0, + int type = ACE_DEFAULT_SYNCH_TYPE, + const char *name = 0, + void *arg = 0, + LPSECURITY_ATTRIBUTES sa = 0); # if defined (ACE_HAS_WCHAR) - static int event_init (ACE_event_t *event, - int manual_reset, - int initial_state, - int type, - const wchar_t *name, - void *arg = 0, - LPSECURITY_ATTRIBUTES sa = 0); + int event_init (ACE_event_t *event, + int manual_reset, + int initial_state, + int type, + const wchar_t *name, + void *arg = 0, + LPSECURITY_ATTRIBUTES sa = 0); # endif /* ACE_HAS_WCHAR */ - static int event_destroy (ACE_event_t *event); - static int event_wait (ACE_event_t *event); - static int event_timedwait (ACE_event_t *event, - ACE_Time_Value *timeout, - int use_absolute_time = 1); - static int event_signal (ACE_event_t *event); - static int event_pulse (ACE_event_t *event); - static int event_reset (ACE_event_t *event); + int event_destroy (ACE_event_t *event); + int event_wait (ACE_event_t *event); + int event_timedwait (ACE_event_t *event, + ACE_Time_Value *timeout, + int use_absolute_time = 1); + int event_signal (ACE_event_t *event); + int event_pulse (ACE_event_t *event); + int event_reset (ACE_event_t *event); //@} //@{ @name A set of wrappers for semaphores. - static int sema_destroy (ACE_sema_t *s); - static int sema_init (ACE_sema_t *s, - u_int count, - int type = ACE_DEFAULT_SYNCH_TYPE, - const char *name = 0, - void *arg = 0, - int max = 0x7fffffff, - LPSECURITY_ATTRIBUTES sa = 0); + int sema_destroy (ACE_sema_t *s); + int sema_init (ACE_sema_t *s, + u_int count, + int type = ACE_DEFAULT_SYNCH_TYPE, + const char *name = 0, + void *arg = 0, + int max = 0x7fffffff, + LPSECURITY_ATTRIBUTES sa = 0); # if defined (ACE_HAS_WCHAR) - static int sema_init (ACE_sema_t *s, - u_int count, - int type, - const wchar_t *name, - void *arg = 0, - int max = 0x7fffffff, - LPSECURITY_ATTRIBUTES sa = 0); + int sema_init (ACE_sema_t *s, + u_int count, + int type, + const wchar_t *name, + void *arg = 0, + int max = 0x7fffffff, + LPSECURITY_ATTRIBUTES sa = 0); # endif /* ACE_HAS_WCHAR */ - static int sema_post (ACE_sema_t *s); - static int sema_post (ACE_sema_t *s, - u_int release_count); - static int sema_trywait (ACE_sema_t *s); - static int sema_wait (ACE_sema_t *s); - static int sema_wait (ACE_sema_t *s, - ACE_Time_Value &tv); - static int sema_wait (ACE_sema_t *s, - ACE_Time_Value *tv); + int sema_post (ACE_sema_t *s); + int sema_post (ACE_sema_t *s, + u_int release_count); + int sema_trywait (ACE_sema_t *s); + int sema_wait (ACE_sema_t *s); + int sema_wait (ACE_sema_t *s, + ACE_Time_Value &tv); + int sema_wait (ACE_sema_t *s, + ACE_Time_Value *tv); //@} //@{ @name A set of wrappers for System V semaphores. - static int semctl (int int_id, - int semnum, - int cmd, - semun); - static int semget (key_t key, - int nsems, - int flags); - static int semop (int int_id, - struct sembuf *sops, - size_t nsops); + int semctl (int int_id, + int semnum, + int cmd, + semun); + int semget (key_t key, + int nsems, + int flags); + int semop (int int_id, + struct sembuf *sops, + size_t nsops); //@} //@{ @name Thread scheduler interface. /// Set scheduling parameters. An id of ACE_SELF indicates, e.g., /// set the parameters on the calling thread. - static int sched_params (const ACE_Sched_Params &, ACE_id_t id = ACE_SELF); + int sched_params (const ACE_Sched_Params &, ACE_id_t id = ACE_SELF); //@} //@{ @name A set of wrappers for System V shared memory. - static void *shmat (int int_id, - void *shmaddr, - int shmflg); - static int shmctl (int int_id, - int cmd, - struct shmid_ds *buf); - static int shmdt (void *shmaddr); - static int shmget (key_t key, - int size, - int flags); + void *shmat (int int_id, + void *shmaddr, + int shmflg); + int shmctl (int int_id, + int cmd, + struct shmid_ds *buf); + int shmdt (void *shmaddr); + int shmget (key_t key, + int size, + int flags); ///@} //@{ @name A set of wrappers for Signals. - static int kill (pid_t pid, + int kill (pid_t pid, + int signum); + int sigaction (int signum, + const struct sigaction *nsa, + struct sigaction *osa); + int sigaddset (sigset_t *s, + int signum); + int sigdelset (sigset_t *s, + int signum); + int sigemptyset (sigset_t *s); + int sigfillset (sigset_t *s); + int sigismember (sigset_t *s, int signum); - static int sigaction (int signum, - const struct sigaction *nsa, - struct sigaction *osa); - static int sigaddset (sigset_t *s, - int signum); - static int sigdelset (sigset_t *s, - int signum); - static int sigemptyset (sigset_t *s); - static int sigfillset (sigset_t *s); - static int sigismember (sigset_t *s, - int signum); - static ACE_SignalHandler signal (int signum, - ACE_SignalHandler); - static int sigsuspend (const sigset_t *set); - static int sigprocmask (int how, - const sigset_t *nsp, - sigset_t *osp); - - static int pthread_sigmask (int how, - const sigset_t *nsp, - sigset_t *osp); + ACE_SignalHandler signal (int signum, + ACE_SignalHandler); + int sigsuspend (const sigset_t *set); + int sigprocmask (int how, + const sigset_t *nsp, + sigset_t *osp); + + int pthread_sigmask (int how, + const sigset_t *nsp, + sigset_t *osp); //@} //@{ @name A set of wrappers for sockets. /// BSD-style (no QoS). - static ACE_HANDLE accept (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen); + ACE_HANDLE accept (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen); #if !defined (ACE_HAS_WINCE) /** @@ -3209,16 +3173,16 @@ public: * the OS platform doesn't support QoS-enabled then the * are ignored and the BSD-style is called. */ - static ACE_HANDLE accept (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen, - const ACE_Accept_QoS_Params &qos_params); + ACE_HANDLE accept (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen, + const ACE_Accept_QoS_Params &qos_params); #endif // ACE_HAS_WINCE /// BSD-style (no QoS). - static int connect (ACE_HANDLE handle, - struct sockaddr *addr, - int addrlen); + int connect (ACE_HANDLE handle, + struct sockaddr *addr, + int addrlen); #if !defined (ACE_HAS_WINCE) /** @@ -3226,218 +3190,218 @@ public: * If the OS platform doesn't support QoS-enabled then the * are ignored and the BSD-style is called. */ - static int connect (ACE_HANDLE handle, - const sockaddr *addr, - int addrlen, - const ACE_QoS_Params &qos_params); + int connect (ACE_HANDLE handle, + const sockaddr *addr, + int addrlen, + const ACE_QoS_Params &qos_params); #endif // ACE_HAS_WINCE - static int bind (ACE_HANDLE s, - struct sockaddr *name, - int namelen); - - static int closesocket (ACE_HANDLE s); - static struct hostent *gethostbyaddr (const char *addr, - int length, - int type); - static struct hostent *gethostbyname (const char *name); - static struct hostent *getipnodebyname (const char *name, int family, - int flags = 0); - static struct hostent *getipnodebyaddr (const void *src, size_t len, - int family); - static struct hostent *gethostbyaddr_r (const char *addr, - int length, - int type, - struct hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop); - static struct hostent *gethostbyname_r (const char *name, - struct hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop); - static int getpeername (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen); - static struct protoent *getprotobyname (const char *name); - static struct protoent *getprotobyname_r (const char *name, - struct protoent *result, - ACE_PROTOENT_DATA buffer); - static struct protoent *getprotobynumber (int proto); - static struct protoent *getprotobynumber_r (int proto, - struct protoent *result, - ACE_PROTOENT_DATA buffer); - static struct servent *getservbyname (const char *svc, - const char *proto); - static struct servent *getservbyname_r (const char *svc, - const char *proto, - struct servent *result, - ACE_SERVENT_DATA buf); - static int getsockname (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen); - static int getsockopt (ACE_HANDLE handle, - int level, - int optname, - char *optval, - int *optlen); - static unsigned long inet_addr (const char *name); - static char *inet_ntoa (const struct in_addr addr); - static int inet_aton (const char *strptr, - struct in_addr *addr); - static const char *inet_ntop (int family, - const void *addrptr, - char *strptr, - size_t len); - static int inet_pton (int family, - const char *strptr, - void *addrptr); + int bind (ACE_HANDLE s, + struct sockaddr *name, + int namelen); + + int closesocket (ACE_HANDLE s); + struct hostent *gethostbyaddr (const char *addr, + int length, + int type); + struct hostent *gethostbyname (const char *name); + struct hostent *getipnodebyname (const char *name, int family, + int flags = 0); + struct hostent *getipnodebyaddr (const void *src, size_t len, + int family); + struct hostent *gethostbyaddr_r (const char *addr, + int length, + int type, + struct hostent *result, + ACE_HOSTENT_DATA buffer, + int *h_errnop); + struct hostent *gethostbyname_r (const char *name, + struct hostent *result, + ACE_HOSTENT_DATA buffer, + int *h_errnop); + int getpeername (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen); + struct protoent *getprotobyname (const char *name); + struct protoent *getprotobyname_r (const char *name, + struct protoent *result, + ACE_PROTOENT_DATA buffer); + struct protoent *getprotobynumber (int proto); + struct protoent *getprotobynumber_r (int proto, + struct protoent *result, + ACE_PROTOENT_DATA buffer); + struct servent *getservbyname (const char *svc, + const char *proto); + struct servent *getservbyname_r (const char *svc, + const char *proto, + struct servent *result, + ACE_SERVENT_DATA buf); + int getsockname (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen); + int getsockopt (ACE_HANDLE handle, + int level, + int optname, + char *optval, + int *optlen); + unsigned long inet_addr (const char *name); + char *inet_ntoa (const struct in_addr addr); + int inet_aton (const char *strptr, + struct in_addr *addr); + const char *inet_ntop (int family, + const void *addrptr, + char *strptr, + size_t len); + int inet_pton (int family, + const char *strptr, + void *addrptr); /// Retrieve information about available transport protocols /// installed on the local machine. - static int enum_protocols (int *protocols, - ACE_Protocol_Info *protocol_buffer, - u_long *buffer_length); + int enum_protocols (int *protocols, + ACE_Protocol_Info *protocol_buffer, + u_long *buffer_length); #if !defined (ACE_HAS_WINCE) /// Joins a leaf node into a QoS-enabled multi-point session. - static ACE_HANDLE join_leaf (ACE_HANDLE socket, - const sockaddr *name, - int namelen, - const ACE_QoS_Params &qos_params); + ACE_HANDLE join_leaf (ACE_HANDLE socket, + const sockaddr *name, + int namelen, + const ACE_QoS_Params &qos_params); #endif // ACE_HAS_WINCE - static int listen (ACE_HANDLE handle, - int backlog); - static int recv (ACE_HANDLE handle, - char *buf, - size_t len, - int flags = 0); - static int recvfrom (ACE_HANDLE handle, - char *buf, - size_t len, - int flags, - struct sockaddr *addr, - int *addrlen); - static int recvfrom (ACE_HANDLE handle, - iovec *buffers, - int buffer_count, - size_t &number_of_bytes_recvd, - int &flags, - struct sockaddr *addr, - int *addrlen, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func); - static int send (ACE_HANDLE handle, - const char *buf, - size_t len, - int flags = 0); - static int sendto (ACE_HANDLE handle, - const char *buf, - size_t len, - int flags, - const struct sockaddr *addr, - int addrlen); - static int sendto (ACE_HANDLE handle, - const iovec *buffers, - int buffer_count, - size_t &number_of_bytes_sent, - int flags, - const struct sockaddr *addr, - int addrlen, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func); + int listen (ACE_HANDLE handle, + int backlog); + int recv (ACE_HANDLE handle, + char *buf, + size_t len, + int flags = 0); + int recvfrom (ACE_HANDLE handle, + char *buf, + size_t len, + int flags, + struct sockaddr *addr, + int *addrlen); + int recvfrom (ACE_HANDLE handle, + iovec *buffers, + int buffer_count, + size_t &number_of_bytes_recvd, + int &flags, + struct sockaddr *addr, + int *addrlen, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func); + int send (ACE_HANDLE handle, + const char *buf, + size_t len, + int flags = 0); + int sendto (ACE_HANDLE handle, + const char *buf, + size_t len, + int flags, + const struct sockaddr *addr, + int addrlen); + int sendto (ACE_HANDLE handle, + const iovec *buffers, + int buffer_count, + size_t &number_of_bytes_sent, + int flags, + const struct sockaddr *addr, + int addrlen, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func); /// Manipulate the options associated with a socket. - static int setsockopt (ACE_HANDLE handle, - int level, - int optname, - const char *optval, - int optlen); - static int shutdown (ACE_HANDLE handle, - int how); + int setsockopt (ACE_HANDLE handle, + int level, + int optname, + const char *optval, + int optlen); + int shutdown (ACE_HANDLE handle, + int how); /// Create a BSD-style socket (no QoS). - static ACE_HANDLE socket (int protocol_family, - int type, - int proto); + ACE_HANDLE socket (int protocol_family, + int type, + int proto); /// Create a QoS-enabled socket. If the OS platform doesn't support /// QoS-enabled then the BSD-style is called. - static ACE_HANDLE socket (int protocol_family, - int type, - int proto, - ACE_Protocol_Info *protocolinfo, - ACE_SOCK_GROUP g, - u_long flags); - - static int socketpair (int domain, - int type, - int protocol, - ACE_HANDLE sv[2]); + ACE_HANDLE socket (int protocol_family, + int type, + int proto, + ACE_Protocol_Info *protocolinfo, + ACE_SOCK_GROUP g, + u_long flags); + + int socketpair (int domain, + int type, + int protocol, + ACE_HANDLE sv[2]); /// Initialize WinSock before first use (e.g., when a DLL is first /// loaded or the first use of a socket() call. - static int socket_init (int version_high = 1, - int version_low = 1); + int socket_init (int version_high = 1, + int version_low = 1); /// Finalize WinSock after last use (e.g., when a DLL is unloaded). - static int socket_fini (void); + int socket_fini (void); //@} //@{ @name A set of wrappers for password routines. - static void setpwent (void); - static void endpwent (void); - static struct passwd *getpwent (void); - static struct passwd *getpwnam (const char *user); - static struct passwd *getpwnam_r (const char *name, - struct passwd *pwent, - char *buffer, - int buflen); + void setpwent (void); + void endpwent (void); + struct passwd *getpwent (void); + struct passwd *getpwnam (const char *user); + struct passwd *getpwnam_r (const char *name, + struct passwd *pwent, + char *buffer, + int buflen); //@} //@{ @name A set of wrappers for regular expressions. - static char *compile (const char *instring, - char *expbuf, - char *endbuf); - static int step (const char *str, - char *expbuf); + char *compile (const char *instring, + char *expbuf, + char *endbuf); + int step (const char *str, + char *expbuf); //@} //@{ @name Wide-character strings typedef ACE_WCHAR_T WChar; - static u_int wslen (const WChar *); - static WChar *wscpy (WChar *, - const WChar *); - static int wscmp (const WChar *, - const WChar *); - static int wsncmp (const WChar *, - const WChar *, - size_t len); + u_int wslen (const WChar *); + WChar *wscpy (WChar *, + const WChar *); + int wscmp (const WChar *, + const WChar *); + int wsncmp (const WChar *, + const WChar *, + size_t len); //@} # if 0 //@{ @name A set of wrappers for threads (these are portable since they use the ACE_Thread_ID). - static int thr_continue (const ACE_Thread_ID &thread); - static int thr_create (ACE_THR_FUNC, - void *args, - long flags, - ACE_Thread_ID *, - long priority = ACE_DEFAULT_THREAD_PRIORITY, - void *stack = 0, - size_t stacksize = 0); - static int thr_getprio (ACE_Thread_ID thr_id, - int &prio, - int *policy = 0); - static int thr_join (ACE_Thread_ID waiter_id, - ACE_THR_FUNC_RETURN *status); - static int thr_kill (ACE_Thread_ID thr_id, - int signum); - static ACE_Thread_ID thr_self (void); - static int thr_setprio (ACE_Thread_ID thr_id, - int prio); - static int thr_setprio (const ACE_Sched_Priority prio); - static int thr_suspend (ACE_Thread_ID target_thread); - static int thr_cancel (ACE_Thread_ID t_id); + int thr_continue (const ACE_Thread_ID &thread); + int thr_create (ACE_THR_FUNC, + void *args, + long flags, + ACE_Thread_ID *, + long priority = ACE_DEFAULT_THREAD_PRIORITY, + void *stack = 0, + size_t stacksize = 0); + int thr_getprio (ACE_Thread_ID thr_id, + int &prio, + int *policy = 0); + int thr_join (ACE_Thread_ID waiter_id, + ACE_THR_FUNC_RETURN *status); + int thr_kill (ACE_Thread_ID thr_id, + int signum); + ACE_Thread_ID thr_self (void); + int thr_setprio (ACE_Thread_ID thr_id, + int prio); + int thr_setprio (const ACE_Sched_Priority prio); + int thr_suspend (ACE_Thread_ID target_thread); + int thr_cancel (ACE_Thread_ID t_id); //@} # endif /* 0 */ @@ -3445,7 +3409,7 @@ public: // These are non-portable since they use ACE_thread_t and // ACE_hthread_t and will go away in a future release. - static int thr_continue (ACE_hthread_t target_thread); + int thr_continue (ACE_hthread_t target_thread); /* * Creates a new thread having attributes and running @@ -3477,97 +3441,97 @@ public: * Note that is always deleted by , * therefore it must be allocated with global operator new. */ - static int thr_create (ACE_THR_FUNC func, - void *args, - long flags, - ACE_thread_t *thr_id, - ACE_hthread_t *t_handle = 0, - long priority = ACE_DEFAULT_THREAD_PRIORITY, - void *stack = 0, - size_t stacksize = 0, - ACE_Base_Thread_Adapter *thread_adapter = 0); - - static int thr_join (ACE_hthread_t waiter_id, - ACE_THR_FUNC_RETURN *status); - static int thr_join (ACE_thread_t waiter_id, - ACE_thread_t *thr_id, - ACE_THR_FUNC_RETURN *status); - static int thr_kill (ACE_thread_t thr_id, - int signum); - static ACE_thread_t thr_self (void); - static void thr_self (ACE_hthread_t &); - static int thr_getprio (ACE_hthread_t id, - int &priority); - static int thr_getprio (ACE_hthread_t id, - int &priority, - int &policy); - static int thr_setprio (ACE_hthread_t id, - int priority, - int policy = -1); - static int thr_setprio (const ACE_Sched_Priority prio); - static int thr_suspend (ACE_hthread_t target_thread); - static int thr_cancel (ACE_thread_t t_id); - - static int thr_cmp (ACE_hthread_t t1, - ACE_hthread_t t2); - static int thr_equal (ACE_thread_t t1, - ACE_thread_t t2); - static void thr_exit (ACE_THR_FUNC_RETURN status = 0); - static int thr_getconcurrency (void); - static int lwp_getparams (ACE_Sched_Params &); + int thr_create (ACE_THR_FUNC func, + void *args, + long flags, + ACE_thread_t *thr_id, + ACE_hthread_t *t_handle = 0, + long priority = ACE_DEFAULT_THREAD_PRIORITY, + void *stack = 0, + size_t stacksize = 0, + ACE_Base_Thread_Adapter *thread_adapter = 0); + + int thr_join (ACE_hthread_t waiter_id, + ACE_THR_FUNC_RETURN *status); + int thr_join (ACE_thread_t waiter_id, + ACE_thread_t *thr_id, + ACE_THR_FUNC_RETURN *status); + int thr_kill (ACE_thread_t thr_id, + int signum); + ACE_thread_t thr_self (void); + void thr_self (ACE_hthread_t &); + int thr_getprio (ACE_hthread_t id, + int &priority); + int thr_getprio (ACE_hthread_t id, + int &priority, + int &policy); + int thr_setprio (ACE_hthread_t id, + int priority, + int policy = -1); + int thr_setprio (const ACE_Sched_Priority prio); + int thr_suspend (ACE_hthread_t target_thread); + int thr_cancel (ACE_thread_t t_id); + + int thr_cmp (ACE_hthread_t t1, + ACE_hthread_t t2); + int thr_equal (ACE_thread_t t1, + ACE_thread_t t2); + void thr_exit (ACE_THR_FUNC_RETURN status = 0); + int thr_getconcurrency (void); + int lwp_getparams (ACE_Sched_Params &); # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) - static int thr_getspecific (ACE_OS_thread_key_t key, - void **data); + int thr_getspecific (ACE_OS_thread_key_t key, + void **data); # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ - static int thr_getspecific (ACE_thread_key_t key, - void **data); - static int thr_keyfree (ACE_thread_key_t key); - static int thr_key_detach (void *inst); + int thr_getspecific (ACE_thread_key_t key, + void **data); + int thr_keyfree (ACE_thread_key_t key); + int thr_key_detach (void *inst); # if defined (ACE_HAS_THR_C_DEST) # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) - static int thr_keycreate (ACE_OS_thread_key_t *key, - ACE_THR_C_DEST, - void *inst = 0); + int thr_keycreate (ACE_OS_thread_key_t *key, + ACE_THR_C_DEST, + void *inst = 0); # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ - static int thr_keycreate (ACE_thread_key_t *key, - ACE_THR_C_DEST, - void *inst = 0); + int thr_keycreate (ACE_thread_key_t *key, + ACE_THR_C_DEST, + void *inst = 0); # else # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) - static int thr_keycreate (ACE_OS_thread_key_t *key, - ACE_THR_DEST, - void *inst = 0); + int thr_keycreate (ACE_OS_thread_key_t *key, + ACE_THR_DEST, + void *inst = 0); # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ - static int thr_keycreate (ACE_thread_key_t *key, - ACE_THR_DEST, - void *inst = 0); + int thr_keycreate (ACE_thread_key_t *key, + ACE_THR_DEST, + void *inst = 0); # endif /* ACE_HAS_THR_C_DEST */ - static int thr_key_used (ACE_thread_key_t key); - static size_t thr_min_stack (void); - static int thr_setconcurrency (int hint); - static int lwp_setparams (const ACE_Sched_Params &); + int thr_key_used (ACE_thread_key_t key); + size_t thr_min_stack (void); + int thr_setconcurrency (int hint); + int lwp_setparams (const ACE_Sched_Params &); # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) - static int thr_setspecific (ACE_OS_thread_key_t key, - void *data); + int thr_setspecific (ACE_OS_thread_key_t key, + void *data); # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ - static int thr_setspecific (ACE_thread_key_t key, - void *data); - static int thr_sigsetmask (int how, - const sigset_t *nsm, - sigset_t *osm); - static int thr_setcancelstate (int new_state, - int *old_state); - static int thr_setcanceltype (int new_type, - int *old_type); - static int sigwait (sigset_t *set, - int *sig = 0); - static int sigtimedwait (const sigset_t *set, - siginfo_t *info, - const ACE_Time_Value *timeout); - static int sigwaitinfo (const sigset_t *set, - siginfo_t *info); - static void thr_testcancel (void); - static void thr_yield (void); + int thr_setspecific (ACE_thread_key_t key, + void *data); + int thr_sigsetmask (int how, + const sigset_t *nsm, + sigset_t *osm); + int thr_setcancelstate (int new_state, + int *old_state); + int thr_setcanceltype (int new_type, + int *old_type); + int sigwait (sigset_t *set, + int *sig = 0); + int sigtimedwait (const sigset_t *set, + siginfo_t *info, + const ACE_Time_Value *timeout); + int sigwaitinfo (const sigset_t *set, + siginfo_t *info); + void thr_testcancel (void); + void thr_yield (void); /** * This method uses process id and object pointer to come up with a @@ -3577,174 +3541,202 @@ public: * the same process. The uniqueness of this name is therefore only * valid for the life of . */ - static void unique_name (const void *object, - ACE_TCHAR *name, - size_t length); + void unique_name (const void *object, + ACE_TCHAR *name, + size_t length); /// This is necessary to deal with POSIX pthreads and their use of /// structures for thread ids. - static ACE_thread_t NULL_thread; + extern ACE_thread_t NULL_thread; /// This is necessary to deal with POSIX pthreads and their use of /// structures for thread handles. - static ACE_hthread_t NULL_hthread; + extern ACE_hthread_t NULL_hthread; /// This is necessary to deal with POSIX pthreads and their use of /// structures for TSS keys. - static ACE_thread_key_t NULL_key; + extern ACE_thread_key_t NULL_key; # if defined (CHORUS) /// This is used to map an actor's id into a KnCap for killing and /// waiting actors. - static KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS]; + KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS]; # endif /* CHORUS */ //@} # if defined (ACE_WIN32) /// Keeps track of whether we've already initialized WinSock... - static int socket_initialized_; + int socket_initialized_; # endif /* ACE_WIN32 */ /// Handle asynchronous thread cancellation cleanup. - static void mutex_lock_cleanup (void *mutex); + void mutex_lock_cleanup (void *mutex); /** * Call TSS destructors for the current thread. If the current * thread is the main thread, then the argument must be 1. * For private use of ACE_Object_Manager and ACE_Thread_Adapter only. */ - static void cleanup_tss (const u_int main_thread); + void cleanup_tss (const u_int main_thread); # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) - static int netdb_acquire (void); - static int netdb_release (void); + int netdb_acquire (void); + int netdb_release (void); # endif /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ /// Find the schedling class ID that corresponds to the class name. - static int scheduling_class (const char *class_name, ACE_id_t &); + int scheduling_class (const char *class_name, ACE_id_t &); /// Friendly interface to (2). - static int set_scheduling_params (const ACE_Sched_Params &, - ACE_id_t id = ACE_SELF); + int set_scheduling_params (const ACE_Sched_Params &, + ACE_id_t id = ACE_SELF); /// Low-level interface to (2). /** * Can't call the following priocntl, because that's a macro on * Solaris. */ - static int priority_control (ACE_idtype_t, ACE_id_t, int, void *); + int priority_control (ACE_idtype_t, ACE_id_t, int, void *); #if defined (ACE_HAS_STRPTIME) - static char *strptime (char *buf, - const char *format, - struct tm *tm); + char *strptime (char *buf, + const char *format, + struct tm *tm); # if defined (ACE_LACKS_NATIVE_STRPTIME) - static int strptime_getnum (char *buf, int *num, int *bi, - int *fi, int min, int max); + int strptime_getnum (char *buf, int *num, int *bi, + int *fi, int min, int max); # endif /* ACE_LACKS_NATIVE_STRPTIME */ #endif /* ACE_HAS_STRPTIME */ /// Get the number of CPUs configured in the machine. - static long num_processors (void); + long num_processors (void); /// Get the number of CPUs currently online. - static long num_processors_online (void); - -private: + long num_processors_online (void); #if defined (ACE_LACKS_WRITEV) - static int writev_emulation (ACE_HANDLE handle, - ACE_WRITEV_TYPE *iov, - int iovcnt); + int writev_emulation (ACE_HANDLE handle, + ACE_WRITEV_TYPE *iov, + int iovcnt); #endif /* ACE_LACKS_WRITEV */ #if defined (ACE_LACKS_READV) - static ssize_t readv_emulation (ACE_HANDLE handle, - ACE_READV_TYPE *iov, - int iovcnt); + ssize_t readv_emulation (ACE_HANDLE handle, + ACE_READV_TYPE *iov, + int iovcnt); #endif /* ACE_LACKS_READV */ /// Function that is called by , if non-null. - static ACE_EXIT_HOOK exit_hook_; + extern ACE_EXIT_HOOK exit_hook_; /// For use by ACE_Object_Manager only, to register its exit hook.. - static ACE_EXIT_HOOK set_exit_hook (ACE_EXIT_HOOK hook); - - /// Allow the ACE_OS_Object_Manager to call set_exit_hook. - friend class ACE_OS_Object_Manager; + ACE_EXIT_HOOK set_exit_hook (ACE_EXIT_HOOK hook); # if defined (ACE_WIN32) # if defined (ACE_HAS_WINCE) /// Supporting data for ctime and ctime_r functions on WinCE. - static const wchar_t *day_of_week_name[7]; - static const wchar_t *month_name[12]; + const wchar_t *day_of_week_name[7]; + const wchar_t *month_name[12]; # endif /* ACE_HAS_WINCE */ /// Translate fopen's mode char to open's mode. This helper function /// is here to avoid maintaining several pieces of identical code. - static void fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode); + void fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode); - static OSVERSIONINFO win32_versioninfo_; + OSVERSIONINFO win32_versioninfo_; - static HINSTANCE win32_resource_module_; + HINSTANCE win32_resource_module_; # endif /* ACE_WIN32 */ #if defined (ACE_HAS_VIRTUAL_TIME) - static clock_t times (struct tms *buf); + clock_t times (struct tms *buf); #endif /* ACE_HAS_VIRTUAL_TIME */ //changed for ACE_HAS_VIRTUAL_TIME changes. - static int cond_timedwait_i (ACE_cond_t *cv, - ACE_mutex_t *m, - ACE_Time_Value *); + int cond_timedwait_i (ACE_cond_t *cv, + ACE_mutex_t *m, + ACE_Time_Value *); + + u_int alarm_i (u_int secs); + + u_int ualarm_i (u_int usecs, u_int interval = 0); + + u_int ualarm_i (const ACE_Time_Value &tv, + const ACE_Time_Value &tv_interval = ACE_Time_Value::zero); + + int sleep_i (u_int seconds); + + int sleep_i (const ACE_Time_Value &tv); - static u_int alarm_i (u_int secs); + int nanosleep_i (const struct timespec *requested, + struct timespec *remaining = 0); - static u_int ualarm_i (u_int usecs, u_int interval = 0); + int select_i (int width, + fd_set *rfds, + fd_set *wfds, + fd_set *efds, + const ACE_Time_Value *tv = 0); - static u_int ualarm_i (const ACE_Time_Value &tv, - const ACE_Time_Value &tv_interval = ACE_Time_Value::zero); + int select_i (int width, + fd_set *rfds, + fd_set *wfds, + fd_set *efds, + const ACE_Time_Value &tv); - static int sleep_i (u_int seconds); + int poll_i (struct pollfd *pollfds, + u_long len, + const ACE_Time_Value *tv = 0); - static int sleep_i (const ACE_Time_Value &tv); + int poll_i (struct pollfd *pollfds, + u_long len, + const ACE_Time_Value &tv); - static int nanosleep_i (const struct timespec *requested, - struct timespec *remaining = 0); + int sema_wait_i (ACE_sema_t *s); - static int select_i (int width, - fd_set *rfds, - fd_set *wfds, - fd_set *efds, - const ACE_Time_Value *tv = 0); + int sema_wait_i (ACE_sema_t *s, + ACE_Time_Value &tv); - static int select_i (int width, - fd_set *rfds, - fd_set *wfds, - fd_set *efds, - const ACE_Time_Value &tv); + int sigtimedwait_i (const sigset_t *set, + siginfo_t *info, + const ACE_Time_Value *timeout); - static int poll_i (struct pollfd *pollfds, - u_long len, - const ACE_Time_Value *tv = 0); + ACE_Time_Value gettimeofday_i (void); +}; /* namespace ACE_OS */ - static int poll_i (struct pollfd *pollfds, - u_long len, - const ACE_Time_Value &tv); - static int sema_wait_i (ACE_sema_t *s); +/** + * @class ACE_event_t + * + * @brief Wrapper for NT events on UNIX. + */ +class ACE_OS_Export ACE_event_t +{ + friend int ACE_OS::event_init(ACE_event_t*, int, int, int, const char*, void*,int); + friend int ACE_OS::event_destroy(ACE_event_t*); + friend int ACE_OS::event_wait(ACE_event_t*); + friend int ACE_OS::event_timedwait(ACE_event_t*, ACE_Time_Value*, int); + friend int ACE_OS::event_signal(ACE_event_t*); + friend int ACE_OS::event_pulse(ACE_event_t*); + friend int ACE_OS::event_reset(ACE_event_t*); +protected: + + /// Protect critical section. + ACE_mutex_t lock_; - static int sema_wait_i (ACE_sema_t *s, - ACE_Time_Value &tv); + /// Keeps track of waiters. + ACE_cond_t condition_; + + /// Specifies if this is an auto- or manual-reset event. + int manual_reset_; - static int sigtimedwait_i (const sigset_t *set, - siginfo_t *info, - const ACE_Time_Value *timeout); + /// "True" if signaled. + int is_signaled_; - static ACE_Time_Value gettimeofday_i (void); + /// Number of waiting threads. + unsigned long waiting_threads_; }; /** @@ -3951,7 +3943,8 @@ private: static void print_error_message (u_int line_number, const ACE_TCHAR *message); /// This class is for internal use by ACE_OS, etc., only. - friend class ACE_OS; + friend time_t ACE_OS::mktime(tm*); + friend int ACE_OS::atexit(void (*)()); friend class ACE_Object_Manager; friend class ACE_OS_Object_Manager_Manager; friend class ACE_TSS_Cleanup; diff --git a/ace/OS.i b/ace/OS.i index a2830bc5136..7a879816527 100644 --- a/ace/OS.i +++ b/ace/OS.i @@ -136,8 +136,11 @@ typedef const struct timespec * ACE_TIMESPEC_PTR; # include /**/ #endif /* ACE_LACKS_MALLOC_H */ +//////////////////////////////////////////////////////////////////////////////// +namespace ACE_OS +{ ACE_INLINE int -ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg) +fcntl (ACE_HANDLE handle, int cmd, long arg) { ACE_OS_TRACE ("ACE_OS::fcntl"); # if defined (ACE_LACKS_FCNTL) @@ -152,7 +155,7 @@ ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg) #if !defined (ACE_LACKS_CHDIR) ACE_INLINE int -ACE_OS::chdir (const char *path) +chdir (const char *path) { ACE_OS_TRACE ("ACE_OS::chdir"); #if defined (VXWORKS) @@ -182,7 +185,7 @@ ACE_OS::chdir (const char *path) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::chdir (const wchar_t *path) +chdir (const wchar_t *path) { #if defined (ACE_WIN32) ACE_OSCALL_RETURN (::_wchdir (path), int, -1); @@ -195,7 +198,7 @@ ACE_OS::chdir (const wchar_t *path) #if !defined (ACE_LACKS_MKTEMP) ACE_INLINE ACE_TCHAR * -ACE_OS::mktemp (ACE_TCHAR *s) +mktemp (ACE_TCHAR *s) { # if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) return ::_wmktemp (s); @@ -209,14 +212,14 @@ ACE_OS::mktemp (ACE_TCHAR *s) #if !defined (ACE_LACKS_MKSTEMP) ACE_INLINE ACE_HANDLE -ACE_OS::mkstemp (ACE_TCHAR *s) +mkstemp (ACE_TCHAR *s) { return ::mkstemp (s); } #endif /* !ACE_LACKS_MKSTEMP */ ACE_INLINE int -ACE_OS::mkfifo (const ACE_TCHAR *file, mode_t mode) +mkfifo (const ACE_TCHAR *file, mode_t mode) { ACE_OS_TRACE ("ACE_OS::mkfifo"); #if defined (ACE_LACKS_MKFIFO) @@ -227,6 +230,7 @@ ACE_OS::mkfifo (const ACE_TCHAR *file, mode_t mode) ACE_OSCALL_RETURN (::mkfifo (file, mode), int, -1); #endif /* ACE_LACKS_MKFIFO */ } +} /* namespace ACE_OS */ #if !defined (ACE_WIN32) @@ -297,8 +301,10 @@ extern "C" char *mktemp (char *); # define ACE_ADAPT_RETVAL(OP,RESULT) ((RESULT = (OP)) != 0 ? (errno = RESULT, -1) : 0) # endif /* VXWORKS */ +namespace ACE_OS { + ACE_INLINE int -ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp) +fstat (ACE_HANDLE handle, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::fstat"); #if defined (ACE_PSOS_LACKS_PHILE) @@ -322,7 +328,7 @@ ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp) } ACE_INLINE int -ACE_OS::lstat (const char *file, ACE_stat *stp) +lstat (const char *file, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::lstat"); # if defined (ACE_LACKS_LSTAT) || \ @@ -344,7 +350,7 @@ ACE_OS::lstat (const char *file, ACE_stat *stp) } ACE_INLINE int -ACE_OS::fsync (ACE_HANDLE handle) +fsync (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::fsync"); # if defined (ACE_LACKS_FSYNC) @@ -356,7 +362,7 @@ ACE_OS::fsync (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS::getopt (int argc, char *const *argv, const char *optstring) +getopt (int argc, char *const *argv, const char *optstring) { ACE_OS_TRACE ("ACE_OS::getopt"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -374,7 +380,7 @@ ACE_OS::getopt (int argc, char *const *argv, const char *optstring) } ACE_INLINE int -ACE_OS::pipe (ACE_HANDLE fds[]) +pipe (ACE_HANDLE fds[]) { ACE_OS_TRACE ("ACE_OS::pipe"); # if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -384,6 +390,7 @@ ACE_OS::pipe (ACE_HANDLE fds[]) ACE_OSCALL_RETURN (::pipe (fds), int, -1); # endif /* VXWORKS || ACE_PSOS */ } +} /* namespace ACE_OS */ # if defined (DIGITAL_UNIX) extern "C" { @@ -406,8 +413,9 @@ extern "C" { } #endif /* AIX and VAC++ 4 */ +namespace ACE_OS { ACE_INLINE int -ACE_OS::rand_r (ACE_RANDR_TYPE &seed) +rand_r (ACE_RANDR_TYPE &seed) { ACE_OS_TRACE ("ACE_OS::rand_r"); # if defined (ACE_HAS_REENTRANT_FUNCTIONS) && \ @@ -433,7 +441,7 @@ ACE_OS::rand_r (ACE_RANDR_TYPE &seed) } ACE_INLINE pid_t -ACE_OS::setsid (void) +setsid (void) { ACE_OS_TRACE ("ACE_OS::setsid"); # if defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -444,7 +452,7 @@ ACE_OS::setsid (void) } ACE_INLINE mode_t -ACE_OS::umask (mode_t cmask) +umask (mode_t cmask) { ACE_OS_TRACE ("ACE_OS::umask"); # if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -454,6 +462,7 @@ ACE_OS::umask (mode_t cmask) return ::umask (cmask); // This call shouldn't fail... # endif /* VXWORKS || ACE_PSOS */ } +} /* namespace ACE_OS */ #else /* ACE_WIN32 */ @@ -471,8 +480,9 @@ ACE_OS::umask (mode_t cmask) } \ return RESULT; } while (0) +namespace ACE_OS { ACE_INLINE LPSECURITY_ATTRIBUTES -ACE_OS::default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa) +default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa) { #if defined (ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES) if (sa == 0) @@ -494,18 +504,14 @@ ACE_OS::default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa) } ACE_INLINE int -ACE_OS::getopt (int argc, char *const *argv, const char *optstring) +getopt (int, char *const *, const char *) { - ACE_UNUSED_ARG (argc); - ACE_UNUSED_ARG (argv); - ACE_UNUSED_ARG (optstring); - ACE_OS_TRACE ("ACE_OS::getopt"); ACE_NOTSUP_RETURN (-1); } ACE_INLINE int -ACE_OS::pipe (ACE_HANDLE fds[]) +pipe (ACE_HANDLE fds[]) { # if !defined (ACE_HAS_WINCE) && !defined (__IBMCPP__) ACE_OS_TRACE ("ACE_OS::pipe"); @@ -518,7 +524,7 @@ ACE_OS::pipe (ACE_HANDLE fds[]) } ACE_INLINE int -ACE_OS::rand_r (ACE_RANDR_TYPE& seed) +rand_r (ACE_RANDR_TYPE& seed) { ACE_OS_TRACE ("ACE_OS::rand_r"); @@ -534,14 +540,14 @@ ACE_OS::rand_r (ACE_RANDR_TYPE& seed) } ACE_INLINE pid_t -ACE_OS::setsid (void) +setsid (void) { ACE_OS_TRACE ("ACE_OS::setsid"); ACE_NOTSUP_RETURN (-1); } ACE_INLINE mode_t -ACE_OS::umask (mode_t cmask) +umask (mode_t cmask) { #if !defined (ACE_HAS_WINCE) ACE_OS_TRACE ("ACE_OS::umask"); @@ -552,7 +558,7 @@ ACE_OS::umask (mode_t cmask) } ACE_INLINE int -ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp) +fstat (ACE_HANDLE handle, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::fstat"); # if 1 @@ -593,11 +599,12 @@ ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp) return retval; # endif /* 1 */ } - +} /* namespace ACE_OS */ #endif /* WIN32 */ +namespace ACE_OS { ACE_INLINE int -ACE_OS::clock_gettime (clockid_t clockid, struct timespec *ts) +clock_gettime (clockid_t clockid, struct timespec *ts) { ACE_OS_TRACE ("ACE_OS::clock_gettime"); #if defined (ACE_HAS_CLOCK_GETTIME) @@ -616,7 +623,7 @@ ACE_OS::clock_gettime (clockid_t clockid, struct timespec *ts) } ACE_INLINE ACE_Time_Value -ACE_OS::gettimeofday (void) +gettimeofday (void) { // ACE_OS_TRACE ("ACE_OS::gettimeofday"); @@ -683,7 +690,7 @@ ACE_OS::gettimeofday (void) } ACE_INLINE int -ACE_OS::stat (const ACE_TCHAR *file, ACE_stat *stp) +stat (const ACE_TCHAR *file, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::stat"); #if defined (VXWORKS) @@ -735,7 +742,7 @@ ACE_OS::stat (const ACE_TCHAR *file, ACE_stat *stp) } ACE_INLINE time_t -ACE_OS::time (time_t *tloc) +time (time_t *tloc) { #if !defined (ACE_HAS_WINCE) ACE_OS_TRACE ("ACE_OS::time"); @@ -757,21 +764,21 @@ ACE_OS::time (time_t *tloc) } ACE_INLINE void -ACE_OS::srand (u_int seed) +srand (u_int seed) { ACE_OS_TRACE ("ACE_OS::srand"); ::srand (seed); } ACE_INLINE int -ACE_OS::rand (void) +rand (void) { ACE_OS_TRACE ("ACE_OS::rand"); ACE_OSCALL_RETURN (::rand (), int, -1); } ACE_INLINE int -ACE_OS::unlink (const ACE_TCHAR *path) +unlink (const ACE_TCHAR *path) { ACE_OS_TRACE ("ACE_OS::unlink"); # if defined (VXWORKS) @@ -797,9 +804,9 @@ ACE_OS::unlink (const ACE_TCHAR *path) } ACE_INLINE int -ACE_OS::rename (const ACE_TCHAR *old_name, - const ACE_TCHAR *new_name, - int flags) +rename (const ACE_TCHAR *old_name, + const ACE_TCHAR *new_name, + int flags) { # if defined (ACE_LACKS_RENAME) ACE_UNUSED_ARG (old_name); @@ -831,7 +838,7 @@ ACE_OS::rename (const ACE_TCHAR *old_name, } ACE_INLINE ACE_TCHAR * -ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) +tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) { ACE_OS_TRACE ("ACE_OS::tempnam"); #if defined (ACE_HAS_WINCE) || defined (ACE_LACKS_TEMPNAM) @@ -858,10 +865,10 @@ ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) #endif ACE_INLINE ACE_HANDLE -ACE_OS::shm_open (const ACE_TCHAR *filename, - int mode, - int perms, - LPSECURITY_ATTRIBUTES sa) +shm_open (const ACE_TCHAR *filename, + int mode, + int perms, + LPSECURITY_ATTRIBUTES sa) { ACE_OS_TRACE ("ACE_OS::shm_open"); # if defined (ACE_HAS_SHM_OPEN) @@ -874,7 +881,7 @@ ACE_OS::shm_open (const ACE_TCHAR *filename, } ACE_INLINE int -ACE_OS::shm_unlink (const ACE_TCHAR *path) +shm_unlink (const ACE_TCHAR *path) { ACE_OS_TRACE ("ACE_OS::shm_unlink"); # if defined (ACE_HAS_SHM_OPEN) @@ -887,7 +894,7 @@ ACE_OS::shm_unlink (const ACE_TCHAR *path) #if !defined (ACE_LACKS_CUSERID) ACE_INLINE char * -ACE_OS::cuserid (char *user, size_t maxlen) +cuserid (char *user, size_t maxlen) { ACE_OS_TRACE ("ACE_OS::cuserid"); #if defined (VXWORKS) @@ -986,7 +993,7 @@ ACE_OS::cuserid (char *user, size_t maxlen) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS::cuserid (wchar_t *user, size_t maxlen) +cuserid (wchar_t *user, size_t maxlen) { # if defined (ACE_WIN32) BOOL result = GetUserNameW (user, (u_long *) &maxlen); @@ -1015,7 +1022,7 @@ ACE_OS::cuserid (wchar_t *user, size_t maxlen) #endif /* ACE_LACKS_CUSERID */ ACE_INLINE int -ACE_OS::atexit (ACE_EXIT_HOOK func) +atexit (ACE_EXIT_HOOK func) { return ACE_OS_Object_Manager::instance ()->at_exit (func); } @@ -1023,7 +1030,7 @@ ACE_OS::atexit (ACE_EXIT_HOOK func) // Doesn't need a macro since it *never* returns! ACE_INLINE void -ACE_OS::_exit (int status) +_exit (int status) { ACE_OS_TRACE ("ACE_OS::_exit"); #if defined (VXWORKS) @@ -1046,7 +1053,7 @@ ACE_OS::_exit (int status) } ACE_INLINE void -ACE_OS::abort (void) +abort (void) { #if !defined (ACE_HAS_WINCE) ::abort (); @@ -1057,14 +1064,14 @@ ACE_OS::abort (void) } ACE_INLINE int -ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr) +vsprintf (char *buffer, const char *format, va_list argptr) { return ACE_SPRINTF_ADAPTER (::vsprintf (buffer, format, argptr)); } #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) +vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) { # if defined (ACE_HAS_VSWPRINTF) return ::vswprintf (buffer, format, argptr); @@ -1081,7 +1088,7 @@ ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) ACE_INLINE long -ACE_OS::sysconf (int name) +sysconf (int name) { ACE_OS_TRACE ("ACE_OS::sysconf"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -1093,7 +1100,7 @@ ACE_OS::sysconf (int name) } ACE_INLINE int -ACE_OS::mutex_init (ACE_mutex_t *m, +mutex_init (ACE_mutex_t *m, int type, const char *name, ACE_mutexattr_t *attributes, @@ -1291,7 +1298,7 @@ ACE_OS::mutex_init (ACE_mutex_t *m, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::mutex_init (ACE_mutex_t *m, +mutex_init (ACE_mutex_t *m, int type, const wchar_t *name, ACE_mutexattr_t *attributes, @@ -1329,7 +1336,7 @@ ACE_OS::mutex_init (ACE_mutex_t *m, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::mutex_destroy (ACE_mutex_t *m) +mutex_destroy (ACE_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::mutex_destroy"); #if defined (ACE_HAS_THREADS) @@ -1374,7 +1381,7 @@ ACE_OS::mutex_destroy (ACE_mutex_t *m) } ACE_INLINE int -ACE_OS::mutex_lock (ACE_mutex_t *m) +mutex_lock (ACE_mutex_t *m) { // ACE_OS_TRACE ("ACE_OS::mutex_lock"); #if defined (ACE_HAS_THREADS) @@ -1434,8 +1441,8 @@ ACE_OS::mutex_lock (ACE_mutex_t *m) } ACE_INLINE int -ACE_OS::mutex_lock (ACE_mutex_t *m, - int &abandoned) +mutex_lock (ACE_mutex_t *m, + int &abandoned) { ACE_OS_TRACE ("ACE_OS::mutex_lock"); #if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS) @@ -1473,7 +1480,7 @@ ACE_OS::mutex_lock (ACE_mutex_t *m, } ACE_INLINE int -ACE_OS::mutex_trylock (ACE_mutex_t *m) +mutex_trylock (ACE_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::mutex_trylock"); #if defined (ACE_HAS_THREADS) @@ -1563,7 +1570,7 @@ ACE_OS::mutex_trylock (ACE_mutex_t *m) } ACE_INLINE int -ACE_OS::mutex_trylock (ACE_mutex_t *m, int &abandoned) +mutex_trylock (ACE_mutex_t *m, int &abandoned) { #if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS) abandoned = 0; @@ -1602,8 +1609,8 @@ ACE_OS::mutex_trylock (ACE_mutex_t *m, int &abandoned) } ACE_INLINE int -ACE_OS::mutex_lock (ACE_mutex_t *m, - const ACE_Time_Value &timeout) +mutex_lock (ACE_mutex_t *m, + const ACE_Time_Value &timeout) { #if defined (ACE_HAS_THREADS) && defined (ACE_HAS_MUTEX_TIMEOUTS) @@ -1705,14 +1712,14 @@ ACE_OS::mutex_lock (ACE_mutex_t *m, } ACE_INLINE int -ACE_OS::mutex_lock (ACE_mutex_t *m, - const ACE_Time_Value *timeout) +mutex_lock (ACE_mutex_t *m, + const ACE_Time_Value *timeout) { return timeout == 0 ? ACE_OS::mutex_lock (m) : ACE_OS::mutex_lock (m, *timeout); } ACE_INLINE int -ACE_OS::mutex_unlock (ACE_mutex_t *m) +mutex_unlock (ACE_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::mutex_unlock"); #if defined (ACE_HAS_THREADS) @@ -1758,10 +1765,10 @@ ACE_OS::mutex_unlock (ACE_mutex_t *m) } ACE_INLINE int -ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, - int type, - const char *name, - ACE_mutexattr_t *arg) +thread_mutex_init (ACE_thread_mutex_t *m, + int type, + const char *name, + ACE_mutexattr_t *arg) { // ACE_OS_TRACE ("ACE_OS::thread_mutex_init"); #if defined (ACE_HAS_THREADS) @@ -1794,10 +1801,10 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, - int type, - const wchar_t *name, - ACE_mutexattr_t *arg) +thread_mutex_init (ACE_thread_mutex_t *m, + int type, + const wchar_t *name, + ACE_mutexattr_t *arg) { // ACE_OS_TRACE ("ACE_OS::thread_mutex_init"); #if defined (ACE_HAS_THREADS) @@ -1830,7 +1837,7 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::thread_mutex_destroy (ACE_thread_mutex_t *m) +thread_mutex_destroy (ACE_thread_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::thread_mutex_destroy"); #if defined (ACE_HAS_THREADS) @@ -1854,7 +1861,7 @@ ACE_OS::thread_mutex_destroy (ACE_thread_mutex_t *m) } ACE_INLINE int -ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m) +thread_mutex_lock (ACE_thread_mutex_t *m) { // ACE_OS_TRACE ("ACE_OS::thread_mutex_lock"); #if defined (ACE_HAS_THREADS) @@ -1873,8 +1880,8 @@ ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m) } ACE_INLINE int -ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m, - const ACE_Time_Value &timeout) +thread_mutex_lock (ACE_thread_mutex_t *m, + const ACE_Time_Value &timeout) { // ACE_OS_TRACE ("ACE_OS::thread_mutex_lock"); @@ -1900,8 +1907,8 @@ ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m, } ACE_INLINE int -ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m, - const ACE_Time_Value *timeout) +thread_mutex_lock (ACE_thread_mutex_t *m, + const ACE_Time_Value *timeout) { return timeout == 0 ? ACE_OS::thread_mutex_lock (m) @@ -1909,7 +1916,7 @@ ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m, } ACE_INLINE int -ACE_OS::thread_mutex_trylock (ACE_thread_mutex_t *m) +thread_mutex_trylock (ACE_thread_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::thread_mutex_trylock"); @@ -1941,7 +1948,7 @@ ACE_OS::thread_mutex_trylock (ACE_thread_mutex_t *m) } ACE_INLINE int -ACE_OS::thread_mutex_unlock (ACE_thread_mutex_t *m) +thread_mutex_unlock (ACE_thread_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::thread_mutex_unlock"); #if defined (ACE_HAS_THREADS) @@ -1966,7 +1973,7 @@ ACE_OS::thread_mutex_unlock (ACE_thread_mutex_t *m) // using the ACE_OS::sema_* functions. So, they are defined in OS.cpp. ACE_INLINE int -ACE_OS::cond_destroy (ACE_cond_t *cv) +cond_destroy (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_destroy"); # if defined (ACE_HAS_THREADS) @@ -1989,8 +1996,8 @@ ACE_OS::cond_destroy (ACE_cond_t *cv) } ACE_INLINE int -ACE_OS::condattr_init (ACE_condattr_t &attributes, - int type) +condattr_init (ACE_condattr_t &attributes, + int type) { ACE_UNUSED_ARG (type); # if defined (ACE_HAS_THREADS) @@ -2049,7 +2056,7 @@ ACE_OS::condattr_init (ACE_condattr_t &attributes, } ACE_INLINE int -ACE_OS::condattr_destroy (ACE_condattr_t &attributes) +condattr_destroy (ACE_condattr_t &attributes) { #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) @@ -2075,10 +2082,10 @@ ACE_OS::condattr_destroy (ACE_condattr_t &attributes) } ACE_INLINE int -ACE_OS::cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const char *name, - void *arg) +cond_init (ACE_cond_t *cv, + ACE_condattr_t &attributes, + const char *name, + void *arg) { // ACE_OS_TRACE ("ACE_OS::cond_init"); ACE_UNUSED_ARG (name); @@ -2125,17 +2132,17 @@ ACE_OS::cond_init (ACE_cond_t *cv, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const wchar_t *name, - void *arg) +cond_init (ACE_cond_t *cv, + ACE_condattr_t &attributes, + const wchar_t *name, + void *arg) { return ACE_OS::cond_init (cv, attributes, ACE_Wide_To_Ascii (name).char_rep (), arg); } #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) +cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) { ACE_condattr_t attributes; if (ACE_OS::condattr_init (attributes, type) == 0 @@ -2149,14 +2156,14 @@ ACE_OS::cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) +cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) { return ACE_OS::cond_init (cv, type, ACE_Wide_To_Ascii (name).char_rep (), arg); } #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::cond_signal (ACE_cond_t *cv) +cond_signal (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_signal"); # if defined (ACE_HAS_THREADS) @@ -2180,7 +2187,7 @@ ACE_OS::cond_signal (ACE_cond_t *cv) } ACE_INLINE int -ACE_OS::cond_broadcast (ACE_cond_t *cv) +cond_broadcast (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_broadcast"); # if defined (ACE_HAS_THREADS) @@ -2207,8 +2214,8 @@ ACE_OS::cond_broadcast (ACE_cond_t *cv) } ACE_INLINE int -ACE_OS::cond_wait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex) +cond_wait (ACE_cond_t *cv, + ACE_mutex_t *external_mutex) { ACE_OS_TRACE ("ACE_OS::cond_wait"); # if defined (ACE_HAS_THREADS) @@ -2235,9 +2242,9 @@ ACE_OS::cond_wait (ACE_cond_t *cv, } ACE_INLINE int -ACE_OS::cond_timedwait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex, - ACE_Time_Value *timeout) +cond_timedwait (ACE_cond_t *cv, + ACE_mutex_t *external_mutex, + ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::cond_timedwait"); # if defined (ACE_HAS_THREADS) @@ -2345,7 +2352,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, #endif /* !ACE_LACKS_COND_T */ ACE_INLINE int -ACE_OS::thr_equal (ACE_thread_t t1, ACE_thread_t t2) +thr_equal (ACE_thread_t t1, ACE_thread_t t2) { #if defined (ACE_HAS_PTHREADS) # if defined (pthread_equal) @@ -2364,7 +2371,7 @@ ACE_OS::thr_equal (ACE_thread_t t1, ACE_thread_t t2) } ACE_INLINE void -ACE_OS::thr_self (ACE_hthread_t &self) +thr_self (ACE_hthread_t &self) { ACE_OS_TRACE ("ACE_OS::thr_self"); #if defined (ACE_HAS_THREADS) @@ -2388,7 +2395,7 @@ ACE_OS::thr_self (ACE_hthread_t &self) } ACE_INLINE ACE_thread_t -ACE_OS::thr_self (void) +thr_self (void) { // ACE_OS_TRACE ("ACE_OS::thr_self"); #if defined (ACE_HAS_THREADS) @@ -2412,10 +2419,10 @@ ACE_OS::thr_self (void) } ACE_INLINE int -ACE_OS::recursive_mutex_init (ACE_recursive_thread_mutex_t *m, - const ACE_TCHAR *name, - ACE_mutexattr_t *arg, - LPSECURITY_ATTRIBUTES sa) +recursive_mutex_init (ACE_recursive_thread_mutex_t *m, + const ACE_TCHAR *name, + ACE_mutexattr_t *arg, + LPSECURITY_ATTRIBUTES sa) { ACE_UNUSED_ARG (sa); #if defined (ACE_HAS_THREADS) @@ -2445,7 +2452,7 @@ ACE_OS::recursive_mutex_init (ACE_recursive_thread_mutex_t *m, } ACE_INLINE int -ACE_OS::recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m) +recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2465,7 +2472,7 @@ ACE_OS::recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m) } ACE_INLINE int -ACE_OS::recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) +recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2516,7 +2523,7 @@ ACE_OS::recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) } ACE_INLINE int -ACE_OS::recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m) +recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2561,7 +2568,7 @@ ACE_OS::recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m) } ACE_INLINE int -ACE_OS::recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m) +recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2621,8 +2628,8 @@ ACE_OS::recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m) // wait and lock release are atomic. recursive_mutex_cond_relock() // is the inverse of this method. ACE_INLINE int -ACE_OS::recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, - ACE_recursive_mutex_state &state) +recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, + ACE_recursive_mutex_state &state) { #if defined (ACE_HAS_THREADS) ACE_OS_TRACE ("ACE_OS::recursive_mutex_cond_unlock"); @@ -2712,8 +2719,8 @@ ACE_OS::recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, // integrate recursive mutexes and condition variables, it's taken care // of here (inverse of ACE_OS::recursive_mutex_cond_unlock). ACE_INLINE void -ACE_OS::recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, - ACE_recursive_mutex_state &state) +recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, + ACE_recursive_mutex_state &state) { #if defined (ACE_HAS_THREADS) ACE_OS_TRACE ("ACE_OS::recursive_mutex_cond_relock"); @@ -2762,7 +2769,7 @@ ACE_OS::recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, ACE_INLINE int -ACE_OS::sema_destroy (ACE_sema_t *s) +sema_destroy (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_destroy"); # if defined (ACE_HAS_POSIX_SEM) @@ -2832,7 +2839,7 @@ ACE_OS::sema_destroy (ACE_sema_t *s) // ACE_OS::sema_init (). ACE_INLINE int -ACE_OS::close (ACE_HANDLE handle) +close (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::close"); #if defined (ACE_WIN32) @@ -2854,7 +2861,7 @@ ACE_OS::close (ACE_HANDLE handle) // FD. ACE_INLINE long -ACE_OS::filesize (ACE_HANDLE handle) +filesize (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::filesize"); #if defined (ACE_WIN32) @@ -2866,7 +2873,7 @@ ACE_OS::filesize (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS::ftruncate (ACE_HANDLE handle, off_t offset) +ftruncate (ACE_HANDLE handle, off_t offset) { ACE_OS_TRACE ("ACE_OS::ftruncate"); #if defined (ACE_WIN32) @@ -2887,15 +2894,15 @@ ACE_OS::ftruncate (ACE_HANDLE handle, off_t offset) } ACE_INLINE void * -ACE_OS::mmap (void *addr, - size_t len, - int prot, - int flags, - ACE_HANDLE file_handle, - off_t off, - ACE_HANDLE *file_mapping, - LPSECURITY_ATTRIBUTES sa, - const ACE_TCHAR *file_mapping_name) +mmap (void *addr, + size_t len, + int prot, + int flags, + ACE_HANDLE file_handle, + off_t off, + ACE_HANDLE *file_mapping, + LPSECURITY_ATTRIBUTES sa, + const ACE_TCHAR *file_mapping_name) { ACE_OS_TRACE ("ACE_OS::mmap"); #if !defined (ACE_WIN32) || defined (ACE_HAS_PHARLAP) @@ -3085,13 +3092,13 @@ ACE_OS::mmap (void *addr, // ACE_OS::sema_init (). ACE_INLINE int -ACE_OS::sema_init (ACE_sema_t *s, - u_int count, - int type, - const char *name, - void *arg, - int max, - LPSECURITY_ATTRIBUTES sa) +sema_init (ACE_sema_t *s, + u_int count, + int type, + const char *name, + void *arg, + int max, + LPSECURITY_ATTRIBUTES sa) { ACE_OS_TRACE ("ACE_OS::sema_init"); #if defined (ACE_HAS_POSIX_SEM) @@ -3312,13 +3319,13 @@ ACE_OS::sema_init (ACE_sema_t *s, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::sema_init (ACE_sema_t *s, - u_int count, - int type, - const wchar_t *name, - void *arg, - int max, - LPSECURITY_ATTRIBUTES sa) +sema_init (ACE_sema_t *s, + u_int count, + int type, + const wchar_t *name, + void *arg, + int max, + LPSECURITY_ATTRIBUTES sa) { # if defined (ACE_HAS_WTHREADS) # if ! defined (ACE_USES_WINCE_SEMA_SIMULATION) @@ -3379,7 +3386,7 @@ ACE_OS::sema_init (ACE_sema_t *s, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::sema_post (ACE_sema_t *s) +sema_post (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_post"); # if defined (ACE_HAS_POSIX_SEM) @@ -3440,7 +3447,7 @@ ACE_OS::sema_post (ACE_sema_t *s) } ACE_INLINE int -ACE_OS::sema_post (ACE_sema_t *s, u_int release_count) +sema_post (ACE_sema_t *s, u_int release_count) { #if defined (ACE_WIN32) && !defined (ACE_USES_WINCE_SEMA_SIMULATION) // Win32 supports this natively. @@ -3463,7 +3470,7 @@ ACE_OS::sema_post (ACE_sema_t *s, u_int release_count) } ACE_INLINE int -ACE_OS::sema_trywait (ACE_sema_t *s) +sema_trywait (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_trywait"); # if defined (ACE_HAS_POSIX_SEM) @@ -3538,7 +3545,7 @@ ACE_OS::sema_trywait (ACE_sema_t *s) if (result == WAIT_TIMEOUT) errno = EBUSY; else - ACE_OS::set_errno_to_last_error (); + set_errno_to_last_error (); // This is taken from the hack above. ;) return -1; # endif /* ACE_USES_WINCE_SEMA_SIMULATION */ @@ -3575,7 +3582,7 @@ ACE_OS::sema_trywait (ACE_sema_t *s) } ACE_INLINE int -ACE_OS::sema_wait (ACE_sema_t *s) +sema_wait (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_wait"); # if defined (ACE_HAS_POSIX_SEM) @@ -3683,7 +3690,7 @@ ACE_OS::sema_wait (ACE_sema_t *s) } ACE_INLINE int -ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) +sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) { ACE_OS_TRACE ("ACE_OS::sema_wait"); # if defined (ACE_HAS_POSIX_SEM) @@ -3880,13 +3887,13 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) } ACE_INLINE int -ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value *tv) +sema_wait (ACE_sema_t *s, ACE_Time_Value *tv) { return tv == 0 ? ACE_OS::sema_wait (s) : ACE_OS::sema_wait (s, *tv); } ACE_INLINE int -ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw) +rw_tryrdlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_tryrdlock"); #if defined (ACE_HAS_THREADS) @@ -3927,7 +3934,7 @@ ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw) } ACE_INLINE int -ACE_OS::rw_trywrlock (ACE_rwlock_t *rw) +rw_trywrlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_trywrlock"); #if defined (ACE_HAS_THREADS) @@ -3968,7 +3975,7 @@ ACE_OS::rw_trywrlock (ACE_rwlock_t *rw) } ACE_INLINE int -ACE_OS::rw_rdlock (ACE_rwlock_t *rw) +rw_rdlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_rdlock"); #if defined (ACE_HAS_THREADS) @@ -4017,7 +4024,7 @@ ACE_OS::rw_rdlock (ACE_rwlock_t *rw) } ACE_INLINE int -ACE_OS::rw_wrlock (ACE_rwlock_t *rw) +rw_wrlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_wrlock"); #if defined (ACE_HAS_THREADS) @@ -4068,7 +4075,7 @@ ACE_OS::rw_wrlock (ACE_rwlock_t *rw) } ACE_INLINE int -ACE_OS::rw_unlock (ACE_rwlock_t *rw) +rw_unlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_unlock"); #if defined (ACE_HAS_THREADS) @@ -4129,7 +4136,7 @@ ACE_OS::rw_unlock (ACE_rwlock_t *rw) // 0 means: upgraded successfully} ACE_INLINE int -ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw) +rw_trywrlock_upgrade (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_trywrlock_upgrade"); #if defined (ACE_HAS_THREADS) @@ -4198,10 +4205,10 @@ ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) && (!defined (ACE_LACKS_RWLOCK_T) || \ defined (ACE_HAS_PTHREADS_UNIX98_EXT)) ACE_INLINE int -ACE_OS::rwlock_init (ACE_rwlock_t *rw, - int type, - const ACE_TCHAR *name, - void *arg) +rwlock_init (ACE_rwlock_t *rw, + int type, + const ACE_TCHAR *name, + void *arg) { // ACE_OS_TRACE ("ACE_OS::rwlock_init"); # if defined (ACE_HAS_PTHREADS_UNIX98_EXT) @@ -4228,7 +4235,7 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw, #endif /* ACE_HAS THREADS && !defined (ACE_LACKS_RWLOCK_T) */ ACE_INLINE int -ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) +rwlock_destroy (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rwlock_destroy"); #if defined (ACE_HAS_THREADS) @@ -4253,13 +4260,13 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) } ACE_INLINE int -ACE_OS::event_init (ACE_event_t *event, - int manual_reset, - int initial_state, - int type, - const char *name, - void *arg, - LPSECURITY_ATTRIBUTES sa) +event_init (ACE_event_t *event, + int manual_reset, + int initial_state, + int type, + const char *name, + void *arg, + LPSECURITY_ATTRIBUTES sa) { #if defined (ACE_WIN32) ACE_UNUSED_ARG (type); @@ -4310,13 +4317,13 @@ ACE_OS::event_init (ACE_event_t *event, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::event_init (ACE_event_t *event, - int manual_reset, - int initial_state, - int type, - const wchar_t *name, - void *arg, - LPSECURITY_ATTRIBUTES sa) +event_init (ACE_event_t *event, + int manual_reset, + int initial_state, + int type, + const wchar_t *name, + void *arg, + LPSECURITY_ATTRIBUTES sa) { #if defined (ACE_WIN32) ACE_UNUSED_ARG (type); @@ -4342,7 +4349,7 @@ ACE_OS::event_init (ACE_event_t *event, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::event_destroy (ACE_event_t *event) +event_destroy (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*event), ace_result_), int, -1); @@ -4357,7 +4364,7 @@ ACE_OS::event_destroy (ACE_event_t *event) } ACE_INLINE int -ACE_OS::event_wait (ACE_event_t *event) +event_wait (ACE_event_t *event) { #if defined (ACE_WIN32) switch (::WaitForSingleObject (*event, INFINITE)) @@ -4415,9 +4422,9 @@ ACE_OS::event_wait (ACE_event_t *event) } ACE_INLINE int -ACE_OS::event_timedwait (ACE_event_t *event, - ACE_Time_Value *timeout, - int use_absolute_time) +event_timedwait (ACE_event_t *event, + ACE_Time_Value *timeout, + int use_absolute_time) { #if defined (ACE_WIN32) DWORD result; @@ -4526,7 +4533,7 @@ ACE_OS::event_timedwait (ACE_event_t *event, } ACE_INLINE int -ACE_OS::event_signal (ACE_event_t *event) +event_signal (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEvent (*event), ace_result_), int, -1); @@ -4581,7 +4588,7 @@ ACE_OS::event_signal (ACE_event_t *event) } ACE_INLINE int -ACE_OS::event_pulse (ACE_event_t *event) +event_pulse (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::PulseEvent (*event), ace_result_), int, -1); @@ -4629,7 +4636,7 @@ ACE_OS::event_pulse (ACE_event_t *event) } ACE_INLINE int -ACE_OS::event_reset (ACE_event_t *event) +event_reset (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ResetEvent (*event), ace_result_), int, -1); @@ -4698,7 +4705,7 @@ ACE_OS::event_reset (ACE_event_t *event) #endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ ACE_INLINE ACE_HANDLE -ACE_OS::accept (ACE_HANDLE handle, +accept (ACE_HANDLE handle, struct sockaddr *addr, int *addrlen) { @@ -4763,9 +4770,9 @@ ACE_SOCKCALL_RETURN (::accept ((ACE_SOCKET) handle, } ACE_INLINE int -ACE_OS::enum_protocols (int *protocols, - ACE_Protocol_Info *protocol_buffer, - u_long *buffer_length) +enum_protocols (int *protocols, + ACE_Protocol_Info *protocol_buffer, + u_long *buffer_length) { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -4785,7 +4792,7 @@ ACE_OS::enum_protocols (int *protocols, ACE_INLINE int -ACE_OS::bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen) +bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen) { ACE_OS_TRACE ("ACE_OS::bind"); #if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) @@ -4801,9 +4808,9 @@ ACE_OS::bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen) } ACE_INLINE int -ACE_OS::connect (ACE_HANDLE handle, - struct sockaddr *addr, - int addrlen) +connect (ACE_HANDLE handle, + struct sockaddr *addr, + int addrlen) { ACE_OS_TRACE ("ACE_OS::connect"); #if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) @@ -4820,7 +4827,7 @@ ACE_OS::connect (ACE_HANDLE handle, #if !defined (VXWORKS) ACE_INLINE struct hostent * -ACE_OS::gethostbyname (const char *name) +gethostbyname (const char *name) { ACE_OS_TRACE ("ACE_OS::gethostbyname"); # if defined (ACE_PSOS) @@ -4839,7 +4846,7 @@ ACE_OS::gethostbyname (const char *name) ACE_INLINE struct hostent * -ACE_OS::gethostbyaddr (const char *addr, int length, int type) +gethostbyaddr (const char *addr, int length, int type) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr"); # if defined (ACE_PSOS) @@ -4864,7 +4871,7 @@ ACE_OS::gethostbyaddr (const char *addr, int length, int type) ACE_INLINE struct hostent * -ACE_OS::getipnodebyname (const char *name, int family, int flags) +getipnodebyname (const char *name, int family, int flags) { ACE_OS_TRACE ("ACE_OS::getipnodebyname"); # if defined (ACE_PSOS) @@ -4904,7 +4911,7 @@ ACE_OS::getipnodebyname (const char *name, int family, int flags) ACE_INLINE struct hostent * -ACE_OS::getipnodebyaddr (const void *src, size_t len, int family) +getipnodebyaddr (const void *src, size_t len, int family) { #if defined (ACE_HAS_IPV6) # if defined (__GLIBC__) @@ -4936,9 +4943,9 @@ ACE_OS::getipnodebyaddr (const void *src, size_t len, int family) // It would be really cool to add another version of select that would // function like the one we're defending against below! ACE_INLINE int -ACE_OS::select (int width, - fd_set *rfds, fd_set *wfds, fd_set *efds, - const ACE_Time_Value *timeout) +select (int width, + fd_set *rfds, fd_set *wfds, fd_set *efds, + const ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::select"); #if defined (ACE_HAS_NONCONST_SELECT_TIMEVAL) @@ -4965,9 +4972,9 @@ ACE_OS::select (int width, } ACE_INLINE int -ACE_OS::select (int width, - fd_set *rfds, fd_set *wfds, fd_set *efds, - const ACE_Time_Value &timeout) +select (int width, + fd_set *rfds, fd_set *wfds, fd_set *efds, + const ACE_Time_Value &timeout) { ACE_OS_TRACE ("ACE_OS::select"); #if defined (ACE_HAS_NONCONST_SELECT_TIMEVAL) @@ -4987,7 +4994,7 @@ ACE_OS::select (int width, } ACE_INLINE int -ACE_OS::recv (ACE_HANDLE handle, char *buf, size_t len, int flags) +recv (ACE_HANDLE handle, char *buf, size_t len, int flags) { ACE_OS_TRACE ("ACE_OS::recv"); @@ -5013,12 +5020,12 @@ ACE_OS::recv (ACE_HANDLE handle, char *buf, size_t len, int flags) } ACE_INLINE int -ACE_OS::recvfrom (ACE_HANDLE handle, - char *buf, - size_t len, - int flags, - struct sockaddr *addr, - int *addrlen) +recvfrom (ACE_HANDLE handle, + char *buf, + size_t len, + int flags, + struct sockaddr *addr, + int *addrlen) { ACE_OS_TRACE ("ACE_OS::recvfrom"); #if defined (ACE_PSOS) @@ -5058,7 +5065,7 @@ ACE_OS::recvfrom (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::send (ACE_HANDLE handle, const char *buf, size_t len, int flags) +send (ACE_HANDLE handle, const char *buf, size_t len, int flags) { ACE_OS_TRACE ("ACE_OS::send"); @@ -5090,15 +5097,15 @@ ACE_OS::send (ACE_HANDLE handle, const char *buf, size_t len, int flags) } ACE_INLINE int -ACE_OS::recvfrom (ACE_HANDLE handle, - iovec *buffers, - int buffer_count, - size_t &number_of_bytes_recvd, - int &flags, - struct sockaddr *addr, - int *addrlen, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func) +recvfrom (ACE_HANDLE handle, + iovec *buffers, + int buffer_count, + size_t &number_of_bytes_recvd, + int &flags, + struct sockaddr *addr, + int *addrlen, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) { ACE_OS_TRACE ("ACE_OS::recvfrom"); @@ -5135,12 +5142,12 @@ ACE_OS::recvfrom (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::sendto (ACE_HANDLE handle, - const char *buf, - size_t len, - int flags, - const struct sockaddr *addr, - int addrlen) +sendto (ACE_HANDLE handle, + const char *buf, + size_t len, + int flags, + const struct sockaddr *addr, + int addrlen) { ACE_OS_TRACE ("ACE_OS::sendto"); #if defined (VXWORKS) @@ -5172,15 +5179,15 @@ ACE_OS::sendto (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::sendto (ACE_HANDLE handle, - const iovec *buffers, - int buffer_count, - size_t &number_of_bytes_sent, - int flags, - const struct sockaddr *addr, - int addrlen, - ACE_OVERLAPPED *overlapped, - ACE_OVERLAPPED_COMPLETION_FUNC func) +sendto (ACE_HANDLE handle, + const iovec *buffers, + int buffer_count, + size_t &number_of_bytes_sent, + int flags, + const struct sockaddr *addr, + int addrlen, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) { ACE_OS_TRACE ("ACE_OS::sendto"); #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -5226,8 +5233,8 @@ ACE_OS::sendto (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::getpeername (ACE_HANDLE handle, struct sockaddr *addr, - int *addrlen) +getpeername (ACE_HANDLE handle, struct sockaddr *addr, + int *addrlen) { ACE_OS_TRACE ("ACE_OS::getpeername"); #if defined (ACE_PSOS) && !defined ACE_PSOS_DIAB_PPC @@ -5244,7 +5251,7 @@ ACE_OS::getpeername (ACE_HANDLE handle, struct sockaddr *addr, } ACE_INLINE struct protoent * -ACE_OS::getprotobyname (const char *name) +getprotobyname (const char *name) { #if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS) ACE_UNUSED_ARG (name); @@ -5261,9 +5268,9 @@ ACE_OS::getprotobyname (const char *name) } ACE_INLINE struct protoent * -ACE_OS::getprotobyname_r (const char *name, - struct protoent *result, - ACE_PROTOENT_DATA buffer) +getprotobyname_r (const char *name, + struct protoent *result, + ACE_PROTOENT_DATA buffer) { #if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS) ACE_UNUSED_ARG (name); @@ -5316,7 +5323,7 @@ ACE_OS::getprotobyname_r (const char *name, } ACE_INLINE struct protoent * -ACE_OS::getprotobynumber (int proto) +getprotobynumber (int proto) { #if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS) ACE_UNUSED_ARG (proto); @@ -5328,9 +5335,9 @@ ACE_OS::getprotobynumber (int proto) } ACE_INLINE struct protoent * -ACE_OS::getprotobynumber_r (int proto, - struct protoent *result, - ACE_PROTOENT_DATA buffer) +getprotobynumber_r (int proto, + struct protoent *result, + ACE_PROTOENT_DATA buffer) { #if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS) ACE_UNUSED_ARG (proto); @@ -5374,7 +5381,7 @@ ACE_OS::getprotobynumber_r (int proto, } ACE_INLINE struct servent * -ACE_OS::getservbyname (const char *svc, const char *proto) +getservbyname (const char *svc, const char *proto) { ACE_OS_TRACE ("ACE_OS::getservbyname"); #if defined (ACE_LACKS_GETSERVBYNAME) @@ -5395,9 +5402,9 @@ ACE_OS::getservbyname (const char *svc, const char *proto) } ACE_INLINE int -ACE_OS::getsockname (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen) +getsockname (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen) { ACE_OS_TRACE ("ACE_OS::getsockname"); #if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) @@ -5414,11 +5421,11 @@ ACE_OS::getsockname (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::getsockopt (ACE_HANDLE handle, - int level, - int optname, - char *optval, - int *optlen) +getsockopt (ACE_HANDLE handle, + int level, + int optname, + char *optval, + int *optlen) { ACE_OS_TRACE ("ACE_OS::getsockopt"); ACE_SOCKCALL_RETURN (::getsockopt ((ACE_SOCKET) handle, @@ -5431,18 +5438,18 @@ ACE_OS::getsockopt (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::listen (ACE_HANDLE handle, int backlog) +listen (ACE_HANDLE handle, int backlog) { ACE_OS_TRACE ("ACE_OS::listen"); ACE_SOCKCALL_RETURN (::listen ((ACE_SOCKET) handle, backlog), int, -1); } ACE_INLINE int -ACE_OS::setsockopt (ACE_HANDLE handle, - int level, - int optname, - const char *optval, - int optlen) +setsockopt (ACE_HANDLE handle, + int level, + int optname, + const char *optval, + int optlen) { ACE_OS_TRACE ("ACE_OS::setsockopt"); @@ -5475,16 +5482,16 @@ ACE_OS::setsockopt (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::shutdown (ACE_HANDLE handle, int how) +shutdown (ACE_HANDLE handle, int how) { ACE_OS_TRACE ("ACE_OS::shutdown"); ACE_SOCKCALL_RETURN (::shutdown ((ACE_SOCKET) handle, how), int, -1); } ACE_INLINE ACE_HANDLE -ACE_OS::socket (int domain, - int type, - int proto) +socket (int domain, + int type, + int proto) { ACE_OS_TRACE ("ACE_OS::socket"); ACE_SOCKCALL_RETURN (::socket (domain, @@ -5495,12 +5502,12 @@ ACE_OS::socket (int domain, } ACE_INLINE ACE_HANDLE -ACE_OS::socket (int domain, - int type, - int proto, - ACE_Protocol_Info *protocolinfo, - ACE_SOCK_GROUP g, - u_long flags) +socket (int domain, + int type, + int proto, + ACE_Protocol_Info *protocolinfo, + ACE_SOCK_GROUP g, + u_long flags) { ACE_OS_TRACE ("ACE_OS::socket"); @@ -5525,14 +5532,14 @@ ACE_OS::socket (int domain, } ACE_INLINE int -ACE_OS::atoi (const char *s) +atoi (const char *s) { ACE_OSCALL_RETURN (::atoi (s), int, -1); } #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::atoi (const wchar_t *s) +atoi (const wchar_t *s) { #if defined (ACE_WIN32) ACE_OSCALL_RETURN (::_wtoi (s), int, -1); @@ -5544,7 +5551,7 @@ ACE_OS::atoi (const wchar_t *s) ACE_INLINE void * -ACE_OS::atop (const char *s) +atop (const char *s) { ACE_TRACE ("ACE_OS::atop"); // It would be nice to make use of Basic_Types.h here, but that @@ -5562,7 +5569,7 @@ ACE_OS::atop (const char *s) #if defined (ACE_HAS_WCHAR) ACE_INLINE void * -ACE_OS::atop (const wchar_t *s) +atop (const wchar_t *s) { # if defined (ACE_WIN64) __int64 ip = ::_wtoi64 (s); @@ -5575,14 +5582,14 @@ ACE_OS::atop (const wchar_t *s) #endif /* ACE_HAS_WCHAR */ ACE_INLINE double -ACE_OS::floor (double x) +floor (double x) { // This method computes the largest integral value not greater than x. return double (ACE_static_cast (long, x)); } ACE_INLINE double -ACE_OS::ceil (double x) +ceil (double x) { // This method computes the smallest integral value not less than x. double floor = ACE_OS::floor (x); @@ -5593,7 +5600,7 @@ ACE_OS::ceil (double x) } ACE_INLINE int -ACE_OS::recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags) +recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags) { ACE_OS_TRACE ("ACE_OS::recvmsg"); #if !defined (ACE_LACKS_RECVMSG) @@ -5630,9 +5637,9 @@ ACE_OS::recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags) } ACE_INLINE int -ACE_OS::sendmsg (ACE_HANDLE handle, - const struct msghdr *msg, - int flags) +sendmsg (ACE_HANDLE handle, + const struct msghdr *msg, + int flags) { ACE_OS_TRACE ("ACE_OS::sendmsg"); #if !defined (ACE_LACKS_SENDMSG) @@ -5670,14 +5677,14 @@ ACE_OS::sendmsg (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::fclose (FILE *fp) +fclose (FILE *fp) { ACE_OS_TRACE ("ACE_OS::fclose"); ACE_OSCALL_RETURN (::fclose (fp), int, -1); } ACE_INLINE ACE_TCHAR * -ACE_OS::fgets (ACE_TCHAR *buf, int size, FILE *fp) +fgets (ACE_TCHAR *buf, int size, FILE *fp) { ACE_OS_TRACE ("ACE_OS::fgets"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -5691,7 +5698,7 @@ ACE_OS::fgets (ACE_TCHAR *buf, int size, FILE *fp) // Win32 implementation of fopen(const ACE_TCHAR*, const ACE_TCHAR*) // is in OS.cpp. ACE_INLINE FILE * -ACE_OS::fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode) +fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fopen"); ACE_OSCALL_RETURN (::fopen (filename, mode), FILE *, 0); @@ -5699,7 +5706,7 @@ ACE_OS::fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode) #endif /* ACE_WIN32 */ ACE_INLINE FILE * -ACE_OS::freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) +freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) { ACE_OS_TRACE ("ACE_OS::freopen"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -5710,7 +5717,7 @@ ACE_OS::freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) } ACE_INLINE int -ACE_OS::fflush (FILE *fp) +fflush (FILE *fp) { ACE_OS_TRACE ("ACE_OS::fflush"); #if defined (VXWORKS) @@ -5725,7 +5732,7 @@ ACE_OS::fflush (FILE *fp) } ACE_INLINE size_t -ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp) +fread (void *ptr, size_t size, size_t nelems, FILE *fp) { ACE_OS_TRACE ("ACE_OS::fread"); #if defined (ACE_LACKS_POSIX_PROTOTYPES) @@ -5736,7 +5743,7 @@ ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp) } ACE_INLINE size_t -ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp) +fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp) { ACE_OS_TRACE ("ACE_OS::fwrite"); #if defined (ACE_LACKS_POSIX_PROTOTYPES) @@ -5747,8 +5754,8 @@ ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp) } ACE_INLINE int -ACE_OS::truncate (const ACE_TCHAR *filename, - off_t offset) +truncate (const ACE_TCHAR *filename, + off_t offset) { ACE_OS_TRACE ("ACE_OS::truncate"); #if defined (ACE_WIN32) @@ -5784,7 +5791,7 @@ ACE_OS::truncate (const ACE_TCHAR *filename, // Accessors to PWD file. ACE_INLINE struct passwd * -ACE_OS::getpwnam (const char *name) +getpwnam (const char *name) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5800,7 +5807,7 @@ ACE_OS::getpwnam (const char *name) } ACE_INLINE void -ACE_OS::setpwent (void) +setpwent (void) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5812,7 +5819,7 @@ ACE_OS::setpwent (void) } ACE_INLINE void -ACE_OS::endpwent (void) +endpwent (void) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5824,7 +5831,7 @@ ACE_OS::endpwent (void) } ACE_INLINE struct passwd * -ACE_OS::getpwent (void) +getpwent (void) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5838,8 +5845,8 @@ ACE_OS::getpwent (void) } ACE_INLINE struct passwd * -ACE_OS::getpwnam_r (const char *name, struct passwd *pwent, - char *buffer, int buflen) +getpwnam_r (const char *name, struct passwd *pwent, + char *buffer, int buflen) { #if defined (ACE_HAS_POSIX_GETPWNAM_R) struct passwd *result; @@ -5914,12 +5921,12 @@ ACE_OS::getpwnam_r (const char *name, struct passwd *pwent, #if !defined (VXWORKS) ACE_INLINE struct hostent * -ACE_OS::gethostbyaddr_r (const char *addr, - int length, - int type, - struct hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop) +gethostbyaddr_r (const char *addr, + int length, + int type, + struct hostent *result, + ACE_HOSTENT_DATA buffer, + int *h_errnop) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr_r"); # if defined (ACE_PSOS) @@ -5994,10 +6001,10 @@ ACE_OS::gethostbyaddr_r (const char *addr, } ACE_INLINE struct hostent * -ACE_OS::gethostbyname_r (const char *name, - struct hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop) +gethostbyname_r (const char *name, + struct hostent *result, + ACE_HOSTENT_DATA buffer, + int *h_errnop) { ACE_OS_TRACE ("ACE_OS::gethostbyname_r"); #if defined (ACE_PSOS) @@ -6079,7 +6086,7 @@ ACE_OS::gethostbyname_r (const char *name, // really needs gets, use ACE_OS::gets (char*, int) // instead. ACE_INLINE char * -ACE_OS::gets (char *str) +gets (char *str) { ACE_OS_TRACE ("ACE_OS::gets"); ACE_OSCALL_RETURN (::gets (str), char *, 0); @@ -6087,10 +6094,10 @@ ACE_OS::gets (char *str) #endif /* 0 */ ACE_INLINE struct servent * -ACE_OS::getservbyname_r (const char *svc, - const char *proto, - struct servent *result, - ACE_SERVENT_DATA buf) +getservbyname_r (const char *svc, + const char *proto, + struct servent *result, + ACE_SERVENT_DATA buf) { ACE_OS_TRACE ("ACE_OS::getservbyname_r"); #if defined (ACE_LACKS_GETSERVBYNAME) @@ -6151,7 +6158,7 @@ ACE_OS::getservbyname_r (const char *svc, } ACE_INLINE unsigned long -ACE_OS::inet_addr (const char *name) +inet_addr (const char *name) { ACE_OS_TRACE ("ACE_OS::inet_addr"); #if defined (VXWORKS) || defined (ACE_PSOS) @@ -6197,7 +6204,7 @@ ACE_OS::inet_addr (const char *name) // For pSOS, this function is in OS.cpp #if !defined (ACE_PSOS) ACE_INLINE char * -ACE_OS::inet_ntoa (const struct in_addr addr) +inet_ntoa (const struct in_addr addr) { ACE_OS_TRACE ("ACE_OS::inet_ntoa"); ACE_OSCALL_RETURN (::inet_ntoa (addr), @@ -6207,7 +6214,7 @@ ACE_OS::inet_ntoa (const struct in_addr addr) #endif /* defined (ACE_PSOS) */ ACE_INLINE int -ACE_OS::inet_pton (int family, const char *strptr, void *addrptr) +inet_pton (int family, const char *strptr, void *addrptr) { ACE_OS_TRACE ("ACE_OS::inet_pton"); @@ -6232,7 +6239,7 @@ ACE_OS::inet_pton (int family, const char *strptr, void *addrptr) } ACE_INLINE const char * -ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len) +inet_ntop (int family, const void *addrptr, char *strptr, size_t len) { ACE_OS_TRACE ("ACE_OS::inet_ntop"); @@ -6268,7 +6275,7 @@ ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len) } ACE_INLINE int -ACE_OS::set_errno_to_last_error (void) +set_errno_to_last_error (void) { # if defined (ACE_WIN32) // Borland C++ Builder 4 has a bug in the RTL that resets the @@ -6287,7 +6294,7 @@ ACE_OS::set_errno_to_last_error (void) } ACE_INLINE int -ACE_OS::set_errno_to_wsa_last_error (void) +set_errno_to_wsa_last_error (void) { # if defined (ACE_WIN32) // Borland C++ Builder 4 has a bug in the RTL that resets the @@ -6306,7 +6313,7 @@ ACE_OS::set_errno_to_wsa_last_error (void) } ACE_INLINE int -ACE_OS::last_error (void) +last_error (void) { // ACE_OS_TRACE ("ACE_OS::last_error"); @@ -6320,7 +6327,7 @@ ACE_OS::last_error (void) } ACE_INLINE void -ACE_OS::last_error (int error) +last_error (int error) { ACE_OS_TRACE ("ACE_OS::last_error"); #if defined (ACE_WIN32) @@ -6330,7 +6337,7 @@ ACE_OS::last_error (int error) } ACE_INLINE void -ACE_OS::perror (const ACE_TCHAR *s) +perror (const ACE_TCHAR *s) { ACE_OS_TRACE ("ACE_OS::perror"); #if defined (ACE_HAS_WINCE) @@ -6344,7 +6351,7 @@ ACE_OS::perror (const ACE_TCHAR *s) } ACE_INLINE int -ACE_OS::puts (const ACE_TCHAR *s) +puts (const ACE_TCHAR *s) { ACE_OS_TRACE ("ACE_OS::puts"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -6355,7 +6362,7 @@ ACE_OS::puts (const ACE_TCHAR *s) } ACE_INLINE int -ACE_OS::fputs (const ACE_TCHAR *s, FILE *stream) +fputs (const ACE_TCHAR *s, FILE *stream) { ACE_OS_TRACE ("ACE_OS::fputs"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -6366,7 +6373,7 @@ ACE_OS::fputs (const ACE_TCHAR *s, FILE *stream) } ACE_INLINE ACE_SignalHandler -ACE_OS::signal (int signum, ACE_SignalHandler func) +signal (int signum, ACE_SignalHandler func) { if (signum == 0) return 0; @@ -6395,7 +6402,7 @@ ACE_OS::signal (int signum, ACE_SignalHandler func) } ACE_INLINE int -ACE_OS::system (const ACE_TCHAR *s) +system (const ACE_TCHAR *s) { // ACE_OS_TRACE ("ACE_OS::system"); #if defined (CHORUS) || defined (ACE_HAS_WINCE) || defined(ACE_PSOS) @@ -6409,7 +6416,7 @@ ACE_OS::system (const ACE_TCHAR *s) } ACE_INLINE int -ACE_OS::thr_continue (ACE_hthread_t target_thread) +thr_continue (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_continue"); #if defined (ACE_HAS_THREADS) @@ -6442,7 +6449,7 @@ ACE_OS::thr_continue (ACE_hthread_t target_thread) } ACE_INLINE int -ACE_OS::thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) +thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) { #if defined (ACE_HAS_PTHREADS) # if defined (pthread_equal) @@ -6459,7 +6466,7 @@ ACE_OS::thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) } ACE_INLINE int -ACE_OS::thr_getconcurrency (void) +thr_getconcurrency (void) { ACE_OS_TRACE ("ACE_OS::thr_getconcurrency"); #if defined (ACE_HAS_THREADS) @@ -6476,7 +6483,7 @@ ACE_OS::thr_getconcurrency (void) } ACE_INLINE int -ACE_OS::thr_getprio (ACE_hthread_t id, int &priority, int &policy) +thr_getprio (ACE_hthread_t id, int &priority, int &policy) { ACE_OS_TRACE ("ACE_OS::thr_getprio"); ACE_UNUSED_ARG (policy); @@ -6539,18 +6546,20 @@ ACE_OS::thr_getprio (ACE_hthread_t id, int &priority, int &policy) } ACE_INLINE int -ACE_OS::thr_getprio (ACE_hthread_t id, int &priority) +thr_getprio (ACE_hthread_t id, int &priority) { ACE_OS_TRACE ("ACE_OS::thr_getprio"); int policy = 0; return ACE_OS::thr_getprio (id, priority, policy); } +} /* namespace ACE_OS */ #if defined (ACE_HAS_TSS_EMULATION) # if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) +namespace ACE_OS { ACE_INLINE int -ACE_OS::thr_getspecific (ACE_OS_thread_key_t key, void **data) +thr_getspecific (ACE_OS_thread_key_t key, void **data) { ACE_OS_TRACE ("ACE_OS::thr_getspecific"); # if defined (ACE_HAS_THREADS) @@ -6602,6 +6611,7 @@ ACE_OS::thr_getspecific (ACE_OS_thread_key_t key, void **data) ACE_NOTSUP_RETURN (-1); # endif /* ACE_HAS_THREADS */ } +} /* namespace ACE_OS */ # endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */ # if !defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) @@ -6676,9 +6686,9 @@ ACE_TSS_Emulation::ts_object (const ACE_thread_key_t key) #endif /* ACE_HAS_TSS_EMULATION */ - +namespace ACE_OS { ACE_INLINE int -ACE_OS::thr_getspecific (ACE_thread_key_t key, void **data) +thr_getspecific (ACE_thread_key_t key, void **data) { // ACE_OS_TRACE ("ACE_OS::thr_getspecific"); #if defined (ACE_HAS_THREADS) @@ -6747,8 +6757,8 @@ ACE_OS::thr_getspecific (ACE_thread_key_t key, void **data) #if !defined (VXWORKS) ACE_INLINE int -ACE_OS::thr_join (ACE_hthread_t thr_handle, - ACE_THR_FUNC_RETURN *status) +thr_join (ACE_hthread_t thr_handle, + ACE_THR_FUNC_RETURN *status) { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) @@ -6819,9 +6829,9 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, } ACE_INLINE int -ACE_OS::thr_join (ACE_thread_t waiter_id, - ACE_thread_t *thr_id, - ACE_THR_FUNC_RETURN *status) +thr_join (ACE_thread_t waiter_id, + ACE_thread_t *thr_id, + ACE_THR_FUNC_RETURN *status) { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) @@ -6866,7 +6876,7 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, #endif /* !VXWORKS */ ACE_INLINE int -ACE_OS::thr_setcancelstate (int new_state, int *old_state) +thr_setcancelstate (int new_state, int *old_state) { ACE_OS_TRACE ("ACE_OS::thr_setcancelstate"); #if defined (ACE_HAS_THREADS) @@ -6908,7 +6918,7 @@ ACE_OS::thr_setcancelstate (int new_state, int *old_state) } ACE_INLINE int -ACE_OS::thr_setcanceltype (int new_type, int *old_type) +thr_setcanceltype (int new_type, int *old_type) { ACE_OS_TRACE ("ACE_OS::thr_setcanceltype"); #if defined (ACE_HAS_THREADS) @@ -6942,7 +6952,7 @@ ACE_OS::thr_setcanceltype (int new_type, int *old_type) } ACE_INLINE int -ACE_OS::thr_cancel (ACE_thread_t thr_id) +thr_cancel (ACE_thread_t thr_id) { ACE_OS_TRACE ("ACE_OS::thr_cancel"); #if defined (ACE_HAS_THREADS) @@ -6965,7 +6975,7 @@ ACE_OS::thr_cancel (ACE_thread_t thr_id) } ACE_INLINE int -ACE_OS::sigwait (sigset_t *sset, int *sig) +sigwait (sigset_t *sset, int *sig) { ACE_OS_TRACE ("ACE_OS::sigwait"); int local_sig; @@ -7029,9 +7039,9 @@ ACE_OS::sigwait (sigset_t *sset, int *sig) } ACE_INLINE int -ACE_OS::sigtimedwait (const sigset_t *sset, - siginfo_t *info, - const ACE_Time_Value *timeout) +sigtimedwait (const sigset_t *sset, + siginfo_t *info, + const ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::sigtimedwait"); #if defined (ACE_HAS_SIGTIMEDWAIT) @@ -7057,8 +7067,8 @@ ACE_OS::sigtimedwait (const sigset_t *sset, } ACE_INLINE int -ACE_OS::sigwaitinfo (const sigset_t *sset, - siginfo_t *info) +sigwaitinfo (const sigset_t *sset, + siginfo_t *info) { ACE_OS_TRACE ("ACE_OS::sigwaitinfo"); // If this platform has sigtimedwait, it should have sigwaitinfo as well. @@ -7074,7 +7084,7 @@ ACE_OS::sigwaitinfo (const sigset_t *sset, } ACE_INLINE void -ACE_OS::thr_testcancel (void) +thr_testcancel (void) { ACE_OS_TRACE ("ACE_OS::thr_testcancel"); #if defined (ACE_HAS_THREADS) @@ -7095,9 +7105,9 @@ ACE_OS::thr_testcancel (void) } ACE_INLINE int -ACE_OS::thr_sigsetmask (int how, - const sigset_t *nsm, - sigset_t *osm) +thr_sigsetmask (int how, + const sigset_t *nsm, + sigset_t *osm) { ACE_OS_TRACE ("ACE_OS::thr_sigsetmask"); #if defined (ACE_HAS_THREADS) @@ -7178,7 +7188,7 @@ ACE_OS::thr_sigsetmask (int how, } ACE_INLINE int -ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) +thr_kill (ACE_thread_t thr_id, int signum) { ACE_OS_TRACE ("ACE_OS::thr_kill"); #if defined (ACE_HAS_THREADS) @@ -7223,7 +7233,7 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) } ACE_INLINE size_t -ACE_OS::thr_min_stack (void) +thr_min_stack (void) { ACE_OS_TRACE ("ACE_OS::thr_min_stack"); #if defined (ACE_HAS_THREADS) @@ -7272,7 +7282,7 @@ ACE_OS::thr_min_stack (void) } ACE_INLINE int -ACE_OS::thr_setconcurrency (int hint) +thr_setconcurrency (int hint) { ACE_OS_TRACE ("ACE_OS::thr_setconcurrency"); #if defined (ACE_HAS_THREADS) @@ -7298,7 +7308,7 @@ ACE_OS::thr_setconcurrency (int hint) } ACE_INLINE int -ACE_OS::thr_setprio (ACE_hthread_t id, int priority, int policy) +thr_setprio (ACE_hthread_t id, int priority, int policy) { ACE_OS_TRACE ("ACE_OS::thr_setprio"); ACE_UNUSED_ARG (policy); @@ -7368,7 +7378,7 @@ ACE_OS::thr_setprio (ACE_hthread_t id, int priority, int policy) } ACE_INLINE int -ACE_OS::thr_suspend (ACE_hthread_t target_thread) +thr_suspend (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_suspend"); #if defined (ACE_HAS_THREADS) @@ -7401,7 +7411,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread) } ACE_INLINE void -ACE_OS::thr_yield (void) +thr_yield (void) { ACE_OS_TRACE ("ACE_OS::thr_yield"); #if defined (ACE_HAS_THREADS) @@ -7431,7 +7441,7 @@ ACE_OS::thr_yield (void) } ACE_INLINE int -ACE_OS::priority_control (ACE_idtype_t idtype, ACE_id_t id, int cmd, void *arg) +priority_control (ACE_idtype_t idtype, ACE_id_t id, int cmd, void *arg) { ACE_OS_TRACE ("ACE_OS::priority_control"); #if defined (ACE_HAS_PRIOCNTL) @@ -7447,7 +7457,7 @@ ACE_OS::priority_control (ACE_idtype_t idtype, ACE_id_t id, int cmd, void *arg) } ACE_INLINE void -ACE_OS::rewind (FILE *fp) +rewind (FILE *fp) { #if !defined (ACE_HAS_WINCE) ACE_OS_TRACE ("ACE_OS::rewind"); @@ -7459,9 +7469,9 @@ ACE_OS::rewind (FILE *fp) } ACE_INLINE ssize_t -ACE_OS::readv (ACE_HANDLE handle, - iovec *iov, - int iovlen) +readv (ACE_HANDLE handle, + iovec *iov, + int iovlen) { ACE_OS_TRACE ("ACE_OS::readv"); #if defined (ACE_LACKS_READV) @@ -7474,9 +7484,9 @@ ACE_OS::readv (ACE_HANDLE handle, } ACE_INLINE ssize_t -ACE_OS::writev (ACE_HANDLE handle, - const iovec *iov, - int iovcnt) +writev (ACE_HANDLE handle, + const iovec *iov, + int iovcnt) { ACE_OS_TRACE ("ACE_OS::writev"); #if defined (ACE_LACKS_WRITEV) @@ -7491,9 +7501,9 @@ ACE_OS::writev (ACE_HANDLE handle, } ACE_INLINE ssize_t -ACE_OS::recvv (ACE_HANDLE handle, - iovec *buffers, - int n) +recvv (ACE_HANDLE handle, + iovec *buffers, + int n) { #if defined (ACE_HAS_WINSOCK2) @@ -7548,9 +7558,9 @@ ACE_OS::recvv (ACE_HANDLE handle, } ACE_INLINE ssize_t -ACE_OS::sendv (ACE_HANDLE handle, - const iovec *buffers, - int n) +sendv (ACE_HANDLE handle, + const iovec *buffers, + int n) { #if defined (ACE_HAS_WINSOCK2) DWORD bytes_sent = 0; @@ -7597,7 +7607,7 @@ ACE_OS::sendv (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value *timeout) +poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::poll"); #if defined (ACE_HAS_POLL) @@ -7613,7 +7623,7 @@ ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value *timeout) } ACE_INLINE int -ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout) +poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout) { ACE_OS_TRACE ("ACE_OS::poll"); #if defined (ACE_HAS_POLL) @@ -7628,7 +7638,7 @@ ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout) } ACE_INLINE char * -ACE_OS::compile (const char *instring, char *expbuf, char *endbuf) +compile (const char *instring, char *expbuf, char *endbuf) { ACE_OS_TRACE ("ACE_OS::compile"); #if defined (ACE_HAS_REGEX) @@ -7643,7 +7653,7 @@ ACE_OS::compile (const char *instring, char *expbuf, char *endbuf) } ACE_INLINE long -ACE_OS::filesize (const ACE_TCHAR *filename) +filesize (const ACE_TCHAR *filename) { ACE_OS_TRACE ("ACE_OS::filesize"); @@ -7659,7 +7669,7 @@ ACE_OS::filesize (const ACE_TCHAR *filename) } ACE_INLINE int -ACE_OS::closesocket (ACE_HANDLE handle) +closesocket (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::closesocket"); #if defined (ACE_WIN32) @@ -7672,7 +7682,7 @@ ACE_OS::closesocket (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS::access (const char *path, int amode) +access (const char *path, int amode) { ACE_OS_TRACE ("ACE_OS::access"); #if defined (ACE_LACKS_ACCESS) @@ -7706,7 +7716,7 @@ ACE_OS::access (const char *path, int amode) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::access (const wchar_t *path, int amode) +access (const wchar_t *path, int amode) { #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) ACE_OSCALL_RETURN (::_waccess (path, amode), int, -1); @@ -7717,7 +7727,7 @@ ACE_OS::access (const wchar_t *path, int amode) #endif /* ACE_HAS_WCHAR */ ACE_INLINE ACE_HANDLE -ACE_OS::creat (const ACE_TCHAR *filename, mode_t mode) +creat (const ACE_TCHAR *filename, mode_t mode) { ACE_OS_TRACE ("ACE_OS::creat"); #if defined (ACE_WIN32) @@ -7745,7 +7755,7 @@ ACE_OS::creat (const ACE_TCHAR *filename, mode_t mode) // string literals, and some compilers, e.g., g++, don't handle those // efficiently in unused inline functions. ACE_INLINE int -ACE_OS::uname (ACE_utsname *name) +uname (ACE_utsname *name) { #if defined (INTEGRITY) if(!name) { @@ -7766,7 +7776,7 @@ ACE_OS::uname (ACE_utsname *name) #endif /* ! ACE_WIN32 && ! VXWORKS && ! CHORUS */ ACE_INLINE int -ACE_OS::hostname (char name[], size_t maxnamelen) +hostname (char name[], size_t maxnamelen) { ACE_OS_TRACE ("ACE_OS::hostname"); #if defined (ACE_HAS_PHARLAP) @@ -7816,7 +7826,7 @@ ACE_OS::hostname (char name[], size_t maxnamelen) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS::hostname (wchar_t name[], size_t maxnamelen) +hostname (wchar_t name[], size_t maxnamelen) { #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (GetComputerNameW (name, @@ -7839,7 +7849,7 @@ ACE_OS::hostname (wchar_t name[], size_t maxnamelen) #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS::msgctl (int msqid, int cmd, struct msqid_ds *val) +msgctl (int msqid, int cmd, struct msqid_ds *val) { ACE_OS_TRACE ("ACE_OS::msgctl"); #if defined (ACE_HAS_SYSV_IPC) @@ -7854,7 +7864,7 @@ ACE_OS::msgctl (int msqid, int cmd, struct msqid_ds *val) } ACE_INLINE int -ACE_OS::msgget (key_t key, int msgflg) +msgget (key_t key, int msgflg) { ACE_OS_TRACE ("ACE_OS::msgget"); #if defined (ACE_HAS_SYSV_IPC) @@ -7868,8 +7878,8 @@ ACE_OS::msgget (key_t key, int msgflg) } ACE_INLINE int -ACE_OS::msgrcv (int int_id, void *buf, size_t len, - long type, int flags) +msgrcv (int int_id, void *buf, size_t len, + long type, int flags) { ACE_OS_TRACE ("ACE_OS::msgrcv"); #if defined (ACE_HAS_SYSV_IPC) @@ -7892,7 +7902,7 @@ ACE_OS::msgrcv (int int_id, void *buf, size_t len, } ACE_INLINE int -ACE_OS::msgsnd (int int_id, const void *buf, size_t len, int flags) +msgsnd (int int_id, const void *buf, size_t len, int flags) { ACE_OS_TRACE ("ACE_OS::msgsnd"); #if defined (ACE_HAS_SYSV_IPC) @@ -7914,7 +7924,7 @@ ACE_OS::msgsnd (int int_id, const void *buf, size_t len, int flags) } ACE_INLINE u_int -ACE_OS::alarm (u_int secs) +alarm (u_int secs) { ACE_OS_TRACE ("ACE_OS::alarm"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS) @@ -7927,7 +7937,7 @@ ACE_OS::alarm (u_int secs) } ACE_INLINE u_int -ACE_OS::ualarm (u_int usecs, u_int interval) +ualarm (u_int usecs, u_int interval) { ACE_OS_TRACE ("ACE_OS::ualarm"); @@ -7944,8 +7954,8 @@ ACE_OS::ualarm (u_int usecs, u_int interval) } ACE_INLINE u_int -ACE_OS::ualarm (const ACE_Time_Value &tv, - const ACE_Time_Value &tv_interval) +ualarm (const ACE_Time_Value &tv, + const ACE_Time_Value &tv_interval) { ACE_OS_TRACE ("ACE_OS::ualarm"); @@ -7964,7 +7974,7 @@ ACE_OS::ualarm (const ACE_Time_Value &tv, } ACE_INLINE int -ACE_OS::dlclose (ACE_SHLIB_HANDLE handle) +dlclose (ACE_SHLIB_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::dlclose"); #if defined (ACE_LACKS_DLCLOSE) @@ -8015,7 +8025,7 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle) } ACE_INLINE ACE_TCHAR * -ACE_OS::dlerror (void) +dlerror (void) { ACE_OS_TRACE ("ACE_OS::dlerror"); # if defined (ACE_HAS_SVR4_DYNAMIC_LINKING) @@ -8046,8 +8056,8 @@ ACE_OS::dlerror (void) } ACE_INLINE ACE_SHLIB_HANDLE -ACE_OS::dlopen (const ACE_TCHAR *fname, - int mode) +dlopen (const ACE_TCHAR *fname, + int mode) { ACE_OS_TRACE ("ACE_OS::dlopen"); @@ -8127,8 +8137,8 @@ ACE_OS::dlopen (const ACE_TCHAR *fname, } ACE_INLINE void * -ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, - const ACE_TCHAR *sname) +dlsym (ACE_SHLIB_HANDLE handle, + const ACE_TCHAR *sname) { ACE_OS_TRACE ("ACE_OS::dlsym"); @@ -8205,7 +8215,7 @@ ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, } ACE_INLINE int -ACE_OS::step (const char *str, char *expbuf) +step (const char *str, char *expbuf) { ACE_OS_TRACE ("ACE_OS::step"); #if defined (ACE_HAS_REGEX) @@ -8219,7 +8229,7 @@ ACE_OS::step (const char *str, char *expbuf) } ACE_INLINE long -ACE_OS::sysinfo (int cmd, char *buf, long count) +sysinfo (int cmd, char *buf, long count) { ACE_OS_TRACE ("ACE_OS::sysinfo"); #if defined (ACE_HAS_SYSINFO) @@ -8234,7 +8244,7 @@ ACE_OS::sysinfo (int cmd, char *buf, long count) } ACE_INLINE ssize_t -ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte) +write (ACE_HANDLE handle, const void *buf, size_t nbyte) { ACE_OS_TRACE ("ACE_OS::write"); #if defined (ACE_WIN32) @@ -8273,8 +8283,8 @@ ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte) } ACE_INLINE ssize_t -ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte, - ACE_OVERLAPPED *overlapped) +write (ACE_HANDLE handle, const void *buf, size_t nbyte, + ACE_OVERLAPPED *overlapped) { ACE_OS_TRACE ("ACE_OS::write"); overlapped = overlapped; @@ -8292,7 +8302,7 @@ ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte, } ACE_INLINE ssize_t -ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len) +read (ACE_HANDLE handle, void *buf, size_t len) { ACE_OS_TRACE ("ACE_OS::read"); #if defined (ACE_WIN32) @@ -8331,8 +8341,8 @@ ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len) } ACE_INLINE ssize_t -ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len, - ACE_OVERLAPPED *overlapped) +read (ACE_HANDLE handle, void *buf, size_t len, + ACE_OVERLAPPED *overlapped) { ACE_OS_TRACE ("ACE_OS::read"); overlapped = overlapped; @@ -8349,7 +8359,7 @@ ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len, } ACE_INLINE int -ACE_OS::readlink (const char *path, char *buf, size_t bufsiz) +readlink (const char *path, char *buf, size_t bufsiz) { ACE_OS_TRACE ("ACE_OS::readlink"); # if defined (ACE_LACKS_READLINK) || \ @@ -8368,10 +8378,10 @@ ACE_OS::readlink (const char *path, char *buf, size_t bufsiz) } ACE_INLINE int -ACE_OS::getmsg (ACE_HANDLE handle, - struct strbuf *ctl, - struct strbuf *data, - int *flags) +getmsg (ACE_HANDLE handle, + struct strbuf *ctl, + struct strbuf *data, + int *flags) { ACE_OS_TRACE ("ACE_OS::getmsg"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8388,11 +8398,11 @@ ACE_OS::getmsg (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::getpmsg (ACE_HANDLE handle, - struct strbuf *ctl, - struct strbuf *data, - int *band, - int *flags) +getpmsg (ACE_HANDLE handle, + struct strbuf *ctl, + struct strbuf *data, + int *band, + int *flags) { ACE_OS_TRACE ("ACE_OS::getpmsg"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8445,7 +8455,7 @@ ACE_OS::getrusage (int who, struct rusage *ru) } ACE_INLINE int -ACE_OS::isastream (ACE_HANDLE handle) +isastream (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::isastream"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8463,7 +8473,7 @@ ACE_OS::isastream (ACE_HANDLE handle) // to do with a mmap region. ACE_INLINE int -ACE_OS::mprotect (void *addr, size_t len, int prot) +mprotect (void *addr, size_t len, int prot) { ACE_OS_TRACE ("ACE_OS::mprotect"); #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) @@ -8480,7 +8490,7 @@ ACE_OS::mprotect (void *addr, size_t len, int prot) } ACE_INLINE int -ACE_OS::msync (void *addr, size_t len, int sync) +msync (void *addr, size_t len, int sync) { ACE_OS_TRACE ("ACE_OS::msync"); #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) @@ -8503,7 +8513,7 @@ ACE_OS::msync (void *addr, size_t len, int sync) } ACE_INLINE int -ACE_OS::munmap (void *addr, size_t len) +munmap (void *addr, size_t len) { ACE_OS_TRACE ("ACE_OS::munmap"); #if defined (ACE_WIN32) @@ -8520,7 +8530,7 @@ ACE_OS::munmap (void *addr, size_t len) } ACE_INLINE int -ACE_OS::madvise (caddr_t addr, size_t len, int map_advice) +madvise (caddr_t addr, size_t len, int map_advice) { ACE_OS_TRACE ("ACE_OS::madvise"); #if defined (ACE_WIN32) @@ -8540,8 +8550,8 @@ ACE_OS::madvise (caddr_t addr, size_t len, int map_advice) } ACE_INLINE int -ACE_OS::putmsg (ACE_HANDLE handle, const struct strbuf *ctl, - const struct strbuf *data, int flags) +putmsg (ACE_HANDLE handle, const struct strbuf *ctl, + const struct strbuf *data, int flags) { ACE_OS_TRACE ("ACE_OS::putmsg"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8576,11 +8586,11 @@ ACE_OS::putmsg (ACE_HANDLE handle, const struct strbuf *ctl, } ACE_INLINE int -ACE_OS::putpmsg (ACE_HANDLE handle, - const struct strbuf *ctl, - const struct strbuf *data, - int band, - int flags) +putpmsg (ACE_HANDLE handle, + const struct strbuf *ctl, + const struct strbuf *data, + int band, + int flags) { ACE_OS_TRACE ("ACE_OS::putpmsg"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8596,7 +8606,7 @@ ACE_OS::putpmsg (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::semctl (int int_id, int semnum, int cmd, semun value) +semctl (int int_id, int semnum, int cmd, semun value) { ACE_OS_TRACE ("ACE_OS::semctl"); #if defined (ACE_HAS_SYSV_IPC) @@ -8612,7 +8622,7 @@ ACE_OS::semctl (int int_id, int semnum, int cmd, semun value) } ACE_INLINE int -ACE_OS::semget (key_t key, int nsems, int flags) +semget (key_t key, int nsems, int flags) { ACE_OS_TRACE ("ACE_OS::semget"); #if defined (ACE_HAS_SYSV_IPC) @@ -8627,7 +8637,7 @@ ACE_OS::semget (key_t key, int nsems, int flags) } ACE_INLINE int -ACE_OS::semop (int int_id, struct sembuf *sops, size_t nsops) +semop (int int_id, struct sembuf *sops, size_t nsops) { ACE_OS_TRACE ("ACE_OS::semop"); #if defined (ACE_HAS_SYSV_IPC) @@ -8642,7 +8652,7 @@ ACE_OS::semop (int int_id, struct sembuf *sops, size_t nsops) } ACE_INLINE void * -ACE_OS::shmat (int int_id, void *shmaddr, int shmflg) +shmat (int int_id, void *shmaddr, int shmflg) { ACE_OS_TRACE ("ACE_OS::shmat"); #if defined (ACE_HAS_SYSV_IPC) @@ -8661,7 +8671,7 @@ ACE_OS::shmat (int int_id, void *shmaddr, int shmflg) } ACE_INLINE int -ACE_OS::shmctl (int int_id, int cmd, struct shmid_ds *buf) +shmctl (int int_id, int cmd, struct shmid_ds *buf) { ACE_OS_TRACE ("ACE_OS::shmctl"); #if defined (ACE_HAS_SYSV_IPC) @@ -8676,7 +8686,7 @@ ACE_OS::shmctl (int int_id, int cmd, struct shmid_ds *buf) } ACE_INLINE int -ACE_OS::shmdt (void *shmaddr) +shmdt (void *shmaddr) { ACE_OS_TRACE ("ACE_OS::shmdt"); #if defined (ACE_HAS_SYSV_IPC) @@ -8689,7 +8699,7 @@ ACE_OS::shmdt (void *shmaddr) } ACE_INLINE int -ACE_OS::shmget (key_t key, int size, int flags) +shmget (key_t key, int size, int flags) { ACE_OS_TRACE ("ACE_OS::shmget"); #if defined (ACE_HAS_SYSV_IPC) @@ -8704,7 +8714,7 @@ ACE_OS::shmget (key_t key, int size, int flags) } ACE_INLINE void -ACE_OS::tzset (void) +tzset (void) { #if !defined (ACE_HAS_WINCE) && !defined (VXWORKS) && !defined (ACE_PSOS) && ! defined(__rtems__) # if defined (ACE_WIN32) @@ -8718,14 +8728,14 @@ ACE_OS::tzset (void) } ACE_INLINE long -ACE_OS::timezone (void) +timezone (void) { return ::ace_timezone (); } #if !defined (ACE_LACKS_DIFFTIME) ACE_INLINE double -ACE_OS::difftime (time_t t1, time_t t0) +difftime (time_t t1, time_t t0) { return ::ace_difftime (t1, t0); } @@ -8735,7 +8745,7 @@ ACE_OS::difftime (time_t t1, time_t t0) static const int ctime_buf_size = 26; ACE_INLINE ACE_TCHAR * -ACE_OS::ctime (const time_t *t) +ctime (const time_t *t) { ACE_OS_TRACE ("ACE_OS::ctime"); #if defined (ACE_HAS_BROKEN_CTIME) @@ -8756,7 +8766,7 @@ ACE_OS::ctime (const time_t *t) #if !defined (ACE_HAS_WINCE) /* CE version in OS.cpp */ ACE_INLINE ACE_TCHAR * -ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) +ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) { ACE_OS_TRACE ("ACE_OS::ctime_r"); @@ -8808,7 +8818,7 @@ ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) #endif /* !ACE_HAS_WINCE */ ACE_INLINE struct tm * -ACE_OS::localtime (const time_t *t) +localtime (const time_t *t) { #if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) ACE_OS_TRACE ("ACE_OS::localtime"); @@ -8822,7 +8832,7 @@ ACE_OS::localtime (const time_t *t) } ACE_INLINE struct tm * -ACE_OS::gmtime (const time_t *t) +gmtime (const time_t *t) { #if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) ACE_OS_TRACE ("ACE_OS::gmtime"); @@ -8835,7 +8845,7 @@ ACE_OS::gmtime (const time_t *t) } ACE_INLINE struct tm * -ACE_OS::gmtime_r (const time_t *t, struct tm *res) +gmtime_r (const time_t *t, struct tm *res) { ACE_OS_TRACE ("ACE_OS::gmtime_r"); #if defined (ACE_HAS_REENTRANT_FUNCTIONS) @@ -8862,7 +8872,7 @@ ACE_OS::gmtime_r (const time_t *t, struct tm *res) } ACE_INLINE char * -ACE_OS::asctime (const struct tm *t) +asctime (const struct tm *t) { #if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) ACE_OS_TRACE ("ACE_OS::asctime"); @@ -8875,7 +8885,7 @@ ACE_OS::asctime (const struct tm *t) } ACE_INLINE char * -ACE_OS::asctime_r (const struct tm *t, char *buf, int buflen) +asctime_r (const struct tm *t, char *buf, int buflen) { ACE_OS_TRACE ("ACE_OS::asctime_r"); #if defined (ACE_HAS_REENTRANT_FUNCTIONS) @@ -8911,8 +8921,8 @@ ACE_OS::asctime_r (const struct tm *t, char *buf, int buflen) } ACE_INLINE size_t -ACE_OS::strftime (char *s, size_t maxsize, const char *format, - const struct tm *timeptr) +strftime (char *s, size_t maxsize, const char *format, + const struct tm *timeptr) { #if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) return ::strftime (s, maxsize, format, timeptr); @@ -8926,10 +8936,10 @@ ACE_OS::strftime (char *s, size_t maxsize, const char *format, } ACE_INLINE int -ACE_OS::flock_init (ACE_OS::ace_flock_t *lock, - int flags, - const ACE_TCHAR *name, - mode_t perms) +flock_init (ace_flock_t *lock, + int flags, + const ACE_TCHAR *name, + mode_t perms) { ACE_OS_TRACE ("ACE_OS::flock_init"); #if defined (CHORUS) @@ -9007,10 +9017,10 @@ ACE_OS::flock_init (ACE_OS::ace_flock_t *lock, #if defined (ACE_WIN32) ACE_INLINE void -ACE_OS::adjust_flock_params (ACE_OS::ace_flock_t *lock, - short whence, - off_t &start, - off_t &len) +adjust_flock_params (ace_flock_t *lock, + short whence, + off_t &start, + off_t &len) { switch (whence) { @@ -9031,10 +9041,10 @@ ACE_OS::adjust_flock_params (ACE_OS::ace_flock_t *lock, #endif /* ACE_WIN32 */ ACE_INLINE int -ACE_OS::flock_wrlock (ACE_OS::ace_flock_t *lock, - short whence, - off_t start, - off_t len) +flock_wrlock (ace_flock_t *lock, + short whence, + off_t start, + off_t len) { ACE_OS_TRACE ("ACE_OS::flock_wrlock"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9079,10 +9089,10 @@ ACE_OS::flock_wrlock (ACE_OS::ace_flock_t *lock, } ACE_INLINE int -ACE_OS::flock_rdlock (ACE_OS::ace_flock_t *lock, - short whence, - off_t start, - off_t len) +flock_rdlock (ace_flock_t *lock, + short whence, + off_t start, + off_t len) { ACE_OS_TRACE ("ACE_OS::flock_rdlock"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9127,10 +9137,10 @@ ACE_OS::flock_rdlock (ACE_OS::ace_flock_t *lock, } ACE_INLINE int -ACE_OS::flock_trywrlock (ACE_OS::ace_flock_t *lock, - short whence, - off_t start, - off_t len) +flock_trywrlock (ace_flock_t *lock, + short whence, + off_t start, + off_t len) { ACE_OS_TRACE ("ACE_OS::ace_flock_trywrlock"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9184,10 +9194,10 @@ ACE_OS::flock_trywrlock (ACE_OS::ace_flock_t *lock, } ACE_INLINE int -ACE_OS::flock_tryrdlock (ACE_OS::ace_flock_t *lock, - short whence, - off_t start, - off_t len) +flock_tryrdlock (ace_flock_t *lock, + short whence, + off_t start, + off_t len) { ACE_OS_TRACE ("ACE_OS::ace_flock_tryrdlock"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9240,10 +9250,10 @@ ACE_OS::flock_tryrdlock (ACE_OS::ace_flock_t *lock, } ACE_INLINE int -ACE_OS::flock_unlock (ACE_OS::ace_flock_t *lock, - short whence, - off_t start, - off_t len) +flock_unlock (ace_flock_t *lock, + short whence, + off_t start, + off_t len) { ACE_OS_TRACE ("ACE_OS::flock_unlock"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9279,8 +9289,8 @@ ACE_OS::flock_unlock (ACE_OS::ace_flock_t *lock, } ACE_INLINE int -ACE_OS::flock_destroy (ACE_OS::ace_flock_t *lock, - int unlink_file) +flock_destroy (ace_flock_t *lock, + int unlink_file) { ACE_OS_TRACE ("ACE_OS::flock_destroy"); if (lock->handle_ != ACE_INVALID_HANDLE) @@ -9323,8 +9333,8 @@ ACE_OS::flock_destroy (ACE_OS::ace_flock_t *lock, } ACE_INLINE int -ACE_OS::execv (const char *path, - char *const argv[]) +execv (const char *path, + char *const argv[]) { ACE_OS_TRACE ("ACE_OS::execv"); #if defined (ACE_LACKS_EXEC) @@ -9354,9 +9364,9 @@ ACE_OS::execv (const char *path, } ACE_INLINE int -ACE_OS::execve (const char *path, - char *const argv[], - char *const envp[]) +execve (const char *path, + char *const argv[], + char *const envp[]) { ACE_OS_TRACE ("ACE_OS::execve"); #if defined (ACE_LACKS_EXEC) @@ -9387,8 +9397,8 @@ ACE_OS::execve (const char *path, } ACE_INLINE int -ACE_OS::execvp (const char *file, - char *const argv[]) +execvp (const char *file, + char *const argv[]) { ACE_OS_TRACE ("ACE_OS::execvp"); #if defined (ACE_LACKS_EXEC) @@ -9418,7 +9428,7 @@ ACE_OS::execvp (const char *file, } ACE_INLINE FILE * -ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) +fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fdopen"); # if defined (ACE_HAS_WINCE) @@ -9469,7 +9479,7 @@ ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) } ACE_INLINE int -ACE_OS::getrlimit (int resource, struct rlimit *rl) +getrlimit (int resource, struct rlimit *rl) { ACE_OS_TRACE ("ACE_OS::getrlimit"); @@ -9488,7 +9498,7 @@ ACE_OS::getrlimit (int resource, struct rlimit *rl) } ACE_INLINE int -ACE_OS::setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl) +setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl) { ACE_OS_TRACE ("ACE_OS::setrlimit"); @@ -9507,8 +9517,8 @@ ACE_OS::setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl) } ACE_INLINE int -ACE_OS::socketpair (int domain, int type, - int protocol, ACE_HANDLE sv[2]) +socketpair (int domain, int type, + int protocol, ACE_HANDLE sv[2]) { ACE_OS_TRACE ("ACE_OS::socketpair"); #if defined (ACE_WIN32) || defined (ACE_LACKS_SOCKETPAIR) @@ -9525,7 +9535,7 @@ ACE_OS::socketpair (int domain, int type, } ACE_INLINE ACE_HANDLE -ACE_OS::dup (ACE_HANDLE handle) +dup (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::dup"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9553,7 +9563,7 @@ ACE_OS::dup (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS::dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) +dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) { ACE_OS_TRACE ("ACE_OS::dup2"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_PSOS) @@ -9572,7 +9582,7 @@ ACE_OS::dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) #endif /* ghs && ACE_HAS_PENTIUM */ ACE_INLINE ACE_hrtime_t -ACE_OS::gethrtime (const ACE_HRTimer_Op op) +gethrtime (const ACE_HRTimer_Op op) { ACE_OS_TRACE ("ACE_OS::gethrtime"); #if defined (ACE_HAS_HI_RES_TIMER) @@ -9714,7 +9724,7 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) } ACE_INLINE int -ACE_OS::fdetach (const char *file) +fdetach (const char *file) { ACE_OS_TRACE ("ACE_OS::fdetach"); #if defined (ACE_HAS_STREAM_PIPES) @@ -9727,7 +9737,7 @@ ACE_OS::fdetach (const char *file) } ACE_INLINE int -ACE_OS::fattach (int handle, const char *path) +fattach (int handle, const char *path) { ACE_OS_TRACE ("ACE_OS::fattach"); #if defined (ACE_HAS_STREAM_PIPES) @@ -9741,7 +9751,7 @@ ACE_OS::fattach (int handle, const char *path) } ACE_INLINE pid_t -ACE_OS::fork (void) +fork (void) { ACE_OS_TRACE ("ACE_OS::fork"); #if defined (ACE_LACKS_FORK) @@ -9752,7 +9762,7 @@ ACE_OS::fork (void) } ACE_INLINE int -ACE_OS::getpagesize (void) +getpagesize (void) { ACE_OS_TRACE ("ACE_OS::getpagesize"); #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) @@ -9770,7 +9780,7 @@ ACE_OS::getpagesize (void) } ACE_INLINE int -ACE_OS::allocation_granularity (void) +allocation_granularity (void) { #if defined (ACE_WIN32) SYSTEM_INFO sys_info; @@ -9782,7 +9792,7 @@ ACE_OS::allocation_granularity (void) } ACE_INLINE pid_t -ACE_OS::getpid (void) +getpid (void) { // ACE_OS_TRACE ("ACE_OS::getpid"); #if defined (ACE_WIN32) @@ -9798,7 +9808,7 @@ ACE_OS::getpid (void) } ACE_INLINE pid_t -ACE_OS::getpgid (pid_t pid) +getpgid (pid_t pid) { ACE_OS_TRACE ("ACE_OS::getpgid"); #if defined (ACE_LACKS_GETPGID) @@ -9820,7 +9830,7 @@ ACE_OS::getpgid (pid_t pid) } ACE_INLINE pid_t -ACE_OS::getppid (void) +getppid (void) { ACE_OS_TRACE ("ACE_OS::getppid"); #if defined (ACE_LACKS_GETPPID) @@ -9834,7 +9844,7 @@ ACE_OS::getppid (void) } ACE_INLINE int -ACE_OS::setpgid (pid_t pid, pid_t pgid) +setpgid (pid_t pid, pid_t pgid) { ACE_OS_TRACE ("ACE_OS::setpgid"); #if defined (ACE_LACKS_SETPGID) @@ -9852,7 +9862,7 @@ ACE_OS::setpgid (pid_t pid, pid_t pgid) } ACE_INLINE int -ACE_OS::setreuid (uid_t ruid, uid_t euid) +setreuid (uid_t ruid, uid_t euid) { ACE_OS_TRACE ("ACE_OS::setreuid"); #if defined (ACE_LACKS_SETREUID) @@ -9870,7 +9880,7 @@ ACE_OS::setreuid (uid_t ruid, uid_t euid) } ACE_INLINE int -ACE_OS::setregid (gid_t rgid, gid_t egid) +setregid (gid_t rgid, gid_t egid) { ACE_OS_TRACE ("ACE_OS::setregid"); #if defined (ACE_LACKS_SETREGID) @@ -9888,7 +9898,7 @@ ACE_OS::setregid (gid_t rgid, gid_t egid) } ACE_INLINE off_t -ACE_OS::lseek (ACE_HANDLE handle, off_t offset, int whence) +lseek (ACE_HANDLE handle, off_t offset, int whence) { ACE_OS_TRACE ("ACE_OS::lseek"); #if defined (ACE_WIN32) @@ -9946,7 +9956,7 @@ ACE_OS::lseek (ACE_HANDLE handle, off_t offset, int whence) #if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64) ACE_INLINE ACE_LOFF_T -ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) +llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) { ACE_OS_TRACE ("ACE_OS::llseek"); @@ -9973,7 +9983,7 @@ ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) #endif /* ACE_HAS_LLSEEK || ACE_HAS_LSEEK64 */ ACE_INLINE int -ACE_OS::fseek (FILE *fp, long offset, int whence) +fseek (FILE *fp, long offset, int whence) { # if defined (ACE_WIN32) # if SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END @@ -9999,32 +10009,32 @@ ACE_OS::fseek (FILE *fp, long offset, int whence) } ACE_INLINE long -ACE_OS::ftell (FILE* fp) +ftell (FILE* fp) { ACE_OSCALL_RETURN (::ftell (fp), long, -1); } ACE_INLINE int -ACE_OS::fgetpos (FILE* fp, fpos_t* pos) +fgetpos (FILE* fp, fpos_t* pos) { ACE_OSCALL_RETURN (::fgetpos (fp, pos), int, -1); } ACE_INLINE int -ACE_OS::fsetpos (FILE* fp, fpos_t* pos) +fsetpos (FILE* fp, fpos_t* pos) { ACE_OSCALL_RETURN (::fsetpos (fp, pos), int, -1); } ACE_INLINE int -ACE_OS::fgetc (FILE* fp) +fgetc (FILE* fp) { ACE_OSCALL_RETURN (::fgetc (fp), int, -1); } #if !defined (ACE_LACKS_CLEARERR) ACE_INLINE void -ACE_OS::clearerr (FILE* fp) +clearerr (FILE* fp) { ::clearerr(fp); } @@ -10033,7 +10043,7 @@ ACE_OS::clearerr (FILE* fp) #if defined (ACE_HAS_WCHAR) ACE_INLINE wint_t -ACE_OS::fgetwc (FILE* fp) +fgetwc (FILE* fp) { #if defined (ACE_LACKS_FGETWC) ACE_UNUSED_ARG (fp); @@ -10044,7 +10054,7 @@ ACE_OS::fgetwc (FILE* fp) } ACE_INLINE wint_t -ACE_OS::ungetwc (wint_t c, FILE* fp) +ungetwc (wint_t c, FILE* fp) { #if defined (ACE_LACKS_FGETWC) ACE_UNUSED_ARG (c); @@ -10058,10 +10068,10 @@ ACE_OS::ungetwc (wint_t c, FILE* fp) #endif /* ACE_HAS_WCHAR */ ACE_INLINE pid_t -ACE_OS::waitpid (pid_t pid, - ACE_exitcode *status, - int wait_options, - ACE_HANDLE handle) +waitpid (pid_t pid, + ACE_exitcode *status, + int wait_options, + ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::waitpid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -10130,10 +10140,10 @@ ACE_OS::waitpid (pid_t pid, } ACE_INLINE pid_t -ACE_OS::wait (pid_t pid, - ACE_exitcode *status, - int wait_options, - ACE_HANDLE handle) +wait (pid_t pid, + ACE_exitcode *status, + int wait_options, + ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::wait"); return ACE_OS::waitpid (pid, @@ -10143,7 +10153,7 @@ ACE_OS::wait (pid_t pid, } ACE_INLINE pid_t -ACE_OS::wait (int *status) +wait (int *status) { ACE_OS_TRACE ("ACE_OS::wait"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined(CHORUS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -10160,9 +10170,9 @@ ACE_OS::wait (int *status) } ACE_INLINE int -ACE_OS::ioctl (ACE_HANDLE handle, - int cmd, - void *val) +ioctl (ACE_HANDLE handle, + int cmd, + void *val) { ACE_OS_TRACE ("ACE_OS::ioctl"); @@ -10180,7 +10190,7 @@ ACE_OS::ioctl (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS::kill (pid_t pid, int signum) +kill (pid_t pid, int signum) { ACE_OS_TRACE ("ACE_OS::kill"); #if defined (ACE_WIN32) || defined (CHORUS) || defined (ACE_PSOS) @@ -10193,9 +10203,9 @@ ACE_OS::kill (pid_t pid, int signum) } ACE_INLINE int -ACE_OS::sigaction (int signum, - const struct sigaction *nsa, - struct sigaction *osa) +sigaction (int signum, + const struct sigaction *nsa, + struct sigaction *osa) { ACE_OS_TRACE ("ACE_OS::sigaction"); if (signum == 0) @@ -10227,7 +10237,7 @@ ACE_OS::sigaction (int signum, } ACE_INLINE ACE_TCHAR * -ACE_OS::getcwd (ACE_TCHAR *buf, size_t size) +getcwd (ACE_TCHAR *buf, size_t size) { ACE_OS_TRACE ("ACE_OS::getcwd"); #if defined (ACE_PSOS_LACKS_PHILE) @@ -10330,7 +10340,7 @@ ACE_OS::getcwd (ACE_TCHAR *buf, size_t size) } ACE_INLINE int -ACE_OS::sleep (u_int seconds) +sleep (u_int seconds) { ACE_OS_TRACE ("ACE_OS::sleep"); #if defined (ACE_WIN32) @@ -10363,7 +10373,7 @@ ACE_OS::sleep (u_int seconds) } ACE_INLINE int -ACE_OS::sleep (const ACE_Time_Value &tv) +sleep (const ACE_Time_Value &tv) { ACE_OS_TRACE ("ACE_OS::sleep"); #if defined (ACE_WIN32) @@ -10383,8 +10393,8 @@ ACE_OS::sleep (const ACE_Time_Value &tv) } ACE_INLINE int -ACE_OS::nanosleep (const struct timespec *requested, - struct timespec *remaining) +nanosleep (const struct timespec *requested, + struct timespec *remaining) { ACE_OS_TRACE ("ACE_OS::nanosleep"); #if defined (ACE_HAS_CLOCK_GETTIME) @@ -10444,7 +10454,7 @@ ACE_OS::nanosleep (const struct timespec *requested, } ACE_INLINE int -ACE_OS::mkdir (const ACE_TCHAR *path, mode_t mode) +mkdir (const ACE_TCHAR *path, mode_t mode) { #if defined (ACE_PSOS_LACKS_PHILE) ACE_UNUSED_ARG (path); @@ -10508,7 +10518,7 @@ ACE_OS::mkdir (const ACE_TCHAR *path, mode_t mode) } ACE_INLINE char * -ACE_OS::getenv (const char *symbol) +getenv (const char *symbol) { ACE_OS_TRACE ("ACE_OS::getenv"); #if defined (ACE_LACKS_ENV) @@ -10524,7 +10534,7 @@ ACE_OS::getenv (const char *symbol) #if defined (ACE_HAS_WCHAR) && defined (ACE_WIN32) ACE_INLINE wchar_t * -ACE_OS::getenv (const wchar_t *symbol) +getenv (const wchar_t *symbol) { #if defined (ACE_LACKS_ENV) ACE_UNUSED_ARG (symbol); @@ -10542,7 +10552,7 @@ extern "C" { #endif ACE_INLINE int -ACE_OS::putenv (const ACE_TCHAR *string) +putenv (const ACE_TCHAR *string) { ACE_OS_TRACE ("ACE_OS::putenv"); #if defined (ACE_HAS_WINCE) || defined (ACE_PSOS) @@ -10577,7 +10587,7 @@ ACE_Str_Buf::ACE_Str_Buf (strbuf &sb) } ACE_INLINE u_int -ACE_OS::wslen (const WChar *s) +wslen (const WChar *s) { u_int len = 0; @@ -10588,7 +10598,7 @@ ACE_OS::wslen (const WChar *s) } ACE_INLINE ACE_OS::WChar * -ACE_OS::wscpy (WChar *dest, const WChar *src) +wscpy (WChar *dest, const WChar *src) { WChar *original_dest = dest; @@ -10599,7 +10609,7 @@ ACE_OS::wscpy (WChar *dest, const WChar *src) } ACE_INLINE int -ACE_OS::wscmp (const WChar *s, const WChar *t) +wscmp (const WChar *s, const WChar *t) { const WChar *scan1 = s; const WChar *scan2 = t; @@ -10614,7 +10624,7 @@ ACE_OS::wscmp (const WChar *s, const WChar *t) } ACE_INLINE int -ACE_OS::wsncmp (const WChar *s, const WChar *t, size_t len) +wsncmp (const WChar *s, const WChar *t, size_t len) { const WChar *scan1 = s; const WChar *scan2 = t; @@ -10639,20 +10649,20 @@ ACE_cond_t::waiters (void) const #if 0 ACE_INLINE int -ACE_OS::thr_continue (const ACE_Thread_ID &thr_id) +thr_continue (const ACE_Thread_ID &thr_id) { ACE_OS_TRACE ("ACE_OS::thr_continue"); return ACE_OS::thr_continue (thr_id.id ()); } ACE_INLINE int -ACE_OS::thr_create (ACE_THR_FUNC func, - void *args, - long flags, - ACE_Thread_ID *thr_id, - long priority, - void *stack, - size_t stacksize); +thr_create (ACE_THR_FUNC func, + void *args, + long flags, + ACE_Thread_ID *thr_id, + long priority, + void *stack, + size_t stacksize); { ACE_OS_TRACE ("ACE_OS::thr_create"); ACE_thread_t thread_id; @@ -10672,14 +10682,14 @@ ACE_OS::thr_create (ACE_THR_FUNC func, } ACE_INLINE int -ACE_OS::thr_getprio (const ACE_Thread_ID &thr_id, int &prio) +thr_getprio (const ACE_Thread_ID &thr_id, int &prio) { ACE_OS_TRACE ("ACE_OS::thr_getprio"); return ACE_OS::thr_getprio (thr_id.handle (), prio); } ACE_INLINE int -ACE_OS::thr_join (const ACE_Thread_ID &thr_id, ACE_THR_FUNC_RETURN *status) +thr_join (const ACE_Thread_ID &thr_id, ACE_THR_FUNC_RETURN *status) { # if defined (ACE_WIN32) return ACE_OS::thr_join (thr_id.handle (), status); @@ -10689,19 +10699,19 @@ ACE_OS::thr_join (const ACE_Thread_ID &thr_id, ACE_THR_FUNC_RETURN *status) } ACE_INLINE int -ACE_OS::thr_cancel (const ACE_Thread_ID &thr_id) +thr_cancel (const ACE_Thread_ID &thr_id) { return ACE_OS::thr_cancel (thr_id.id ()); } ACE_INLINE int -ACE_OS::thr_kill (const ACE_Thread_ID &thr_id, int signum) +thr_kill (const ACE_Thread_ID &thr_id, int signum) { return ACE_OS::thr_kill (thr_id.id (), signum); } ACE_INLINE ACE_Thread_ID -ACE_OS::thr_self (void) +thr_self (void) { ACE_hthread_t thr_handle; ACE_OS::thr_self (thr_handle); @@ -10711,14 +10721,14 @@ ACE_OS::thr_self (void) } ACE_INLINE int -ACE_OS::thr_setprio (const ACE_Thread_ID &thr_id, int prio) +thr_setprio (const ACE_Thread_ID &thr_id, int prio) { ACE_OS_TRACE ("ACE_OS::thr_setprio"); return ACE_OS::thr_setprio (thr_id.handle (), prio); } ACE_INLINE int -ACE_OS::thr_suspend (const ACE_Thread_ID &thr_id) +thr_suspend (const ACE_Thread_ID &thr_id) { return ACE_OS::thr_suspend (thr_id.handle ()); } @@ -10726,7 +10736,7 @@ ACE_OS::thr_suspend (const ACE_Thread_ID &thr_id) #endif /* 0 */ ACE_INLINE int -ACE_OS::sigaddset (sigset_t *s, int signum) +sigaddset (sigset_t *s, int signum) { ACE_OS_TRACE ("ACE_OS::sigaddset"); #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) @@ -10757,7 +10767,7 @@ ACE_OS::sigaddset (sigset_t *s, int signum) } ACE_INLINE int -ACE_OS::sigdelset (sigset_t *s, int signum) +sigdelset (sigset_t *s, int signum) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10787,7 +10797,7 @@ ACE_OS::sigdelset (sigset_t *s, int signum) } ACE_INLINE int -ACE_OS::sigemptyset (sigset_t *s) +sigemptyset (sigset_t *s) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10808,7 +10818,7 @@ ACE_OS::sigemptyset (sigset_t *s) } ACE_INLINE int -ACE_OS::sigfillset (sigset_t *s) +sigfillset (sigset_t *s) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10829,7 +10839,7 @@ ACE_OS::sigfillset (sigset_t *s) } ACE_INLINE int -ACE_OS::sigismember (sigset_t *s, int signum) +sigismember (sigset_t *s, int signum) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10865,7 +10875,7 @@ ACE_OS::sigismember (sigset_t *s, int signum) } ACE_INLINE int -ACE_OS::sigsuspend (const sigset_t *sigset) +sigsuspend (const sigset_t *sigset) { #if defined (ACE_HAS_SIGSUSPEND) sigset_t s; @@ -10883,7 +10893,7 @@ ACE_OS::sigsuspend (const sigset_t *sigset) } ACE_INLINE int -ACE_OS::sigprocmask (int how, const sigset_t *nsp, sigset_t *osp) +sigprocmask (int how, const sigset_t *nsp, sigset_t *osp) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) ACE_UNUSED_ARG (how); @@ -10900,7 +10910,7 @@ ACE_OS::sigprocmask (int how, const sigset_t *nsp, sigset_t *osp) } ACE_INLINE int -ACE_OS::pthread_sigmask (int how, const sigset_t *nsp, sigset_t *osp) +pthread_sigmask (int how, const sigset_t *nsp, sigset_t *osp) { #if defined (ACE_HAS_PTHREADS_STD) && !defined (ACE_LACKS_PTHREAD_SIGMASK) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigmask (how, nsp, osp), @@ -10939,11 +10949,11 @@ ACE_Cleanup::ACE_Cleanup (void) } ACE_INLINE void * -ACE_OS::bsearch (const void *key, - const void *base, - size_t nel, - size_t size, - ACE_COMPARE_FUNC compar) +bsearch (const void *key, + const void *base, + size_t nel, + size_t size, + ACE_COMPARE_FUNC compar) { #if !defined (ACE_LACKS_BSEARCH) return ::bsearch (key, base, nel, size, compar); @@ -10958,7 +10968,7 @@ ACE_OS::bsearch (const void *key, } ACE_INLINE void -ACE_OS::qsort (void *base, +qsort (void *base, size_t nel, size_t width, ACE_COMPARE_FUNC compar) @@ -10974,7 +10984,7 @@ ACE_OS::qsort (void *base, } ACE_INLINE int -ACE_OS::setuid (uid_t uid) +setuid (uid_t uid) { ACE_OS_TRACE ("ACE_OS::setuid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -10990,7 +11000,7 @@ ACE_OS::setuid (uid_t uid) } ACE_INLINE uid_t -ACE_OS::getuid (void) +getuid (void) { ACE_OS_TRACE ("ACE_OS::getuid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11004,7 +11014,7 @@ ACE_OS::getuid (void) } ACE_INLINE int -ACE_OS::setgid (gid_t gid) +setgid (gid_t gid) { ACE_OS_TRACE ("ACE_OS::setgid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11020,7 +11030,7 @@ ACE_OS::setgid (gid_t gid) } ACE_INLINE gid_t -ACE_OS::getgid (void) +getgid (void) { ACE_OS_TRACE ("ACE_OS::getgid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11034,7 +11044,7 @@ ACE_OS::getgid (void) } ACE_INLINE ACE_EXIT_HOOK -ACE_OS::set_exit_hook (ACE_EXIT_HOOK exit_hook) +set_exit_hook (ACE_EXIT_HOOK exit_hook) { ACE_EXIT_HOOK old_hook = exit_hook_; exit_hook_ = exit_hook; @@ -11042,7 +11052,7 @@ ACE_OS::set_exit_hook (ACE_EXIT_HOOK exit_hook) } ACE_INLINE int -ACE_OS::isatty (int handle) +isatty (int handle) { #if defined (ACE_LACKS_ISATTY) ACE_UNUSED_ARG (handle); @@ -11058,7 +11068,7 @@ ACE_OS::isatty (int handle) #if defined (ACE_WIN32) ACE_INLINE int -ACE_OS::isatty (ACE_HANDLE handle) +isatty (ACE_HANDLE handle) { #if defined (ACE_LACKS_ISATTY) ACE_UNUSED_ARG (handle); @@ -11077,7 +11087,7 @@ ACE_OS::isatty (ACE_HANDLE handle) } ACE_INLINE void -ACE_OS::fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode) +fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode) { switch (x) { @@ -11126,7 +11136,7 @@ ACE_OS::fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode) // . ACE_INLINE ACE_TCHAR * -ACE_OS::strenvdup (const ACE_TCHAR *str) +strenvdup (const ACE_TCHAR *str) { #if defined (ACE_HAS_WINCE) // WinCE doesn't have environment variables so we just skip it. @@ -11191,20 +11201,22 @@ ACE_Countdown_Time::update (void) #if defined (ACE_WIN32) ACE_INLINE const OSVERSIONINFO & -ACE_OS::get_win32_versioninfo () +get_win32_versioninfo () { return ACE_OS::win32_versioninfo_; } ACE_INLINE HINSTANCE -ACE_OS::get_win32_resource_module () +get_win32_resource_module () { return ACE_OS::win32_resource_module_; } ACE_INLINE void -ACE_OS::set_win32_resource_module (HINSTANCE instance) +set_win32_resource_module (HINSTANCE instance) { ACE_OS::win32_resource_module_ = instance; } #endif /* ACE_WIN32 */ + +}; /* namespace ACE_OS */ diff --git a/ace/OS_Dirent.cpp b/ace/OS_Dirent.cpp index 6941272d452..273e6081970 100644 --- a/ace/OS_Dirent.cpp +++ b/ace/OS_Dirent.cpp @@ -6,6 +6,11 @@ #include "ace/Log_Msg.h" #include "ace/OS.h" +extern "C" +{ + typedef int (*ACE_SCANDIR_COMPARATOR) (const void *, const void *); +} + /* These definitions are missing on the original VC6 distribution. The new headers that define these are available in the Platform SDK and are defined @@ -26,8 +31,9 @@ ACE_RCSID(ace, OS_Dirent, "$Id$") # include "ace/OS_Dirent.inl" #endif /* ACE_HAS_INLINED_OS_CALLS */ +namespace ACE_OS { ACE_DIR * -ACE_OS_Dirent::opendir_emulation (const ACE_TCHAR *filename) +opendir_emulation (const ACE_TCHAR *filename) { #if defined (ACE_WIN32) ACE_DIR *dir; @@ -87,7 +93,7 @@ ACE_OS_Dirent::opendir_emulation (const ACE_TCHAR *filename) } void -ACE_OS_Dirent::closedir_emulation (ACE_DIR *d) +closedir_emulation (ACE_DIR *d) { #if defined (ACE_WIN32) if (d->current_handle_ != INVALID_HANDLE_VALUE) @@ -106,7 +112,7 @@ ACE_OS_Dirent::closedir_emulation (ACE_DIR *d) } dirent * -ACE_OS_Dirent::readdir_emulation (ACE_DIR *d) +readdir_emulation (ACE_DIR *d) { #if defined (ACE_WIN32) if (d->dirent_ != 0) @@ -158,17 +164,12 @@ ACE_OS_Dirent::readdir_emulation (ACE_DIR *d) #endif /* ACE_WIN32 */ } -extern "C" -{ - typedef int (*ACE_SCANDIR_COMPARATOR) (const void *, const void *); -} - int -ACE_OS_Dirent::scandir_emulation (const ACE_TCHAR *dirname, - dirent **namelist[], - int (*selector) (const dirent *entry), - int (*comparator) (const dirent **f1, - const dirent **f2)) +scandir_emulation (const ACE_TCHAR *dirname, + dirent **namelist[], + int (*selector) (const dirent *entry), + int (*comparator) (const dirent **f1, + const dirent **f2)) { ACE_DIR *dirp = ACE_OS_Dirent::opendir (dirname); @@ -275,3 +276,5 @@ ACE_OS_Dirent::scandir_emulation (const ACE_TCHAR *dirname, return nfiles; } + +} /* namespace ACE_OS */ diff --git a/ace/OS_Dirent.h b/ace/OS_Dirent.h index 3c0fb782d03..7f51c93c0c2 100644 --- a/ace/OS_Dirent.h +++ b/ace/OS_Dirent.h @@ -27,41 +27,40 @@ #include "ace/os_include/sys/os_types.h" /** - * @class ACE_OS_Dirent + * @namespace ACE_OS_Dirent * * @brief This class is a wrapper for the dirent.h operations * */ -class ACE_OS_Export ACE_OS_Dirent -{ -public: - static ACE_DIR *opendir (const ACE_TCHAR *filename); - static void closedir (ACE_DIR *); - static dirent *readdir (ACE_DIR *); - static int readdir_r (ACE_DIR *dirp, +#define ACE_OS_Dirent ACE_OS +namespace ACE_OS { + ACE_DIR *opendir (const ACE_TCHAR *filename); + void closedir (ACE_DIR *); + dirent *readdir (ACE_DIR *); + int readdir_r (ACE_DIR *dirp, struct dirent *entry, struct dirent **result); - static long telldir (ACE_DIR *); - static void seekdir (ACE_DIR *, + long telldir (ACE_DIR *); + void seekdir (ACE_DIR *, long loc); - static void rewinddir (ACE_DIR *); + void rewinddir (ACE_DIR *); - static int scandir (const ACE_TCHAR *dirname, + int scandir (const ACE_TCHAR *dirname, struct dirent **namelist[], int (*selector) (const struct dirent *filename), int (*comparator) (const struct dirent **f1, const struct dirent **f2)); -private: + // Win32 emulation functions - static ACE_DIR *opendir_emulation (const ACE_TCHAR *filename); - static int scandir_emulation (const ACE_TCHAR *dirname, + ACE_DIR *opendir_emulation (const ACE_TCHAR *filename); + int scandir_emulation (const ACE_TCHAR *dirname, dirent **namelist[], int (*selector)(const dirent *entry), int (*comparator)(const dirent **f1, const dirent**f2)); - static void closedir_emulation (ACE_DIR *); - static dirent *readdir_emulation (ACE_DIR *); -}; + void closedir_emulation (ACE_DIR *); + dirent *readdir_emulation (ACE_DIR *); +}; /* namespace ACE_OS */ # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) diff --git a/ace/OS_Dirent.inl b/ace/OS_Dirent.inl index 314f33f32da..9a93c1a9b9f 100644 --- a/ace/OS_Dirent.inl +++ b/ace/OS_Dirent.inl @@ -1,8 +1,9 @@ // -*- C++ -*- // $Id$ +namespace ACE_OS { ACE_INLINE ACE_DIR * -ACE_OS_Dirent::opendir (const ACE_TCHAR *filename) +opendir (const ACE_TCHAR *filename) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) @@ -36,7 +37,7 @@ ACE_OS_Dirent::opendir (const ACE_TCHAR *filename) } ACE_INLINE void -ACE_OS_Dirent::closedir (ACE_DIR *d) +closedir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) @@ -63,7 +64,7 @@ ACE_OS_Dirent::closedir (ACE_DIR *d) } ACE_INLINE struct dirent * -ACE_OS_Dirent::readdir (ACE_DIR *d) +readdir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) @@ -91,9 +92,9 @@ ACE_OS_Dirent::readdir (ACE_DIR *d) } ACE_INLINE int -ACE_OS_Dirent::readdir_r (ACE_DIR *dirp, - struct dirent *entry, - struct dirent **result) +readdir_r (ACE_DIR *dirp, + struct dirent *entry, + struct dirent **result) { #if !defined (ACE_HAS_REENTRANT_FUNCTIONS) ACE_UNUSED_ARG (entry); @@ -136,7 +137,7 @@ ACE_OS_Dirent::readdir_r (ACE_DIR *dirp, } ACE_INLINE long -ACE_OS_Dirent::telldir (ACE_DIR *d) +telldir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_TELLDIR) return ::telldir (d); @@ -147,7 +148,7 @@ ACE_OS_Dirent::telldir (ACE_DIR *d) } ACE_INLINE void -ACE_OS_Dirent::seekdir (ACE_DIR *d, long loc) +seekdir (ACE_DIR *d, long loc) { #if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_SEEKDIR) ::seekdir (d, loc); @@ -158,7 +159,7 @@ ACE_OS_Dirent::seekdir (ACE_DIR *d, long loc) } ACE_INLINE void -ACE_OS_Dirent::rewinddir (ACE_DIR *d) +rewinddir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_LACKS_SEEKDIR) @@ -178,11 +179,11 @@ ACE_OS_Dirent::rewinddir (ACE_DIR *d) } ACE_INLINE int -ACE_OS_Dirent::scandir (const ACE_TCHAR *dirname, - struct dirent **namelist[], - int (*selector)(const struct dirent *), - int (*comparator) (const struct dirent **f1, - const struct dirent **f2)) +scandir (const ACE_TCHAR *dirname, + struct dirent **namelist[], + int (*selector)(const struct dirent *), + int (*comparator) (const struct dirent **f1, + const struct dirent **f2)) { #if defined (ACE_HAS_SCANDIR) return ::scandir (dirname, namelist, selector, comparator); @@ -190,3 +191,4 @@ ACE_OS_Dirent::scandir (const ACE_TCHAR *dirname, return ACE_OS_Dirent::scandir_emulation (dirname, namelist, selector, comparator); #endif /* ACE_HAS_SCANDIR */ } +} /* namespace ACE_OS */ diff --git a/ace/OS_Memory.cpp b/ace/OS_Memory.cpp index aed484de9d8..e9e7634f65d 100644 --- a/ace/OS_Memory.cpp +++ b/ace/OS_Memory.cpp @@ -14,14 +14,15 @@ static int shut_up_aCC = 0; #include "ace/os_include/os_stdlib.h" +namespace ACE_OS { void * -ACE_OS_Memory::malloc (size_t nbytes) +malloc (size_t nbytes) { return ACE_MALLOC_FUNC (nbytes); } void * -ACE_OS_Memory::calloc (size_t elements, size_t sizeof_elements) +calloc (size_t elements, size_t sizeof_elements) { #if !defined (ACE_HAS_WINCE) return ACE_CALLOC_FUNC (elements, sizeof_elements); @@ -33,13 +34,15 @@ ACE_OS_Memory::calloc (size_t elements, size_t sizeof_elements) } void * -ACE_OS_Memory::realloc (void *ptr, size_t nbytes) +realloc (void *ptr, size_t nbytes) { return ACE_REALLOC_FUNC (ACE_MALLOC_T (ptr), nbytes); } void -ACE_OS_Memory::free (void *ptr) +free (void *ptr) { ACE_FREE_FUNC (ACE_MALLOC_T (ptr)); } + +} /* namespace ACE_OS */ diff --git a/ace/OS_Memory.h b/ace/OS_Memory.h index e914deebd1a..522a18d99e2 100644 --- a/ace/OS_Memory.h +++ b/ace/OS_Memory.h @@ -233,21 +233,21 @@ typedef void *ACE_MALLOC_T; //@} /** - * @class ACE_OS_Memory + * @namespace ACE_OS_Memory * * @brief This class is a wrapper for dynamic memory operations. * */ -class ACE_OS_Export ACE_OS_Memory +#define ACE_OS_Memory ACE_OS +namespace ACE_OS { -public: // = A set of wrappers for memory managment. - static void *sbrk (int brk); - static void *calloc (size_t elements, size_t sizeof_elements); - static void *malloc (size_t); - static void *realloc (void *, size_t); - static void free (void *); -}; + void *sbrk (int brk); + void *calloc (size_t elements, size_t sizeof_elements); + void *malloc (size_t); + void *realloc (void *, size_t); + void free (void *); +} /* namespace ACE_OS */ # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) diff --git a/ace/OS_Memory.inl b/ace/OS_Memory.inl index a0cb82573e9..5b4bea0d854 100644 --- a/ace/OS_Memory.inl +++ b/ace/OS_Memory.inl @@ -1,11 +1,13 @@ +// -*- C++ -*- // $Id$ #if !defined (ACE_LACKS_SBRK) # include "ace/os_include/os_unistd.h" #endif /* !ACE_LACKS_SBRK */ +namespace ACE_OS { ACE_INLINE void * -ACE_OS_Memory::sbrk (int brk) +sbrk (int brk) { #if defined (ACE_LACKS_SBRK) ACE_UNUSED_ARG (brk); @@ -14,3 +16,4 @@ ACE_OS_Memory::sbrk (int brk) ACE_OSCALL_RETURN (::sbrk (brk), void *, 0); #endif /* VXWORKS */ } +} /* namespace ACE_OS */ diff --git a/ace/OS_String.cpp b/ace/OS_String.cpp index a7388fffd86..77b817e16dd 100644 --- a/ace/OS_String.cpp +++ b/ace/OS_String.cpp @@ -21,11 +21,12 @@ ACE_RCSID (ace, OS_String, "$Id$") extern "C" wchar_t *wcsdup __P ((__const wchar_t *__s)); #endif /* ACE_LACKS_WCSDUP_PROTOTYPE */ +namespace ACE_OS { const char * -ACE_OS_String::strnstr (const char *s1, const char *s2, size_t len2) +strnstr (const char *s1, const char *s2, size_t len2) { // Substring length - size_t len1 = ACE_OS_String::strlen (s1); + size_t len1 = ACE_OS::strlen (s1); // Check if the substring is longer than the string being searched. if (len2 > len1) @@ -36,7 +37,7 @@ ACE_OS_String::strnstr (const char *s1, const char *s2, size_t len2) for (size_t i = 0; i <= len; i++) { - if (ACE_OS_String::memcmp (s1 + i, s2, len2) == 0) + if (ACE_OS::memcmp (s1 + i, s2, len2) == 0) // Found a match! Return the index. return s1 + i; } @@ -45,10 +46,10 @@ ACE_OS_String::strnstr (const char *s1, const char *s2, size_t len2) } const ACE_WCHAR_T * -ACE_OS_String::strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len2) +strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len2) { // Substring length - size_t len1 = ACE_OS_String::strlen (s1); + size_t len1 = ACE_OS::strlen (s1); // Check if the substring is longer than the string being searched. if (len2 > len1) @@ -59,7 +60,7 @@ ACE_OS_String::strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len for (size_t i = 0; i <= len; i++) { - if (ACE_OS_String::memcmp (s1 + i, s2, len2 * sizeof (ACE_WCHAR_T)) == 0) + if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (ACE_WCHAR_T)) == 0) // Found a match! Return the index. return s1 + i; } @@ -68,14 +69,14 @@ ACE_OS_String::strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len } char * -ACE_OS_String::strdup (const char *s) +strdup (const char *s) { #if defined (ACE_HAS_STRDUP_EMULATION) - char *t = (char *) ACE_OS_Memory::malloc (ACE_OS_String::strlen (s) + 1); + char *t = (char *) ACE_OS_Memory::malloc (ACE_OS::strlen (s) + 1); if (t == 0) return 0; - return ACE_OS_String::strcpy (t, s); + return ACE_OS::strcpy (t, s); #else return ::strdup (s); #endif /* ACE_HAS_STRDUP_EMULATION */ @@ -83,16 +84,16 @@ ACE_OS_String::strdup (const char *s) #if defined (ACE_HAS_WCHAR) wchar_t * -ACE_OS_String::strdup (const wchar_t *s) +strdup (const wchar_t *s) { # if defined (ACE_LACKS_WCSDUP) wchar_t *buffer = - (wchar_t *) ACE_OS_Memory::malloc ((ACE_OS_String::strlen (s) + 1) + (wchar_t *) ACE_OS_Memory::malloc ((ACE_OS::strlen (s) + 1) * sizeof (wchar_t)); if (buffer == 0) return 0; - return ACE_OS_String::strcpy (buffer, s); + return ACE_OS::strcpy (buffer, s); # elif defined (ACE_WCSDUP_EQUIVALENT) return ACE_WCSDUP_EQUIVALENT (s); # else /* ACE_LACKS_WCSDUP */ @@ -110,7 +111,7 @@ ACE_OS_String::strdup (const wchar_t *s) * Just returns "Unknown Error" all the time. */ char * -ACE_OS_String::strerror_emulation (int errnum) +strerror_emulation (int errnum) { return "Unknown Error"; } @@ -118,7 +119,7 @@ ACE_OS_String::strerror_emulation (int errnum) #if defined (ACE_LACKS_STRCHR) char * -ACE_OS_String::strchr_emulation (char *s, int c) +strchr_emulation (char *s, int c) { for (;;++s) { @@ -130,7 +131,7 @@ ACE_OS_String::strchr_emulation (char *s, int c) } const char * -ACE_OS_String::strchr_emulation (const char *s, int c) +strchr_emulation (const char *s, int c) { for (;;++s) { @@ -143,7 +144,7 @@ ACE_OS_String::strchr_emulation (const char *s, int c) #endif /* ACE_LACKS_STRCHR */ const char * -ACE_OS_String::strnchr (const char *s, int c, size_t len) +strnchr (const char *s, int c, size_t len) { for (size_t i = 0; i < len; i++) if (s[i] == c) @@ -153,7 +154,7 @@ ACE_OS_String::strnchr (const char *s, int c, size_t len) } const ACE_WCHAR_T * -ACE_OS_String::strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) +strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) { for (size_t i = 0; i < len; i++) if (s[i] == ACE_static_cast(ACE_WCHAR_T, c)) @@ -164,9 +165,9 @@ ACE_OS_String::strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) #if defined (ACE_LACKS_STRRCHR) char * -ACE_OS_String::strrchr_emulation (char *s, int c) +strrchr_emulation (char *s, int c) { - char *p = s + ACE_OS_String::strlen (s); + char *p = s + ACE_OS::strlen (s); while (*p != c) if (p == s) @@ -178,9 +179,9 @@ ACE_OS_String::strrchr_emulation (char *s, int c) } const char * -ACE_OS_String::strrchr_emulation (const char *s, int c) +strrchr_emulation (const char *s, int c) { - const char *p = s + ACE_OS_String::strlen (s); + const char *p = s + ACE_OS::strlen (s); while (*p != c) if (p == s) @@ -194,9 +195,9 @@ ACE_OS_String::strrchr_emulation (const char *s, int c) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR) const wchar_t * -ACE_OS_String::wcsrchr_emulation (const wchar_t *s, wint_t c) +wcsrchr_emulation (const wchar_t *s, wint_t c) { - const wchar_t *p = s + ACE_OS_String::strlen (s); + const wchar_t *p = s + ACE_OS::strlen (s); while (*p != ACE_static_cast (wchar_t, c)) if (p == s) @@ -208,9 +209,9 @@ ACE_OS_String::wcsrchr_emulation (const wchar_t *s, wint_t c) } wchar_t * -ACE_OS_String::wcsrchr_emulation (wchar_t *s, wint_t c) +wcsrchr_emulation (wchar_t *s, wint_t c) { - wchar_t *p = s + ACE_OS_String::strlen (s); + wchar_t *p = s + ACE_OS::strlen (s); while (*p != ACE_static_cast(wchar_t, c)) if (p == s) @@ -223,7 +224,7 @@ ACE_OS_String::wcsrchr_emulation (wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSRCHR */ char * -ACE_OS_String::strecpy (char *s, const char *t) +strecpy (char *s, const char *t) { register char *dscan = s; register const char *sscan = t; @@ -236,7 +237,7 @@ ACE_OS_String::strecpy (char *s, const char *t) #if defined (ACE_HAS_WCHAR) wchar_t * -ACE_OS_String::strecpy (wchar_t *s, const wchar_t *t) +strecpy (wchar_t *s, const wchar_t *t) { register wchar_t *dscan = s; register const wchar_t *sscan = t; @@ -250,7 +251,7 @@ ACE_OS_String::strecpy (wchar_t *s, const wchar_t *t) #if defined (ACE_LACKS_STRCSPN) size_t -ACE_OS_String::strcspn_emulation (const char *s, const char *reject) +strcspn_emulation (const char *s, const char *reject) { const char *scan; const char *rej_scan; @@ -272,14 +273,14 @@ ACE_OS_String::strcspn_emulation (const char *s, const char *reject) #if defined (ACE_LACKS_STRCASECMP) int -ACE_OS_String::strcasecmp_emulation (const char *s, const char *t) +strcasecmp_emulation (const char *s, const char *t) { const char *scan1 = s; const char *scan2 = t; while (*scan1 != 0 - && ACE_OS_String::to_lower (*scan1) - == ACE_OS_String::to_lower (*scan2)) + && ACE_OS::to_lower (*scan1) + == ACE_OS::to_lower (*scan2)) { ++scan1; ++scan2; @@ -296,20 +297,20 @@ ACE_OS_String::strcasecmp_emulation (const char *s, const char *t) else if (*scan2 == '\0') return 1; else - return ACE_OS_String::to_lower (*scan1) - ACE_OS_String::to_lower (*scan2); + return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); } #endif /* ACE_LACKS_STRCASECMP */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP) int -ACE_OS_String::wcsicmp_emulation (const wchar_t *s, const wchar_t *t) +wcsicmp_emulation (const wchar_t *s, const wchar_t *t) { const wchar_t *scan1 = s; const wchar_t *scan2 = t; while (*scan1 != 0 - && ACE_OS_String::to_lower (*scan1) - == ACE_OS_String::to_lower (*scan2)) + && ACE_OS::to_lower (*scan1) + == ACE_OS::to_lower (*scan2)) { ++scan1; ++scan2; @@ -326,15 +327,15 @@ ACE_OS_String::wcsicmp_emulation (const wchar_t *s, const wchar_t *t) else if (*scan2 == '\0') return 1; else - return ACE_OS_String::to_lower (*scan1) - ACE_OS_String::to_lower (*scan2); + return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); } #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSICMP */ #if defined (ACE_LACKS_STRCASECMP) int -ACE_OS_String::strncasecmp_emulation (const char *s, - const char *t, - size_t len) +strncasecmp_emulation (const char *s, + const char *t, + size_t len) { const char *scan1 = s; const char *scan2 = t; @@ -342,8 +343,8 @@ ACE_OS_String::strncasecmp_emulation (const char *s, while (count++ < len && *scan1 != 0 - && ACE_OS_String::to_lower (*scan1) - == ACE_OS_String::to_lower (*scan2)) + && ACE_OS::to_lower (*scan1) + == ACE_OS::to_lower (*scan2)) { ++scan1; ++scan2; @@ -363,15 +364,15 @@ ACE_OS_String::strncasecmp_emulation (const char *s, else if (*scan2 == '\0') return 1; else - return ACE_OS_String::to_lower (*scan1) - ACE_OS_String::to_lower (*scan2); + return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); } #endif /* ACE_LACKS_STRCASECMP */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP) int -ACE_OS_String::wcsnicmp_emulation (const wchar_t *s, - const wchar_t *t, - size_t len) +wcsnicmp_emulation (const wchar_t *s, + const wchar_t *t, + size_t len) { const wchar_t *scan1 = s; const wchar_t *scan2 = t; @@ -379,8 +380,8 @@ ACE_OS_String::wcsnicmp_emulation (const wchar_t *s, while (count++ < len && *scan1 != 0 - && ACE_OS_String::to_lower (*scan1) - == ACE_OS_String::to_lower (*scan2)) + && ACE_OS::to_lower (*scan1) + == ACE_OS::to_lower (*scan2)) { ++scan1; ++scan2; @@ -400,13 +401,13 @@ ACE_OS_String::wcsnicmp_emulation (const wchar_t *s, else if (*scan2 == '\0') return 1; else - return ACE_OS_String::to_lower (*scan1) - ACE_OS_String::to_lower (*scan2); + return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); } #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSNICMP */ #if !defined (ACE_HAS_REENTRANT_FUNCTIONS) char * -ACE_OS_String::strtok_r_emulation (char *s, const char *tokens, char **lasts) +strtok_r_emulation (char *s, const char *tokens, char **lasts) { if (s == 0) s = *lasts; @@ -414,11 +415,11 @@ ACE_OS_String::strtok_r_emulation (char *s, const char *tokens, char **lasts) *lasts = s; if (*s == 0) // We have reached the end return 0; - size_t l_org = ACE_OS_String::strlen (s); + size_t l_org = ACE_OS::strlen (s); s = ::strtok (s, tokens); if (s == 0) return 0; - size_t l_sub = ACE_OS_String::strlen (s); + size_t l_sub = ACE_OS::strlen (s); if (s + l_sub < *lasts + l_org) *lasts = s + l_sub + 1; else @@ -429,7 +430,7 @@ ACE_OS_String::strtok_r_emulation (char *s, const char *tokens, char **lasts) # if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSTOK) wchar_t* -ACE_OS_String::strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) +strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) { if (s == 0) s = *lasts; @@ -437,11 +438,11 @@ ACE_OS_String::strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, AC *lasts = s; if (*s == 0) // We have reached the end return 0; - int l_org = ACE_OS_String::strlen (s); - s = ACE_OS_String::strtok (s, tokens); + int l_org = ACE_OS::strlen (s); + s = ACE_OS::strtok (s, tokens); if (s == 0) return 0; - int l_sub = ACE_OS_String::strlen (s); + int l_sub = ACE_OS::strlen (s); if (s + l_sub < *lasts + l_org) *lasts = s + l_sub + 1; else @@ -452,7 +453,7 @@ ACE_OS_String::strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, AC #if !defined (ACE_HAS_MEMCHR) const void * -ACE_OS_String::memchr_emulation (const void *s, int c, size_t len) +memchr_emulation (const void *s, int c, size_t len) { const unsigned char *t = (const unsigned char *) s; const unsigned char *e = (const unsigned char *) s + len; @@ -469,7 +470,7 @@ ACE_OS_String::memchr_emulation (const void *s, int c, size_t len) #if !defined (ACE_HAS_ITOA) char * -ACE_OS_String::itoa_emulation (int value, char *string, int radix) +ACE_OS::itoa_emulation (int value, char *string, int radix) { char *e = string; char *b = string; @@ -523,7 +524,7 @@ ACE_OS_String::itoa_emulation (int value, char *string, int radix) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_ITOW) wchar_t * -ACE_OS_String::itow_emulation (int value, wchar_t *string, int radix) +itow_emulation (int value, wchar_t *string, int radix) { wchar_t *e = string; wchar_t *b = string; @@ -575,7 +576,7 @@ ACE_OS_String::itow_emulation (int value, wchar_t *string, int radix) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN) size_t -ACE_OS_String::wcscspn_emulation (const wchar_t *s, const wchar_t *reject) +wcscspn_emulation (const wchar_t *s, const wchar_t *reject) { const wchar_t *scan; const wchar_t *rej_scan; @@ -637,8 +638,8 @@ ACE_OS_String::wcscspn_emulation (const wchar_t *s, const wchar_t *reject) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT) wchar_t * -ACE_OS_String::wcscat_emulation (wchar_t *destination, - const wchar_t *source) +wcscat_emulation (wchar_t *destination, + const wchar_t *source) { wchar_t *save = destination; @@ -650,8 +651,8 @@ ACE_OS_String::wcscat_emulation (wchar_t *destination, #if defined (ACE_LACKS_STRSPN) size_t -ACE_OS_String::strspn_emulation (const char *string, - const char *charset) +strspn_emulation (const char *string, + const char *charset) { const char *p = string; const char *spanp; @@ -669,8 +670,8 @@ cont: #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN) size_t -ACE_OS_String::wcsspn_emulation (const wchar_t *string, - const wchar_t *charset) +wcsspn_emulation (const wchar_t *string, + const wchar_t *charset) { const wchar_t *p = string; const wchar_t *spanp; @@ -688,8 +689,8 @@ cont: #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR) wchar_t * -ACE_OS_String::wcsstr_emulation (const wchar_t *string, - const wchar_t *charset) +wcsstr_emulation (const wchar_t *string, + const wchar_t *charset) { wchar_t c, sc; size_t len; @@ -714,7 +715,7 @@ ACE_OS_String::wcsstr_emulation (const wchar_t *string, #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN) size_t -ACE_OS_String::wcslen_emulation (const ACE_WCHAR_T *string) +wcslen_emulation (const ACE_WCHAR_T *string) { const ACE_WCHAR_T *s; @@ -727,9 +728,9 @@ ACE_OS_String::wcslen_emulation (const ACE_WCHAR_T *string) #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY) ACE_WCHAR_T * -ACE_OS_String::wcsncpy_emulation (ACE_WCHAR_T *destination, - const ACE_WCHAR_T *source, - size_t len) +wcsncpy_emulation (ACE_WCHAR_T *destination, + const ACE_WCHAR_T *source, + size_t len) { if (len != 0) { @@ -754,8 +755,8 @@ ACE_OS_String::wcsncpy_emulation (ACE_WCHAR_T *destination, #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP) int -ACE_OS_String::wcscmp_emulation (const ACE_WCHAR_T *string1, - const ACE_WCHAR_T *string2) +wcscmp_emulation (const ACE_WCHAR_T *string1, + const ACE_WCHAR_T *string2) { while (*string1 == *string2++) if (*string1++ == 0) @@ -766,8 +767,8 @@ ACE_OS_String::wcscmp_emulation (const ACE_WCHAR_T *string1, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY) wchar_t * -ACE_OS_String::wcscpy_emulation (wchar_t *destination, - const wchar_t *source) +wcscpy_emulation (wchar_t *destination, + const wchar_t *source) { wchar_t *save = destination; @@ -778,8 +779,8 @@ ACE_OS_String::wcscpy_emulation (wchar_t *destination, #if defined (ACE_LACKS_STRPBRK) char * -ACE_OS_String::strpbrk_emulation (const char *string, - const char *charset) +strpbrk_emulation (const char *string, + const char *charset) { const char *scanp; int c, sc; @@ -797,8 +798,8 @@ ACE_OS_String::strpbrk_emulation (const char *string, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK) wchar_t * -ACE_OS_String::wcspbrk_emulation (const wchar_t *string, - const wchar_t *charset) +wcspbrk_emulation (const wchar_t *string, + const wchar_t *charset) { const wchar_t *scanp; int c, sc; @@ -816,9 +817,9 @@ ACE_OS_String::wcspbrk_emulation (const wchar_t *string, #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT) ACE_WCHAR_T * -ACE_OS_String::wcsncat_emulation (ACE_WCHAR_T *destination, - const ACE_WCHAR_T *source, - size_t count) +wcsncat_emulation (ACE_WCHAR_T *destination, + const ACE_WCHAR_T *source, + size_t count) { if (count != 0) { @@ -845,7 +846,7 @@ ACE_OS_String::wcsncat_emulation (ACE_WCHAR_T *destination, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR) wchar_t * -ACE_OS_String::wcschr_emulation (const wchar_t *string, wint_t c) +wcschr_emulation (const wchar_t *string, wint_t c) { for (;*string ; ++string) if (*string == ACE_static_cast (wchar_t, c)) @@ -857,9 +858,9 @@ ACE_OS_String::wcschr_emulation (const wchar_t *string, wint_t c) #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP) int -ACE_OS_String::wcsncmp_emulation (const ACE_WCHAR_T *s1, - const ACE_WCHAR_T *s2, - size_t len) +wcsncmp_emulation (const ACE_WCHAR_T *s1, + const ACE_WCHAR_T *s2, + size_t len) { if (len == 0) return 0; @@ -878,7 +879,7 @@ ACE_OS_String::wcsncmp_emulation (const ACE_WCHAR_T *s1, #if defined (ACE_LACKS_STRTOL) long -ACE_OS_String::strtol_emulation (const char *nptr, char **endptr, int base) +strtol_emulation (const char *nptr, char **endptr, int base) { register const char *s = nptr; register unsigned long acc; @@ -958,9 +959,9 @@ ACE_OS_String::strtol_emulation (const char *nptr, char **endptr, int base) #if defined (ACE_LACKS_STRTOUL) unsigned long -ACE_OS_String::strtoul_emulation (const char *nptr, - char **endptr, - register int base) +strtoul_emulation (const char *nptr, + char **endptr, + register int base) { register const char *s = nptr; register unsigned long acc; @@ -1025,7 +1026,7 @@ ACE_OS_String::strtoul_emulation (const char *nptr, #endif /* ACE_LACKS_STRTOUL */ char * -ACE_OS_String::strsncpy (char *dst, const char *src, size_t maxlen) +strsncpy (char *dst, const char *src, size_t maxlen) { register char *rdst = dst; register const char *rsrc = src; @@ -1049,7 +1050,7 @@ ACE_OS_String::strsncpy (char *dst, const char *src, size_t maxlen) } ACE_WCHAR_T * -ACE_OS_String::strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen) +strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen) { register ACE_WCHAR_T *rdst = dst; register const ACE_WCHAR_T *rsrc = src; @@ -1071,3 +1072,4 @@ ACE_OS_String::strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen } return dst; } +} /* namespace ACE_OS */ diff --git a/ace/OS_String.h b/ace/OS_String.h index 3d011ef3479..d4be69e56b7 100644 --- a/ace/OS_String.h +++ b/ace/OS_String.h @@ -33,13 +33,13 @@ using std::wint_t; #endif /* ACE_USES_STD_NAMESPACE_FOR_STDC_LIB */ /** - * @class ACE_OS_String + * @namespace ACE_OS_String * * @brief This class includes functions available in string.h and ctype.h. */ -class ACE_OS_Export ACE_OS_String +#define ACE_OS_String ACE_OS +namespace ACE_OS { -public: /** @name Functions from * * Included are the functions defined in and their @@ -50,81 +50,81 @@ public: //@{ /// Finds characters in a buffer (const void version). - static const void *memchr (const void *s, int c, size_t len); + const void *memchr (const void *s, int c, size_t len); /// Finds characters in a buffer (void version). - static void *memchr (void *s, int c, size_t len); + void *memchr (void *s, int c, size_t len); /// Compares two buffers. - static int memcmp (const void *t, const void *s, size_t len); + int memcmp (const void *t, const void *s, size_t len); /// Copies one buffer to another. - static void *memcpy (void *t, const void *s, size_t len); + void *memcpy (void *t, const void *s, size_t len); /// Moves one buffer to another. - static void *memmove (void *t, const void *s, size_t len); + void *memmove (void *t, const void *s, size_t len); /// Fills a buffer with a character value. - static void *memset (void *s, int c, size_t len); + void *memset (void *s, int c, size_t len); /// Appends a string to another string (char version). - static char *strcat (char *s, const char *t); + char *strcat (char *s, const char *t); #if defined (ACE_HAS_WCHAR) /// Appends a string to another string (wchar_t version). - static wchar_t *strcat (wchar_t *s, const wchar_t *t); + wchar_t *strcat (wchar_t *s, const wchar_t *t); #endif /* ACE_HAS_WCHAR */ /// Finds the first occurance of a character in a string (const char /// version). - static const char *strchr (const char *s, int c); + const char *strchr (const char *s, int c); #if defined (ACE_HAS_WCHAR) /// Finds the first occurance of a character in a string (const wchar_t /// version). - static const wchar_t *strchr (const wchar_t *s, wint_t c); + const wchar_t *strchr (const wchar_t *s, wint_t c); #endif /* ACE_HAS_WCHAR */ /// Finds the first occurance of a character in a string (char version). - static char *strchr (char *s, int c); + char *strchr (char *s, int c); #if defined (ACE_HAS_WCHAR) /// Finds the first occurance of a character in a string (wchar_t version). - static wchar_t *strchr (wchar_t *s, wint_t c); + wchar_t *strchr (wchar_t *s, wint_t c); #endif /* ACE_HAS_WCHAR */ /// Compares two strings (char version). - static int strcmp (const char *s, const char *t); + int strcmp (const char *s, const char *t); /// Compares two strings (wchar_t version). - static int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t); + int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t); /// Copies a string (char version). - static char *strcpy (char *s, const char *t); + char *strcpy (char *s, const char *t); #if defined (ACE_HAS_WCHAR) /// Copies a string (wchar_t version). - static wchar_t *strcpy (wchar_t *s, const wchar_t *t); + wchar_t *strcpy (wchar_t *s, const wchar_t *t); #endif /* ACE_HAS_WCHAR */ /// Searches for the first substring without any of the specified /// characters and returns the size of the substring (char version). - static size_t strcspn (const char *s, const char *reject); + size_t strcspn (const char *s, const char *reject); #if defined (ACE_HAS_WCHAR) /// Searches for the first substring without any of the specified /// characters and returns the size of the substring (wchar_t version). - static size_t strcspn (const wchar_t *s, const wchar_t *reject); + size_t strcspn (const wchar_t *s, const wchar_t *reject); #endif /* ACE_HAS_WCHAR */ /// Returns a system error message. - static char *strerror (int errnum); + char *strerror (int errnum); /// Finds the length of a string (char version). - static size_t strlen (const char *s); + size_t strlen (const char *s); /// Finds the length of a string (ACE_WCHAR_T version). - static size_t strlen (const ACE_WCHAR_T *s); + size_t strlen (const ACE_WCHAR_T *s); /// Finds the length of a limited-length string (char version). /** @@ -135,7 +135,7 @@ public: * @return The length of @arg s, if the terminating nul character * is located, else @arg maxlen. */ - static size_t strnlen (const char *s, size_t maxlen); + size_t strnlen (const char *s, size_t maxlen); /// Finds the length of a limited-length string (ACE_WCHAR_T version). /** @@ -146,94 +146,94 @@ public: * @return The length of @arg s, if the terminating nul character * is located, else @arg maxlen. */ - static size_t strnlen (const ACE_WCHAR_T *s, size_t maxlen); + size_t strnlen (const ACE_WCHAR_T *s, size_t maxlen); /// Appends part of a string to another string (char version). - static char *strncat (char *s, const char *t, size_t len); + char *strncat (char *s, const char *t, size_t len); /// Appends part of a string to another string (wchar_t version). - static ACE_WCHAR_T *strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); + ACE_WCHAR_T *strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); /// Compares two arrays (char version). - static int strncmp (const char *s, const char *t, size_t len); + int strncmp (const char *s, const char *t, size_t len); /// Compares two arrays (wchar_t version). - static int strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); + int strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); /// Copies an array (char version) - static char *strncpy (char *s, const char *t, size_t len); + char *strncpy (char *s, const char *t, size_t len); /// Copies an array (ACE_WCHAR_T version) - static ACE_WCHAR_T *strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); + ACE_WCHAR_T *strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); /// Searches for characters in a string (const char version). - static const char *strpbrk (const char *s1, const char *s2); + const char *strpbrk (const char *s1, const char *s2); #if defined (ACE_HAS_WCHAR) /// Searches for characters in a string (const wchar_t version). - static const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2); + const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2); #endif /* ACE_HAS_WCHAR */ /// Searches for characters in a string (char version). - static char *strpbrk (char *s1, const char *s2); + char *strpbrk (char *s1, const char *s2); #if defined (ACE_HAS_WCHAR) /// Searches for characters in a string (wchar_t version). - static wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2); + wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2); #endif /* ACE_HAS_WCHAR */ /// Finds the last occurance of a character in a string (const char /// version). - static const char *strrchr (const char *s, int c); + const char *strrchr (const char *s, int c); #if defined (ACE_HAS_WCHAR) /// Finds the last occurance of a character in a string (const wchar_t /// version). - static const wchar_t *strrchr (const wchar_t *s, wint_t c); + const wchar_t *strrchr (const wchar_t *s, wint_t c); #endif /* ACE_HAS_WCHAR */ /// Finds the last occurance of a character in a string (char version). - static char *strrchr (char *s, int c); + char *strrchr (char *s, int c); #if defined (ACE_HAS_WCHAR) /// Finds the last occurance of a character in a string (wchar_t version). - static wchar_t *strrchr (wchar_t *s, wint_t c); + wchar_t *strrchr (wchar_t *s, wint_t c); #endif /* ACE_HAS_WCHAR */ /// Searches for the first substring containing only the specified /// characters and returns the size of the substring (char version). - static size_t strspn (const char *s1, const char *s2); + size_t strspn (const char *s1, const char *s2); #if defined (ACE_HAS_WCHAR) /// Searches for the first substring containing only the specified /// characters and returns the size of the substring (wchar_t version). - static size_t strspn (const wchar_t *s1, const wchar_t *s2); + size_t strspn (const wchar_t *s1, const wchar_t *s2); #endif /* ACE_HAS_WCHAR */ /// Finds the first occurance of a substring in a string (const char /// version). - static const char *strstr (const char *s, const char *t); + const char *strstr (const char *s, const char *t); #if defined (ACE_HAS_WCHAR) /// Finds the first occurance of a substring in a string (const wchar_t /// version). - static const wchar_t *strstr (const wchar_t *s, const wchar_t *t); + const wchar_t *strstr (const wchar_t *s, const wchar_t *t); #endif /* ACE_HAS_WCHAR */ /// Finds the first occurance of a substring in a string (char version). - static char *strstr (char *s, const char *t); + char *strstr (char *s, const char *t); #if defined (ACE_HAS_WCHAR) /// Finds the first occurance of a substring in a string (wchar_t version). - static wchar_t *strstr (wchar_t *s, const wchar_t *t); + wchar_t *strstr (wchar_t *s, const wchar_t *t); #endif /* ACE_HAS_WCHAR */ /// Finds the next token in a string (char version). - static char *strtok (char *s, const char *tokens); + char *strtok (char *s, const char *tokens); #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK) /// Finds the next token in a string (wchar_t version). - static wchar_t *strtok (wchar_t *s, const wchar_t *tokens); + wchar_t *strtok (wchar_t *s, const wchar_t *tokens); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOK */ //@} @@ -253,17 +253,17 @@ public: //@{ /// Returns true if the character is a printable character. - static int ace_isprint (const ACE_TCHAR c); + int ace_isprint (const ACE_TCHAR c); /// Returns true if the character is a space character. - static int ace_isspace (const ACE_TCHAR c); + int ace_isspace (const ACE_TCHAR c); /// Converts a character to lower case (char version). - static int to_lower (int c); + int to_lower (int c); #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER) /// Converts a character to lower case (wchar_t version). - static wint_t to_lower (wint_t c); + wint_t to_lower (wint_t c); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */ //@} @@ -276,51 +276,51 @@ public: //@{ /// Converts an integer to a string. - static char *itoa (int value, char *string, int radix); + char *itoa (int value, char *string, int radix); #if defined (ACE_HAS_WCHAR) /// Converts an integer to a string. - static wchar_t *itoa (int value, wchar_t *string, int radix); + wchar_t *itoa (int value, wchar_t *string, int radix); #endif /* ACE_HAS_WCHAR */ /// Compares two strings (case insensitive const char version). - static int strcasecmp (const char *s, const char *t); + int strcasecmp (const char *s, const char *t); #if defined (ACE_HAS_WCHAR) /// Compares two strings (case insensitive const wchar_t version). - static int strcasecmp (const wchar_t *s, const wchar_t *t); + int strcasecmp (const wchar_t *s, const wchar_t *t); #endif /* ACE_HAS_WCHAR */ /// Finds the first occurance of a character in an array (const char /// version). - static const char *strnchr (const char *s, int c, size_t len); + const char *strnchr (const char *s, int c, size_t len); /// Finds the first occurance of a character in an array (const ACE_WCHAR_T /// version). - static const ACE_WCHAR_T *strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len); + const ACE_WCHAR_T *strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len); /// Finds the first occurance of a character in an array (char version). - static char *strnchr (char *s, int c, size_t len); + char *strnchr (char *s, int c, size_t len); /// Finds the first occurance of a character in an array (ACE_WCHAR_T version). - static ACE_WCHAR_T *strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len); + ACE_WCHAR_T *strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len); /// Compares two arrays (case insensitive const char version). - static int strncasecmp (const char *s, const char *t, size_t len); + int strncasecmp (const char *s, const char *t, size_t len); #if defined (ACE_HAS_WCHAR) /// Compares two arrays (case insensitive const wchar_t version). - static int strncasecmp (const wchar_t *s, const wchar_t *t, size_t len); + int strncasecmp (const wchar_t *s, const wchar_t *t, size_t len); #endif /* ACE_HAS_WCHAR */ /// Copies a string, but returns a pointer to the end of the /// copied region (char version). - static char *strecpy (char *des, const char *src); + char *strecpy (char *des, const char *src); #if defined (ACE_HAS_WCHAR) /// Copies a string, but returns a pointer to the end of the /// copied region (wchar_t version). - static wchar_t *strecpy (wchar_t *s, const wchar_t *t); + wchar_t *strecpy (wchar_t *s, const wchar_t *t); #endif /* ACE_HAS_WCHAR */ /// This is a "safe" c string copy function (char version). @@ -339,7 +339,7 @@ public: * Very seldom it's possible that the '\0' padding feature from * strncpy() is needed. */ - static char *strsncpy (char *dst, + char *strsncpy (char *dst, const char *src, size_t maxlen); @@ -359,72 +359,70 @@ public: * Very seldom it's possible that the '\0' padding feature from * strncpy() is needed. */ - static ACE_WCHAR_T *strsncpy (ACE_WCHAR_T *dst, + ACE_WCHAR_T *strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen); /// Finds the first occurance of a substring in an array (const char /// version). - static const char *strnstr (const char *s, const char *t, size_t len); + const char *strnstr (const char *s, const char *t, size_t len); /// Finds the first occurance of a substring in an array (const wchar_t /// version). - static const ACE_WCHAR_T *strnstr (const ACE_WCHAR_T *s, + const ACE_WCHAR_T *strnstr (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); /// Finds the first occurance of a substring in an array (char version). - static char *strnstr (char *s, const char *t, size_t len); + char *strnstr (char *s, const char *t, size_t len); /// Finds the first occurance of a substring in an array (wchar_t version). - static ACE_WCHAR_T *strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); + ACE_WCHAR_T *strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len); /// Returns a malloced duplicated string (char version). - static char *strdup (const char *s); + char *strdup (const char *s); #if defined (ACE_HAS_WCHAR) /// Returns a malloced duplicated string (wchar_t version). - static wchar_t *strdup (const wchar_t *s); + wchar_t *strdup (const wchar_t *s); #endif /* ACE_HAS_WCHAR */ /// Finds the next token in a string (safe char version). - static char *strtok_r (char *s, const char *tokens, char **lasts); + char *strtok_r (char *s, const char *tokens, char **lasts); #if defined (ACE_HAS_WCHAR) /// Finds the next token in a string (wchar_t version). - static wchar_t *strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts); + wchar_t *strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts); #endif // ACE_HAS_WCHAR #if !defined (ACE_LACKS_STRTOD) /// Converts a string to a double value (char version). - static double strtod (const char *s, char **endptr); + double strtod (const char *s, char **endptr); #endif /* !ACE_LACKS_STRTOD */ #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOD) /// Converts a string to a double value (wchar_t version). - static double strtod (const wchar_t *s, wchar_t **endptr); + double strtod (const wchar_t *s, wchar_t **endptr); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */ /// Converts a string to a long value (char version). - static long strtol (const char *s, char **ptr, int base); + long strtol (const char *s, char **ptr, int base); #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOL) /// Converts a string to a long value (wchar_t version). - static long strtol (const wchar_t *s, wchar_t **ptr, int base); + long strtol (const wchar_t *s, wchar_t **ptr, int base); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOL */ /// Converts a string to an unsigned long value (char version). - static unsigned long strtoul (const char *s, char **ptr, int base); + unsigned long strtoul (const char *s, char **ptr, int base); #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOUL) /// Converts a string to an unsigned long value (wchar_t version). - static unsigned long strtoul (const wchar_t *s, wchar_t **ptr, int base); + unsigned long strtoul (const wchar_t *s, wchar_t **ptr, int base); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOUL */ //@} -private: - /** @name Emulation * * These methods are provided for platforms that do not have a native @@ -434,139 +432,139 @@ private: #if !defined (ACE_HAS_ITOA) /// Emulated itoa - Converts an integer to a string. - static char *itoa_emulation (int value, char *string, int radix); + char *itoa_emulation (int value, char *string, int radix); #endif /* !ACE_HAS_ITOA */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_ITOW) /// Emulated itow - Converts an integer to a string. - static wchar_t *itow_emulation (int value, wchar_t *string, int radix); + wchar_t *itow_emulation (int value, wchar_t *string, int radix); #endif /* ACE_HAS_WCHAR && ACE_LACKS_ITOW */ #if !defined (ACE_HAS_MEMCHR) /// Emulated memchr - Finds a character in a buffer. - static const void *memchr_emulation (const void *s, int c, size_t len); + const void *memchr_emulation (const void *s, int c, size_t len); #endif /* ACE_HAS_MEMCHR */ #if defined (ACE_LACKS_STRCASECMP) /// Emulated strcasecmp - Performs a case insensitive comparison of strings. - static int strcasecmp_emulation (const char *s, const char *t); + int strcasecmp_emulation (const char *s, const char *t); /// Emulated strncasecmp - Performs a case insensitvie comparison of arrays. - static int strncasecmp_emulation (const char *s, const char *t, size_t len); + int strncasecmp_emulation (const char *s, const char *t, size_t len); #endif /* ACE_LACKS_STRCASECMP */ #if defined (ACE_LACKS_STRCSPN) /// Emulated strcspn - Finds a substring in a string. - static size_t strcspn_emulation (const char *s, const char *reject); + size_t strcspn_emulation (const char *s, const char *reject); #endif /* ACE_LACKS_STRCSPN */ #if defined (ACE_LACKS_STRCHR) /// Emulated strchr (char version) - Finds the first occurance of a /// character in a string. - static char *strchr_emulation (char *s, int c); + char *strchr_emulation (char *s, int c); /// Emulated strchr (const char version) - Finds the first occurance of a /// character in a string. - static const char *strchr_emulation (const char *s, int c); + const char *strchr_emulation (const char *s, int c); #endif /* ACE_LACKS_STRCHR */ #if defined (ACE_LACKS_STRERROR) /// Emulated strerror - Returns a system error message. - static char *strerror_emulation (int errnum); + char *strerror_emulation (int errnum); #endif /* ACE_LACKS_STRERROR */ #if defined (ACE_LACKS_STRPBRK) /// Emulated strpbrk - Searches for characters in a string. - static char *strpbrk_emulation (const char *string, + char *strpbrk_emulation (const char *string, const char *charset); #endif /* ACE_LACKS_STRPBRK */ #if defined (ACE_LACKS_STRRCHR) /// Emulated strrchr (char version) - Finds the last occurance of a /// character in a string. - static char *strrchr_emulation (char *s, int c); + char *strrchr_emulation (char *s, int c); /// Emulated strrchr (const char version) - Finds the last occurance of a /// character in a string. - static const char *strrchr_emulation (const char *s, int c); + const char *strrchr_emulation (const char *s, int c); #endif /* ACE_LACKS_STRRCHR */ #if !defined (ACE_HAS_REENTRANT_FUNCTIONS) /// Emulated strtok_r. - static char *strtok_r_emulation (char *s, const char *tokens, char **lasts); + char *strtok_r_emulation (char *s, const char *tokens, char **lasts); # if defined (ACE_HAS_WCHAR) /// Emulated strtok_r (wchar_t version). - static wchar_t *strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts); + wchar_t *strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts); # endif // ACE_HAS_WCHAR #endif /* !ACE_HAS_REENTRANT_FUNCTIONS */ #if defined (ACE_LACKS_STRSPN) /// Emulated wcsspn. - static size_t strspn_emulation (const char *string, + size_t strspn_emulation (const char *string, const char *charset); #endif /* ACE_LACKS_STRSPN */ #if defined (ACE_LACKS_STRTOL) - static long strtol_emulation (const char *nptr, char **endptr, int base); + long strtol_emulation (const char *nptr, char **endptr, int base); #endif /* ACE_LACKS_STRTOL */ #if defined (ACE_LACKS_STRTOUL) - static unsigned long strtoul_emulation (const char *nptr, + unsigned long strtoul_emulation (const char *nptr, char **endptr, int base); #endif /* ACE_LACKS_STRTOUL */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT) /// Emulated wcscat - Appends a string. - static wchar_t *wcscat_emulation (wchar_t *destination, + wchar_t *wcscat_emulation (wchar_t *destination, const wchar_t *source); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCAT */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR) /// Emulated wcschr - Finds a character in a string. - static wchar_t *wcschr_emulation (const wchar_t *string, wint_t c); + wchar_t *wcschr_emulation (const wchar_t *string, wint_t c); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCHR */ #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP) /// Emulated wcscmp - Compares strings. - static int wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2); + int wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2); #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCMP */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY) /// Emulated wcscpy - Copies a string. - static wchar_t *wcscpy_emulation (wchar_t *destination, + wchar_t *wcscpy_emulation (wchar_t *destination, const wchar_t *source); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCPY */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP) /// Emulated wcsicmp - Performs a case insensitive comparison of strings. - static int wcsicmp_emulation (const wchar_t *string1, + int wcsicmp_emulation (const wchar_t *string1, const wchar_t *string2); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSICMP */ #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN) /// Emulated wcslen - Returns the length of a string. - static size_t wcslen_emulation (const ACE_WCHAR_T *string); + size_t wcslen_emulation (const ACE_WCHAR_T *string); #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSLEN */ #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT) /// Emulated wcscat - Appends a string. - static ACE_WCHAR_T *wcsncat_emulation (ACE_WCHAR_T *destination, + ACE_WCHAR_T *wcsncat_emulation (ACE_WCHAR_T *destination, const ACE_WCHAR_T *source, size_t count); #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCAT */ #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP) /// Emulated wcsncmp - Compares two arrays. - static int wcsncmp_emulation (const ACE_WCHAR_T *string1, + int wcsncmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2, size_t len); #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCMP */ #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY) /// Emulated wcsncpy - Copies an array. - static ACE_WCHAR_T *wcsncpy_emulation (ACE_WCHAR_T *destination, + ACE_WCHAR_T *wcsncpy_emulation (ACE_WCHAR_T *destination, const ACE_WCHAR_T *source, size_t len); #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCPY */ @@ -574,47 +572,47 @@ private: #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP) /// Emulated wcsnicmp - Performs a case insensitive comparison of two /// arrays - static int wcsnicmp_emulation (const wchar_t *string1, + int wcsnicmp_emulation (const wchar_t *string1, const wchar_t *string2, size_t len); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSNICMP */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK) /// Emulated wcspbrk - Searches for characters in a string. - static wchar_t *wcspbrk_emulation (const wchar_t *string, + wchar_t *wcspbrk_emulation (const wchar_t *string, const wchar_t *charset); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSPBRK */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR) /// Emulated wcsrchr (wchar_t version) - Finds the last occurance of a /// character in a string. - static wchar_t *wcsrchr_emulation (wchar_t *string, wint_t c); + wchar_t *wcsrchr_emulation (wchar_t *string, wint_t c); /// Emulated wcsrchr (const wchar_t version) - Finds the last occurance of a /// character in a string. - static const wchar_t *wcsrchr_emulation (const wchar_t *string, wint_t c); + const wchar_t *wcsrchr_emulation (const wchar_t *string, wint_t c); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSRCHR */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN) /// Emulated wcscspn. - static size_t wcscspn_emulation (const wchar_t *string, + size_t wcscspn_emulation (const wchar_t *string, const wchar_t *reject); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCSPN */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN) /// Emulated wcsspn. - static size_t wcsspn_emulation (const wchar_t *string, + size_t wcsspn_emulation (const wchar_t *string, const wchar_t *charset); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSPN */ #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR) /// Emulated wcsstr - Performs a case insensitive comparison of two strings. - static wchar_t *wcsstr_emulation (const wchar_t *string, + wchar_t *wcsstr_emulation (const wchar_t *string, const wchar_t *charset); #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSTR */ //@} -}; +}; /* namespace ACE_OS */ # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) diff --git a/ace/OS_String.inl b/ace/OS_String.inl index aa86825114c..37b63cfd54b 100644 --- a/ace/OS_String.inl +++ b/ace/OS_String.inl @@ -24,61 +24,62 @@ #include "ace/os_include/os_strings.h" #include "ace/os_include/os_ctype.h" +namespace ACE_OS { ACE_INLINE const void * -ACE_OS_String::memchr (const void *s, int c, size_t len) +memchr (const void *s, int c, size_t len) { #if defined (ACE_HAS_MEMCHR) return ::memchr (s, c, len); #else /* ACE_HAS_MEMCHR */ - return ACE_OS_String::memchr_emulation (s, c, len); + return ACE_OS::memchr_emulation (s, c, len); #endif /* ACE_HAS_MEMCHR */ } ACE_INLINE void * -ACE_OS_String::memchr (void *s, int c, size_t len) +memchr (void *s, int c, size_t len) { return ACE_const_cast (void *, - ACE_OS_String::memchr (ACE_static_cast (const void *, s), c, len)); + ACE_OS::memchr (ACE_static_cast (const void *, s), c, len)); } ACE_INLINE int -ACE_OS_String::memcmp (const void *t, const void *s, size_t len) +memcmp (const void *t, const void *s, size_t len) { return ::memcmp (t, s, len); } ACE_INLINE void * -ACE_OS_String::memcpy (void *t, const void *s, size_t len) +memcpy (void *t, const void *s, size_t len) { return ::memcpy (t, s, len); } ACE_INLINE void * -ACE_OS_String::memmove (void *t, const void *s, size_t len) +memmove (void *t, const void *s, size_t len) { return ::memmove (t, s, len); } ACE_INLINE void * -ACE_OS_String::memset (void *s, int c, size_t len) +memset (void *s, int c, size_t len) { return ::memset (s, c, len); } ACE_INLINE char * -ACE_OS_String::strcat (char *s, const char *t) +strcat (char *s, const char *t) { return ::strcat (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::strcat (wchar_t *s, const wchar_t *t) +strcat (wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSCAT) - return ACE_OS_String::wcscat_emulation (s, t); + return ACE_OS::wcscat_emulation (s, t); # else /* ACE_LACKS_WCSCAT */ return ::wcscat (s, t); # endif /* ACE_LACKS_WCSCAT */ @@ -86,10 +87,10 @@ ACE_OS_String::strcat (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE const char * -ACE_OS_String::strchr (const char *s, int c) +strchr (const char *s, int c) { #if defined (ACE_LACKS_STRCHR) - return ACE_OS_String::strchr_emulation (s, c); + return ACE_OS::strchr_emulation (s, c); #else /* ! ACE_LACKS_STRCHR */ return (const char *) ::strchr (s, c); #endif /* ACE_LACKS_STRCHR */ @@ -97,10 +98,10 @@ ACE_OS_String::strchr (const char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -ACE_OS_String::strchr (const wchar_t *s, wint_t c) +strchr (const wchar_t *s, wint_t c) { # if defined (ACE_LACKS_WCSCHR) - return ACE_OS_String::wcschr_emulation (s, c); + return ACE_OS::wcschr_emulation (s, c); # else /* ACE_LACKS_WCSCHR */ return ::wcschr (s, c); # endif /* ACE_LACKS_WCSCHR */ @@ -108,10 +109,10 @@ ACE_OS_String::strchr (const wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strchr (char *s, int c) +strchr (char *s, int c) { #if defined (ACE_LACKS_STRCHR) - return ACE_OS_String::strchr_emulation (s, c); + return ACE_OS::strchr_emulation (s, c); #else /* ! ACE_LACKS_STRCHR */ return ::strchr (s, c); #endif /* ACE_LACKS_STRCHR */ @@ -119,41 +120,41 @@ ACE_OS_String::strchr (char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::strchr (wchar_t *s, wint_t c) +strchr (wchar_t *s, wint_t c) { return ACE_const_cast (wchar_t *, - ACE_OS_String::strchr (ACE_static_cast (const wchar_t *, s), c)); + ACE_OS::strchr (ACE_static_cast (const wchar_t *, s), c)); } #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS_String::strcmp (const char *s, const char *t) +strcmp (const char *s, const char *t) { return ::strcmp (s, t); } ACE_INLINE int -ACE_OS_String::strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t) +strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP) - return ACE_OS_String::wcscmp_emulation (s, t); + return ACE_OS::wcscmp_emulation (s, t); # else /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCMP */ return ::wcscmp (s, t); # endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCMP */ } ACE_INLINE char * -ACE_OS_String::strcpy (char *s, const char *t) +strcpy (char *s, const char *t) { return ::strcpy (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::strcpy (wchar_t *s, const wchar_t *t) +strcpy (wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSCPY) - return ACE_OS_String::wcscpy_emulation (s, t); + return ACE_OS::wcscpy_emulation (s, t); # else /* ACE_LACKS_WCSCPY */ return ::wcscpy (s, t); # endif /* ACE_LACKS_WCSCPY */ @@ -161,10 +162,10 @@ ACE_OS_String::strcpy (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE size_t -ACE_OS_String::strcspn (const char *s, const char *reject) +strcspn (const char *s, const char *reject) { #if defined (ACE_LACKS_STRCSPN) - return ACE_OS_String::strcspn_emulation (s, reject); + return ACE_OS::strcspn_emulation (s, reject); #else /* ACE_LACKS_STRCSPN */ return ::strcspn (s, reject); #endif /* ACE_LACKS_STRCSPN */ @@ -172,10 +173,10 @@ ACE_OS_String::strcspn (const char *s, const char *reject) #if defined (ACE_HAS_WCHAR) ACE_INLINE size_t -ACE_OS_String::strcspn (const wchar_t *s, const wchar_t *reject) +strcspn (const wchar_t *s, const wchar_t *reject) { # if defined (ACE_LACKS_WCSCSPN) - return ACE_OS_String::wcscspn_emulation (s, reject); + return ACE_OS::wcscspn_emulation (s, reject); # else /* ACE_LACKS_WCSCSPN */ return ::wcscspn (s, reject); # endif /* ACE_LACKS_WCSCSPN */ @@ -183,33 +184,33 @@ ACE_OS_String::strcspn (const wchar_t *s, const wchar_t *reject) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strerror (int errnum) +strerror (int errnum) { #if defined (ACE_LACKS_STRERROR) - return ACE_OS_String::strerror_emulation (errnum); + return ACE_OS::strerror_emulation (errnum); #else /* ACE_LACKS_STRERROR */ return ::strerror (errnum); #endif /* ACE_LACKS_STRERROR */ } ACE_INLINE size_t -ACE_OS_String::strlen (const char *s) +strlen (const char *s) { return ::strlen (s); } ACE_INLINE size_t -ACE_OS_String::strlen (const ACE_WCHAR_T *s) +strlen (const ACE_WCHAR_T *s) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN) - return ACE_OS_String::wcslen_emulation (s); + return ACE_OS::wcslen_emulation (s); # else /* !ACE_HAS_WCHAR || ACE_LACKS_WCSLEN */ return ::wcslen (s); # endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSLEN */ } ACE_INLINE size_t -ACE_OS_String::strnlen (const char *s, size_t maxlen) +strnlen (const char *s, size_t maxlen) { #if defined (ACE_HAS_STRNLEN) return ::strnlen (s, maxlen); @@ -223,7 +224,7 @@ ACE_OS_String::strnlen (const char *s, size_t maxlen) } ACE_INLINE size_t -ACE_OS_String::strnlen (const ACE_WCHAR_T *s, size_t maxlen) +strnlen (const ACE_WCHAR_T *s, size_t maxlen) { #if defined (ACE_HAS_WCHAR) && defined (ACE_HAS_WCSNLEN) return wcsnlen (s, maxlen); @@ -237,58 +238,58 @@ ACE_OS_String::strnlen (const ACE_WCHAR_T *s, size_t maxlen) } ACE_INLINE char * -ACE_OS_String::strncat (char *s, const char *t, size_t len) +strncat (char *s, const char *t, size_t len) { return ::strncat (s, t, len); } ACE_INLINE ACE_WCHAR_T * -ACE_OS_String::strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT) - return ACE_OS_String::wcsncat_emulation (s, t, len); + return ACE_OS::wcsncat_emulation (s, t, len); # else /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCAT */ return ::wcsncat (s, t, len); # endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCAT */ } ACE_INLINE int -ACE_OS_String::strncmp (const char *s, const char *t, size_t len) +strncmp (const char *s, const char *t, size_t len) { return ::strncmp (s, t, len); } ACE_INLINE int -ACE_OS_String::strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP) - return ACE_OS_String::wcsncmp_emulation (s, t, len); + return ACE_OS::wcsncmp_emulation (s, t, len); # else /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCMP */ return ::wcsncmp (s, t, len); # endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCMP */ } ACE_INLINE char * -ACE_OS_String::strncpy (char *s, const char *t, size_t len) +strncpy (char *s, const char *t, size_t len) { return ::strncpy (s, t, len); } ACE_INLINE ACE_WCHAR_T * -ACE_OS_String::strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY) - return ACE_OS_String::wcsncpy_emulation (s, t, len); + return ACE_OS::wcsncpy_emulation (s, t, len); # else /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCPY */ return ::wcsncpy (s, t, len); # endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCPY */ } ACE_INLINE const char * -ACE_OS_String::strpbrk (const char *s1, const char *s2) +strpbrk (const char *s1, const char *s2) { #if defined (ACE_LACKS_STRPBRK) - return ACE_OS_String::strpbrk_emulation (s1, s2); + return ACE_OS::strpbrk_emulation (s1, s2); #else /* ACE_LACKS_STRPBRK */ return (const char *) ::strpbrk (s1, s2); #endif /* ACE_LACKS_STRPBRK */ @@ -296,10 +297,10 @@ ACE_OS_String::strpbrk (const char *s1, const char *s2) #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -ACE_OS_String::strpbrk (const wchar_t *s, const wchar_t *t) +strpbrk (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSPBRK) - return ACE_OS_String::wcspbrk_emulation (s, t); + return ACE_OS::wcspbrk_emulation (s, t); # else /* ACE_LACKS_WCSPBRK */ return ::wcspbrk (s, t); # endif /* ACE_LACKS_WCSPBRK */ @@ -307,10 +308,10 @@ ACE_OS_String::strpbrk (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strpbrk (char *s1, const char *s2) +strpbrk (char *s1, const char *s2) { #if defined (ACE_LACKS_STRPBRK) - return ACE_OS_String::strpbrk_emulation (s1, s2); + return ACE_OS::strpbrk_emulation (s1, s2); #else /* ACE_LACKS_STRPBRK */ return ::strpbrk (s1, s2); #endif /* ACE_LACKS_STRPBRK */ @@ -318,18 +319,18 @@ ACE_OS_String::strpbrk (char *s1, const char *s2) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::strpbrk (wchar_t *s, const wchar_t *t) +strpbrk (wchar_t *s, const wchar_t *t) { return ACE_const_cast (wchar_t *, - ACE_OS_String::strpbrk (ACE_static_cast (const wchar_t *, s), t)); + ACE_OS::strpbrk (ACE_static_cast (const wchar_t *, s), t)); } #endif /* ACE_HAS_WCHAR */ ACE_INLINE const char * -ACE_OS_String::strrchr (const char *s, int c) +strrchr (const char *s, int c) { #if defined (ACE_LACKS_STRRCHR) - return ACE_OS_String::strrchr_emulation (s, c); + return ACE_OS::strrchr_emulation (s, c); #else /* ! ACE_LACKS_STRRCHR */ return (const char *) ::strrchr (s, c); #endif /* ! ACE_LACKS_STRRCHR */ @@ -337,10 +338,10 @@ ACE_OS_String::strrchr (const char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -ACE_OS_String::strrchr (const wchar_t *s, wint_t c) +strrchr (const wchar_t *s, wint_t c) { #if defined (ACE_LACKS_WCSRCHR) - return ACE_OS_String::wcsrchr_emulation (s, c); + return ACE_OS::wcsrchr_emulation (s, c); #else /* ! ACE_LACKS_WCSRCHR */ return (const wchar_t *) ::wcsrchr (s, c); #endif /* ! ACE_LACKS_WCSRCHR */ @@ -348,10 +349,10 @@ ACE_OS_String::strrchr (const wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strrchr (char *s, int c) +strrchr (char *s, int c) { #if defined (ACE_LACKS_STRRCHR) - return ACE_OS_String::strrchr_emulation (s, c); + return ACE_OS::strrchr_emulation (s, c); #else /* ! ACE_LACKS_STRRCHR */ return ::strrchr (s, c); #endif /* ! ACE_LACKS_STRRCHR */ @@ -359,18 +360,18 @@ ACE_OS_String::strrchr (char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::strrchr (wchar_t *s, wint_t c) +strrchr (wchar_t *s, wint_t c) { return ACE_const_cast (wchar_t *, - ACE_OS_String::strrchr (ACE_static_cast (const wchar_t *, s), c)); + ACE_OS::strrchr (ACE_static_cast (const wchar_t *, s), c)); } #endif /* ACE_HAS_WCHAR */ ACE_INLINE size_t -ACE_OS_String::strspn (const char *s, const char *t) +strspn (const char *s, const char *t) { #if defined (ACE_LACKS_STRSPN) - return ACE_OS_String::strspn_emulation (s, t); + return ACE_OS::strspn_emulation (s, t); #else /* ACE_LACKS_STRSPN */ return ::strspn (s, t); #endif /* ACE_LACKS_STRSPN */ @@ -378,10 +379,10 @@ ACE_OS_String::strspn (const char *s, const char *t) #if defined (ACE_HAS_WCHAR) ACE_INLINE size_t -ACE_OS_String::strspn (const wchar_t *s, const wchar_t *t) +strspn (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSPN) - return ACE_OS_String::wcsspn_emulation (s, t); + return ACE_OS::wcsspn_emulation (s, t); # else /* ACE_LACKS_WCSSPN */ return ::wcsspn (s, t); # endif /* ACE_LACKS_WCSSPN */ @@ -389,17 +390,17 @@ ACE_OS_String::strspn (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE const char * -ACE_OS_String::strstr (const char *s, const char *t) +strstr (const char *s, const char *t) { return (const char *) ::strstr (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -ACE_OS_String::strstr (const wchar_t *s, const wchar_t *t) +strstr (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSTR) - return ACE_OS_String::wcsstr_emulation (s, t); + return ACE_OS::wcsstr_emulation (s, t); # elif defined (HPUX) return (const wchar_t *) ::wcswcs (s, t); # else /* ACE_LACKS_WCSSTR */ @@ -409,17 +410,17 @@ ACE_OS_String::strstr (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strstr (char *s, const char *t) +strstr (char *s, const char *t) { return ::strstr (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::strstr (wchar_t *s, const wchar_t *t) +strstr (wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSTR) - return ACE_OS_String::wcsstr_emulation (s, t); + return ACE_OS::wcsstr_emulation (s, t); # elif defined (HPUX) return ::wcswcs (s, t); # else /* ACE_LACKS_WCSSTR */ @@ -429,14 +430,14 @@ ACE_OS_String::strstr (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strtok (char *s, const char *tokens) +strtok (char *s, const char *tokens) { return ::strtok (s, tokens); } #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK) ACE_INLINE wchar_t * -ACE_OS_String::strtok (wchar_t *s, const wchar_t *tokens) +strtok (wchar_t *s, const wchar_t *tokens) { #if defined (ACE_HAS_3_PARAM_WCSTOK) static wchar_t *lasts; @@ -448,7 +449,7 @@ ACE_OS_String::strtok (wchar_t *s, const wchar_t *tokens) #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOK */ ACE_INLINE int -ACE_OS_String::ace_isprint (const ACE_TCHAR c) +ace_isprint (const ACE_TCHAR c) { #if defined (ACE_USES_WCHAR) return iswprint (c); @@ -458,7 +459,7 @@ ACE_OS_String::ace_isprint (const ACE_TCHAR c) } ACE_INLINE int -ACE_OS_String::ace_isspace (const ACE_TCHAR c) +ace_isspace (const ACE_TCHAR c) { #if defined (ACE_USES_WCHAR) return iswspace (c); @@ -468,24 +469,24 @@ ACE_OS_String::ace_isspace (const ACE_TCHAR c) } ACE_INLINE int -ACE_OS_String::to_lower (int c) +to_lower (int c) { return tolower (c); } #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER) ACE_INLINE wint_t -ACE_OS_String::to_lower (wint_t c) +to_lower (wint_t c) { return towlower (c); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */ ACE_INLINE char * -ACE_OS_String::itoa (int value, char *string, int radix) +itoa (int value, char *string, int radix) { #if !defined (ACE_HAS_ITOA) - return ACE_OS_String::itoa_emulation (value, string, radix); + return ACE_OS::itoa_emulation (value, string, radix); #elif defined (ACE_ITOA_EQUIVALENT) return ACE_ITOA_EQUIVALENT (value, string, radix); #else /* !ACE_HAS_ITOA */ @@ -495,10 +496,10 @@ ACE_OS_String::itoa (int value, char *string, int radix) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -ACE_OS_String::itoa (int value, wchar_t *string, int radix) +itoa (int value, wchar_t *string, int radix) { #if defined (ACE_LACKS_ITOW) - return ACE_OS_String::itow_emulation (value, string, radix); + return ACE_OS::itow_emulation (value, string, radix); #else /* ACE_LACKS_ITOW */ return ::_itow (value, string, radix); #endif /* ACE_LACKS_ITOW */ @@ -506,10 +507,10 @@ ACE_OS_String::itoa (int value, wchar_t *string, int radix) #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -ACE_OS_String::strcasecmp (const char *s, const char *t) +strcasecmp (const char *s, const char *t) { #if defined (ACE_LACKS_STRCASECMP) - return ACE_OS_String::strcasecmp_emulation (s, t); + return ACE_OS::strcasecmp_emulation (s, t); #elif defined (ACE_STRCASECMP_EQUIVALENT) return ACE_STRCASECMP_EQUIVALENT (s, t); #else /* ACE_LACKS_STRCASECMP */ @@ -519,10 +520,10 @@ ACE_OS_String::strcasecmp (const char *s, const char *t) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS_String::strcasecmp (const wchar_t *s, const wchar_t *t) +strcasecmp (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSICMP) - return ACE_OS_String::wcsicmp_emulation (s, t); + return ACE_OS::wcsicmp_emulation (s, t); # else /* ACE_LACKS_WCSICMP */ return ::_wcsicmp (s, t); # endif /* ACE_LACKS_WCSICMP */ @@ -530,30 +531,30 @@ ACE_OS_String::strcasecmp (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strnchr (char *s, int c, size_t len) +strnchr (char *s, int c, size_t len) { #if defined ACE_PSOS_DIAB_PPC /* Compiler problem Diab 4.2b */ const char *const_char_s = s; return ACE_const_cast (char *, - ACE_OS_String::strnchr (const_char_s, c, len)); + ACE_OS::strnchr (const_char_s, c, len)); #else return ACE_const_cast (char *, - ACE_OS_String::strnchr (ACE_static_cast (const char *, s), c, len)); + ACE_OS::strnchr (ACE_static_cast (const char *, s), c, len)); #endif } ACE_INLINE ACE_WCHAR_T * -ACE_OS_String::strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) +strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) { return ACE_const_cast (ACE_WCHAR_T *, - ACE_OS_String::strnchr (ACE_static_cast (const ACE_WCHAR_T *, s), c, len)); + ACE_OS::strnchr (ACE_static_cast (const ACE_WCHAR_T *, s), c, len)); } ACE_INLINE int -ACE_OS_String::strncasecmp (const char *s, const char *t, size_t len) +strncasecmp (const char *s, const char *t, size_t len) { #if defined (ACE_LACKS_STRCASECMP) - return ACE_OS_String::strncasecmp_emulation (s, t, len); + return ACE_OS::strncasecmp_emulation (s, t, len); #elif defined (ACE_STRNCASECMP_EQUIVALENT) return ACE_STRNCASECMP_EQUIVALENT (s, t, len); #else /* ACE_LACKS_STRCASECMP */ @@ -563,10 +564,10 @@ ACE_OS_String::strncasecmp (const char *s, const char *t, size_t len) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -ACE_OS_String::strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) +strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) { #if defined (ACE_LACKS_WCSNICMP) - return ACE_OS_String::wcsnicmp_emulation (s, t, len); + return ACE_OS::wcsnicmp_emulation (s, t, len); #else /* ACE_LACKS_WCSNICMP */ return ::_wcsnicmp (s, t, len); #endif /* ACE_LACKS_WCSNICMP */ @@ -574,39 +575,39 @@ ACE_OS_String::strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -ACE_OS_String::strnstr (char *s, const char *t, size_t len) +strnstr (char *s, const char *t, size_t len) { #if defined ACE_PSOS_DIAB_PPC /* Compiler problem Diab 4.2b */ const char *const_char_s=s; - return (char *) ACE_OS_String::strnstr (const_char_s, t, len); + return (char *) ACE_OS::strnstr (const_char_s, t, len); #else - return (char *) ACE_OS_String::strnstr ((const char *) s, t, len); + return (char *) ACE_OS::strnstr ((const char *) s, t, len); #endif } ACE_INLINE ACE_WCHAR_T * -ACE_OS_String::strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) { return ACE_const_cast (ACE_WCHAR_T *, - ACE_OS_String::strnstr (ACE_static_cast (const ACE_WCHAR_T *, s), t, len)); + ACE_OS::strnstr (ACE_static_cast (const ACE_WCHAR_T *, s), t, len)); } ACE_INLINE char * -ACE_OS_String::strtok_r (char *s, const char *tokens, char **lasts) +strtok_r (char *s, const char *tokens, char **lasts) { #if defined (ACE_HAS_REENTRANT_FUNCTIONS) return ::strtok_r (s, tokens, lasts); #else - return ACE_OS_String::strtok_r_emulation (s, tokens, lasts); + return ACE_OS::strtok_r_emulation (s, tokens, lasts); #endif /* (ACE_HAS_REENTRANT_FUNCTIONS) */ } #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t* -ACE_OS_String::strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) +strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) { #if defined (ACE_LACKS_WCSTOK) - return ACE_OS_String::strtok_r_emulation (s, tokens, lasts); + return ACE_OS::strtok_r_emulation (s, tokens, lasts); #else # if defined (ACE_HAS_3_PARAM_WCSTOK) return ::wcstok (s, tokens, lasts); @@ -620,7 +621,7 @@ ACE_OS_String::strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T #if !defined (ACE_LACKS_STRTOD) ACE_INLINE double -ACE_OS_String::strtod (const char *s, char **endptr) +strtod (const char *s, char **endptr) { return ::strtod (s, endptr); } @@ -628,17 +629,17 @@ ACE_OS_String::strtod (const char *s, char **endptr) #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOD) ACE_INLINE double -ACE_OS_String::strtod (const wchar_t *s, wchar_t **endptr) +strtod (const wchar_t *s, wchar_t **endptr) { return ::wcstod (s, endptr); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */ ACE_INLINE long -ACE_OS_String::strtol (const char *s, char **ptr, int base) +strtol (const char *s, char **ptr, int base) { #if defined (ACE_LACKS_STRTOL) - return ACE_OS_String::strtol_emulation (s, ptr, base); + return ACE_OS::strtol_emulation (s, ptr, base); #else /* ACE_LACKS_STRTOL */ return ::strtol (s, ptr, base); #endif /* ACE_LACKS_STRTOL */ @@ -646,17 +647,17 @@ ACE_OS_String::strtol (const char *s, char **ptr, int base) #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOL) ACE_INLINE long -ACE_OS_String::strtol (const wchar_t *s, wchar_t **ptr, int base) +strtol (const wchar_t *s, wchar_t **ptr, int base) { return ::wcstol (s, ptr, base); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOL */ ACE_INLINE unsigned long -ACE_OS_String::strtoul (const char *s, char **ptr, int base) +strtoul (const char *s, char **ptr, int base) { #if defined (ACE_LACKS_STRTOUL) - return ACE_OS_String::strtoul_emulation (s, ptr, base); + return ACE_OS::strtoul_emulation (s, ptr, base); #else /* ACE_LACKS_STRTOUL */ return ::strtoul (s, ptr, base); #endif /* ACE_LACKS_STRTOUL */ @@ -664,8 +665,9 @@ ACE_OS_String::strtoul (const char *s, char **ptr, int base) #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOUL) ACE_INLINE unsigned long -ACE_OS_String::strtoul (const wchar_t *s, wchar_t **ptr, int base) +strtoul (const wchar_t *s, wchar_t **ptr, int base) { return ::wcstoul (s, ptr, base); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOUL */ +} /* namespace ACE_OS */ diff --git a/ace/OS_TLI.h b/ace/OS_TLI.h index 1a83e22f93f..3615805a1bd 100644 --- a/ace/OS_TLI.h +++ b/ace/OS_TLI.h @@ -119,71 +119,71 @@ extern "C" int _xti_error(char *); # endif /* ACE_REDEFINES_XTI_FUNCTIONS */ /** - * @class ACE_OS_TLI + * @namespace ACE_OS_TLI * * @brief This class is a wrapper for the TLI operations * */ -class ACE_OS_Export ACE_OS_TLI +#define ACE_OS_TLI ACE_OS +namespace ACE_OS { -public: // = A set of wrappers for TLI. - static int t_accept (ACE_HANDLE fildes, + int t_accept (ACE_HANDLE fildes, ACE_HANDLE resfd, struct t_call *call); - static char *t_alloc (ACE_HANDLE fildes, + char *t_alloc (ACE_HANDLE fildes, int struct_type, int fields); - static int t_bind (ACE_HANDLE fildes, + int t_bind (ACE_HANDLE fildes, struct t_bind *req, struct t_bind *ret); - static int t_close (ACE_HANDLE fildes); - static int t_connect (ACE_HANDLE fildes, + int t_close (ACE_HANDLE fildes); + int t_connect (ACE_HANDLE fildes, struct t_call *sndcall, struct t_call *rcvcall); - static void t_error (const char *errmsg); - static int t_free (char *ptr, + void t_error (const char *errmsg); + int t_free (char *ptr, int struct_type); - static int t_getinfo (ACE_HANDLE fildes, + int t_getinfo (ACE_HANDLE fildes, struct t_info *info); - static int t_getname (ACE_HANDLE fildes, + int t_getname (ACE_HANDLE fildes, struct netbuf *namep, int type); - static int t_getstate (ACE_HANDLE fildes); - static int t_listen (ACE_HANDLE fildes, - struct t_call *call); - static int t_look (ACE_HANDLE fildes); - static ACE_HANDLE t_open (char *path, + int t_getstate (ACE_HANDLE fildes); + int t_listen (ACE_HANDLE fildes, + struct t_call *call); + int t_look (ACE_HANDLE fildes); + ACE_HANDLE t_open (char *path, int oflag, struct t_info *info); - static int t_optmgmt (ACE_HANDLE fildes, + int t_optmgmt (ACE_HANDLE fildes, struct t_optmgmt *req, struct t_optmgmt *ret); - static int t_rcv (ACE_HANDLE fildes, + int t_rcv (ACE_HANDLE fildes, char *buf, unsigned int nbytes, int *flags); - static int t_rcvdis (ACE_HANDLE fildes, + int t_rcvdis (ACE_HANDLE fildes, struct t_discon *discon); - static int t_rcvrel (ACE_HANDLE fildes); - static int t_rcvudata (ACE_HANDLE fildes, + int t_rcvrel (ACE_HANDLE fildes); + int t_rcvudata (ACE_HANDLE fildes, struct t_unitdata *unitdata, int *flags); - static int t_rcvuderr (ACE_HANDLE fildes, + int t_rcvuderr (ACE_HANDLE fildes, struct t_uderr *uderr); - static int t_snd (ACE_HANDLE fildes, + int t_snd (ACE_HANDLE fildes, const char *buf, unsigned int nbytes, int flags); - static int t_snddis (ACE_HANDLE fildes, + int t_snddis (ACE_HANDLE fildes, struct t_call *call); - static int t_sndrel (ACE_HANDLE fildes); - static int t_sync (ACE_HANDLE fildes); - static int t_unbind (ACE_HANDLE fildes); -}; + int t_sndrel (ACE_HANDLE fildes); + int t_sync (ACE_HANDLE fildes); + int t_unbind (ACE_HANDLE fildes); +}; /* namespace ACE_OS */ # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) diff --git a/ace/OS_TLI.inl b/ace/OS_TLI.inl index c4dc02d5346..51d28041afb 100644 --- a/ace/OS_TLI.inl +++ b/ace/OS_TLI.inl @@ -1,10 +1,12 @@ /* -*- C++ -*- */ // $Id$ +namespace ACE_OS { + ACE_INLINE int -ACE_OS_TLI::t_accept (ACE_HANDLE handle, - ACE_HANDLE reshandle, - struct t_call *call) +t_accept (ACE_HANDLE handle, + ACE_HANDLE reshandle, + struct t_call *call) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_accept (handle, reshandle, call), int, -1); @@ -18,8 +20,8 @@ ACE_OS_TLI::t_accept (ACE_HANDLE handle, } ACE_INLINE char * -ACE_OS_TLI::t_alloc (ACE_HANDLE handle, int struct_type, - int fields) +t_alloc (ACE_HANDLE handle, int struct_type, + int fields) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_alloc (handle, struct_type, fields), @@ -34,8 +36,8 @@ ACE_OS_TLI::t_alloc (ACE_HANDLE handle, int struct_type, } ACE_INLINE int -ACE_OS_TLI::t_bind (ACE_HANDLE handle, struct t_bind *req, - struct t_bind *ret) +t_bind (ACE_HANDLE handle, struct t_bind *req, + struct t_bind *ret) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_bind (handle, req, ret), int, -1); @@ -49,7 +51,7 @@ ACE_OS_TLI::t_bind (ACE_HANDLE handle, struct t_bind *req, } ACE_INLINE int -ACE_OS_TLI::t_close (ACE_HANDLE handle) +t_close (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_close (handle), int, -1); @@ -61,9 +63,9 @@ ACE_OS_TLI::t_close (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS_TLI::t_connect(ACE_HANDLE fildes, - struct t_call *sndcall, - struct t_call *rcvcall) +t_connect(ACE_HANDLE fildes, + struct t_call *sndcall, + struct t_call *rcvcall) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_connect (fildes, sndcall, rcvcall), int, -1); @@ -77,7 +79,7 @@ ACE_OS_TLI::t_connect(ACE_HANDLE fildes, } ACE_INLINE void -ACE_OS_TLI::t_error (const char *errmsg) +t_error (const char *errmsg) { #if defined (ACE_HAS_TLI) #if defined (ACE_HAS_BROKEN_T_ERROR) @@ -91,7 +93,7 @@ ACE_OS_TLI::t_error (const char *errmsg) } ACE_INLINE int -ACE_OS_TLI::t_free (char *ptr, int struct_type) +t_free (char *ptr, int struct_type) { #if defined (ACE_HAS_TLI) if (ptr == 0) @@ -106,7 +108,7 @@ ACE_OS_TLI::t_free (char *ptr, int struct_type) } ACE_INLINE int -ACE_OS_TLI::t_getinfo (ACE_HANDLE handle, struct t_info *info) +t_getinfo (ACE_HANDLE handle, struct t_info *info) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_getinfo (handle, info), int, -1); @@ -119,9 +121,9 @@ ACE_OS_TLI::t_getinfo (ACE_HANDLE handle, struct t_info *info) } ACE_INLINE int -ACE_OS_TLI::t_getname (ACE_HANDLE handle, - struct netbuf *namep, - int type) +t_getname (ACE_HANDLE handle, + struct netbuf *namep, + int type) { #if defined (ACE_HAS_SVR4_TLI) ACE_OSCALL_RETURN (::t_getname (handle, namep, type), int, -1); @@ -135,7 +137,7 @@ ACE_OS_TLI::t_getname (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS_TLI::t_getstate (ACE_HANDLE handle) +t_getstate (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_getstate (handle), int, -1); @@ -147,7 +149,7 @@ ACE_OS_TLI::t_getstate (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS_TLI::t_listen (ACE_HANDLE handle, struct t_call *call) +t_listen (ACE_HANDLE handle, struct t_call *call) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_listen (handle, call), int, -1); @@ -160,7 +162,7 @@ ACE_OS_TLI::t_listen (ACE_HANDLE handle, struct t_call *call) } ACE_INLINE int -ACE_OS_TLI::t_look (ACE_HANDLE handle) +t_look (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_look (handle), int, -1); @@ -172,7 +174,7 @@ ACE_OS_TLI::t_look (ACE_HANDLE handle) } ACE_INLINE ACE_HANDLE -ACE_OS_TLI::t_open (char *path, int oflag, struct t_info *info) +t_open (char *path, int oflag, struct t_info *info) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_open (path, oflag, info), ACE_HANDLE, ACE_INVALID_HANDLE); @@ -186,9 +188,9 @@ ACE_OS_TLI::t_open (char *path, int oflag, struct t_info *info) } ACE_INLINE int -ACE_OS_TLI::t_optmgmt (ACE_HANDLE handle, - struct t_optmgmt *req, - struct t_optmgmt *ret) +t_optmgmt (ACE_HANDLE handle, + struct t_optmgmt *req, + struct t_optmgmt *ret) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_optmgmt (handle, req, ret), int, -1); @@ -202,10 +204,10 @@ ACE_OS_TLI::t_optmgmt (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS_TLI::t_rcv (ACE_HANDLE handle, - char *buf, - unsigned int nbytes, - int *flags) +t_rcv (ACE_HANDLE handle, + char *buf, + unsigned int nbytes, + int *flags) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcv (handle, buf, nbytes, flags), @@ -221,7 +223,7 @@ ACE_OS_TLI::t_rcv (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS_TLI::t_rcvdis (ACE_HANDLE handle, struct t_discon *discon) +t_rcvdis (ACE_HANDLE handle, struct t_discon *discon) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvdis (handle, discon), int, -1); @@ -234,7 +236,7 @@ ACE_OS_TLI::t_rcvdis (ACE_HANDLE handle, struct t_discon *discon) } ACE_INLINE int -ACE_OS_TLI::t_rcvrel (ACE_HANDLE handle) +t_rcvrel (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvrel (handle), int, -1); @@ -246,9 +248,9 @@ ACE_OS_TLI::t_rcvrel (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS_TLI::t_rcvudata (ACE_HANDLE handle, - struct t_unitdata *unitdata, - int *flags) +t_rcvudata (ACE_HANDLE handle, + struct t_unitdata *unitdata, + int *flags) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvudata (handle, unitdata, flags), @@ -263,7 +265,7 @@ ACE_OS_TLI::t_rcvudata (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS_TLI::t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr) +t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvuderr (handle, uderr), int, -1); @@ -276,10 +278,10 @@ ACE_OS_TLI::t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr) } ACE_INLINE int -ACE_OS_TLI::t_snd (ACE_HANDLE handle, - const char *buf, - unsigned int nbytes, - int flags) +t_snd (ACE_HANDLE handle, + const char *buf, + unsigned int nbytes, + int flags) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_snd (handle, (char *) buf, nbytes, flags), int, -1); @@ -294,7 +296,7 @@ ACE_OS_TLI::t_snd (ACE_HANDLE handle, } ACE_INLINE int -ACE_OS_TLI::t_snddis (ACE_HANDLE handle, struct t_call *call) +t_snddis (ACE_HANDLE handle, struct t_call *call) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_snddis (handle, call), int, -1); @@ -307,7 +309,7 @@ ACE_OS_TLI::t_snddis (ACE_HANDLE handle, struct t_call *call) } ACE_INLINE int -ACE_OS_TLI::t_sndrel (ACE_HANDLE handle) +t_sndrel (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_sndrel (handle), int, -1); @@ -319,7 +321,7 @@ ACE_OS_TLI::t_sndrel (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS_TLI::t_sync (ACE_HANDLE handle) +t_sync (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_sync (handle), int, -1); @@ -331,7 +333,7 @@ ACE_OS_TLI::t_sync (ACE_HANDLE handle) } ACE_INLINE int -ACE_OS_TLI::t_unbind (ACE_HANDLE handle) +t_unbind (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_unbind (handle), int, -1); @@ -341,3 +343,5 @@ ACE_OS_TLI::t_unbind (ACE_HANDLE handle) ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_TLI */ } + +} /* namespace ACE_OS */ diff --git a/ace/os_include/os_pthread.h b/ace/os_include/os_pthread.h index 030730a8a6b..77e1282bd67 100644 --- a/ace/os_include/os_pthread.h +++ b/ace/os_include/os_pthread.h @@ -362,8 +362,7 @@ extern "C" pthread_t pthread_self (void); */ class ACE_OS_Export ACE_sema_t { -friend class ACE_OS; -protected: +public: /// Serialize access to internal state. ACE_mutex_t lock_; diff --git a/ace/os_include/sys/os_stat.h b/ace/os_include/sys/os_stat.h index e43c68ca282..7224eee9160 100644 --- a/ace/os_include/sys/os_stat.h +++ b/ace/os_include/sys/os_stat.h @@ -27,7 +27,7 @@ #include "ace/os_include/sys/os_types.h" #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) -# include +# include /**/ #endif /* ACE_WIN32 && !ACE_HAS_WINCE */ // This collides with phile.h on PSOS -- cgit v1.2.1