diff options
author | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-09-15 18:40:33 +0000 |
---|---|---|
committer | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-09-15 18:40:33 +0000 |
commit | a222f346646ca4b6622d3795c115a09b0a9c7d28 (patch) | |
tree | 1c98d52714204813f22911982a438c3c067bdd5e | |
parent | 1f066f7e2bd5d0805c25e69b9e5bda7ff672178e (diff) | |
download | ATCD-a222f346646ca4b6622d3795c115a09b0a9c7d28.tar.gz |
ChangeLogTag:Sat Sep 13 18:33:07 UTC 2003 Don Hinton <dhinton@dresystems.com>
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | ace/OS.cpp | 424 | ||||
-rw-r--r-- | ace/OS.h | 4 | ||||
-rw-r--r-- | ace/OS.i | 1177 | ||||
-rw-r--r-- | ace/OS_Dirent.cpp | 82 | ||||
-rw-r--r-- | ace/OS_Dirent.inl | 42 | ||||
-rw-r--r-- | ace/OS_Memory.cpp | 11 | ||||
-rw-r--r-- | ace/OS_Memory.inl | 4 | ||||
-rw-r--r-- | ace/OS_String.cpp | 134 | ||||
-rw-r--r-- | ace/OS_String.inl | 134 | ||||
-rw-r--r-- | ace/OS_TLI.inl | 88 |
11 files changed, 1043 insertions, 1074 deletions
diff --git a/ChangeLog b/ChangeLog index 4dc1579b63d..ad9d36abfd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Sat Sep 13 18:33:07 UTC 2003 Don Hinton <dhinton@dresystems.com> + + * ace/OS.{cpp,i}: + * ace/OS_Dirent.{cpp,inl}: + * ace/OS_Memory.{cpp,inl}: + * ace/OS_String.{cpp,inl}: + * ace/OS_TLI.inl: + Rolled back the namespace directives so each method definition + is fully qualified--solves problem on Solaris with SPRO 5.4 + compiler. Also changed remaining ACE_OS_*:: invocations to + ACE_OS::. + +Thu Sep 11 15:19:46 UTC 2003 Don Hinton <dhinton@dresystems.com> + + * ace/OS.h: + Corrected types in friend declarations for pread/pwrite. + Thu Sep 11 14:52:32 UTC 2003 Don Hinton <dhinton@dresystems.com> * ace/OS.h: diff --git a/ace/OS.cpp b/ace/OS.cpp index ba31d83882e..d18a5bce379 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -24,23 +24,18 @@ 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) @@ -228,11 +223,9 @@ 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 -netdb_acquire (void) +ACE_OS::netdb_acquire (void) { return ACE_OS::thread_mutex_lock ((ACE_thread_mutex_t *) ACE_OS_Object_Manager::preallocated_object[ @@ -240,7 +233,7 @@ netdb_acquire (void) } int -netdb_release (void) +ACE_OS::netdb_release (void) { return ACE_OS::thread_mutex_unlock ((ACE_thread_mutex_t *) ACE_OS_Object_Manager::preallocated_object[ @@ -253,8 +246,7 @@ netdb_release (void) # define ACE_TSS_BASE_GUARD #endif /* ! ACE_MT_SAFE */ -ACE_EXIT_HOOK exit_hook_ = 0; -}; /* namespace ACE_OS */ +ACE_EXIT_HOOK ACE_OS::exit_hook_ = 0; ACE_Cleanup_Info::ACE_Cleanup_Info (void) : object_ (0), @@ -418,11 +410,9 @@ ACE_Countdown_Time::~ACE_Countdown_Time (void) this->stop (); } -namespace ACE_OS { - #if defined (ACE_HAS_POWERPC_TIMER) && defined (ghs) void -readPPCTimeBase (u_long &most, u_long &least) +ACE_OS::readPPCTimeBase (u_long &most, u_long &least) { ACE_OS_TRACE ("ACE_OS::readPPCTimeBase"); @@ -442,7 +432,7 @@ readPPCTimeBase (u_long &most, u_long &least) } #elif defined (ACE_HAS_POWERPC_TIMER) && defined (__GNUG__) void -readPPCTimeBase (u_long &most, u_long &least) +ACE_OS::readPPCTimeBase (u_long &most, u_long &least) { ACE_OS_TRACE ("ACE_OS::readPPCTimeBase"); @@ -469,7 +459,7 @@ 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 -uname (ACE_utsname *name) +ACE_OS::uname (ACE_utsname *name) { ACE_OS_TRACE ("ACE_OS::uname"); # if defined (ACE_WIN32) @@ -684,7 +674,7 @@ uname (ACE_utsname *name) #if defined (VXWORKS) struct hostent * -gethostbyname (const char *name) +ACE_OS::gethostbyname (const char *name) { ACE_OS_TRACE ("ACE_OS::gethostbyname"); @@ -713,7 +703,7 @@ gethostbyname (const char *name) } struct hostent * -gethostbyaddr (const char *addr, int length, int type) +ACE_OS::gethostbyaddr (const char *addr, int length, int type) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr"); @@ -750,9 +740,9 @@ gethostbyaddr (const char *addr, int length, int type) } struct hostent * -gethostbyaddr_r (const char *addr, int length, int type, - hostent *result, ACE_HOSTENT_DATA buffer, - int *h_errnop) +ACE_OS::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) @@ -800,9 +790,9 @@ gethostbyaddr_r (const char *addr, int length, int type, } struct hostent * -gethostbyname_r (const char *name, hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop) +ACE_OS::gethostbyname_r (const char *name, hostent *result, + ACE_HOSTENT_DATA buffer, + int *h_errnop) { ACE_OS_TRACE ("ACE_OS::gethostbyname_r"); @@ -852,8 +842,8 @@ gethostbyname_r (const char *name, hostent *result, int ACE_THR_JOIN_DELAY = 5; int -thr_join (ACE_hthread_t thr_handle, - ACE_THR_FUNC_RETURN *status) +ACE_OS::thr_join (ACE_hthread_t thr_handle, + ACE_THR_FUNC_RETURN *status) { // We can't get the status of the thread if (status != 0) @@ -903,9 +893,9 @@ thr_join (ACE_hthread_t thr_handle, } int -thr_join (ACE_thread_t waiter_id, - ACE_thread_t *thr_id, - ACE_THR_FUNC_RETURN *status) +ACE_OS::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); @@ -913,7 +903,7 @@ thr_join (ACE_thread_t waiter_id, #endif /* VXWORKS */ void -ace_flock_t::dump (void) const +ACE_OS::ace_flock_t::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_OS_TRACE ("ACE_OS::ace_flock_t::dump"); @@ -938,7 +928,7 @@ ace_flock_t::dump (void) const } void -mutex_lock_cleanup (void *mutex) +ACE_OS::mutex_lock_cleanup (void *mutex) { ACE_OS_TRACE ("ACE_OS::mutex_lock_cleanup"); #if defined (ACE_HAS_THREADS) @@ -954,8 +944,7 @@ mutex_lock_cleanup (void *mutex) } #if defined (ACE_USES_WCHAR) -void -checkUnicodeFormat (FILE* fp) +void ACE_OS::checkUnicodeFormat (FILE* fp) { if (fp != 0) { @@ -986,8 +975,8 @@ checkUnicodeFormat (FILE* fp) #if defined (ACE_WIN32) FILE * -fopen (const ACE_TCHAR *filename, - const ACE_TCHAR *mode) +ACE_OS::fopen (const ACE_TCHAR *filename, + const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fopen"); int hmode = _O_TEXT; @@ -1044,7 +1033,7 @@ fopen (const ACE_TCHAR *filename, // they use varargs. int -fprintf (FILE *fp, const char *format, ...) +ACE_OS::fprintf (FILE *fp, const char *format, ...) { ACE_OS_TRACE ("ACE_OS::fprintf"); int result = 0; @@ -1057,7 +1046,7 @@ fprintf (FILE *fp, const char *format, ...) #if defined (ACE_HAS_WCHAR) int -fprintf (FILE *fp, const wchar_t *format, ...) +ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...) { ACE_OS_TRACE ("ACE_OS::fprintf"); @@ -1079,7 +1068,7 @@ fprintf (FILE *fp, const wchar_t *format, ...) #endif /* ACE_HAS_WCHAR */ int -printf (const char *format, ...) +ACE_OS::printf (const char *format, ...) { ACE_OS_TRACE ("ACE_OS::printf"); int result; @@ -1091,7 +1080,7 @@ printf (const char *format, ...) } int -sprintf (char *buf, const char *format, ...) +ACE_OS::sprintf (char *buf, const char *format, ...) { // ACE_OS_TRACE ("ACE_OS::sprintf"); @@ -1105,7 +1094,7 @@ sprintf (char *buf, const char *format, ...) #if defined (ACE_HAS_WCHAR) int -sprintf (wchar_t *buf, const wchar_t *format, ...) +ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) { ACE_OS_TRACE ("ACE_OS::sprintf"); @@ -1143,7 +1132,7 @@ sprintf (wchar_t *buf, const wchar_t *format, ...) #endif /* ACE_HAS_WCHAR */ int -snprintf (char *buf, size_t maxlen, const char *format, ...) +ACE_OS::snprintf (char *buf, size_t maxlen, const char *format, ...) { // ACE_OS_TRACE ("ACE_OS::snprintf"); #if defined (ACE_HAS_SNPRINTF) @@ -1180,7 +1169,7 @@ snprintf (char *buf, size_t maxlen, const char *format, ...) #if defined (ACE_HAS_WCHAR) int -snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...) +ACE_OS::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) @@ -1220,7 +1209,7 @@ snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...) #endif /* ACE_HAS_WCHAR */ char * -gets (char *str, int n) +ACE_OS::gets (char *str, int n) { ACE_OS_TRACE ("ACE_OS::gets"); int c; @@ -1254,7 +1243,7 @@ gets (char *str, int n) } int -execl (const char * /* path */, const char * /* arg0 */, ...) +ACE_OS::execl (const char * /* path */, const char * /* arg0 */, ...) { ACE_OS_TRACE ("ACE_OS::execl"); #if defined (ACE_WIN32) || defined (VXWORKS) @@ -1267,7 +1256,7 @@ execl (const char * /* path */, const char * /* arg0 */, ...) } int -execle (const char * /* path */, const char * /* arg0 */, ...) +ACE_OS::execle (const char * /* path */, const char * /* arg0 */, ...) { ACE_OS_TRACE ("ACE_OS::execle"); #if defined (ACE_WIN32) || defined (VXWORKS) @@ -1280,7 +1269,7 @@ execle (const char * /* path */, const char * /* arg0 */, ...) } int -execlp (const char * /* file */, const char * /* arg0 */, ...) +ACE_OS::execlp (const char * /* file */, const char * /* arg0 */, ...) { ACE_OS_TRACE ("ACE_OS::execlp"); #if defined (ACE_WIN32) || defined (VXWORKS) @@ -1293,7 +1282,7 @@ execlp (const char * /* file */, const char * /* arg0 */, ...) } int -scheduling_class (const char *class_name, ACE_id_t &id) +ACE_OS::scheduling_class (const char *class_name, ACE_id_t &id) { #if defined (ACE_HAS_PRIOCNTL) // Get the priority class ID. @@ -1323,8 +1312,8 @@ scheduling_class (const char *class_name, ACE_id_t &id) } int -set_scheduling_params (const ACE_Sched_Params &sched_params, - ACE_id_t id) +ACE_OS::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 @@ -1418,7 +1407,7 @@ set_scheduling_params (const ACE_Sched_Params &sched_params, } int -thr_setprio (const ACE_Sched_Priority prio) +ACE_OS::thr_setprio (const ACE_Sched_Priority prio) { // Set the thread priority on the current thread. ACE_hthread_t my_thread_id; @@ -1457,8 +1446,8 @@ thr_setprio (const ACE_Sched_Priority prio) } int -sched_params (const ACE_Sched_Params &sched_params, - ACE_id_t id) +ACE_OS::sched_params (const ACE_Sched_Params &sched_params, + ACE_id_t id) { ACE_OS_TRACE ("ACE_OS::sched_params"); # if defined (CHORUS) @@ -1609,16 +1598,16 @@ 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 NULL_thread; -ACE_hthread_t NULL_hthread; +ACE_thread_t ACE_OS::NULL_thread; +ACE_hthread_t ACE_OS::NULL_hthread; #if defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) - ACE_thread_key_t NULL_key = ACE_static_cast (ACE_thread_key_t, -1); + ACE_thread_key_t ACE_OS::NULL_key = ACE_static_cast (ACE_thread_key_t, -1); #else /* ! ACE_HAS_TSS_EMULATION */ - ACE_thread_key_t NULL_key; + ACE_thread_key_t ACE_OS::NULL_key; #endif /* ! ACE_HAS_TSS_EMULATION */ #if defined (CHORUS) -KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS]; +KnCap ACE_OS::actorcaps_[ACE_CHORUS_MAX_ACTORS]; // This is used to map an actor's id into a KnCap for killing and // waiting actors. #endif /* CHORUS */ @@ -1628,10 +1617,9 @@ KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS]; // = Static initialization. // Keeps track of whether we've initialized the WinSock DLL. -int socket_initialized_; +int ACE_OS::socket_initialized_; #endif /* WIN32 */ -} /* namespace ACE_OS */ #if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)) @@ -2473,9 +2461,8 @@ ACE_TSS_Emulation::tss_close () #endif /* WIN32 || ACE_HAS_TSS_EMULATION */ -namespace ACE_OS { void -cleanup_tss (const u_int main_thread) +ACE_OS::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. @@ -2513,7 +2500,6 @@ 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) \ @@ -2592,17 +2578,16 @@ ace_cleanup_destroyer (ACE_Cleanup *object, void *param) object->cleanup (param); } -namespace ACE_OS { int -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::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"); @@ -3454,7 +3439,7 @@ thr_create (ACE_THR_FUNC func, } void -thr_exit (ACE_THR_FUNC_RETURN status) +ACE_OS::thr_exit (ACE_THR_FUNC_RETURN status) { ACE_OS_TRACE ("ACE_OS::thr_exit"); #if defined (ACE_HAS_THREADS) @@ -3529,7 +3514,7 @@ thr_exit (ACE_THR_FUNC_RETURN status) } int -lwp_getparams (ACE_Sched_Params &sched_params) +ACE_OS::lwp_getparams (ACE_Sched_Params &sched_params) { # if defined (ACE_HAS_STHREADS) || defined (sun) // Get the class TS and RT class IDs. @@ -3587,7 +3572,7 @@ lwp_getparams (ACE_Sched_Params &sched_params) } int -lwp_setparams (const ACE_Sched_Params &sched_params) +ACE_OS::lwp_setparams (const ACE_Sched_Params &sched_params) { # if defined (ACE_HAS_STHREADS) || defined (sun) ACE_Sched_Params lwp_params (sched_params); @@ -3601,7 +3586,7 @@ lwp_setparams (const ACE_Sched_Params &sched_params) # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) int -thr_setspecific (ACE_OS_thread_key_t key, void *data) +ACE_OS::thr_setspecific (ACE_OS_thread_key_t key, void *data) { // ACE_OS_TRACE ("ACE_OS::thr_setspecific"); # if defined (ACE_HAS_THREADS) @@ -3632,7 +3617,7 @@ thr_setspecific (ACE_OS_thread_key_t key, void *data) # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ int -thr_setspecific (ACE_thread_key_t key, void *data) +ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data) { // ACE_OS_TRACE ("ACE_OS::thr_setspecific"); #if defined (ACE_HAS_THREADS) @@ -3698,7 +3683,7 @@ thr_setspecific (ACE_thread_key_t key, void *data) } int -thr_keyfree (ACE_thread_key_t key) +ACE_OS::thr_keyfree (ACE_thread_key_t key) { ACE_OS_TRACE ("ACE_OS::thr_keyfree"); # if defined (ACE_HAS_THREADS) @@ -3738,7 +3723,7 @@ thr_keyfree (ACE_thread_key_t key) # if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) int -thr_keycreate (ACE_OS_thread_key_t *key, +ACE_OS::thr_keycreate (ACE_OS_thread_key_t *key, # if defined (ACE_HAS_THR_C_DEST) ACE_THR_C_DEST dest, # else @@ -3793,13 +3778,13 @@ thr_keycreate (ACE_OS_thread_key_t *key, # endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */ int -thr_keycreate (ACE_thread_key_t *key, +ACE_OS::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) @@ -3882,7 +3867,7 @@ thr_keycreate (ACE_thread_key_t *key, } int -thr_key_used (ACE_thread_key_t key) +ACE_OS::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); @@ -3894,7 +3879,7 @@ thr_key_used (ACE_thread_key_t key) } int -thr_key_detach (void *inst) +ACE_OS::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 ()) @@ -3912,9 +3897,9 @@ thr_key_detach (void *inst) } void -unique_name (const void *object, - ACE_TCHAR *name, - size_t length) +ACE_OS::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 <object> will provide @@ -3932,9 +3917,9 @@ unique_name (const void *object, } int -argv_to_string (ACE_TCHAR **argv, - ACE_TCHAR *&buf, - int substitute_env_args) +ACE_OS::argv_to_string (ACE_TCHAR **argv, + ACE_TCHAR *&buf, + int substitute_env_args) { if (argv == 0 || argv[0] == 0) return 0; @@ -3999,10 +3984,10 @@ argv_to_string (ACE_TCHAR **argv, } int -string_to_argv (ACE_TCHAR *buf, - int &argc, - ACE_TCHAR **&argv, - int substitute_env_args) +ACE_OS::string_to_argv (ACE_TCHAR *buf, + int &argc, + ACE_TCHAR **&argv, + int substitute_env_args) { // Reset the number of arguments argc = 0; @@ -4131,7 +4116,7 @@ string_to_argv (ACE_TCHAR *buf, // separated by spaces. pid_t -fork_exec (ACE_TCHAR *argv[]) +ACE_OS::fork_exec (ACE_TCHAR *argv[]) { # if defined (ACE_WIN32) ACE_TCHAR *buf; @@ -4209,10 +4194,10 @@ fork_exec (ACE_TCHAR *argv[]) } ssize_t -read_n (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bt) +ACE_OS::read_n (ACE_HANDLE handle, + void *buf, + size_t len, + size_t *bt) { size_t temp; size_t &bytes_transferred = bt == 0 ? temp : *bt; @@ -4237,10 +4222,10 @@ read_n (ACE_HANDLE handle, // system call on UNIX and the <WriteFile> call on Win32). ssize_t -write_n (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bt) +ACE_OS::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; @@ -4267,7 +4252,7 @@ write_n (ACE_HANDLE handle, // thread-safe. int -writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) +ACE_OS::writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) { ACE_OS_TRACE ("ACE_OS::writev_emulation"); @@ -4313,9 +4298,9 @@ writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) // thread-safe. ssize_t -readv_emulation (ACE_HANDLE handle, - ACE_READV_TYPE *iov, - int n) +ACE_OS::readv_emulation (ACE_HANDLE handle, + ACE_READV_TYPE *iov, + int n) { ACE_OS_TRACE ("ACE_OS::readv_emulation"); @@ -4381,7 +4366,7 @@ ftruncate (ACE_HANDLE handle, long len) # if defined (ACE_LACKS_MKTEMP) ACE_TCHAR * -mktemp (ACE_TCHAR *s) +ACE_OS::mktemp (ACE_TCHAR *s) { ACE_OS_TRACE ("ACE_OS::mktemp"); if (s == 0) @@ -4430,7 +4415,7 @@ mktemp (ACE_TCHAR *s) # endif /* ACE_LACKS_MKTEMP */ int -socket_init (int version_high, int version_low) +ACE_OS::socket_init (int version_high, int version_low) { # if defined (ACE_WIN32) if (ACE_OS::socket_initialized_ == 0) @@ -4464,7 +4449,7 @@ socket_init (int version_high, int version_low) } int -socket_fini (void) +ACE_OS::socket_fini (void) { # if defined (ACE_WIN32) if (ACE_OS::socket_initialized_ != 0) @@ -4730,7 +4715,6 @@ spaef (FUNCPTR entry, ...) return ret; } # endif /* VXWORKS */ -} /* namespace ACE_OS */ # if !defined (ACE_HAS_SIGINFO_T) siginfo_t::siginfo_t (ACE_HANDLE handle) @@ -4746,9 +4730,8 @@ siginfo_t::siginfo_t (ACE_HANDLE *handles) } # endif /* ACE_HAS_SIGINFO_T */ -namespace ACE_OS { pid_t -fork (const ACE_TCHAR *program_name) +ACE_OS::fork (const ACE_TCHAR *program_name) { ACE_OS_TRACE ("ACE_OS::fork"); # if defined (ACE_LACKS_FORK) @@ -4770,7 +4753,6 @@ fork (const ACE_TCHAR *program_name) return pid; # endif /* ACE_WIN32 */ } -} /* namespace ACE_OS */ void ACE_Cleanup::cleanup (void *) @@ -4907,11 +4889,10 @@ 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 * -inet_ntoa (const struct in_addr addr) +ACE_OS::inet_ntoa (const struct in_addr addr) { ACE_OS_TRACE ("ACE_OS::inet_ntoa"); @@ -4928,7 +4909,7 @@ inet_ntoa (const struct in_addr addr) #endif /* defined (ACE_PSOS) */ int -inet_aton (const char *host_name, struct in_addr *addr) +ACE_OS::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); @@ -4959,7 +4940,7 @@ inet_aton (const char *host_name, struct in_addr *addr) } struct tm * -localtime_r (const time_t *t, struct tm *res) +ACE_OS::localtime_r (const time_t *t, struct tm *res) { ACE_OS_TRACE ("ACE_OS::localtime_r"); #if defined (ACE_HAS_REENTRANT_FUNCTIONS) @@ -5042,10 +5023,10 @@ localtime_r (const time_t *t, struct tm *res) } ssize_t -pread (ACE_HANDLE handle, - void *buf, - size_t nbytes, - off_t offset) +ACE_OS::pread (ACE_HANDLE handle, + void *buf, + size_t nbytes, + off_t offset) { # if defined (ACE_HAS_P_READ_WRITE) # if defined (ACE_WIN32) @@ -5167,10 +5148,10 @@ pread (ACE_HANDLE handle, } ssize_t -pwrite (ACE_HANDLE handle, - const void *buf, - size_t nbytes, - off_t offset) +ACE_OS::pwrite (ACE_HANDLE handle, + const void *buf, + size_t nbytes, + off_t offset) { # if defined (ACE_HAS_P_READ_WRITE) # if defined (ACE_WIN32) @@ -5286,10 +5267,10 @@ pwrite (ACE_HANDLE handle, } ACE_HANDLE -open (const char *filename, - int mode, - int perms, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::open (const char *filename, + int mode, + int perms, + LPSECURITY_ATTRIBUTES sa) { ACE_OS_TRACE ("ACE_OS::open"); @@ -5434,10 +5415,10 @@ open (const char *filename, #if defined (ACE_HAS_WCHAR) ACE_HANDLE -open (const wchar_t *filename, - int mode, - int perms, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::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 @@ -5531,7 +5512,7 @@ open (const wchar_t *filename, # if defined (ACE_LACKS_DIFFTIME) double -difftime (time_t t1, time_t t0) +ACE_OS::difftime (time_t t1, time_t t0) { /* return t1 - t0 in seconds */ struct tm tms[2], *ptms[2], temp; @@ -5664,7 +5645,7 @@ difftime (time_t t1, time_t t0) # if defined (ACE_HAS_WINCE) ACE_TCHAR * -ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) +ACE_OS::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. @@ -5699,7 +5680,7 @@ ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) # endif /* ACE_HAS_WINCE */ time_t -mktime (struct tm *t) +ACE_OS::mktime (struct tm *t) { ACE_OS_TRACE ("ACE_OS::mktime"); # if defined (ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME) @@ -5730,10 +5711,10 @@ mktime (struct tm *t) # if !defined (ACE_HAS_THREADS) || defined (ACE_LACKS_RWLOCK_T) int -rwlock_init (ACE_rwlock_t *rw, - int type, - const ACE_TCHAR *name, - void *arg) +ACE_OS::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) @@ -5809,7 +5790,7 @@ rwlock_init (ACE_rwlock_t *rw, // to avoid use before definition if they were inline. int -cond_destroy (ACE_cond_t *cv) +ACE_OS::cond_destroy (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_destroy"); # if defined (ACE_HAS_THREADS) @@ -5829,39 +5810,39 @@ cond_destroy (ACE_cond_t *cv) // @@ The following functions could be inlined if i could figure where // to put it among the #ifdefs! int -condattr_init (ACE_condattr_t &attributes, - int type) +ACE_OS::condattr_init (ACE_condattr_t &attributes, + int type) { attributes.type = type; return 0; } int -condattr_destroy (ACE_condattr_t &) +ACE_OS::condattr_destroy (ACE_condattr_t &) { return 0; } int -cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const char *name, void *arg) +ACE_OS::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 -cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const wchar_t *name, void *arg) +ACE_OS::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 -cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) +ACE_OS::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) @@ -5891,7 +5872,7 @@ cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) #if defined (ACE_HAS_WCHAR) int -cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) +ACE_OS::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) @@ -5921,7 +5902,7 @@ cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) #endif /* ACE_HAS_WCHAR */ int -cond_signal (ACE_cond_t *cv) +ACE_OS::cond_signal (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_signal"); # if defined (ACE_HAS_THREADS) @@ -5946,7 +5927,7 @@ cond_signal (ACE_cond_t *cv) } int -cond_broadcast (ACE_cond_t *cv) +ACE_OS::cond_broadcast (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_broadcast"); # if defined (ACE_HAS_THREADS) @@ -5993,8 +5974,8 @@ cond_broadcast (ACE_cond_t *cv) } int -cond_wait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex) +ACE_OS::cond_wait (ACE_cond_t *cv, + ACE_mutex_t *external_mutex) { ACE_OS_TRACE ("ACE_OS::cond_wait"); # if defined (ACE_HAS_THREADS) @@ -6087,9 +6068,9 @@ cond_wait (ACE_cond_t *cv, } int -cond_timedwait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex, - ACE_Time_Value *timeout) +ACE_OS::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) @@ -6275,9 +6256,9 @@ cond_timedwait (ACE_cond_t *cv, # if defined (ACE_HAS_WTHREADS) int -cond_timedwait (ACE_cond_t *cv, - ACE_thread_mutex_t *external_mutex, - ACE_Time_Value *timeout) +ACE_OS::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) @@ -6368,8 +6349,8 @@ cond_timedwait (ACE_cond_t *cv, } int -cond_wait (ACE_cond_t *cv, - ACE_thread_mutex_t *external_mutex) +ACE_OS::cond_wait (ACE_cond_t *cv, + ACE_thread_mutex_t *external_mutex) { ACE_OS_TRACE ("ACE_OS::cond_wait"); # if defined (ACE_HAS_THREADS) @@ -6440,7 +6421,7 @@ cond_wait (ACE_cond_t *cv, #endif /* ACE_LACKS_COND_T */ void -exit (int status) +ACE_OS::exit (int status) { ACE_OS_TRACE ("ACE_OS::exit"); @@ -6467,8 +6448,6 @@ 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 @@ -7131,7 +7110,6 @@ 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. @@ -7142,7 +7120,7 @@ namespace ACE_OS { #endif /* ACE_WIN32 && UNICODE !ACE_USES_TCHAR */ ACE_TCHAR * -getenvstrings (void) +ACE_OS::getenvstrings (void) { #if defined (ACE_LACKS_ENV) ACE_NOTSUP_RETURN (0); @@ -7159,7 +7137,7 @@ getenvstrings (void) #if defined (ACE_HAS_STRPTIME) char * -strptime (char *buf, const char *format, struct tm *tm) +ACE_OS::strptime (char *buf, const char *format, struct tm *tm) { #if !defined (ACE_HAS_WINCE) #if defined (ACE_LACKS_NATIVE_STRPTIME) @@ -7401,12 +7379,12 @@ strptime (char *buf, const char *format, struct tm *tm) # if defined (ACE_LACKS_NATIVE_STRPTIME) int -strptime_getnum (char *buf, - int *num, - int *bi, - int *fi, - int min, - int max) +ACE_OS::strptime_getnum (char *buf, + int *num, + int *bi, + int *fi, + int min, + int max) { int i = 0, tmp = 0; @@ -7435,10 +7413,10 @@ strptime_getnum (char *buf, #if !defined (ACE_HAS_WINCE) ACE_HANDLE -accept (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen, - const ACE_Accept_QoS_Params &qos_params) +ACE_OS::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, @@ -7457,10 +7435,10 @@ accept (ACE_HANDLE handle, } ACE_HANDLE -join_leaf (ACE_HANDLE socket, - const sockaddr *name, - int namelen, - const ACE_QoS_Params &qos_params) +ACE_OS::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) @@ -7492,15 +7470,15 @@ join_leaf (ACE_HANDLE socket, } 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) +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) { # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) ACE_SOCKCALL_RETURN (::WSAIoctl ((ACE_SOCKET) socket, @@ -7530,14 +7508,14 @@ ioctl (ACE_HANDLE socket, int -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) +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) { # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -7674,10 +7652,10 @@ ioctl (ACE_HANDLE socket, } int -connect (ACE_HANDLE handle, - const sockaddr *addr, - int addrlen, - const ACE_QoS_Params &qos_params) +ACE_OS::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) @@ -7699,7 +7677,7 @@ connect (ACE_HANDLE handle, #endif // ACE_HAS_WINCE long -num_processors (void) +ACE_OS::num_processors (void) { ACE_OS_TRACE ("ACE_OS::num_processors"); @@ -7715,7 +7693,7 @@ num_processors (void) } long -num_processors_online (void) +ACE_OS::num_processors_online (void) { ACE_OS_TRACE ("ACE_OS::num_processors_online"); @@ -7743,7 +7721,7 @@ num_processors_online (void) #endif int -getmacaddress (struct macaddr_node_t *node) +ACE_OS::getmacaddress (struct macaddr_node_t *node) { ACE_OS_TRACE ("ACE_OS::getmacaddress"); @@ -7893,5 +7871,3 @@ getmacaddress (struct macaddr_node_t *node) ACE_NOTSUP_RETURN (-1); #endif } - -}; /* namespace ACE_OS */ @@ -3947,8 +3947,8 @@ private: friend int ACE_OS::netdb_acquire (void); friend int ACE_OS::netdb_release (void); # endif /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ - friend ssize_t ACE_OS::pread(int, void*, unsigned int, long long int); - friend ssize_t ACE_OS::pwrite(int, const void*, unsigned int, long long int); + friend ssize_t ACE_OS::pread(ACE_HANDLE, void*, size_t, off_t); + friend ssize_t ACE_OS::pwrite(ACE_HANDLE, const void*, size_t, off_t); friend time_t ACE_OS::mktime(tm*); friend int ACE_OS::atexit(void (*)()); friend class ACE_Object_Manager; @@ -136,11 +136,8 @@ typedef const struct timespec * ACE_TIMESPEC_PTR; # include /**/ <malloc.h> #endif /* ACE_LACKS_MALLOC_H */ -//////////////////////////////////////////////////////////////////////////////// -namespace ACE_OS -{ ACE_INLINE int -fcntl (ACE_HANDLE handle, int cmd, long arg) +ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg) { ACE_OS_TRACE ("ACE_OS::fcntl"); # if defined (ACE_LACKS_FCNTL) @@ -155,7 +152,7 @@ fcntl (ACE_HANDLE handle, int cmd, long arg) #if !defined (ACE_LACKS_CHDIR) ACE_INLINE int -chdir (const char *path) +ACE_OS::chdir (const char *path) { ACE_OS_TRACE ("ACE_OS::chdir"); #if defined (VXWORKS) @@ -185,7 +182,7 @@ chdir (const char *path) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -chdir (const wchar_t *path) +ACE_OS::chdir (const wchar_t *path) { #if defined (ACE_WIN32) ACE_OSCALL_RETURN (::_wchdir (path), int, -1); @@ -198,7 +195,7 @@ chdir (const wchar_t *path) #if !defined (ACE_LACKS_MKTEMP) ACE_INLINE ACE_TCHAR * -mktemp (ACE_TCHAR *s) +ACE_OS::mktemp (ACE_TCHAR *s) { # if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) return ::_wmktemp (s); @@ -212,14 +209,14 @@ mktemp (ACE_TCHAR *s) #if !defined (ACE_LACKS_MKSTEMP) ACE_INLINE ACE_HANDLE -mkstemp (ACE_TCHAR *s) +ACE_OS::mkstemp (ACE_TCHAR *s) { return ::mkstemp (s); } #endif /* !ACE_LACKS_MKSTEMP */ ACE_INLINE int -mkfifo (const ACE_TCHAR *file, mode_t mode) +ACE_OS::mkfifo (const ACE_TCHAR *file, mode_t mode) { ACE_OS_TRACE ("ACE_OS::mkfifo"); #if defined (ACE_LACKS_MKFIFO) @@ -230,7 +227,6 @@ 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) @@ -301,10 +297,8 @@ 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 -fstat (ACE_HANDLE handle, ACE_stat *stp) +ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::fstat"); #if defined (ACE_PSOS_LACKS_PHILE) @@ -328,7 +322,7 @@ fstat (ACE_HANDLE handle, ACE_stat *stp) } ACE_INLINE int -lstat (const char *file, ACE_stat *stp) +ACE_OS::lstat (const char *file, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::lstat"); # if defined (ACE_LACKS_LSTAT) || \ @@ -350,7 +344,7 @@ lstat (const char *file, ACE_stat *stp) } ACE_INLINE int -fsync (ACE_HANDLE handle) +ACE_OS::fsync (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::fsync"); # if defined (ACE_LACKS_FSYNC) @@ -362,7 +356,7 @@ fsync (ACE_HANDLE handle) } ACE_INLINE int -getopt (int argc, char *const *argv, const char *optstring) +ACE_OS::getopt (int argc, char *const *argv, const char *optstring) { ACE_OS_TRACE ("ACE_OS::getopt"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -380,7 +374,7 @@ getopt (int argc, char *const *argv, const char *optstring) } ACE_INLINE int -pipe (ACE_HANDLE fds[]) +ACE_OS::pipe (ACE_HANDLE fds[]) { ACE_OS_TRACE ("ACE_OS::pipe"); # if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -390,7 +384,6 @@ pipe (ACE_HANDLE fds[]) ACE_OSCALL_RETURN (::pipe (fds), int, -1); # endif /* VXWORKS || ACE_PSOS */ } -} /* namespace ACE_OS */ # if defined (DIGITAL_UNIX) extern "C" { @@ -413,9 +406,8 @@ extern "C" { } #endif /* AIX and VAC++ 4 */ -namespace ACE_OS { ACE_INLINE int -rand_r (ACE_RANDR_TYPE &seed) +ACE_OS::rand_r (ACE_RANDR_TYPE &seed) { ACE_OS_TRACE ("ACE_OS::rand_r"); # if defined (ACE_HAS_REENTRANT_FUNCTIONS) && \ @@ -441,7 +433,7 @@ rand_r (ACE_RANDR_TYPE &seed) } ACE_INLINE pid_t -setsid (void) +ACE_OS::setsid (void) { ACE_OS_TRACE ("ACE_OS::setsid"); # if defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -452,7 +444,7 @@ setsid (void) } ACE_INLINE mode_t -umask (mode_t cmask) +ACE_OS::umask (mode_t cmask) { ACE_OS_TRACE ("ACE_OS::umask"); # if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -462,7 +454,6 @@ umask (mode_t cmask) return ::umask (cmask); // This call shouldn't fail... # endif /* VXWORKS || ACE_PSOS */ } -} /* namespace ACE_OS */ #else /* ACE_WIN32 */ @@ -480,9 +471,8 @@ umask (mode_t cmask) } \ return RESULT; } while (0) -namespace ACE_OS { ACE_INLINE LPSECURITY_ATTRIBUTES -default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa) +ACE_OS::default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa) { #if defined (ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES) if (sa == 0) @@ -504,14 +494,18 @@ default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa) } ACE_INLINE int -getopt (int, char *const *, const char *) +ACE_OS::getopt (int argc, char *const *argv, const char *optstring) { + 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 -pipe (ACE_HANDLE fds[]) +ACE_OS::pipe (ACE_HANDLE fds[]) { # if !defined (ACE_HAS_WINCE) && !defined (__IBMCPP__) ACE_OS_TRACE ("ACE_OS::pipe"); @@ -524,7 +518,7 @@ pipe (ACE_HANDLE fds[]) } ACE_INLINE int -rand_r (ACE_RANDR_TYPE& seed) +ACE_OS::rand_r (ACE_RANDR_TYPE& seed) { ACE_OS_TRACE ("ACE_OS::rand_r"); @@ -540,14 +534,14 @@ rand_r (ACE_RANDR_TYPE& seed) } ACE_INLINE pid_t -setsid (void) +ACE_OS::setsid (void) { ACE_OS_TRACE ("ACE_OS::setsid"); ACE_NOTSUP_RETURN (-1); } ACE_INLINE mode_t -umask (mode_t cmask) +ACE_OS::umask (mode_t cmask) { #if !defined (ACE_HAS_WINCE) ACE_OS_TRACE ("ACE_OS::umask"); @@ -558,7 +552,7 @@ umask (mode_t cmask) } ACE_INLINE int -fstat (ACE_HANDLE handle, ACE_stat *stp) +ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::fstat"); # if 1 @@ -599,12 +593,11 @@ fstat (ACE_HANDLE handle, ACE_stat *stp) return retval; # endif /* 1 */ } -} /* namespace ACE_OS */ + #endif /* WIN32 */ -namespace ACE_OS { ACE_INLINE int -clock_gettime (clockid_t clockid, struct timespec *ts) +ACE_OS::clock_gettime (clockid_t clockid, struct timespec *ts) { ACE_OS_TRACE ("ACE_OS::clock_gettime"); #if defined (ACE_HAS_CLOCK_GETTIME) @@ -623,7 +616,7 @@ clock_gettime (clockid_t clockid, struct timespec *ts) } ACE_INLINE ACE_Time_Value -gettimeofday (void) +ACE_OS::gettimeofday (void) { // ACE_OS_TRACE ("ACE_OS::gettimeofday"); @@ -690,7 +683,7 @@ gettimeofday (void) } ACE_INLINE int -stat (const ACE_TCHAR *file, ACE_stat *stp) +ACE_OS::stat (const ACE_TCHAR *file, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::stat"); #if defined (VXWORKS) @@ -742,7 +735,7 @@ stat (const ACE_TCHAR *file, ACE_stat *stp) } ACE_INLINE time_t -time (time_t *tloc) +ACE_OS::time (time_t *tloc) { #if !defined (ACE_HAS_WINCE) ACE_OS_TRACE ("ACE_OS::time"); @@ -764,21 +757,21 @@ time (time_t *tloc) } ACE_INLINE void -srand (u_int seed) +ACE_OS::srand (u_int seed) { ACE_OS_TRACE ("ACE_OS::srand"); ::srand (seed); } ACE_INLINE int -rand (void) +ACE_OS::rand (void) { ACE_OS_TRACE ("ACE_OS::rand"); ACE_OSCALL_RETURN (::rand (), int, -1); } ACE_INLINE int -unlink (const ACE_TCHAR *path) +ACE_OS::unlink (const ACE_TCHAR *path) { ACE_OS_TRACE ("ACE_OS::unlink"); # if defined (VXWORKS) @@ -804,9 +797,9 @@ unlink (const ACE_TCHAR *path) } ACE_INLINE int -rename (const ACE_TCHAR *old_name, - const ACE_TCHAR *new_name, - int flags) +ACE_OS::rename (const ACE_TCHAR *old_name, + const ACE_TCHAR *new_name, + int flags) { # if defined (ACE_LACKS_RENAME) ACE_UNUSED_ARG (old_name); @@ -838,7 +831,7 @@ rename (const ACE_TCHAR *old_name, } ACE_INLINE ACE_TCHAR * -tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) +ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) { ACE_OS_TRACE ("ACE_OS::tempnam"); #if defined (ACE_HAS_WINCE) || defined (ACE_LACKS_TEMPNAM) @@ -865,10 +858,10 @@ tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) #endif ACE_INLINE ACE_HANDLE -shm_open (const ACE_TCHAR *filename, - int mode, - int perms, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::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) @@ -881,7 +874,7 @@ shm_open (const ACE_TCHAR *filename, } ACE_INLINE int -shm_unlink (const ACE_TCHAR *path) +ACE_OS::shm_unlink (const ACE_TCHAR *path) { ACE_OS_TRACE ("ACE_OS::shm_unlink"); # if defined (ACE_HAS_SHM_OPEN) @@ -894,7 +887,7 @@ shm_unlink (const ACE_TCHAR *path) #if !defined (ACE_LACKS_CUSERID) ACE_INLINE char * -cuserid (char *user, size_t maxlen) +ACE_OS::cuserid (char *user, size_t maxlen) { ACE_OS_TRACE ("ACE_OS::cuserid"); #if defined (VXWORKS) @@ -993,7 +986,7 @@ cuserid (char *user, size_t maxlen) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -cuserid (wchar_t *user, size_t maxlen) +ACE_OS::cuserid (wchar_t *user, size_t maxlen) { # if defined (ACE_WIN32) BOOL result = GetUserNameW (user, (u_long *) &maxlen); @@ -1022,7 +1015,7 @@ cuserid (wchar_t *user, size_t maxlen) #endif /* ACE_LACKS_CUSERID */ ACE_INLINE int -atexit (ACE_EXIT_HOOK func) +ACE_OS::atexit (ACE_EXIT_HOOK func) { return ACE_OS_Object_Manager::instance ()->at_exit (func); } @@ -1030,7 +1023,7 @@ atexit (ACE_EXIT_HOOK func) // Doesn't need a macro since it *never* returns! ACE_INLINE void -_exit (int status) +ACE_OS::_exit (int status) { ACE_OS_TRACE ("ACE_OS::_exit"); #if defined (VXWORKS) @@ -1053,7 +1046,7 @@ _exit (int status) } ACE_INLINE void -abort (void) +ACE_OS::abort (void) { #if !defined (ACE_HAS_WINCE) ::abort (); @@ -1064,14 +1057,14 @@ abort (void) } ACE_INLINE int -vsprintf (char *buffer, const char *format, va_list argptr) +ACE_OS::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 -vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) +ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) { # if defined (ACE_HAS_VSWPRINTF) return ::vswprintf (buffer, format, argptr); @@ -1088,7 +1081,7 @@ vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) ACE_INLINE long -sysconf (int name) +ACE_OS::sysconf (int name) { ACE_OS_TRACE ("ACE_OS::sysconf"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -1100,7 +1093,7 @@ sysconf (int name) } ACE_INLINE int -mutex_init (ACE_mutex_t *m, +ACE_OS::mutex_init (ACE_mutex_t *m, int type, const char *name, ACE_mutexattr_t *attributes, @@ -1298,7 +1291,7 @@ mutex_init (ACE_mutex_t *m, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -mutex_init (ACE_mutex_t *m, +ACE_OS::mutex_init (ACE_mutex_t *m, int type, const wchar_t *name, ACE_mutexattr_t *attributes, @@ -1336,7 +1329,7 @@ mutex_init (ACE_mutex_t *m, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -mutex_destroy (ACE_mutex_t *m) +ACE_OS::mutex_destroy (ACE_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::mutex_destroy"); #if defined (ACE_HAS_THREADS) @@ -1381,7 +1374,7 @@ mutex_destroy (ACE_mutex_t *m) } ACE_INLINE int -mutex_lock (ACE_mutex_t *m) +ACE_OS::mutex_lock (ACE_mutex_t *m) { // ACE_OS_TRACE ("ACE_OS::mutex_lock"); #if defined (ACE_HAS_THREADS) @@ -1441,8 +1434,8 @@ mutex_lock (ACE_mutex_t *m) } ACE_INLINE int -mutex_lock (ACE_mutex_t *m, - int &abandoned) +ACE_OS::mutex_lock (ACE_mutex_t *m, + int &abandoned) { ACE_OS_TRACE ("ACE_OS::mutex_lock"); #if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS) @@ -1480,7 +1473,7 @@ mutex_lock (ACE_mutex_t *m, } ACE_INLINE int -mutex_trylock (ACE_mutex_t *m) +ACE_OS::mutex_trylock (ACE_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::mutex_trylock"); #if defined (ACE_HAS_THREADS) @@ -1570,7 +1563,7 @@ mutex_trylock (ACE_mutex_t *m) } ACE_INLINE int -mutex_trylock (ACE_mutex_t *m, int &abandoned) +ACE_OS::mutex_trylock (ACE_mutex_t *m, int &abandoned) { #if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS) abandoned = 0; @@ -1609,8 +1602,8 @@ mutex_trylock (ACE_mutex_t *m, int &abandoned) } ACE_INLINE int -mutex_lock (ACE_mutex_t *m, - const ACE_Time_Value &timeout) +ACE_OS::mutex_lock (ACE_mutex_t *m, + const ACE_Time_Value &timeout) { #if defined (ACE_HAS_THREADS) && defined (ACE_HAS_MUTEX_TIMEOUTS) @@ -1712,14 +1705,14 @@ mutex_lock (ACE_mutex_t *m, } ACE_INLINE int -mutex_lock (ACE_mutex_t *m, - const ACE_Time_Value *timeout) +ACE_OS::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 -mutex_unlock (ACE_mutex_t *m) +ACE_OS::mutex_unlock (ACE_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::mutex_unlock"); #if defined (ACE_HAS_THREADS) @@ -1765,10 +1758,10 @@ mutex_unlock (ACE_mutex_t *m) } ACE_INLINE int -thread_mutex_init (ACE_thread_mutex_t *m, - int type, - const char *name, - ACE_mutexattr_t *arg) +ACE_OS::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) @@ -1801,10 +1794,10 @@ thread_mutex_init (ACE_thread_mutex_t *m, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -thread_mutex_init (ACE_thread_mutex_t *m, - int type, - const wchar_t *name, - ACE_mutexattr_t *arg) +ACE_OS::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) @@ -1837,7 +1830,7 @@ thread_mutex_init (ACE_thread_mutex_t *m, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -thread_mutex_destroy (ACE_thread_mutex_t *m) +ACE_OS::thread_mutex_destroy (ACE_thread_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::thread_mutex_destroy"); #if defined (ACE_HAS_THREADS) @@ -1861,7 +1854,7 @@ thread_mutex_destroy (ACE_thread_mutex_t *m) } ACE_INLINE int -thread_mutex_lock (ACE_thread_mutex_t *m) +ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m) { // ACE_OS_TRACE ("ACE_OS::thread_mutex_lock"); #if defined (ACE_HAS_THREADS) @@ -1880,8 +1873,8 @@ thread_mutex_lock (ACE_thread_mutex_t *m) } ACE_INLINE int -thread_mutex_lock (ACE_thread_mutex_t *m, - const ACE_Time_Value &timeout) +ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m, + const ACE_Time_Value &timeout) { // ACE_OS_TRACE ("ACE_OS::thread_mutex_lock"); @@ -1907,8 +1900,8 @@ thread_mutex_lock (ACE_thread_mutex_t *m, } ACE_INLINE int -thread_mutex_lock (ACE_thread_mutex_t *m, - const ACE_Time_Value *timeout) +ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m, + const ACE_Time_Value *timeout) { return timeout == 0 ? ACE_OS::thread_mutex_lock (m) @@ -1916,7 +1909,7 @@ thread_mutex_lock (ACE_thread_mutex_t *m, } ACE_INLINE int -thread_mutex_trylock (ACE_thread_mutex_t *m) +ACE_OS::thread_mutex_trylock (ACE_thread_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::thread_mutex_trylock"); @@ -1948,7 +1941,7 @@ thread_mutex_trylock (ACE_thread_mutex_t *m) } ACE_INLINE int -thread_mutex_unlock (ACE_thread_mutex_t *m) +ACE_OS::thread_mutex_unlock (ACE_thread_mutex_t *m) { ACE_OS_TRACE ("ACE_OS::thread_mutex_unlock"); #if defined (ACE_HAS_THREADS) @@ -1973,7 +1966,7 @@ thread_mutex_unlock (ACE_thread_mutex_t *m) // using the ACE_OS::sema_* functions. So, they are defined in OS.cpp. ACE_INLINE int -cond_destroy (ACE_cond_t *cv) +ACE_OS::cond_destroy (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_destroy"); # if defined (ACE_HAS_THREADS) @@ -1996,8 +1989,8 @@ cond_destroy (ACE_cond_t *cv) } ACE_INLINE int -condattr_init (ACE_condattr_t &attributes, - int type) +ACE_OS::condattr_init (ACE_condattr_t &attributes, + int type) { ACE_UNUSED_ARG (type); # if defined (ACE_HAS_THREADS) @@ -2056,7 +2049,7 @@ condattr_init (ACE_condattr_t &attributes, } ACE_INLINE int -condattr_destroy (ACE_condattr_t &attributes) +ACE_OS::condattr_destroy (ACE_condattr_t &attributes) { #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) @@ -2082,10 +2075,10 @@ condattr_destroy (ACE_condattr_t &attributes) } ACE_INLINE int -cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const char *name, - void *arg) +ACE_OS::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); @@ -2132,17 +2125,17 @@ cond_init (ACE_cond_t *cv, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -cond_init (ACE_cond_t *cv, - ACE_condattr_t &attributes, - const wchar_t *name, - void *arg) +ACE_OS::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 -cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) +ACE_OS::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 @@ -2156,14 +2149,14 @@ cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) +ACE_OS::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 -cond_signal (ACE_cond_t *cv) +ACE_OS::cond_signal (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_signal"); # if defined (ACE_HAS_THREADS) @@ -2187,7 +2180,7 @@ cond_signal (ACE_cond_t *cv) } ACE_INLINE int -cond_broadcast (ACE_cond_t *cv) +ACE_OS::cond_broadcast (ACE_cond_t *cv) { ACE_OS_TRACE ("ACE_OS::cond_broadcast"); # if defined (ACE_HAS_THREADS) @@ -2214,8 +2207,8 @@ cond_broadcast (ACE_cond_t *cv) } ACE_INLINE int -cond_wait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex) +ACE_OS::cond_wait (ACE_cond_t *cv, + ACE_mutex_t *external_mutex) { ACE_OS_TRACE ("ACE_OS::cond_wait"); # if defined (ACE_HAS_THREADS) @@ -2242,9 +2235,9 @@ cond_wait (ACE_cond_t *cv, } ACE_INLINE int -cond_timedwait (ACE_cond_t *cv, - ACE_mutex_t *external_mutex, - ACE_Time_Value *timeout) +ACE_OS::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) @@ -2352,7 +2345,7 @@ cond_timedwait (ACE_cond_t *cv, #endif /* !ACE_LACKS_COND_T */ ACE_INLINE int -thr_equal (ACE_thread_t t1, ACE_thread_t t2) +ACE_OS::thr_equal (ACE_thread_t t1, ACE_thread_t t2) { #if defined (ACE_HAS_PTHREADS) # if defined (pthread_equal) @@ -2371,7 +2364,7 @@ thr_equal (ACE_thread_t t1, ACE_thread_t t2) } ACE_INLINE void -thr_self (ACE_hthread_t &self) +ACE_OS::thr_self (ACE_hthread_t &self) { ACE_OS_TRACE ("ACE_OS::thr_self"); #if defined (ACE_HAS_THREADS) @@ -2395,7 +2388,7 @@ thr_self (ACE_hthread_t &self) } ACE_INLINE ACE_thread_t -thr_self (void) +ACE_OS::thr_self (void) { // ACE_OS_TRACE ("ACE_OS::thr_self"); #if defined (ACE_HAS_THREADS) @@ -2419,10 +2412,10 @@ thr_self (void) } ACE_INLINE int -recursive_mutex_init (ACE_recursive_thread_mutex_t *m, - const ACE_TCHAR *name, - ACE_mutexattr_t *arg, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::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) @@ -2452,7 +2445,7 @@ recursive_mutex_init (ACE_recursive_thread_mutex_t *m, } ACE_INLINE int -recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m) +ACE_OS::recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2472,7 +2465,7 @@ recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m) } ACE_INLINE int -recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) +ACE_OS::recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2523,7 +2516,7 @@ recursive_mutex_lock (ACE_recursive_thread_mutex_t *m) } ACE_INLINE int -recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m) +ACE_OS::recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2568,7 +2561,7 @@ recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m) } ACE_INLINE int -recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m) +ACE_OS::recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m) { #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_RECURSIVE_MUTEXES) @@ -2628,8 +2621,8 @@ 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 -recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, - ACE_recursive_mutex_state &state) +ACE_OS::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"); @@ -2719,8 +2712,8 @@ 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 -recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, - ACE_recursive_mutex_state &state) +ACE_OS::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"); @@ -2769,7 +2762,7 @@ recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m, ACE_INLINE int -sema_destroy (ACE_sema_t *s) +ACE_OS::sema_destroy (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_destroy"); # if defined (ACE_HAS_POSIX_SEM) @@ -2839,7 +2832,7 @@ sema_destroy (ACE_sema_t *s) // ACE_OS::sema_init (). ACE_INLINE int -close (ACE_HANDLE handle) +ACE_OS::close (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::close"); #if defined (ACE_WIN32) @@ -2861,7 +2854,7 @@ close (ACE_HANDLE handle) // FD. ACE_INLINE long -filesize (ACE_HANDLE handle) +ACE_OS::filesize (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::filesize"); #if defined (ACE_WIN32) @@ -2873,7 +2866,7 @@ filesize (ACE_HANDLE handle) } ACE_INLINE int -ftruncate (ACE_HANDLE handle, off_t offset) +ACE_OS::ftruncate (ACE_HANDLE handle, off_t offset) { ACE_OS_TRACE ("ACE_OS::ftruncate"); #if defined (ACE_WIN32) @@ -2894,15 +2887,15 @@ ftruncate (ACE_HANDLE handle, off_t offset) } ACE_INLINE void * -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::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) @@ -3092,13 +3085,13 @@ mmap (void *addr, // ACE_OS::sema_init (). ACE_INLINE int -sema_init (ACE_sema_t *s, - u_int count, - int type, - const char *name, - void *arg, - int max, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::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) @@ -3319,13 +3312,13 @@ sema_init (ACE_sema_t *s, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -sema_init (ACE_sema_t *s, - u_int count, - int type, - const wchar_t *name, - void *arg, - int max, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::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) @@ -3386,7 +3379,7 @@ sema_init (ACE_sema_t *s, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -sema_post (ACE_sema_t *s) +ACE_OS::sema_post (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_post"); # if defined (ACE_HAS_POSIX_SEM) @@ -3447,7 +3440,7 @@ sema_post (ACE_sema_t *s) } ACE_INLINE int -sema_post (ACE_sema_t *s, u_int release_count) +ACE_OS::sema_post (ACE_sema_t *s, u_int release_count) { #if defined (ACE_WIN32) && !defined (ACE_USES_WINCE_SEMA_SIMULATION) // Win32 supports this natively. @@ -3470,7 +3463,7 @@ sema_post (ACE_sema_t *s, u_int release_count) } ACE_INLINE int -sema_trywait (ACE_sema_t *s) +ACE_OS::sema_trywait (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_trywait"); # if defined (ACE_HAS_POSIX_SEM) @@ -3545,7 +3538,7 @@ sema_trywait (ACE_sema_t *s) if (result == WAIT_TIMEOUT) errno = EBUSY; else - set_errno_to_last_error (); + ACE_OS::set_errno_to_last_error (); // This is taken from the hack above. ;) return -1; # endif /* ACE_USES_WINCE_SEMA_SIMULATION */ @@ -3582,7 +3575,7 @@ sema_trywait (ACE_sema_t *s) } ACE_INLINE int -sema_wait (ACE_sema_t *s) +ACE_OS::sema_wait (ACE_sema_t *s) { ACE_OS_TRACE ("ACE_OS::sema_wait"); # if defined (ACE_HAS_POSIX_SEM) @@ -3690,7 +3683,7 @@ sema_wait (ACE_sema_t *s) } ACE_INLINE int -sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) +ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) { ACE_OS_TRACE ("ACE_OS::sema_wait"); # if defined (ACE_HAS_POSIX_SEM) @@ -3887,13 +3880,13 @@ sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) } ACE_INLINE int -sema_wait (ACE_sema_t *s, ACE_Time_Value *tv) +ACE_OS::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 -rw_tryrdlock (ACE_rwlock_t *rw) +ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_tryrdlock"); #if defined (ACE_HAS_THREADS) @@ -3934,7 +3927,7 @@ rw_tryrdlock (ACE_rwlock_t *rw) } ACE_INLINE int -rw_trywrlock (ACE_rwlock_t *rw) +ACE_OS::rw_trywrlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_trywrlock"); #if defined (ACE_HAS_THREADS) @@ -3975,7 +3968,7 @@ rw_trywrlock (ACE_rwlock_t *rw) } ACE_INLINE int -rw_rdlock (ACE_rwlock_t *rw) +ACE_OS::rw_rdlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_rdlock"); #if defined (ACE_HAS_THREADS) @@ -4024,7 +4017,7 @@ rw_rdlock (ACE_rwlock_t *rw) } ACE_INLINE int -rw_wrlock (ACE_rwlock_t *rw) +ACE_OS::rw_wrlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_wrlock"); #if defined (ACE_HAS_THREADS) @@ -4075,7 +4068,7 @@ rw_wrlock (ACE_rwlock_t *rw) } ACE_INLINE int -rw_unlock (ACE_rwlock_t *rw) +ACE_OS::rw_unlock (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_unlock"); #if defined (ACE_HAS_THREADS) @@ -4136,7 +4129,7 @@ rw_unlock (ACE_rwlock_t *rw) // 0 means: upgraded successfully} ACE_INLINE int -rw_trywrlock_upgrade (ACE_rwlock_t *rw) +ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rw_trywrlock_upgrade"); #if defined (ACE_HAS_THREADS) @@ -4205,10 +4198,10 @@ 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 -rwlock_init (ACE_rwlock_t *rw, - int type, - const ACE_TCHAR *name, - void *arg) +ACE_OS::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) @@ -4235,7 +4228,7 @@ rwlock_init (ACE_rwlock_t *rw, #endif /* ACE_HAS THREADS && !defined (ACE_LACKS_RWLOCK_T) */ ACE_INLINE int -rwlock_destroy (ACE_rwlock_t *rw) +ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) { ACE_OS_TRACE ("ACE_OS::rwlock_destroy"); #if defined (ACE_HAS_THREADS) @@ -4260,13 +4253,13 @@ rwlock_destroy (ACE_rwlock_t *rw) } ACE_INLINE int -event_init (ACE_event_t *event, - int manual_reset, - int initial_state, - int type, - const char *name, - void *arg, - LPSECURITY_ATTRIBUTES sa) +ACE_OS::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); @@ -4317,13 +4310,13 @@ event_init (ACE_event_t *event, #if defined (ACE_HAS_WCHAR) ACE_INLINE int -event_init (ACE_event_t *event, - int manual_reset, - int initial_state, - int type, - const wchar_t *name, - void *arg, - LPSECURITY_ATTRIBUTES sa) +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) { #if defined (ACE_WIN32) ACE_UNUSED_ARG (type); @@ -4349,7 +4342,7 @@ event_init (ACE_event_t *event, #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -event_destroy (ACE_event_t *event) +ACE_OS::event_destroy (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*event), ace_result_), int, -1); @@ -4364,7 +4357,7 @@ event_destroy (ACE_event_t *event) } ACE_INLINE int -event_wait (ACE_event_t *event) +ACE_OS::event_wait (ACE_event_t *event) { #if defined (ACE_WIN32) switch (::WaitForSingleObject (*event, INFINITE)) @@ -4422,9 +4415,9 @@ event_wait (ACE_event_t *event) } ACE_INLINE int -event_timedwait (ACE_event_t *event, - ACE_Time_Value *timeout, - int use_absolute_time) +ACE_OS::event_timedwait (ACE_event_t *event, + ACE_Time_Value *timeout, + int use_absolute_time) { #if defined (ACE_WIN32) DWORD result; @@ -4533,7 +4526,7 @@ event_timedwait (ACE_event_t *event, } ACE_INLINE int -event_signal (ACE_event_t *event) +ACE_OS::event_signal (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEvent (*event), ace_result_), int, -1); @@ -4588,7 +4581,7 @@ event_signal (ACE_event_t *event) } ACE_INLINE int -event_pulse (ACE_event_t *event) +ACE_OS::event_pulse (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::PulseEvent (*event), ace_result_), int, -1); @@ -4636,7 +4629,7 @@ event_pulse (ACE_event_t *event) } ACE_INLINE int -event_reset (ACE_event_t *event) +ACE_OS::event_reset (ACE_event_t *event) { #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ResetEvent (*event), ace_result_), int, -1); @@ -4705,7 +4698,7 @@ event_reset (ACE_event_t *event) #endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ ACE_INLINE ACE_HANDLE -accept (ACE_HANDLE handle, +ACE_OS::accept (ACE_HANDLE handle, struct sockaddr *addr, int *addrlen) { @@ -4770,9 +4763,9 @@ ACE_SOCKCALL_RETURN (::accept ((ACE_SOCKET) handle, } ACE_INLINE int -enum_protocols (int *protocols, - ACE_Protocol_Info *protocol_buffer, - u_long *buffer_length) +ACE_OS::enum_protocols (int *protocols, + ACE_Protocol_Info *protocol_buffer, + u_long *buffer_length) { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -4792,7 +4785,7 @@ enum_protocols (int *protocols, ACE_INLINE int -bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen) +ACE_OS::bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen) { ACE_OS_TRACE ("ACE_OS::bind"); #if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) @@ -4808,9 +4801,9 @@ bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen) } ACE_INLINE int -connect (ACE_HANDLE handle, - struct sockaddr *addr, - int addrlen) +ACE_OS::connect (ACE_HANDLE handle, + struct sockaddr *addr, + int addrlen) { ACE_OS_TRACE ("ACE_OS::connect"); #if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) @@ -4827,7 +4820,7 @@ connect (ACE_HANDLE handle, #if !defined (VXWORKS) ACE_INLINE struct hostent * -gethostbyname (const char *name) +ACE_OS::gethostbyname (const char *name) { ACE_OS_TRACE ("ACE_OS::gethostbyname"); # if defined (ACE_PSOS) @@ -4846,7 +4839,7 @@ gethostbyname (const char *name) ACE_INLINE struct hostent * -gethostbyaddr (const char *addr, int length, int type) +ACE_OS::gethostbyaddr (const char *addr, int length, int type) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr"); # if defined (ACE_PSOS) @@ -4871,7 +4864,7 @@ gethostbyaddr (const char *addr, int length, int type) ACE_INLINE struct hostent * -getipnodebyname (const char *name, int family, int flags) +ACE_OS::getipnodebyname (const char *name, int family, int flags) { ACE_OS_TRACE ("ACE_OS::getipnodebyname"); # if defined (ACE_PSOS) @@ -4911,7 +4904,7 @@ getipnodebyname (const char *name, int family, int flags) ACE_INLINE struct hostent * -getipnodebyaddr (const void *src, size_t len, int family) +ACE_OS::getipnodebyaddr (const void *src, size_t len, int family) { #if defined (ACE_HAS_IPV6) # if defined (__GLIBC__) @@ -4943,9 +4936,9 @@ 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 -select (int width, - fd_set *rfds, fd_set *wfds, fd_set *efds, - const ACE_Time_Value *timeout) +ACE_OS::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) @@ -4972,9 +4965,9 @@ select (int width, } ACE_INLINE int -select (int width, - fd_set *rfds, fd_set *wfds, fd_set *efds, - const ACE_Time_Value &timeout) +ACE_OS::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) @@ -4994,7 +4987,7 @@ select (int width, } ACE_INLINE int -recv (ACE_HANDLE handle, char *buf, size_t len, int flags) +ACE_OS::recv (ACE_HANDLE handle, char *buf, size_t len, int flags) { ACE_OS_TRACE ("ACE_OS::recv"); @@ -5020,12 +5013,12 @@ recv (ACE_HANDLE handle, char *buf, size_t len, int flags) } ACE_INLINE int -recvfrom (ACE_HANDLE handle, - char *buf, - size_t len, - int flags, - struct sockaddr *addr, - int *addrlen) +ACE_OS::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) @@ -5065,7 +5058,7 @@ recvfrom (ACE_HANDLE handle, } ACE_INLINE int -send (ACE_HANDLE handle, const char *buf, size_t len, int flags) +ACE_OS::send (ACE_HANDLE handle, const char *buf, size_t len, int flags) { ACE_OS_TRACE ("ACE_OS::send"); @@ -5097,15 +5090,15 @@ send (ACE_HANDLE handle, const char *buf, size_t len, int flags) } ACE_INLINE 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) +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) { ACE_OS_TRACE ("ACE_OS::recvfrom"); @@ -5142,12 +5135,12 @@ recvfrom (ACE_HANDLE handle, } ACE_INLINE int -sendto (ACE_HANDLE handle, - const char *buf, - size_t len, - int flags, - const struct sockaddr *addr, - int addrlen) +ACE_OS::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) @@ -5179,15 +5172,15 @@ sendto (ACE_HANDLE handle, } ACE_INLINE 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) +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) { ACE_OS_TRACE ("ACE_OS::sendto"); #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -5233,8 +5226,8 @@ sendto (ACE_HANDLE handle, } ACE_INLINE int -getpeername (ACE_HANDLE handle, struct sockaddr *addr, - int *addrlen) +ACE_OS::getpeername (ACE_HANDLE handle, struct sockaddr *addr, + int *addrlen) { ACE_OS_TRACE ("ACE_OS::getpeername"); #if defined (ACE_PSOS) && !defined ACE_PSOS_DIAB_PPC @@ -5251,7 +5244,7 @@ getpeername (ACE_HANDLE handle, struct sockaddr *addr, } ACE_INLINE struct protoent * -getprotobyname (const char *name) +ACE_OS::getprotobyname (const char *name) { #if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS) ACE_UNUSED_ARG (name); @@ -5268,9 +5261,9 @@ getprotobyname (const char *name) } ACE_INLINE struct protoent * -getprotobyname_r (const char *name, - struct protoent *result, - ACE_PROTOENT_DATA buffer) +ACE_OS::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); @@ -5323,7 +5316,7 @@ getprotobyname_r (const char *name, } ACE_INLINE struct protoent * -getprotobynumber (int proto) +ACE_OS::getprotobynumber (int proto) { #if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS) ACE_UNUSED_ARG (proto); @@ -5335,9 +5328,9 @@ getprotobynumber (int proto) } ACE_INLINE struct protoent * -getprotobynumber_r (int proto, - struct protoent *result, - ACE_PROTOENT_DATA buffer) +ACE_OS::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); @@ -5381,7 +5374,7 @@ getprotobynumber_r (int proto, } ACE_INLINE struct servent * -getservbyname (const char *svc, const char *proto) +ACE_OS::getservbyname (const char *svc, const char *proto) { ACE_OS_TRACE ("ACE_OS::getservbyname"); #if defined (ACE_LACKS_GETSERVBYNAME) @@ -5402,9 +5395,9 @@ getservbyname (const char *svc, const char *proto) } ACE_INLINE int -getsockname (ACE_HANDLE handle, - struct sockaddr *addr, - int *addrlen) +ACE_OS::getsockname (ACE_HANDLE handle, + struct sockaddr *addr, + int *addrlen) { ACE_OS_TRACE ("ACE_OS::getsockname"); #if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) @@ -5421,11 +5414,11 @@ getsockname (ACE_HANDLE handle, } ACE_INLINE int -getsockopt (ACE_HANDLE handle, - int level, - int optname, - char *optval, - int *optlen) +ACE_OS::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, @@ -5438,18 +5431,18 @@ getsockopt (ACE_HANDLE handle, } ACE_INLINE int -listen (ACE_HANDLE handle, int backlog) +ACE_OS::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 -setsockopt (ACE_HANDLE handle, - int level, - int optname, - const char *optval, - int optlen) +ACE_OS::setsockopt (ACE_HANDLE handle, + int level, + int optname, + const char *optval, + int optlen) { ACE_OS_TRACE ("ACE_OS::setsockopt"); @@ -5482,16 +5475,16 @@ setsockopt (ACE_HANDLE handle, } ACE_INLINE int -shutdown (ACE_HANDLE handle, int how) +ACE_OS::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 -socket (int domain, - int type, - int proto) +ACE_OS::socket (int domain, + int type, + int proto) { ACE_OS_TRACE ("ACE_OS::socket"); ACE_SOCKCALL_RETURN (::socket (domain, @@ -5502,12 +5495,12 @@ socket (int domain, } ACE_INLINE ACE_HANDLE -socket (int domain, - int type, - int proto, - ACE_Protocol_Info *protocolinfo, - ACE_SOCK_GROUP g, - u_long flags) +ACE_OS::socket (int domain, + int type, + int proto, + ACE_Protocol_Info *protocolinfo, + ACE_SOCK_GROUP g, + u_long flags) { ACE_OS_TRACE ("ACE_OS::socket"); @@ -5532,14 +5525,14 @@ socket (int domain, } ACE_INLINE int -atoi (const char *s) +ACE_OS::atoi (const char *s) { ACE_OSCALL_RETURN (::atoi (s), int, -1); } #if defined (ACE_HAS_WCHAR) ACE_INLINE int -atoi (const wchar_t *s) +ACE_OS::atoi (const wchar_t *s) { #if defined (ACE_WIN32) ACE_OSCALL_RETURN (::_wtoi (s), int, -1); @@ -5551,7 +5544,7 @@ atoi (const wchar_t *s) ACE_INLINE void * -atop (const char *s) +ACE_OS::atop (const char *s) { ACE_TRACE ("ACE_OS::atop"); // It would be nice to make use of Basic_Types.h here, but that @@ -5569,7 +5562,7 @@ atop (const char *s) #if defined (ACE_HAS_WCHAR) ACE_INLINE void * -atop (const wchar_t *s) +ACE_OS::atop (const wchar_t *s) { # if defined (ACE_WIN64) __int64 ip = ::_wtoi64 (s); @@ -5582,14 +5575,14 @@ atop (const wchar_t *s) #endif /* ACE_HAS_WCHAR */ ACE_INLINE double -floor (double x) +ACE_OS::floor (double x) { // This method computes the largest integral value not greater than x. return double (ACE_static_cast (long, x)); } ACE_INLINE double -ceil (double x) +ACE_OS::ceil (double x) { // This method computes the smallest integral value not less than x. double floor = ACE_OS::floor (x); @@ -5600,7 +5593,7 @@ ceil (double x) } ACE_INLINE int -recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags) +ACE_OS::recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags) { ACE_OS_TRACE ("ACE_OS::recvmsg"); #if !defined (ACE_LACKS_RECVMSG) @@ -5637,9 +5630,9 @@ recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags) } ACE_INLINE int -sendmsg (ACE_HANDLE handle, - const struct msghdr *msg, - int flags) +ACE_OS::sendmsg (ACE_HANDLE handle, + const struct msghdr *msg, + int flags) { ACE_OS_TRACE ("ACE_OS::sendmsg"); #if !defined (ACE_LACKS_SENDMSG) @@ -5677,14 +5670,14 @@ sendmsg (ACE_HANDLE handle, } ACE_INLINE int -fclose (FILE *fp) +ACE_OS::fclose (FILE *fp) { ACE_OS_TRACE ("ACE_OS::fclose"); ACE_OSCALL_RETURN (::fclose (fp), int, -1); } ACE_INLINE ACE_TCHAR * -fgets (ACE_TCHAR *buf, int size, FILE *fp) +ACE_OS::fgets (ACE_TCHAR *buf, int size, FILE *fp) { ACE_OS_TRACE ("ACE_OS::fgets"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -5698,7 +5691,7 @@ 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 * -fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode) +ACE_OS::fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fopen"); ACE_OSCALL_RETURN (::fopen (filename, mode), FILE *, 0); @@ -5706,7 +5699,7 @@ fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode) #endif /* ACE_WIN32 */ ACE_INLINE FILE * -freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) +ACE_OS::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) @@ -5717,7 +5710,7 @@ freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) } ACE_INLINE int -fflush (FILE *fp) +ACE_OS::fflush (FILE *fp) { ACE_OS_TRACE ("ACE_OS::fflush"); #if defined (VXWORKS) @@ -5732,7 +5725,7 @@ fflush (FILE *fp) } ACE_INLINE size_t -fread (void *ptr, size_t size, size_t nelems, FILE *fp) +ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp) { ACE_OS_TRACE ("ACE_OS::fread"); #if defined (ACE_LACKS_POSIX_PROTOTYPES) @@ -5743,7 +5736,7 @@ fread (void *ptr, size_t size, size_t nelems, FILE *fp) } ACE_INLINE size_t -fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp) +ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp) { ACE_OS_TRACE ("ACE_OS::fwrite"); #if defined (ACE_LACKS_POSIX_PROTOTYPES) @@ -5754,8 +5747,8 @@ fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp) } ACE_INLINE int -truncate (const ACE_TCHAR *filename, - off_t offset) +ACE_OS::truncate (const ACE_TCHAR *filename, + off_t offset) { ACE_OS_TRACE ("ACE_OS::truncate"); #if defined (ACE_WIN32) @@ -5791,7 +5784,7 @@ truncate (const ACE_TCHAR *filename, // Accessors to PWD file. ACE_INLINE struct passwd * -getpwnam (const char *name) +ACE_OS::getpwnam (const char *name) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5807,7 +5800,7 @@ getpwnam (const char *name) } ACE_INLINE void -setpwent (void) +ACE_OS::setpwent (void) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5819,7 +5812,7 @@ setpwent (void) } ACE_INLINE void -endpwent (void) +ACE_OS::endpwent (void) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5831,7 +5824,7 @@ endpwent (void) } ACE_INLINE struct passwd * -getpwent (void) +ACE_OS::getpwent (void) { #if !defined (ACE_LACKS_PWD_FUNCTIONS) # if !defined (ACE_WIN32) @@ -5845,8 +5838,8 @@ getpwent (void) } ACE_INLINE struct passwd * -getpwnam_r (const char *name, struct passwd *pwent, - char *buffer, int buflen) +ACE_OS::getpwnam_r (const char *name, struct passwd *pwent, + char *buffer, int buflen) { #if defined (ACE_HAS_POSIX_GETPWNAM_R) struct passwd *result; @@ -5921,12 +5914,12 @@ getpwnam_r (const char *name, struct passwd *pwent, #if !defined (VXWORKS) ACE_INLINE struct hostent * -gethostbyaddr_r (const char *addr, - int length, - int type, - struct hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop) +ACE_OS::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) @@ -6001,10 +5994,10 @@ gethostbyaddr_r (const char *addr, } ACE_INLINE struct hostent * -gethostbyname_r (const char *name, - struct hostent *result, - ACE_HOSTENT_DATA buffer, - int *h_errnop) +ACE_OS::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) @@ -6086,7 +6079,7 @@ gethostbyname_r (const char *name, // really needs gets, use ACE_OS::gets (char*, int) // instead. ACE_INLINE char * -gets (char *str) +ACE_OS::gets (char *str) { ACE_OS_TRACE ("ACE_OS::gets"); ACE_OSCALL_RETURN (::gets (str), char *, 0); @@ -6094,10 +6087,10 @@ gets (char *str) #endif /* 0 */ ACE_INLINE struct servent * -getservbyname_r (const char *svc, - const char *proto, - struct servent *result, - ACE_SERVENT_DATA buf) +ACE_OS::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) @@ -6158,7 +6151,7 @@ getservbyname_r (const char *svc, } ACE_INLINE unsigned long -inet_addr (const char *name) +ACE_OS::inet_addr (const char *name) { ACE_OS_TRACE ("ACE_OS::inet_addr"); #if defined (VXWORKS) || defined (ACE_PSOS) @@ -6204,7 +6197,7 @@ inet_addr (const char *name) // For pSOS, this function is in OS.cpp #if !defined (ACE_PSOS) ACE_INLINE char * -inet_ntoa (const struct in_addr addr) +ACE_OS::inet_ntoa (const struct in_addr addr) { ACE_OS_TRACE ("ACE_OS::inet_ntoa"); ACE_OSCALL_RETURN (::inet_ntoa (addr), @@ -6214,7 +6207,7 @@ inet_ntoa (const struct in_addr addr) #endif /* defined (ACE_PSOS) */ ACE_INLINE int -inet_pton (int family, const char *strptr, void *addrptr) +ACE_OS::inet_pton (int family, const char *strptr, void *addrptr) { ACE_OS_TRACE ("ACE_OS::inet_pton"); @@ -6239,7 +6232,7 @@ inet_pton (int family, const char *strptr, void *addrptr) } ACE_INLINE const char * -inet_ntop (int family, const void *addrptr, char *strptr, size_t len) +ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len) { ACE_OS_TRACE ("ACE_OS::inet_ntop"); @@ -6275,7 +6268,7 @@ inet_ntop (int family, const void *addrptr, char *strptr, size_t len) } ACE_INLINE int -set_errno_to_last_error (void) +ACE_OS::set_errno_to_last_error (void) { # if defined (ACE_WIN32) // Borland C++ Builder 4 has a bug in the RTL that resets the @@ -6294,7 +6287,7 @@ set_errno_to_last_error (void) } ACE_INLINE int -set_errno_to_wsa_last_error (void) +ACE_OS::set_errno_to_wsa_last_error (void) { # if defined (ACE_WIN32) // Borland C++ Builder 4 has a bug in the RTL that resets the @@ -6313,7 +6306,7 @@ set_errno_to_wsa_last_error (void) } ACE_INLINE int -last_error (void) +ACE_OS::last_error (void) { // ACE_OS_TRACE ("ACE_OS::last_error"); @@ -6327,7 +6320,7 @@ last_error (void) } ACE_INLINE void -last_error (int error) +ACE_OS::last_error (int error) { ACE_OS_TRACE ("ACE_OS::last_error"); #if defined (ACE_WIN32) @@ -6337,7 +6330,7 @@ last_error (int error) } ACE_INLINE void -perror (const ACE_TCHAR *s) +ACE_OS::perror (const ACE_TCHAR *s) { ACE_OS_TRACE ("ACE_OS::perror"); #if defined (ACE_HAS_WINCE) @@ -6351,7 +6344,7 @@ perror (const ACE_TCHAR *s) } ACE_INLINE int -puts (const ACE_TCHAR *s) +ACE_OS::puts (const ACE_TCHAR *s) { ACE_OS_TRACE ("ACE_OS::puts"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -6362,7 +6355,7 @@ puts (const ACE_TCHAR *s) } ACE_INLINE int -fputs (const ACE_TCHAR *s, FILE *stream) +ACE_OS::fputs (const ACE_TCHAR *s, FILE *stream) { ACE_OS_TRACE ("ACE_OS::fputs"); #if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -6373,7 +6366,7 @@ fputs (const ACE_TCHAR *s, FILE *stream) } ACE_INLINE ACE_SignalHandler -signal (int signum, ACE_SignalHandler func) +ACE_OS::signal (int signum, ACE_SignalHandler func) { if (signum == 0) return 0; @@ -6402,7 +6395,7 @@ signal (int signum, ACE_SignalHandler func) } ACE_INLINE int -system (const ACE_TCHAR *s) +ACE_OS::system (const ACE_TCHAR *s) { // ACE_OS_TRACE ("ACE_OS::system"); #if defined (CHORUS) || defined (ACE_HAS_WINCE) || defined(ACE_PSOS) @@ -6416,7 +6409,7 @@ system (const ACE_TCHAR *s) } ACE_INLINE int -thr_continue (ACE_hthread_t target_thread) +ACE_OS::thr_continue (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_continue"); #if defined (ACE_HAS_THREADS) @@ -6449,7 +6442,7 @@ thr_continue (ACE_hthread_t target_thread) } ACE_INLINE int -thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) +ACE_OS::thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) { #if defined (ACE_HAS_PTHREADS) # if defined (pthread_equal) @@ -6466,7 +6459,7 @@ thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) } ACE_INLINE int -thr_getconcurrency (void) +ACE_OS::thr_getconcurrency (void) { ACE_OS_TRACE ("ACE_OS::thr_getconcurrency"); #if defined (ACE_HAS_THREADS) @@ -6483,7 +6476,7 @@ thr_getconcurrency (void) } ACE_INLINE int -thr_getprio (ACE_hthread_t id, int &priority, int &policy) +ACE_OS::thr_getprio (ACE_hthread_t id, int &priority, int &policy) { ACE_OS_TRACE ("ACE_OS::thr_getprio"); ACE_UNUSED_ARG (policy); @@ -6546,20 +6539,18 @@ thr_getprio (ACE_hthread_t id, int &priority, int &policy) } ACE_INLINE int -thr_getprio (ACE_hthread_t id, int &priority) +ACE_OS::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 -thr_getspecific (ACE_OS_thread_key_t key, void **data) +ACE_OS::thr_getspecific (ACE_OS_thread_key_t key, void **data) { ACE_OS_TRACE ("ACE_OS::thr_getspecific"); # if defined (ACE_HAS_THREADS) @@ -6611,7 +6602,6 @@ 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) @@ -6686,9 +6676,9 @@ ACE_TSS_Emulation::ts_object (const ACE_thread_key_t key) #endif /* ACE_HAS_TSS_EMULATION */ -namespace ACE_OS { + ACE_INLINE int -thr_getspecific (ACE_thread_key_t key, void **data) +ACE_OS::thr_getspecific (ACE_thread_key_t key, void **data) { // ACE_OS_TRACE ("ACE_OS::thr_getspecific"); #if defined (ACE_HAS_THREADS) @@ -6757,8 +6747,8 @@ thr_getspecific (ACE_thread_key_t key, void **data) #if !defined (VXWORKS) ACE_INLINE int -thr_join (ACE_hthread_t thr_handle, - ACE_THR_FUNC_RETURN *status) +ACE_OS::thr_join (ACE_hthread_t thr_handle, + ACE_THR_FUNC_RETURN *status) { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) @@ -6829,9 +6819,9 @@ thr_join (ACE_hthread_t thr_handle, } ACE_INLINE int -thr_join (ACE_thread_t waiter_id, - ACE_thread_t *thr_id, - ACE_THR_FUNC_RETURN *status) +ACE_OS::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) @@ -6876,7 +6866,7 @@ thr_join (ACE_thread_t waiter_id, #endif /* !VXWORKS */ ACE_INLINE int -thr_setcancelstate (int new_state, int *old_state) +ACE_OS::thr_setcancelstate (int new_state, int *old_state) { ACE_OS_TRACE ("ACE_OS::thr_setcancelstate"); #if defined (ACE_HAS_THREADS) @@ -6918,7 +6908,7 @@ thr_setcancelstate (int new_state, int *old_state) } ACE_INLINE int -thr_setcanceltype (int new_type, int *old_type) +ACE_OS::thr_setcanceltype (int new_type, int *old_type) { ACE_OS_TRACE ("ACE_OS::thr_setcanceltype"); #if defined (ACE_HAS_THREADS) @@ -6952,7 +6942,7 @@ thr_setcanceltype (int new_type, int *old_type) } ACE_INLINE int -thr_cancel (ACE_thread_t thr_id) +ACE_OS::thr_cancel (ACE_thread_t thr_id) { ACE_OS_TRACE ("ACE_OS::thr_cancel"); #if defined (ACE_HAS_THREADS) @@ -6975,7 +6965,7 @@ thr_cancel (ACE_thread_t thr_id) } ACE_INLINE int -sigwait (sigset_t *sset, int *sig) +ACE_OS::sigwait (sigset_t *sset, int *sig) { ACE_OS_TRACE ("ACE_OS::sigwait"); int local_sig; @@ -7039,9 +7029,9 @@ sigwait (sigset_t *sset, int *sig) } ACE_INLINE int -sigtimedwait (const sigset_t *sset, - siginfo_t *info, - const ACE_Time_Value *timeout) +ACE_OS::sigtimedwait (const sigset_t *sset, + siginfo_t *info, + const ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::sigtimedwait"); #if defined (ACE_HAS_SIGTIMEDWAIT) @@ -7067,8 +7057,8 @@ sigtimedwait (const sigset_t *sset, } ACE_INLINE int -sigwaitinfo (const sigset_t *sset, - siginfo_t *info) +ACE_OS::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. @@ -7084,7 +7074,7 @@ sigwaitinfo (const sigset_t *sset, } ACE_INLINE void -thr_testcancel (void) +ACE_OS::thr_testcancel (void) { ACE_OS_TRACE ("ACE_OS::thr_testcancel"); #if defined (ACE_HAS_THREADS) @@ -7105,9 +7095,9 @@ thr_testcancel (void) } ACE_INLINE int -thr_sigsetmask (int how, - const sigset_t *nsm, - sigset_t *osm) +ACE_OS::thr_sigsetmask (int how, + const sigset_t *nsm, + sigset_t *osm) { ACE_OS_TRACE ("ACE_OS::thr_sigsetmask"); #if defined (ACE_HAS_THREADS) @@ -7188,7 +7178,7 @@ thr_sigsetmask (int how, } ACE_INLINE int -thr_kill (ACE_thread_t thr_id, int signum) +ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) { ACE_OS_TRACE ("ACE_OS::thr_kill"); #if defined (ACE_HAS_THREADS) @@ -7233,7 +7223,7 @@ thr_kill (ACE_thread_t thr_id, int signum) } ACE_INLINE size_t -thr_min_stack (void) +ACE_OS::thr_min_stack (void) { ACE_OS_TRACE ("ACE_OS::thr_min_stack"); #if defined (ACE_HAS_THREADS) @@ -7282,7 +7272,7 @@ thr_min_stack (void) } ACE_INLINE int -thr_setconcurrency (int hint) +ACE_OS::thr_setconcurrency (int hint) { ACE_OS_TRACE ("ACE_OS::thr_setconcurrency"); #if defined (ACE_HAS_THREADS) @@ -7308,7 +7298,7 @@ thr_setconcurrency (int hint) } ACE_INLINE int -thr_setprio (ACE_hthread_t id, int priority, int policy) +ACE_OS::thr_setprio (ACE_hthread_t id, int priority, int policy) { ACE_OS_TRACE ("ACE_OS::thr_setprio"); ACE_UNUSED_ARG (policy); @@ -7378,7 +7368,7 @@ thr_setprio (ACE_hthread_t id, int priority, int policy) } ACE_INLINE int -thr_suspend (ACE_hthread_t target_thread) +ACE_OS::thr_suspend (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_suspend"); #if defined (ACE_HAS_THREADS) @@ -7411,7 +7401,7 @@ thr_suspend (ACE_hthread_t target_thread) } ACE_INLINE void -thr_yield (void) +ACE_OS::thr_yield (void) { ACE_OS_TRACE ("ACE_OS::thr_yield"); #if defined (ACE_HAS_THREADS) @@ -7441,7 +7431,7 @@ thr_yield (void) } ACE_INLINE int -priority_control (ACE_idtype_t idtype, ACE_id_t id, int cmd, void *arg) +ACE_OS::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) @@ -7457,7 +7447,7 @@ priority_control (ACE_idtype_t idtype, ACE_id_t id, int cmd, void *arg) } ACE_INLINE void -rewind (FILE *fp) +ACE_OS::rewind (FILE *fp) { #if !defined (ACE_HAS_WINCE) ACE_OS_TRACE ("ACE_OS::rewind"); @@ -7469,9 +7459,9 @@ rewind (FILE *fp) } ACE_INLINE ssize_t -readv (ACE_HANDLE handle, - iovec *iov, - int iovlen) +ACE_OS::readv (ACE_HANDLE handle, + iovec *iov, + int iovlen) { ACE_OS_TRACE ("ACE_OS::readv"); #if defined (ACE_LACKS_READV) @@ -7484,9 +7474,9 @@ readv (ACE_HANDLE handle, } ACE_INLINE ssize_t -writev (ACE_HANDLE handle, - const iovec *iov, - int iovcnt) +ACE_OS::writev (ACE_HANDLE handle, + const iovec *iov, + int iovcnt) { ACE_OS_TRACE ("ACE_OS::writev"); #if defined (ACE_LACKS_WRITEV) @@ -7501,9 +7491,9 @@ writev (ACE_HANDLE handle, } ACE_INLINE ssize_t -recvv (ACE_HANDLE handle, - iovec *buffers, - int n) +ACE_OS::recvv (ACE_HANDLE handle, + iovec *buffers, + int n) { #if defined (ACE_HAS_WINSOCK2) @@ -7558,9 +7548,9 @@ recvv (ACE_HANDLE handle, } ACE_INLINE ssize_t -sendv (ACE_HANDLE handle, - const iovec *buffers, - int n) +ACE_OS::sendv (ACE_HANDLE handle, + const iovec *buffers, + int n) { #if defined (ACE_HAS_WINSOCK2) DWORD bytes_sent = 0; @@ -7607,7 +7597,7 @@ sendv (ACE_HANDLE handle, } ACE_INLINE int -poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value *timeout) +ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value *timeout) { ACE_OS_TRACE ("ACE_OS::poll"); #if defined (ACE_HAS_POLL) @@ -7623,7 +7613,7 @@ poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value *timeout) } ACE_INLINE int -poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout) +ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout) { ACE_OS_TRACE ("ACE_OS::poll"); #if defined (ACE_HAS_POLL) @@ -7638,7 +7628,7 @@ poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout) } ACE_INLINE char * -compile (const char *instring, char *expbuf, char *endbuf) +ACE_OS::compile (const char *instring, char *expbuf, char *endbuf) { ACE_OS_TRACE ("ACE_OS::compile"); #if defined (ACE_HAS_REGEX) @@ -7653,7 +7643,7 @@ compile (const char *instring, char *expbuf, char *endbuf) } ACE_INLINE long -filesize (const ACE_TCHAR *filename) +ACE_OS::filesize (const ACE_TCHAR *filename) { ACE_OS_TRACE ("ACE_OS::filesize"); @@ -7669,7 +7659,7 @@ filesize (const ACE_TCHAR *filename) } ACE_INLINE int -closesocket (ACE_HANDLE handle) +ACE_OS::closesocket (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::closesocket"); #if defined (ACE_WIN32) @@ -7682,7 +7672,7 @@ closesocket (ACE_HANDLE handle) } ACE_INLINE int -access (const char *path, int amode) +ACE_OS::access (const char *path, int amode) { ACE_OS_TRACE ("ACE_OS::access"); #if defined (ACE_LACKS_ACCESS) @@ -7716,7 +7706,7 @@ access (const char *path, int amode) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -access (const wchar_t *path, int amode) +ACE_OS::access (const wchar_t *path, int amode) { #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) ACE_OSCALL_RETURN (::_waccess (path, amode), int, -1); @@ -7727,7 +7717,7 @@ access (const wchar_t *path, int amode) #endif /* ACE_HAS_WCHAR */ ACE_INLINE ACE_HANDLE -creat (const ACE_TCHAR *filename, mode_t mode) +ACE_OS::creat (const ACE_TCHAR *filename, mode_t mode) { ACE_OS_TRACE ("ACE_OS::creat"); #if defined (ACE_WIN32) @@ -7755,7 +7745,7 @@ 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 -uname (ACE_utsname *name) +ACE_OS::uname (ACE_utsname *name) { #if defined (INTEGRITY) if(!name) { @@ -7776,7 +7766,7 @@ uname (ACE_utsname *name) #endif /* ! ACE_WIN32 && ! VXWORKS && ! CHORUS */ ACE_INLINE int -hostname (char name[], size_t maxnamelen) +ACE_OS::hostname (char name[], size_t maxnamelen) { ACE_OS_TRACE ("ACE_OS::hostname"); #if defined (ACE_HAS_PHARLAP) @@ -7826,7 +7816,7 @@ hostname (char name[], size_t maxnamelen) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -hostname (wchar_t name[], size_t maxnamelen) +ACE_OS::hostname (wchar_t name[], size_t maxnamelen) { #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (GetComputerNameW (name, @@ -7849,7 +7839,7 @@ hostname (wchar_t name[], size_t maxnamelen) #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -msgctl (int msqid, int cmd, struct msqid_ds *val) +ACE_OS::msgctl (int msqid, int cmd, struct msqid_ds *val) { ACE_OS_TRACE ("ACE_OS::msgctl"); #if defined (ACE_HAS_SYSV_IPC) @@ -7864,7 +7854,7 @@ msgctl (int msqid, int cmd, struct msqid_ds *val) } ACE_INLINE int -msgget (key_t key, int msgflg) +ACE_OS::msgget (key_t key, int msgflg) { ACE_OS_TRACE ("ACE_OS::msgget"); #if defined (ACE_HAS_SYSV_IPC) @@ -7878,8 +7868,8 @@ msgget (key_t key, int msgflg) } ACE_INLINE int -msgrcv (int int_id, void *buf, size_t len, - long type, int flags) +ACE_OS::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) @@ -7902,7 +7892,7 @@ msgrcv (int int_id, void *buf, size_t len, } ACE_INLINE int -msgsnd (int int_id, const void *buf, size_t len, int flags) +ACE_OS::msgsnd (int int_id, const void *buf, size_t len, int flags) { ACE_OS_TRACE ("ACE_OS::msgsnd"); #if defined (ACE_HAS_SYSV_IPC) @@ -7924,7 +7914,7 @@ msgsnd (int int_id, const void *buf, size_t len, int flags) } ACE_INLINE u_int -alarm (u_int secs) +ACE_OS::alarm (u_int secs) { ACE_OS_TRACE ("ACE_OS::alarm"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS) @@ -7937,7 +7927,7 @@ alarm (u_int secs) } ACE_INLINE u_int -ualarm (u_int usecs, u_int interval) +ACE_OS::ualarm (u_int usecs, u_int interval) { ACE_OS_TRACE ("ACE_OS::ualarm"); @@ -7954,8 +7944,8 @@ ualarm (u_int usecs, u_int interval) } ACE_INLINE u_int -ualarm (const ACE_Time_Value &tv, - const ACE_Time_Value &tv_interval) +ACE_OS::ualarm (const ACE_Time_Value &tv, + const ACE_Time_Value &tv_interval) { ACE_OS_TRACE ("ACE_OS::ualarm"); @@ -7974,7 +7964,7 @@ ualarm (const ACE_Time_Value &tv, } ACE_INLINE int -dlclose (ACE_SHLIB_HANDLE handle) +ACE_OS::dlclose (ACE_SHLIB_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::dlclose"); #if defined (ACE_LACKS_DLCLOSE) @@ -8025,7 +8015,7 @@ dlclose (ACE_SHLIB_HANDLE handle) } ACE_INLINE ACE_TCHAR * -dlerror (void) +ACE_OS::dlerror (void) { ACE_OS_TRACE ("ACE_OS::dlerror"); # if defined (ACE_HAS_SVR4_DYNAMIC_LINKING) @@ -8056,8 +8046,8 @@ dlerror (void) } ACE_INLINE ACE_SHLIB_HANDLE -dlopen (const ACE_TCHAR *fname, - int mode) +ACE_OS::dlopen (const ACE_TCHAR *fname, + int mode) { ACE_OS_TRACE ("ACE_OS::dlopen"); @@ -8137,8 +8127,8 @@ dlopen (const ACE_TCHAR *fname, } ACE_INLINE void * -dlsym (ACE_SHLIB_HANDLE handle, - const ACE_TCHAR *sname) +ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, + const ACE_TCHAR *sname) { ACE_OS_TRACE ("ACE_OS::dlsym"); @@ -8215,7 +8205,7 @@ dlsym (ACE_SHLIB_HANDLE handle, } ACE_INLINE int -step (const char *str, char *expbuf) +ACE_OS::step (const char *str, char *expbuf) { ACE_OS_TRACE ("ACE_OS::step"); #if defined (ACE_HAS_REGEX) @@ -8229,7 +8219,7 @@ step (const char *str, char *expbuf) } ACE_INLINE long -sysinfo (int cmd, char *buf, long count) +ACE_OS::sysinfo (int cmd, char *buf, long count) { ACE_OS_TRACE ("ACE_OS::sysinfo"); #if defined (ACE_HAS_SYSINFO) @@ -8244,7 +8234,7 @@ sysinfo (int cmd, char *buf, long count) } ACE_INLINE ssize_t -write (ACE_HANDLE handle, const void *buf, size_t nbyte) +ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte) { ACE_OS_TRACE ("ACE_OS::write"); #if defined (ACE_WIN32) @@ -8283,8 +8273,8 @@ write (ACE_HANDLE handle, const void *buf, size_t nbyte) } ACE_INLINE ssize_t -write (ACE_HANDLE handle, const void *buf, size_t nbyte, - ACE_OVERLAPPED *overlapped) +ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte, + ACE_OVERLAPPED *overlapped) { ACE_OS_TRACE ("ACE_OS::write"); overlapped = overlapped; @@ -8302,7 +8292,7 @@ write (ACE_HANDLE handle, const void *buf, size_t nbyte, } ACE_INLINE ssize_t -read (ACE_HANDLE handle, void *buf, size_t len) +ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len) { ACE_OS_TRACE ("ACE_OS::read"); #if defined (ACE_WIN32) @@ -8341,8 +8331,8 @@ read (ACE_HANDLE handle, void *buf, size_t len) } ACE_INLINE ssize_t -read (ACE_HANDLE handle, void *buf, size_t len, - ACE_OVERLAPPED *overlapped) +ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len, + ACE_OVERLAPPED *overlapped) { ACE_OS_TRACE ("ACE_OS::read"); overlapped = overlapped; @@ -8359,7 +8349,7 @@ read (ACE_HANDLE handle, void *buf, size_t len, } ACE_INLINE int -readlink (const char *path, char *buf, size_t bufsiz) +ACE_OS::readlink (const char *path, char *buf, size_t bufsiz) { ACE_OS_TRACE ("ACE_OS::readlink"); # if defined (ACE_LACKS_READLINK) || \ @@ -8378,10 +8368,10 @@ readlink (const char *path, char *buf, size_t bufsiz) } ACE_INLINE int -getmsg (ACE_HANDLE handle, - struct strbuf *ctl, - struct strbuf *data, - int *flags) +ACE_OS::getmsg (ACE_HANDLE handle, + struct strbuf *ctl, + struct strbuf *data, + int *flags) { ACE_OS_TRACE ("ACE_OS::getmsg"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8398,11 +8388,11 @@ getmsg (ACE_HANDLE handle, } ACE_INLINE int -getpmsg (ACE_HANDLE handle, - struct strbuf *ctl, - struct strbuf *data, - int *band, - int *flags) +ACE_OS::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) @@ -8455,7 +8445,7 @@ ACE_OS::getrusage (int who, struct rusage *ru) } ACE_INLINE int -isastream (ACE_HANDLE handle) +ACE_OS::isastream (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::isastream"); #if defined (ACE_HAS_STREAM_PIPES) @@ -8473,7 +8463,7 @@ isastream (ACE_HANDLE handle) // to do with a mmap region. ACE_INLINE int -mprotect (void *addr, size_t len, int prot) +ACE_OS::mprotect (void *addr, size_t len, int prot) { ACE_OS_TRACE ("ACE_OS::mprotect"); #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) @@ -8490,7 +8480,7 @@ mprotect (void *addr, size_t len, int prot) } ACE_INLINE int -msync (void *addr, size_t len, int sync) +ACE_OS::msync (void *addr, size_t len, int sync) { ACE_OS_TRACE ("ACE_OS::msync"); #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) @@ -8513,7 +8503,7 @@ msync (void *addr, size_t len, int sync) } ACE_INLINE int -munmap (void *addr, size_t len) +ACE_OS::munmap (void *addr, size_t len) { ACE_OS_TRACE ("ACE_OS::munmap"); #if defined (ACE_WIN32) @@ -8530,7 +8520,7 @@ munmap (void *addr, size_t len) } ACE_INLINE int -madvise (caddr_t addr, size_t len, int map_advice) +ACE_OS::madvise (caddr_t addr, size_t len, int map_advice) { ACE_OS_TRACE ("ACE_OS::madvise"); #if defined (ACE_WIN32) @@ -8550,8 +8540,8 @@ madvise (caddr_t addr, size_t len, int map_advice) } ACE_INLINE int -putmsg (ACE_HANDLE handle, const struct strbuf *ctl, - const struct strbuf *data, int flags) +ACE_OS::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) @@ -8586,11 +8576,11 @@ putmsg (ACE_HANDLE handle, const struct strbuf *ctl, } ACE_INLINE int -putpmsg (ACE_HANDLE handle, - const struct strbuf *ctl, - const struct strbuf *data, - int band, - int flags) +ACE_OS::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) @@ -8606,7 +8596,7 @@ putpmsg (ACE_HANDLE handle, } ACE_INLINE int -semctl (int int_id, int semnum, int cmd, semun value) +ACE_OS::semctl (int int_id, int semnum, int cmd, semun value) { ACE_OS_TRACE ("ACE_OS::semctl"); #if defined (ACE_HAS_SYSV_IPC) @@ -8622,7 +8612,7 @@ semctl (int int_id, int semnum, int cmd, semun value) } ACE_INLINE int -semget (key_t key, int nsems, int flags) +ACE_OS::semget (key_t key, int nsems, int flags) { ACE_OS_TRACE ("ACE_OS::semget"); #if defined (ACE_HAS_SYSV_IPC) @@ -8637,7 +8627,7 @@ semget (key_t key, int nsems, int flags) } ACE_INLINE int -semop (int int_id, struct sembuf *sops, size_t nsops) +ACE_OS::semop (int int_id, struct sembuf *sops, size_t nsops) { ACE_OS_TRACE ("ACE_OS::semop"); #if defined (ACE_HAS_SYSV_IPC) @@ -8652,7 +8642,7 @@ semop (int int_id, struct sembuf *sops, size_t nsops) } ACE_INLINE void * -shmat (int int_id, void *shmaddr, int shmflg) +ACE_OS::shmat (int int_id, void *shmaddr, int shmflg) { ACE_OS_TRACE ("ACE_OS::shmat"); #if defined (ACE_HAS_SYSV_IPC) @@ -8671,7 +8661,7 @@ shmat (int int_id, void *shmaddr, int shmflg) } ACE_INLINE int -shmctl (int int_id, int cmd, struct shmid_ds *buf) +ACE_OS::shmctl (int int_id, int cmd, struct shmid_ds *buf) { ACE_OS_TRACE ("ACE_OS::shmctl"); #if defined (ACE_HAS_SYSV_IPC) @@ -8686,7 +8676,7 @@ shmctl (int int_id, int cmd, struct shmid_ds *buf) } ACE_INLINE int -shmdt (void *shmaddr) +ACE_OS::shmdt (void *shmaddr) { ACE_OS_TRACE ("ACE_OS::shmdt"); #if defined (ACE_HAS_SYSV_IPC) @@ -8699,7 +8689,7 @@ shmdt (void *shmaddr) } ACE_INLINE int -shmget (key_t key, int size, int flags) +ACE_OS::shmget (key_t key, int size, int flags) { ACE_OS_TRACE ("ACE_OS::shmget"); #if defined (ACE_HAS_SYSV_IPC) @@ -8714,7 +8704,7 @@ shmget (key_t key, int size, int flags) } ACE_INLINE void -tzset (void) +ACE_OS::tzset (void) { #if !defined (ACE_HAS_WINCE) && !defined (VXWORKS) && !defined (ACE_PSOS) && ! defined(__rtems__) # if defined (ACE_WIN32) @@ -8727,15 +8717,18 @@ tzset (void) # endif /* ACE_HAS_WINCE && !VXWORKS && !ACE_PSOS && !__rtems__ */ } -ACE_INLINE long -timezone (void) -{ - return ::ace_timezone (); -} +// Linux won't compile unless we explicitly use a namespace here. +namespace ACE_OS { + ACE_INLINE long + timezone (void) + { + return ::ace_timezone (); + } +} /* namespace ACE_OS */ #if !defined (ACE_LACKS_DIFFTIME) ACE_INLINE double -difftime (time_t t1, time_t t0) +ACE_OS::difftime (time_t t1, time_t t0) { return ::ace_difftime (t1, t0); } @@ -8745,7 +8738,7 @@ difftime (time_t t1, time_t t0) static const int ctime_buf_size = 26; ACE_INLINE ACE_TCHAR * -ctime (const time_t *t) +ACE_OS::ctime (const time_t *t) { ACE_OS_TRACE ("ACE_OS::ctime"); #if defined (ACE_HAS_BROKEN_CTIME) @@ -8766,7 +8759,7 @@ ctime (const time_t *t) #if !defined (ACE_HAS_WINCE) /* CE version in OS.cpp */ ACE_INLINE ACE_TCHAR * -ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) +ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) { ACE_OS_TRACE ("ACE_OS::ctime_r"); @@ -8818,7 +8811,7 @@ ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) #endif /* !ACE_HAS_WINCE */ ACE_INLINE struct tm * -localtime (const time_t *t) +ACE_OS::localtime (const time_t *t) { #if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) ACE_OS_TRACE ("ACE_OS::localtime"); @@ -8832,7 +8825,7 @@ localtime (const time_t *t) } ACE_INLINE struct tm * -gmtime (const time_t *t) +ACE_OS::gmtime (const time_t *t) { #if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) ACE_OS_TRACE ("ACE_OS::gmtime"); @@ -8845,7 +8838,7 @@ gmtime (const time_t *t) } ACE_INLINE struct tm * -gmtime_r (const time_t *t, struct tm *res) +ACE_OS::gmtime_r (const time_t *t, struct tm *res) { ACE_OS_TRACE ("ACE_OS::gmtime_r"); #if defined (ACE_HAS_REENTRANT_FUNCTIONS) @@ -8872,7 +8865,7 @@ gmtime_r (const time_t *t, struct tm *res) } ACE_INLINE char * -asctime (const struct tm *t) +ACE_OS::asctime (const struct tm *t) { #if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME) ACE_OS_TRACE ("ACE_OS::asctime"); @@ -8885,7 +8878,7 @@ asctime (const struct tm *t) } ACE_INLINE char * -asctime_r (const struct tm *t, char *buf, int buflen) +ACE_OS::asctime_r (const struct tm *t, char *buf, int buflen) { ACE_OS_TRACE ("ACE_OS::asctime_r"); #if defined (ACE_HAS_REENTRANT_FUNCTIONS) @@ -8921,8 +8914,8 @@ asctime_r (const struct tm *t, char *buf, int buflen) } ACE_INLINE size_t -strftime (char *s, size_t maxsize, const char *format, - const struct tm *timeptr) +ACE_OS::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); @@ -8936,10 +8929,10 @@ strftime (char *s, size_t maxsize, const char *format, } ACE_INLINE int -flock_init (ace_flock_t *lock, - int flags, - const ACE_TCHAR *name, - mode_t perms) +ACE_OS::flock_init (ACE_OS::ace_flock_t *lock, + int flags, + const ACE_TCHAR *name, + mode_t perms) { ACE_OS_TRACE ("ACE_OS::flock_init"); #if defined (CHORUS) @@ -9017,10 +9010,10 @@ flock_init (ace_flock_t *lock, #if defined (ACE_WIN32) ACE_INLINE void -adjust_flock_params (ace_flock_t *lock, - short whence, - off_t &start, - off_t &len) +ACE_OS::adjust_flock_params (ACE_OS::ace_flock_t *lock, + short whence, + off_t &start, + off_t &len) { switch (whence) { @@ -9041,10 +9034,10 @@ adjust_flock_params (ace_flock_t *lock, #endif /* ACE_WIN32 */ ACE_INLINE int -flock_wrlock (ace_flock_t *lock, - short whence, - off_t start, - off_t len) +ACE_OS::flock_wrlock (ACE_OS::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) @@ -9089,10 +9082,10 @@ flock_wrlock (ace_flock_t *lock, } ACE_INLINE int -flock_rdlock (ace_flock_t *lock, - short whence, - off_t start, - off_t len) +ACE_OS::flock_rdlock (ACE_OS::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) @@ -9137,10 +9130,10 @@ flock_rdlock (ace_flock_t *lock, } ACE_INLINE int -flock_trywrlock (ace_flock_t *lock, - short whence, - off_t start, - off_t len) +ACE_OS::flock_trywrlock (ACE_OS::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) @@ -9194,10 +9187,10 @@ flock_trywrlock (ace_flock_t *lock, } ACE_INLINE int -flock_tryrdlock (ace_flock_t *lock, - short whence, - off_t start, - off_t len) +ACE_OS::flock_tryrdlock (ACE_OS::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) @@ -9250,10 +9243,10 @@ flock_tryrdlock (ace_flock_t *lock, } ACE_INLINE int -flock_unlock (ace_flock_t *lock, - short whence, - off_t start, - off_t len) +ACE_OS::flock_unlock (ACE_OS::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) @@ -9289,8 +9282,8 @@ flock_unlock (ace_flock_t *lock, } ACE_INLINE int -flock_destroy (ace_flock_t *lock, - int unlink_file) +ACE_OS::flock_destroy (ACE_OS::ace_flock_t *lock, + int unlink_file) { ACE_OS_TRACE ("ACE_OS::flock_destroy"); if (lock->handle_ != ACE_INVALID_HANDLE) @@ -9333,8 +9326,8 @@ flock_destroy (ace_flock_t *lock, } ACE_INLINE int -execv (const char *path, - char *const argv[]) +ACE_OS::execv (const char *path, + char *const argv[]) { ACE_OS_TRACE ("ACE_OS::execv"); #if defined (ACE_LACKS_EXEC) @@ -9364,9 +9357,9 @@ execv (const char *path, } ACE_INLINE int -execve (const char *path, - char *const argv[], - char *const envp[]) +ACE_OS::execve (const char *path, + char *const argv[], + char *const envp[]) { ACE_OS_TRACE ("ACE_OS::execve"); #if defined (ACE_LACKS_EXEC) @@ -9397,8 +9390,8 @@ execve (const char *path, } ACE_INLINE int -execvp (const char *file, - char *const argv[]) +ACE_OS::execvp (const char *file, + char *const argv[]) { ACE_OS_TRACE ("ACE_OS::execvp"); #if defined (ACE_LACKS_EXEC) @@ -9428,7 +9421,7 @@ execvp (const char *file, } ACE_INLINE FILE * -fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) +ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fdopen"); # if defined (ACE_HAS_WINCE) @@ -9479,7 +9472,7 @@ fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) } ACE_INLINE int -getrlimit (int resource, struct rlimit *rl) +ACE_OS::getrlimit (int resource, struct rlimit *rl) { ACE_OS_TRACE ("ACE_OS::getrlimit"); @@ -9498,7 +9491,7 @@ getrlimit (int resource, struct rlimit *rl) } ACE_INLINE int -setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl) +ACE_OS::setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl) { ACE_OS_TRACE ("ACE_OS::setrlimit"); @@ -9517,8 +9510,8 @@ setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl) } ACE_INLINE int -socketpair (int domain, int type, - int protocol, ACE_HANDLE sv[2]) +ACE_OS::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) @@ -9535,7 +9528,7 @@ socketpair (int domain, int type, } ACE_INLINE ACE_HANDLE -dup (ACE_HANDLE handle) +ACE_OS::dup (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::dup"); #if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) @@ -9563,7 +9556,7 @@ dup (ACE_HANDLE handle) } ACE_INLINE int -dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) +ACE_OS::dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) { ACE_OS_TRACE ("ACE_OS::dup2"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_PSOS) @@ -9582,7 +9575,7 @@ dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) #endif /* ghs && ACE_HAS_PENTIUM */ ACE_INLINE ACE_hrtime_t -gethrtime (const ACE_HRTimer_Op op) +ACE_OS::gethrtime (const ACE_HRTimer_Op op) { ACE_OS_TRACE ("ACE_OS::gethrtime"); #if defined (ACE_HAS_HI_RES_TIMER) @@ -9724,7 +9717,7 @@ gethrtime (const ACE_HRTimer_Op op) } ACE_INLINE int -fdetach (const char *file) +ACE_OS::fdetach (const char *file) { ACE_OS_TRACE ("ACE_OS::fdetach"); #if defined (ACE_HAS_STREAM_PIPES) @@ -9737,7 +9730,7 @@ fdetach (const char *file) } ACE_INLINE int -fattach (int handle, const char *path) +ACE_OS::fattach (int handle, const char *path) { ACE_OS_TRACE ("ACE_OS::fattach"); #if defined (ACE_HAS_STREAM_PIPES) @@ -9751,7 +9744,7 @@ fattach (int handle, const char *path) } ACE_INLINE pid_t -fork (void) +ACE_OS::fork (void) { ACE_OS_TRACE ("ACE_OS::fork"); #if defined (ACE_LACKS_FORK) @@ -9762,7 +9755,7 @@ fork (void) } ACE_INLINE int -getpagesize (void) +ACE_OS::getpagesize (void) { ACE_OS_TRACE ("ACE_OS::getpagesize"); #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) @@ -9780,7 +9773,7 @@ getpagesize (void) } ACE_INLINE int -allocation_granularity (void) +ACE_OS::allocation_granularity (void) { #if defined (ACE_WIN32) SYSTEM_INFO sys_info; @@ -9792,7 +9785,7 @@ allocation_granularity (void) } ACE_INLINE pid_t -getpid (void) +ACE_OS::getpid (void) { // ACE_OS_TRACE ("ACE_OS::getpid"); #if defined (ACE_WIN32) @@ -9808,7 +9801,7 @@ getpid (void) } ACE_INLINE pid_t -getpgid (pid_t pid) +ACE_OS::getpgid (pid_t pid) { ACE_OS_TRACE ("ACE_OS::getpgid"); #if defined (ACE_LACKS_GETPGID) @@ -9830,7 +9823,7 @@ getpgid (pid_t pid) } ACE_INLINE pid_t -getppid (void) +ACE_OS::getppid (void) { ACE_OS_TRACE ("ACE_OS::getppid"); #if defined (ACE_LACKS_GETPPID) @@ -9844,7 +9837,7 @@ getppid (void) } ACE_INLINE int -setpgid (pid_t pid, pid_t pgid) +ACE_OS::setpgid (pid_t pid, pid_t pgid) { ACE_OS_TRACE ("ACE_OS::setpgid"); #if defined (ACE_LACKS_SETPGID) @@ -9862,7 +9855,7 @@ setpgid (pid_t pid, pid_t pgid) } ACE_INLINE int -setreuid (uid_t ruid, uid_t euid) +ACE_OS::setreuid (uid_t ruid, uid_t euid) { ACE_OS_TRACE ("ACE_OS::setreuid"); #if defined (ACE_LACKS_SETREUID) @@ -9880,7 +9873,7 @@ setreuid (uid_t ruid, uid_t euid) } ACE_INLINE int -setregid (gid_t rgid, gid_t egid) +ACE_OS::setregid (gid_t rgid, gid_t egid) { ACE_OS_TRACE ("ACE_OS::setregid"); #if defined (ACE_LACKS_SETREGID) @@ -9898,7 +9891,7 @@ setregid (gid_t rgid, gid_t egid) } ACE_INLINE off_t -lseek (ACE_HANDLE handle, off_t offset, int whence) +ACE_OS::lseek (ACE_HANDLE handle, off_t offset, int whence) { ACE_OS_TRACE ("ACE_OS::lseek"); #if defined (ACE_WIN32) @@ -9956,7 +9949,7 @@ lseek (ACE_HANDLE handle, off_t offset, int whence) #if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64) ACE_INLINE ACE_LOFF_T -llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) +ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) { ACE_OS_TRACE ("ACE_OS::llseek"); @@ -9983,7 +9976,7 @@ llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) #endif /* ACE_HAS_LLSEEK || ACE_HAS_LSEEK64 */ ACE_INLINE int -fseek (FILE *fp, long offset, int whence) +ACE_OS::fseek (FILE *fp, long offset, int whence) { # if defined (ACE_WIN32) # if SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END @@ -10009,32 +10002,32 @@ fseek (FILE *fp, long offset, int whence) } ACE_INLINE long -ftell (FILE* fp) +ACE_OS::ftell (FILE* fp) { ACE_OSCALL_RETURN (::ftell (fp), long, -1); } ACE_INLINE int -fgetpos (FILE* fp, fpos_t* pos) +ACE_OS::fgetpos (FILE* fp, fpos_t* pos) { ACE_OSCALL_RETURN (::fgetpos (fp, pos), int, -1); } ACE_INLINE int -fsetpos (FILE* fp, fpos_t* pos) +ACE_OS::fsetpos (FILE* fp, fpos_t* pos) { ACE_OSCALL_RETURN (::fsetpos (fp, pos), int, -1); } ACE_INLINE int -fgetc (FILE* fp) +ACE_OS::fgetc (FILE* fp) { ACE_OSCALL_RETURN (::fgetc (fp), int, -1); } #if !defined (ACE_LACKS_CLEARERR) ACE_INLINE void -clearerr (FILE* fp) +ACE_OS::clearerr (FILE* fp) { ::clearerr(fp); } @@ -10043,7 +10036,7 @@ clearerr (FILE* fp) #if defined (ACE_HAS_WCHAR) ACE_INLINE wint_t -fgetwc (FILE* fp) +ACE_OS::fgetwc (FILE* fp) { #if defined (ACE_LACKS_FGETWC) ACE_UNUSED_ARG (fp); @@ -10054,7 +10047,7 @@ fgetwc (FILE* fp) } ACE_INLINE wint_t -ungetwc (wint_t c, FILE* fp) +ACE_OS::ungetwc (wint_t c, FILE* fp) { #if defined (ACE_LACKS_FGETWC) ACE_UNUSED_ARG (c); @@ -10068,10 +10061,10 @@ ungetwc (wint_t c, FILE* fp) #endif /* ACE_HAS_WCHAR */ ACE_INLINE pid_t -waitpid (pid_t pid, - ACE_exitcode *status, - int wait_options, - ACE_HANDLE handle) +ACE_OS::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) @@ -10140,10 +10133,10 @@ waitpid (pid_t pid, } ACE_INLINE pid_t -wait (pid_t pid, - ACE_exitcode *status, - int wait_options, - ACE_HANDLE handle) +ACE_OS::wait (pid_t pid, + ACE_exitcode *status, + int wait_options, + ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::wait"); return ACE_OS::waitpid (pid, @@ -10153,7 +10146,7 @@ wait (pid_t pid, } ACE_INLINE pid_t -wait (int *status) +ACE_OS::wait (int *status) { ACE_OS_TRACE ("ACE_OS::wait"); #if defined (ACE_WIN32) || defined (VXWORKS) || defined(CHORUS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -10170,9 +10163,9 @@ wait (int *status) } ACE_INLINE int -ioctl (ACE_HANDLE handle, - int cmd, - void *val) +ACE_OS::ioctl (ACE_HANDLE handle, + int cmd, + void *val) { ACE_OS_TRACE ("ACE_OS::ioctl"); @@ -10190,7 +10183,7 @@ ioctl (ACE_HANDLE handle, } ACE_INLINE int -kill (pid_t pid, int signum) +ACE_OS::kill (pid_t pid, int signum) { ACE_OS_TRACE ("ACE_OS::kill"); #if defined (ACE_WIN32) || defined (CHORUS) || defined (ACE_PSOS) @@ -10203,9 +10196,9 @@ kill (pid_t pid, int signum) } ACE_INLINE int -sigaction (int signum, - const struct sigaction *nsa, - struct sigaction *osa) +ACE_OS::sigaction (int signum, + const struct sigaction *nsa, + struct sigaction *osa) { ACE_OS_TRACE ("ACE_OS::sigaction"); if (signum == 0) @@ -10237,7 +10230,7 @@ sigaction (int signum, } ACE_INLINE ACE_TCHAR * -getcwd (ACE_TCHAR *buf, size_t size) +ACE_OS::getcwd (ACE_TCHAR *buf, size_t size) { ACE_OS_TRACE ("ACE_OS::getcwd"); #if defined (ACE_PSOS_LACKS_PHILE) @@ -10340,7 +10333,7 @@ getcwd (ACE_TCHAR *buf, size_t size) } ACE_INLINE int -sleep (u_int seconds) +ACE_OS::sleep (u_int seconds) { ACE_OS_TRACE ("ACE_OS::sleep"); #if defined (ACE_WIN32) @@ -10373,7 +10366,7 @@ sleep (u_int seconds) } ACE_INLINE int -sleep (const ACE_Time_Value &tv) +ACE_OS::sleep (const ACE_Time_Value &tv) { ACE_OS_TRACE ("ACE_OS::sleep"); #if defined (ACE_WIN32) @@ -10393,8 +10386,8 @@ sleep (const ACE_Time_Value &tv) } ACE_INLINE int -nanosleep (const struct timespec *requested, - struct timespec *remaining) +ACE_OS::nanosleep (const struct timespec *requested, + struct timespec *remaining) { ACE_OS_TRACE ("ACE_OS::nanosleep"); #if defined (ACE_HAS_CLOCK_GETTIME) @@ -10454,7 +10447,7 @@ nanosleep (const struct timespec *requested, } ACE_INLINE int -mkdir (const ACE_TCHAR *path, mode_t mode) +ACE_OS::mkdir (const ACE_TCHAR *path, mode_t mode) { #if defined (ACE_PSOS_LACKS_PHILE) ACE_UNUSED_ARG (path); @@ -10518,7 +10511,7 @@ mkdir (const ACE_TCHAR *path, mode_t mode) } ACE_INLINE char * -getenv (const char *symbol) +ACE_OS::getenv (const char *symbol) { ACE_OS_TRACE ("ACE_OS::getenv"); #if defined (ACE_LACKS_ENV) @@ -10534,7 +10527,7 @@ getenv (const char *symbol) #if defined (ACE_HAS_WCHAR) && defined (ACE_WIN32) ACE_INLINE wchar_t * -getenv (const wchar_t *symbol) +ACE_OS::getenv (const wchar_t *symbol) { #if defined (ACE_LACKS_ENV) ACE_UNUSED_ARG (symbol); @@ -10552,7 +10545,7 @@ extern "C" { #endif ACE_INLINE int -putenv (const ACE_TCHAR *string) +ACE_OS::putenv (const ACE_TCHAR *string) { ACE_OS_TRACE ("ACE_OS::putenv"); #if defined (ACE_HAS_WINCE) || defined (ACE_PSOS) @@ -10587,7 +10580,7 @@ ACE_Str_Buf::ACE_Str_Buf (strbuf &sb) } ACE_INLINE u_int -wslen (const WChar *s) +ACE_OS::wslen (const WChar *s) { u_int len = 0; @@ -10598,7 +10591,7 @@ wslen (const WChar *s) } ACE_INLINE ACE_OS::WChar * -wscpy (WChar *dest, const WChar *src) +ACE_OS::wscpy (WChar *dest, const WChar *src) { WChar *original_dest = dest; @@ -10609,7 +10602,7 @@ wscpy (WChar *dest, const WChar *src) } ACE_INLINE int -wscmp (const WChar *s, const WChar *t) +ACE_OS::wscmp (const WChar *s, const WChar *t) { const WChar *scan1 = s; const WChar *scan2 = t; @@ -10624,7 +10617,7 @@ wscmp (const WChar *s, const WChar *t) } ACE_INLINE int -wsncmp (const WChar *s, const WChar *t, size_t len) +ACE_OS::wsncmp (const WChar *s, const WChar *t, size_t len) { const WChar *scan1 = s; const WChar *scan2 = t; @@ -10649,20 +10642,20 @@ ACE_cond_t::waiters (void) const #if 0 ACE_INLINE int -thr_continue (const ACE_Thread_ID &thr_id) +ACE_OS::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 -thr_create (ACE_THR_FUNC func, - void *args, - long flags, - ACE_Thread_ID *thr_id, - long priority, - void *stack, - size_t stacksize); +ACE_OS::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; @@ -10682,14 +10675,14 @@ thr_create (ACE_THR_FUNC func, } ACE_INLINE int -thr_getprio (const ACE_Thread_ID &thr_id, int &prio) +ACE_OS::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 -thr_join (const ACE_Thread_ID &thr_id, ACE_THR_FUNC_RETURN *status) +ACE_OS::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); @@ -10699,19 +10692,19 @@ thr_join (const ACE_Thread_ID &thr_id, ACE_THR_FUNC_RETURN *status) } ACE_INLINE int -thr_cancel (const ACE_Thread_ID &thr_id) +ACE_OS::thr_cancel (const ACE_Thread_ID &thr_id) { return ACE_OS::thr_cancel (thr_id.id ()); } ACE_INLINE int -thr_kill (const ACE_Thread_ID &thr_id, int signum) +ACE_OS::thr_kill (const ACE_Thread_ID &thr_id, int signum) { return ACE_OS::thr_kill (thr_id.id (), signum); } ACE_INLINE ACE_Thread_ID -thr_self (void) +ACE_OS::thr_self (void) { ACE_hthread_t thr_handle; ACE_OS::thr_self (thr_handle); @@ -10721,14 +10714,14 @@ thr_self (void) } ACE_INLINE int -thr_setprio (const ACE_Thread_ID &thr_id, int prio) +ACE_OS::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 -thr_suspend (const ACE_Thread_ID &thr_id) +ACE_OS::thr_suspend (const ACE_Thread_ID &thr_id) { return ACE_OS::thr_suspend (thr_id.handle ()); } @@ -10736,7 +10729,7 @@ thr_suspend (const ACE_Thread_ID &thr_id) #endif /* 0 */ ACE_INLINE int -sigaddset (sigset_t *s, int signum) +ACE_OS::sigaddset (sigset_t *s, int signum) { ACE_OS_TRACE ("ACE_OS::sigaddset"); #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) @@ -10767,7 +10760,7 @@ sigaddset (sigset_t *s, int signum) } ACE_INLINE int -sigdelset (sigset_t *s, int signum) +ACE_OS::sigdelset (sigset_t *s, int signum) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10797,7 +10790,7 @@ sigdelset (sigset_t *s, int signum) } ACE_INLINE int -sigemptyset (sigset_t *s) +ACE_OS::sigemptyset (sigset_t *s) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10818,7 +10811,7 @@ sigemptyset (sigset_t *s) } ACE_INLINE int -sigfillset (sigset_t *s) +ACE_OS::sigfillset (sigset_t *s) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10839,7 +10832,7 @@ sigfillset (sigset_t *s) } ACE_INLINE int -sigismember (sigset_t *s, int signum) +ACE_OS::sigismember (sigset_t *s, int signum) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) if (s == 0) @@ -10875,7 +10868,7 @@ sigismember (sigset_t *s, int signum) } ACE_INLINE int -sigsuspend (const sigset_t *sigset) +ACE_OS::sigsuspend (const sigset_t *sigset) { #if defined (ACE_HAS_SIGSUSPEND) sigset_t s; @@ -10893,7 +10886,7 @@ sigsuspend (const sigset_t *sigset) } ACE_INLINE int -sigprocmask (int how, const sigset_t *nsp, sigset_t *osp) +ACE_OS::sigprocmask (int how, const sigset_t *nsp, sigset_t *osp) { #if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS) ACE_UNUSED_ARG (how); @@ -10910,7 +10903,7 @@ sigprocmask (int how, const sigset_t *nsp, sigset_t *osp) } ACE_INLINE int -pthread_sigmask (int how, const sigset_t *nsp, sigset_t *osp) +ACE_OS::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), @@ -10949,11 +10942,11 @@ ACE_Cleanup::ACE_Cleanup (void) } ACE_INLINE void * -bsearch (const void *key, - const void *base, - size_t nel, - size_t size, - ACE_COMPARE_FUNC compar) +ACE_OS::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); @@ -10968,7 +10961,7 @@ bsearch (const void *key, } ACE_INLINE void -qsort (void *base, +ACE_OS::qsort (void *base, size_t nel, size_t width, ACE_COMPARE_FUNC compar) @@ -10984,7 +10977,7 @@ qsort (void *base, } ACE_INLINE int -setuid (uid_t uid) +ACE_OS::setuid (uid_t uid) { ACE_OS_TRACE ("ACE_OS::setuid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11000,7 +10993,7 @@ setuid (uid_t uid) } ACE_INLINE uid_t -getuid (void) +ACE_OS::getuid (void) { ACE_OS_TRACE ("ACE_OS::getuid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11014,7 +11007,7 @@ getuid (void) } ACE_INLINE int -setgid (gid_t gid) +ACE_OS::setgid (gid_t gid) { ACE_OS_TRACE ("ACE_OS::setgid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11030,7 +11023,7 @@ setgid (gid_t gid) } ACE_INLINE gid_t -getgid (void) +ACE_OS::getgid (void) { ACE_OS_TRACE ("ACE_OS::getgid"); #if defined (VXWORKS) || defined (ACE_PSOS) || defined (INTEGRITY) @@ -11044,7 +11037,7 @@ getgid (void) } ACE_INLINE ACE_EXIT_HOOK -set_exit_hook (ACE_EXIT_HOOK exit_hook) +ACE_OS::set_exit_hook (ACE_EXIT_HOOK exit_hook) { ACE_EXIT_HOOK old_hook = exit_hook_; exit_hook_ = exit_hook; @@ -11052,7 +11045,7 @@ set_exit_hook (ACE_EXIT_HOOK exit_hook) } ACE_INLINE int -isatty (int handle) +ACE_OS::isatty (int handle) { #if defined (ACE_LACKS_ISATTY) ACE_UNUSED_ARG (handle); @@ -11068,7 +11061,7 @@ isatty (int handle) #if defined (ACE_WIN32) ACE_INLINE int -isatty (ACE_HANDLE handle) +ACE_OS::isatty (ACE_HANDLE handle) { #if defined (ACE_LACKS_ISATTY) ACE_UNUSED_ARG (handle); @@ -11087,7 +11080,7 @@ isatty (ACE_HANDLE handle) } ACE_INLINE void -fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode) +ACE_OS::fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode) { switch (x) { @@ -11136,7 +11129,7 @@ fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode) // <ACE_OS::free>. ACE_INLINE ACE_TCHAR * -strenvdup (const ACE_TCHAR *str) +ACE_OS::strenvdup (const ACE_TCHAR *str) { #if defined (ACE_HAS_WINCE) // WinCE doesn't have environment variables so we just skip it. @@ -11201,22 +11194,20 @@ ACE_Countdown_Time::update (void) #if defined (ACE_WIN32) ACE_INLINE const OSVERSIONINFO & -get_win32_versioninfo () +ACE_OS::get_win32_versioninfo () { return ACE_OS::win32_versioninfo_; } ACE_INLINE HINSTANCE -get_win32_resource_module () +ACE_OS::get_win32_resource_module () { return ACE_OS::win32_resource_module_; } ACE_INLINE void -set_win32_resource_module (HINSTANCE instance) +ACE_OS::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 273e6081970..b6b517f4a79 100644 --- a/ace/OS_Dirent.cpp +++ b/ace/OS_Dirent.cpp @@ -31,9 +31,8 @@ ACE_RCSID(ace, OS_Dirent, "$Id$") # include "ace/OS_Dirent.inl" #endif /* ACE_HAS_INLINED_OS_CALLS */ -namespace ACE_OS { ACE_DIR * -opendir_emulation (const ACE_TCHAR *filename) +ACE_OS::opendir_emulation (const ACE_TCHAR *filename) { #if defined (ACE_WIN32) ACE_DIR *dir; @@ -63,25 +62,25 @@ opendir_emulation (const ACE_TCHAR *filename) Phil Mesnier */ - size_t lastchar = ACE_OS_String::strlen (filename); + size_t lastchar = ACE_OS::strlen (filename); if (lastchar > 0) { if (filename[lastchar-1] != '*') { if (filename[lastchar-1] != '/' && filename[lastchar-1] != '\\') - ACE_OS_String::strcpy (extra, ACE_LIB_TEXT ("/*")); + ACE_OS::strcpy (extra, ACE_LIB_TEXT ("/*")); else - ACE_OS_String::strcpy (extra, ACE_LIB_TEXT ("*")); + ACE_OS::strcpy (extra, ACE_LIB_TEXT ("*")); } } ACE_NEW_RETURN (dir, ACE_DIR, 0); ACE_NEW_RETURN (dir->directory_name_, - ACE_TCHAR[lastchar + ACE_OS_String::strlen (extra) + 1], + ACE_TCHAR[lastchar + ACE_OS::strlen (extra) + 1], 0); - ACE_OS_String::strcpy (dir->directory_name_, filename); + ACE_OS::strcpy (dir->directory_name_, filename); if (extra[0]) - ACE_OS_String::strcat (dir->directory_name_, extra); + ACE_OS::strcat (dir->directory_name_, extra); dir->current_handle_ = INVALID_HANDLE_VALUE; dir->started_reading_ = 0; dir->dirent_ = 0; @@ -93,7 +92,7 @@ opendir_emulation (const ACE_TCHAR *filename) } void -closedir_emulation (ACE_DIR *d) +ACE_OS::closedir_emulation (ACE_DIR *d) { #if defined (ACE_WIN32) if (d->current_handle_ != INVALID_HANDLE_VALUE) @@ -103,8 +102,8 @@ closedir_emulation (ACE_DIR *d) d->started_reading_ = 0; if (d->dirent_ != 0) { - ACE_OS_Memory::free (d->dirent_->d_name); - ACE_OS_Memory::free (d->dirent_); + ACE_OS::free (d->dirent_->d_name); + ACE_OS::free (d->dirent_); } #else /* ACE_WIN32 */ ACE_UNUSED_ARG (d); @@ -112,13 +111,13 @@ closedir_emulation (ACE_DIR *d) } dirent * -readdir_emulation (ACE_DIR *d) +ACE_OS::readdir_emulation (ACE_DIR *d) { #if defined (ACE_WIN32) if (d->dirent_ != 0) { - ACE_OS_Memory::free (d->dirent_->d_name); - ACE_OS_Memory::free (d->dirent_); + ACE_OS::free (d->dirent_->d_name); + ACE_OS::free (d->dirent_); d->dirent_ = 0; } @@ -143,14 +142,14 @@ readdir_emulation (ACE_DIR *d) if (d->current_handle_ != INVALID_HANDLE_VALUE) { d->dirent_ = (dirent *) - ACE_OS_Memory::malloc (sizeof (dirent)); + ACE_OS::malloc (sizeof (dirent)); if (d->dirent_ != 0) { d->dirent_->d_name = (ACE_TCHAR*) - ACE_OS_Memory::malloc ((ACE_OS_String::strlen (d->fdata_.cFileName) + 1) - * sizeof (ACE_TCHAR)); - ACE_OS_String::strcpy (d->dirent_->d_name, d->fdata_.cFileName); + ACE_OS::malloc ((ACE_OS::strlen (d->fdata_.cFileName) + 1) + * sizeof (ACE_TCHAR)); + ACE_OS::strcpy (d->dirent_->d_name, d->fdata_.cFileName); d->dirent_->d_reclen = sizeof (dirent); } @@ -165,13 +164,13 @@ readdir_emulation (ACE_DIR *d) } int -scandir_emulation (const ACE_TCHAR *dirname, - dirent **namelist[], - int (*selector) (const dirent *entry), - int (*comparator) (const dirent **f1, - const dirent **f2)) +ACE_OS::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); + ACE_DIR *dirp = ACE_OS::opendir (dirname); if (dirp == 0) return -1; @@ -187,9 +186,9 @@ scandir_emulation (const ACE_TCHAR *dirname, int fail = 0; // @@ This code shoulduse readdir_r() rather than readdir(). - for (dp = ACE_OS_Dirent::readdir (dirp); + for (dp = ACE_OS::readdir (dirp); dp != 0; - dp = ACE_OS_Dirent::readdir (dirp)) + dp = ACE_OS::readdir (dirp)) { if (selector && (*selector)(dp) == 0) continue; @@ -203,8 +202,8 @@ scandir_emulation (const ACE_TCHAR *dirname, else arena_size *= 2; - newv = (dirent **) ACE_OS_Memory::realloc (vector, - arena_size * sizeof (dirent *)); + newv = (dirent **) ACE_OS::realloc (vector, + arena_size * sizeof (dirent *)); if (newv == 0) { fail = 1; @@ -214,12 +213,12 @@ scandir_emulation (const ACE_TCHAR *dirname, } #if defined (ACE_LACKS_STRUCT_DIR) - dirent *newdp = (dirent *) ACE_OS_Memory::malloc (sizeof (dirent)); + dirent *newdp = (dirent *) ACE_OS::malloc (sizeof (dirent)); #else int dsize = sizeof (dirent) + - ((ACE_OS_String::strlen (dp->d_name) + 1) * sizeof (ACE_TCHAR)); - dirent *newdp = (dirent *) ACE_OS_Memory::malloc (dsize); + ((ACE_OS::strlen (dp->d_name) + 1) * sizeof (ACE_TCHAR)); + dirent *newdp = (dirent *) ACE_OS::malloc (dsize); #endif /* ACE_LACKS_STRUCT_DIR */ if (newdp == 0) @@ -229,13 +228,13 @@ scandir_emulation (const ACE_TCHAR *dirname, } #if defined (ACE_LACKS_STRUCT_DIR) - newdp->d_name = (ACE_TCHAR*) ACE_OS_Memory::malloc ( - (ACE_OS_String::strlen (dp->d_name) + 1) * sizeof (ACE_TCHAR)); + newdp->d_name = (ACE_TCHAR*) ACE_OS::malloc ( + (ACE_OS::strlen (dp->d_name) + 1) * sizeof (ACE_TCHAR)); if (newdp->d_name == 0) { fail = 1; - ACE_OS_Memory::free (newdp); + ACE_OS::free (newdp); break; } @@ -243,28 +242,28 @@ scandir_emulation (const ACE_TCHAR *dirname, newdp->d_ino = dp->d_ino; newdp->d_off = dp->d_off; newdp->d_reclen = dp->d_reclen; - ACE_OS_String::strcpy (newdp->d_name, dp->d_name); + ACE_OS::strcpy (newdp->d_name, dp->d_name); vector[nfiles++] = newdp; #else - vector[nfiles++] = (dirent *) ACE_OS_String::memcpy (newdp, dp, dsize); + vector[nfiles++] = (dirent *) ACE_OS::memcpy (newdp, dp, dsize); #endif /* ACE_LACKS_STRUCT_DIR */ } if (fail) { - ACE_OS_Dirent::closedir (dirp); + ACE_OS::closedir (dirp); while (nfiles-- > 0) { #if defined (ACE_LACKS_STRUCT_DIR) - ACE_OS_Memory::free (vector[nfiles]->d_name); + ACE_OS::free (vector[nfiles]->d_name); #endif /* ACE_LACKS_STRUCT_DIR */ - ACE_OS_Memory::free (vector[nfiles]); + ACE_OS::free (vector[nfiles]); } - ACE_OS_Memory::free (vector); + ACE_OS::free (vector); return -1; } - ACE_OS_Dirent::closedir (dirp); + ACE_OS::closedir (dirp); *namelist = vector; @@ -277,4 +276,3 @@ scandir_emulation (const ACE_TCHAR *dirname, return nfiles; } -} /* namespace ACE_OS */ diff --git a/ace/OS_Dirent.inl b/ace/OS_Dirent.inl index 9a93c1a9b9f..c8ffbb3ca3b 100644 --- a/ace/OS_Dirent.inl +++ b/ace/OS_Dirent.inl @@ -1,14 +1,13 @@ // -*- C++ -*- // $Id$ -namespace ACE_OS { ACE_INLINE ACE_DIR * -opendir (const ACE_TCHAR *filename) +ACE_OS::opendir (const ACE_TCHAR *filename) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) // The pointer to the <ACE_DIR> buffer *must* be passed to - // <ACE_OS_Dirent::closedir> to free it and avoid a memory leak. + // <ACE_OS::closedir> to free it and avoid a memory leak. ACE_DIR *dir; u_long result; ACE_NEW_RETURN (dir, ACE_DIR, 0); @@ -24,7 +23,7 @@ opendir (const ACE_TCHAR *filename) } # else /* ! ACE_PSOS */ # if defined (ACE_WIN32) - return ::ACE_OS_Dirent::opendir_emulation (filename); + return ::ACE_OS::opendir_emulation (filename); # else /* ! ACE_WIN32 */ // VxWorks' ::opendir () is declared with a non-const argument. return ::opendir (ACE_const_cast (ACE_TCHAR *, filename)); @@ -37,7 +36,7 @@ opendir (const ACE_TCHAR *filename) } ACE_INLINE void -closedir (ACE_DIR *d) +ACE_OS::closedir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) @@ -50,7 +49,7 @@ closedir (ACE_DIR *d) # else /* ! ACE_PSOS */ # if defined (ACE_WIN32) - ACE_OS_Dirent::closedir_emulation (d); + ACE_OS::closedir_emulation (d); delete [] d->directory_name_; delete d; # else /* ACE_WIN32 */ @@ -64,7 +63,7 @@ closedir (ACE_DIR *d) } ACE_INLINE struct dirent * -readdir (ACE_DIR *d) +ACE_OS::readdir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) @@ -80,7 +79,7 @@ readdir (ACE_DIR *d) # else /* ! ACE_PSOS */ # if defined (ACE_WIN32) - return ACE_OS_Dirent::readdir_emulation (d); + return ACE_OS::readdir_emulation (d); # else /* defined (ACE_WIN32) */ return ::readdir (d); # endif /* defined (ACE_WIN32) */ @@ -92,14 +91,14 @@ readdir (ACE_DIR *d) } ACE_INLINE int -readdir_r (ACE_DIR *dirp, - struct dirent *entry, - struct dirent **result) +ACE_OS::readdir_r (ACE_DIR *dirp, + struct dirent *entry, + struct dirent **result) { #if !defined (ACE_HAS_REENTRANT_FUNCTIONS) ACE_UNUSED_ARG (entry); // <result> has better not be 0! - *result = ACE_OS_Dirent::readdir (dirp); + *result = ACE_OS::readdir (dirp); if (*result) return 0; // Keep iterating else @@ -137,7 +136,7 @@ readdir_r (ACE_DIR *dirp, } ACE_INLINE long -telldir (ACE_DIR *d) +ACE_OS::telldir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_TELLDIR) return ::telldir (d); @@ -148,7 +147,7 @@ telldir (ACE_DIR *d) } ACE_INLINE void -seekdir (ACE_DIR *d, long loc) +ACE_OS::seekdir (ACE_DIR *d, long loc) { #if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_SEEKDIR) ::seekdir (d, loc); @@ -159,7 +158,7 @@ seekdir (ACE_DIR *d, long loc) } ACE_INLINE void -rewinddir (ACE_DIR *d) +ACE_OS::rewinddir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_LACKS_SEEKDIR) @@ -179,16 +178,15 @@ rewinddir (ACE_DIR *d) } ACE_INLINE int -scandir (const ACE_TCHAR *dirname, - struct dirent **namelist[], - int (*selector)(const struct dirent *), - int (*comparator) (const struct dirent **f1, - const struct dirent **f2)) +ACE_OS::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); #else /* ! defined ( ACE_HAS_SCANDIR) */ - return ACE_OS_Dirent::scandir_emulation (dirname, namelist, selector, comparator); + return ACE_OS::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 e9e7634f65d..9eec0a5562d 100644 --- a/ace/OS_Memory.cpp +++ b/ace/OS_Memory.cpp @@ -14,15 +14,14 @@ static int shut_up_aCC = 0; #include "ace/os_include/os_stdlib.h" -namespace ACE_OS { void * -malloc (size_t nbytes) +ACE_OS::malloc (size_t nbytes) { return ACE_MALLOC_FUNC (nbytes); } void * -calloc (size_t elements, size_t sizeof_elements) +ACE_OS::calloc (size_t elements, size_t sizeof_elements) { #if !defined (ACE_HAS_WINCE) return ACE_CALLOC_FUNC (elements, sizeof_elements); @@ -34,15 +33,13 @@ calloc (size_t elements, size_t sizeof_elements) } void * -realloc (void *ptr, size_t nbytes) +ACE_OS::realloc (void *ptr, size_t nbytes) { return ACE_REALLOC_FUNC (ACE_MALLOC_T (ptr), nbytes); } void -free (void *ptr) +ACE_OS::free (void *ptr) { ACE_FREE_FUNC (ACE_MALLOC_T (ptr)); } - -} /* namespace ACE_OS */ diff --git a/ace/OS_Memory.inl b/ace/OS_Memory.inl index 5b4bea0d854..41c9105d495 100644 --- a/ace/OS_Memory.inl +++ b/ace/OS_Memory.inl @@ -5,9 +5,8 @@ # include "ace/os_include/os_unistd.h" #endif /* !ACE_LACKS_SBRK */ -namespace ACE_OS { ACE_INLINE void * -sbrk (int brk) +ACE_OS::sbrk (int brk) { #if defined (ACE_LACKS_SBRK) ACE_UNUSED_ARG (brk); @@ -16,4 +15,3 @@ 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 77b817e16dd..35098e54db9 100644 --- a/ace/OS_String.cpp +++ b/ace/OS_String.cpp @@ -21,9 +21,8 @@ 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 * -strnstr (const char *s1, const char *s2, size_t len2) +ACE_OS::strnstr (const char *s1, const char *s2, size_t len2) { // Substring length size_t len1 = ACE_OS::strlen (s1); @@ -46,7 +45,7 @@ strnstr (const char *s1, const char *s2, size_t len2) } const ACE_WCHAR_T * -strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len2) +ACE_OS::strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len2) { // Substring length size_t len1 = ACE_OS::strlen (s1); @@ -69,10 +68,10 @@ strnstr (const ACE_WCHAR_T *s1, const ACE_WCHAR_T *s2, size_t len2) } char * -strdup (const char *s) +ACE_OS::strdup (const char *s) { #if defined (ACE_HAS_STRDUP_EMULATION) - char *t = (char *) ACE_OS_Memory::malloc (ACE_OS::strlen (s) + 1); + char *t = (char *) ACE_OS::malloc (ACE_OS::strlen (s) + 1); if (t == 0) return 0; @@ -84,12 +83,12 @@ strdup (const char *s) #if defined (ACE_HAS_WCHAR) wchar_t * -strdup (const wchar_t *s) +ACE_OS::strdup (const wchar_t *s) { # if defined (ACE_LACKS_WCSDUP) wchar_t *buffer = - (wchar_t *) ACE_OS_Memory::malloc ((ACE_OS::strlen (s) + 1) - * sizeof (wchar_t)); + (wchar_t *) ACE_OS::malloc ((ACE_OS::strlen (s) + 1) + * sizeof (wchar_t)); if (buffer == 0) return 0; @@ -111,7 +110,7 @@ strdup (const wchar_t *s) * Just returns "Unknown Error" all the time. */ char * -strerror_emulation (int errnum) +ACE_OS::strerror_emulation (int errnum) { return "Unknown Error"; } @@ -119,7 +118,7 @@ strerror_emulation (int errnum) #if defined (ACE_LACKS_STRCHR) char * -strchr_emulation (char *s, int c) +ACE_OS::strchr_emulation (char *s, int c) { for (;;++s) { @@ -131,7 +130,7 @@ strchr_emulation (char *s, int c) } const char * -strchr_emulation (const char *s, int c) +ACE_OS::strchr_emulation (const char *s, int c) { for (;;++s) { @@ -144,7 +143,7 @@ strchr_emulation (const char *s, int c) #endif /* ACE_LACKS_STRCHR */ const char * -strnchr (const char *s, int c, size_t len) +ACE_OS::strnchr (const char *s, int c, size_t len) { for (size_t i = 0; i < len; i++) if (s[i] == c) @@ -154,7 +153,7 @@ strnchr (const char *s, int c, size_t len) } const ACE_WCHAR_T * -strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) +ACE_OS::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)) @@ -165,7 +164,7 @@ strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) #if defined (ACE_LACKS_STRRCHR) char * -strrchr_emulation (char *s, int c) +ACE_OS::strrchr_emulation (char *s, int c) { char *p = s + ACE_OS::strlen (s); @@ -179,7 +178,7 @@ strrchr_emulation (char *s, int c) } const char * -strrchr_emulation (const char *s, int c) +ACE_OS::strrchr_emulation (const char *s, int c) { const char *p = s + ACE_OS::strlen (s); @@ -195,7 +194,7 @@ strrchr_emulation (const char *s, int c) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR) const wchar_t * -wcsrchr_emulation (const wchar_t *s, wint_t c) +ACE_OS::wcsrchr_emulation (const wchar_t *s, wint_t c) { const wchar_t *p = s + ACE_OS::strlen (s); @@ -209,7 +208,7 @@ wcsrchr_emulation (const wchar_t *s, wint_t c) } wchar_t * -wcsrchr_emulation (wchar_t *s, wint_t c) +ACE_OS::wcsrchr_emulation (wchar_t *s, wint_t c) { wchar_t *p = s + ACE_OS::strlen (s); @@ -224,7 +223,7 @@ wcsrchr_emulation (wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSRCHR */ char * -strecpy (char *s, const char *t) +ACE_OS::strecpy (char *s, const char *t) { register char *dscan = s; register const char *sscan = t; @@ -237,7 +236,7 @@ strecpy (char *s, const char *t) #if defined (ACE_HAS_WCHAR) wchar_t * -strecpy (wchar_t *s, const wchar_t *t) +ACE_OS::strecpy (wchar_t *s, const wchar_t *t) { register wchar_t *dscan = s; register const wchar_t *sscan = t; @@ -251,7 +250,7 @@ strecpy (wchar_t *s, const wchar_t *t) #if defined (ACE_LACKS_STRCSPN) size_t -strcspn_emulation (const char *s, const char *reject) +ACE_OS::strcspn_emulation (const char *s, const char *reject) { const char *scan; const char *rej_scan; @@ -273,7 +272,7 @@ strcspn_emulation (const char *s, const char *reject) #if defined (ACE_LACKS_STRCASECMP) int -strcasecmp_emulation (const char *s, const char *t) +ACE_OS::strcasecmp_emulation (const char *s, const char *t) { const char *scan1 = s; const char *scan2 = t; @@ -303,7 +302,7 @@ strcasecmp_emulation (const char *s, const char *t) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP) int -wcsicmp_emulation (const wchar_t *s, const wchar_t *t) +ACE_OS::wcsicmp_emulation (const wchar_t *s, const wchar_t *t) { const wchar_t *scan1 = s; const wchar_t *scan2 = t; @@ -333,9 +332,9 @@ wcsicmp_emulation (const wchar_t *s, const wchar_t *t) #if defined (ACE_LACKS_STRCASECMP) int -strncasecmp_emulation (const char *s, - const char *t, - size_t len) +ACE_OS::strncasecmp_emulation (const char *s, + const char *t, + size_t len) { const char *scan1 = s; const char *scan2 = t; @@ -370,9 +369,9 @@ strncasecmp_emulation (const char *s, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP) int -wcsnicmp_emulation (const wchar_t *s, - const wchar_t *t, - size_t len) +ACE_OS::wcsnicmp_emulation (const wchar_t *s, + const wchar_t *t, + size_t len) { const wchar_t *scan1 = s; const wchar_t *scan2 = t; @@ -407,7 +406,7 @@ wcsnicmp_emulation (const wchar_t *s, #if !defined (ACE_HAS_REENTRANT_FUNCTIONS) char * -strtok_r_emulation (char *s, const char *tokens, char **lasts) +ACE_OS::strtok_r_emulation (char *s, const char *tokens, char **lasts) { if (s == 0) s = *lasts; @@ -430,7 +429,9 @@ strtok_r_emulation (char *s, const char *tokens, char **lasts) # if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSTOK) wchar_t* -strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) +ACE_OS::strtok_r_emulation (ACE_WCHAR_T *s, + const ACE_WCHAR_T *tokens, + ACE_WCHAR_T **lasts) { if (s == 0) s = *lasts; @@ -453,7 +454,7 @@ strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **las #if !defined (ACE_HAS_MEMCHR) const void * -memchr_emulation (const void *s, int c, size_t len) +ACE_OS::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; @@ -524,7 +525,7 @@ ACE_OS::itoa_emulation (int value, char *string, int radix) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_ITOW) wchar_t * -itow_emulation (int value, wchar_t *string, int radix) +ACE_OS::itow_emulation (int value, wchar_t *string, int radix) { wchar_t *e = string; wchar_t *b = string; @@ -576,7 +577,7 @@ itow_emulation (int value, wchar_t *string, int radix) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN) size_t -wcscspn_emulation (const wchar_t *s, const wchar_t *reject) +ACE_OS::wcscspn_emulation (const wchar_t *s, const wchar_t *reject) { const wchar_t *scan; const wchar_t *rej_scan; @@ -638,8 +639,8 @@ wcscspn_emulation (const wchar_t *s, const wchar_t *reject) #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT) wchar_t * -wcscat_emulation (wchar_t *destination, - const wchar_t *source) +ACE_OS::wcscat_emulation (wchar_t *destination, + const wchar_t *source) { wchar_t *save = destination; @@ -651,8 +652,8 @@ wcscat_emulation (wchar_t *destination, #if defined (ACE_LACKS_STRSPN) size_t -strspn_emulation (const char *string, - const char *charset) +ACE_OS::strspn_emulation (const char *string, + const char *charset) { const char *p = string; const char *spanp; @@ -670,8 +671,8 @@ cont: #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN) size_t -wcsspn_emulation (const wchar_t *string, - const wchar_t *charset) +ACE_OS::wcsspn_emulation (const wchar_t *string, + const wchar_t *charset) { const wchar_t *p = string; const wchar_t *spanp; @@ -689,8 +690,8 @@ cont: #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR) wchar_t * -wcsstr_emulation (const wchar_t *string, - const wchar_t *charset) +ACE_OS::wcsstr_emulation (const wchar_t *string, + const wchar_t *charset) { wchar_t c, sc; size_t len; @@ -715,7 +716,7 @@ wcsstr_emulation (const wchar_t *string, #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN) size_t -wcslen_emulation (const ACE_WCHAR_T *string) +ACE_OS::wcslen_emulation (const ACE_WCHAR_T *string) { const ACE_WCHAR_T *s; @@ -728,9 +729,9 @@ wcslen_emulation (const ACE_WCHAR_T *string) #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY) ACE_WCHAR_T * -wcsncpy_emulation (ACE_WCHAR_T *destination, - const ACE_WCHAR_T *source, - size_t len) +ACE_OS::wcsncpy_emulation (ACE_WCHAR_T *destination, + const ACE_WCHAR_T *source, + size_t len) { if (len != 0) { @@ -755,8 +756,8 @@ wcsncpy_emulation (ACE_WCHAR_T *destination, #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP) int -wcscmp_emulation (const ACE_WCHAR_T *string1, - const ACE_WCHAR_T *string2) +ACE_OS::wcscmp_emulation (const ACE_WCHAR_T *string1, + const ACE_WCHAR_T *string2) { while (*string1 == *string2++) if (*string1++ == 0) @@ -767,8 +768,8 @@ wcscmp_emulation (const ACE_WCHAR_T *string1, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY) wchar_t * -wcscpy_emulation (wchar_t *destination, - const wchar_t *source) +ACE_OS::wcscpy_emulation (wchar_t *destination, + const wchar_t *source) { wchar_t *save = destination; @@ -779,8 +780,8 @@ wcscpy_emulation (wchar_t *destination, #if defined (ACE_LACKS_STRPBRK) char * -strpbrk_emulation (const char *string, - const char *charset) +ACE_OS::strpbrk_emulation (const char *string, + const char *charset) { const char *scanp; int c, sc; @@ -798,8 +799,8 @@ strpbrk_emulation (const char *string, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK) wchar_t * -wcspbrk_emulation (const wchar_t *string, - const wchar_t *charset) +ACE_OS::wcspbrk_emulation (const wchar_t *string, + const wchar_t *charset) { const wchar_t *scanp; int c, sc; @@ -817,9 +818,9 @@ wcspbrk_emulation (const wchar_t *string, #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT) ACE_WCHAR_T * -wcsncat_emulation (ACE_WCHAR_T *destination, - const ACE_WCHAR_T *source, - size_t count) +ACE_OS::wcsncat_emulation (ACE_WCHAR_T *destination, + const ACE_WCHAR_T *source, + size_t count) { if (count != 0) { @@ -846,7 +847,7 @@ wcsncat_emulation (ACE_WCHAR_T *destination, #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR) wchar_t * -wcschr_emulation (const wchar_t *string, wint_t c) +ACE_OS::wcschr_emulation (const wchar_t *string, wint_t c) { for (;*string ; ++string) if (*string == ACE_static_cast (wchar_t, c)) @@ -858,9 +859,9 @@ wcschr_emulation (const wchar_t *string, wint_t c) #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP) int -wcsncmp_emulation (const ACE_WCHAR_T *s1, - const ACE_WCHAR_T *s2, - size_t len) +ACE_OS::wcsncmp_emulation (const ACE_WCHAR_T *s1, + const ACE_WCHAR_T *s2, + size_t len) { if (len == 0) return 0; @@ -879,7 +880,7 @@ wcsncmp_emulation (const ACE_WCHAR_T *s1, #if defined (ACE_LACKS_STRTOL) long -strtol_emulation (const char *nptr, char **endptr, int base) +ACE_OS::strtol_emulation (const char *nptr, char **endptr, int base) { register const char *s = nptr; register unsigned long acc; @@ -959,9 +960,9 @@ strtol_emulation (const char *nptr, char **endptr, int base) #if defined (ACE_LACKS_STRTOUL) unsigned long -strtoul_emulation (const char *nptr, - char **endptr, - register int base) +ACE_OS::strtoul_emulation (const char *nptr, + char **endptr, + register int base) { register const char *s = nptr; register unsigned long acc; @@ -1026,7 +1027,7 @@ strtoul_emulation (const char *nptr, #endif /* ACE_LACKS_STRTOUL */ char * -strsncpy (char *dst, const char *src, size_t maxlen) +ACE_OS::strsncpy (char *dst, const char *src, size_t maxlen) { register char *rdst = dst; register const char *rsrc = src; @@ -1050,7 +1051,7 @@ strsncpy (char *dst, const char *src, size_t maxlen) } ACE_WCHAR_T * -strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen) +ACE_OS::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; @@ -1072,4 +1073,3 @@ strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen) } return dst; } -} /* namespace ACE_OS */ diff --git a/ace/OS_String.inl b/ace/OS_String.inl index 37b63cfd54b..e2bb2c1b6c4 100644 --- a/ace/OS_String.inl +++ b/ace/OS_String.inl @@ -24,9 +24,8 @@ #include "ace/os_include/os_strings.h" #include "ace/os_include/os_ctype.h" -namespace ACE_OS { ACE_INLINE const void * -memchr (const void *s, int c, size_t len) +ACE_OS::memchr (const void *s, int c, size_t len) { #if defined (ACE_HAS_MEMCHR) return ::memchr (s, c, len); @@ -36,7 +35,7 @@ memchr (const void *s, int c, size_t len) } ACE_INLINE void * -memchr (void *s, int c, size_t len) +ACE_OS::memchr (void *s, int c, size_t len) { return ACE_const_cast (void *, ACE_OS::memchr (ACE_static_cast (const void *, s), c, len)); @@ -44,39 +43,39 @@ memchr (void *s, int c, size_t len) ACE_INLINE int -memcmp (const void *t, const void *s, size_t len) +ACE_OS::memcmp (const void *t, const void *s, size_t len) { return ::memcmp (t, s, len); } ACE_INLINE void * -memcpy (void *t, const void *s, size_t len) +ACE_OS::memcpy (void *t, const void *s, size_t len) { return ::memcpy (t, s, len); } ACE_INLINE void * -memmove (void *t, const void *s, size_t len) +ACE_OS::memmove (void *t, const void *s, size_t len) { return ::memmove (t, s, len); } ACE_INLINE void * -memset (void *s, int c, size_t len) +ACE_OS::memset (void *s, int c, size_t len) { return ::memset (s, c, len); } ACE_INLINE char * -strcat (char *s, const char *t) +ACE_OS::strcat (char *s, const char *t) { return ::strcat (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -strcat (wchar_t *s, const wchar_t *t) +ACE_OS::strcat (wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSCAT) return ACE_OS::wcscat_emulation (s, t); @@ -87,7 +86,7 @@ strcat (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE const char * -strchr (const char *s, int c) +ACE_OS::strchr (const char *s, int c) { #if defined (ACE_LACKS_STRCHR) return ACE_OS::strchr_emulation (s, c); @@ -98,7 +97,7 @@ strchr (const char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -strchr (const wchar_t *s, wint_t c) +ACE_OS::strchr (const wchar_t *s, wint_t c) { # if defined (ACE_LACKS_WCSCHR) return ACE_OS::wcschr_emulation (s, c); @@ -109,7 +108,7 @@ strchr (const wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strchr (char *s, int c) +ACE_OS::strchr (char *s, int c) { #if defined (ACE_LACKS_STRCHR) return ACE_OS::strchr_emulation (s, c); @@ -120,7 +119,7 @@ strchr (char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -strchr (wchar_t *s, wint_t c) +ACE_OS::strchr (wchar_t *s, wint_t c) { return ACE_const_cast (wchar_t *, ACE_OS::strchr (ACE_static_cast (const wchar_t *, s), c)); @@ -128,13 +127,13 @@ strchr (wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -strcmp (const char *s, const char *t) +ACE_OS::strcmp (const char *s, const char *t) { return ::strcmp (s, t); } ACE_INLINE int -strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t) +ACE_OS::strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP) return ACE_OS::wcscmp_emulation (s, t); @@ -144,14 +143,14 @@ strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t) } ACE_INLINE char * -strcpy (char *s, const char *t) +ACE_OS::strcpy (char *s, const char *t) { return ::strcpy (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -strcpy (wchar_t *s, const wchar_t *t) +ACE_OS::strcpy (wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSCPY) return ACE_OS::wcscpy_emulation (s, t); @@ -162,7 +161,7 @@ strcpy (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE size_t -strcspn (const char *s, const char *reject) +ACE_OS::strcspn (const char *s, const char *reject) { #if defined (ACE_LACKS_STRCSPN) return ACE_OS::strcspn_emulation (s, reject); @@ -173,7 +172,7 @@ strcspn (const char *s, const char *reject) #if defined (ACE_HAS_WCHAR) ACE_INLINE size_t -strcspn (const wchar_t *s, const wchar_t *reject) +ACE_OS::strcspn (const wchar_t *s, const wchar_t *reject) { # if defined (ACE_LACKS_WCSCSPN) return ACE_OS::wcscspn_emulation (s, reject); @@ -184,7 +183,7 @@ strcspn (const wchar_t *s, const wchar_t *reject) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strerror (int errnum) +ACE_OS::strerror (int errnum) { #if defined (ACE_LACKS_STRERROR) return ACE_OS::strerror_emulation (errnum); @@ -194,13 +193,13 @@ strerror (int errnum) } ACE_INLINE size_t -strlen (const char *s) +ACE_OS::strlen (const char *s) { return ::strlen (s); } ACE_INLINE size_t -strlen (const ACE_WCHAR_T *s) +ACE_OS::strlen (const ACE_WCHAR_T *s) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN) return ACE_OS::wcslen_emulation (s); @@ -210,7 +209,7 @@ strlen (const ACE_WCHAR_T *s) } ACE_INLINE size_t -strnlen (const char *s, size_t maxlen) +ACE_OS::strnlen (const char *s, size_t maxlen) { #if defined (ACE_HAS_STRNLEN) return ::strnlen (s, maxlen); @@ -224,7 +223,7 @@ strnlen (const char *s, size_t maxlen) } ACE_INLINE size_t -strnlen (const ACE_WCHAR_T *s, size_t maxlen) +ACE_OS::strnlen (const ACE_WCHAR_T *s, size_t maxlen) { #if defined (ACE_HAS_WCHAR) && defined (ACE_HAS_WCSNLEN) return wcsnlen (s, maxlen); @@ -238,13 +237,13 @@ strnlen (const ACE_WCHAR_T *s, size_t maxlen) } ACE_INLINE char * -strncat (char *s, const char *t, size_t len) +ACE_OS::strncat (char *s, const char *t, size_t len) { return ::strncat (s, t, len); } ACE_INLINE ACE_WCHAR_T * -strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +ACE_OS::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::wcsncat_emulation (s, t, len); @@ -254,13 +253,13 @@ strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) } ACE_INLINE int -strncmp (const char *s, const char *t, size_t len) +ACE_OS::strncmp (const char *s, const char *t, size_t len) { return ::strncmp (s, t, len); } ACE_INLINE int -strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +ACE_OS::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::wcsncmp_emulation (s, t, len); @@ -270,13 +269,13 @@ strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) } ACE_INLINE char * -strncpy (char *s, const char *t, size_t len) +ACE_OS::strncpy (char *s, const char *t, size_t len) { return ::strncpy (s, t, len); } ACE_INLINE ACE_WCHAR_T * -strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +ACE_OS::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::wcsncpy_emulation (s, t, len); @@ -286,7 +285,7 @@ strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) } ACE_INLINE const char * -strpbrk (const char *s1, const char *s2) +ACE_OS::strpbrk (const char *s1, const char *s2) { #if defined (ACE_LACKS_STRPBRK) return ACE_OS::strpbrk_emulation (s1, s2); @@ -297,7 +296,7 @@ strpbrk (const char *s1, const char *s2) #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -strpbrk (const wchar_t *s, const wchar_t *t) +ACE_OS::strpbrk (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSPBRK) return ACE_OS::wcspbrk_emulation (s, t); @@ -308,7 +307,7 @@ strpbrk (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strpbrk (char *s1, const char *s2) +ACE_OS::strpbrk (char *s1, const char *s2) { #if defined (ACE_LACKS_STRPBRK) return ACE_OS::strpbrk_emulation (s1, s2); @@ -319,7 +318,7 @@ strpbrk (char *s1, const char *s2) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -strpbrk (wchar_t *s, const wchar_t *t) +ACE_OS::strpbrk (wchar_t *s, const wchar_t *t) { return ACE_const_cast (wchar_t *, ACE_OS::strpbrk (ACE_static_cast (const wchar_t *, s), t)); @@ -327,7 +326,7 @@ strpbrk (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE const char * -strrchr (const char *s, int c) +ACE_OS::strrchr (const char *s, int c) { #if defined (ACE_LACKS_STRRCHR) return ACE_OS::strrchr_emulation (s, c); @@ -338,7 +337,7 @@ strrchr (const char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -strrchr (const wchar_t *s, wint_t c) +ACE_OS::strrchr (const wchar_t *s, wint_t c) { #if defined (ACE_LACKS_WCSRCHR) return ACE_OS::wcsrchr_emulation (s, c); @@ -349,7 +348,7 @@ strrchr (const wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strrchr (char *s, int c) +ACE_OS::strrchr (char *s, int c) { #if defined (ACE_LACKS_STRRCHR) return ACE_OS::strrchr_emulation (s, c); @@ -360,7 +359,7 @@ strrchr (char *s, int c) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -strrchr (wchar_t *s, wint_t c) +ACE_OS::strrchr (wchar_t *s, wint_t c) { return ACE_const_cast (wchar_t *, ACE_OS::strrchr (ACE_static_cast (const wchar_t *, s), c)); @@ -368,7 +367,7 @@ strrchr (wchar_t *s, wint_t c) #endif /* ACE_HAS_WCHAR */ ACE_INLINE size_t -strspn (const char *s, const char *t) +ACE_OS::strspn (const char *s, const char *t) { #if defined (ACE_LACKS_STRSPN) return ACE_OS::strspn_emulation (s, t); @@ -379,7 +378,7 @@ strspn (const char *s, const char *t) #if defined (ACE_HAS_WCHAR) ACE_INLINE size_t -strspn (const wchar_t *s, const wchar_t *t) +ACE_OS::strspn (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSPN) return ACE_OS::wcsspn_emulation (s, t); @@ -390,14 +389,14 @@ strspn (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE const char * -strstr (const char *s, const char *t) +ACE_OS::strstr (const char *s, const char *t) { return (const char *) ::strstr (s, t); } #if defined (ACE_HAS_WCHAR) ACE_INLINE const wchar_t * -strstr (const wchar_t *s, const wchar_t *t) +ACE_OS::strstr (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSTR) return ACE_OS::wcsstr_emulation (s, t); @@ -410,7 +409,7 @@ strstr (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strstr (char *s, const char *t) +ACE_OS::strstr (char *s, const char *t) { return ::strstr (s, t); } @@ -430,14 +429,14 @@ strstr (wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strtok (char *s, const char *tokens) +ACE_OS::strtok (char *s, const char *tokens) { return ::strtok (s, tokens); } #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK) ACE_INLINE wchar_t * -strtok (wchar_t *s, const wchar_t *tokens) +ACE_OS::strtok (wchar_t *s, const wchar_t *tokens) { #if defined (ACE_HAS_3_PARAM_WCSTOK) static wchar_t *lasts; @@ -449,7 +448,7 @@ strtok (wchar_t *s, const wchar_t *tokens) #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOK */ ACE_INLINE int -ace_isprint (const ACE_TCHAR c) +ACE_OS::ace_isprint (const ACE_TCHAR c) { #if defined (ACE_USES_WCHAR) return iswprint (c); @@ -459,7 +458,7 @@ ace_isprint (const ACE_TCHAR c) } ACE_INLINE int -ace_isspace (const ACE_TCHAR c) +ACE_OS::ace_isspace (const ACE_TCHAR c) { #if defined (ACE_USES_WCHAR) return iswspace (c); @@ -469,21 +468,21 @@ ace_isspace (const ACE_TCHAR c) } ACE_INLINE int -to_lower (int c) +ACE_OS::to_lower (int c) { return tolower (c); } #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER) ACE_INLINE wint_t -to_lower (wint_t c) +ACE_OS::to_lower (wint_t c) { return towlower (c); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */ ACE_INLINE char * -itoa (int value, char *string, int radix) +ACE_OS::itoa (int value, char *string, int radix) { #if !defined (ACE_HAS_ITOA) return ACE_OS::itoa_emulation (value, string, radix); @@ -496,7 +495,7 @@ itoa (int value, char *string, int radix) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t * -itoa (int value, wchar_t *string, int radix) +ACE_OS::itoa (int value, wchar_t *string, int radix) { #if defined (ACE_LACKS_ITOW) return ACE_OS::itow_emulation (value, string, radix); @@ -507,7 +506,7 @@ itoa (int value, wchar_t *string, int radix) #endif /* ACE_HAS_WCHAR */ ACE_INLINE int -strcasecmp (const char *s, const char *t) +ACE_OS::strcasecmp (const char *s, const char *t) { #if defined (ACE_LACKS_STRCASECMP) return ACE_OS::strcasecmp_emulation (s, t); @@ -520,7 +519,7 @@ strcasecmp (const char *s, const char *t) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -strcasecmp (const wchar_t *s, const wchar_t *t) +ACE_OS::strcasecmp (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSICMP) return ACE_OS::wcsicmp_emulation (s, t); @@ -531,7 +530,7 @@ strcasecmp (const wchar_t *s, const wchar_t *t) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strnchr (char *s, int c, size_t len) +ACE_OS::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; @@ -544,14 +543,14 @@ strnchr (char *s, int c, size_t len) } ACE_INLINE ACE_WCHAR_T * -strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) +ACE_OS::strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) { return ACE_const_cast (ACE_WCHAR_T *, ACE_OS::strnchr (ACE_static_cast (const ACE_WCHAR_T *, s), c, len)); } ACE_INLINE int -strncasecmp (const char *s, const char *t, size_t len) +ACE_OS::strncasecmp (const char *s, const char *t, size_t len) { #if defined (ACE_LACKS_STRCASECMP) return ACE_OS::strncasecmp_emulation (s, t, len); @@ -564,7 +563,7 @@ strncasecmp (const char *s, const char *t, size_t len) #if defined (ACE_HAS_WCHAR) ACE_INLINE int -strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) +ACE_OS::strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) { #if defined (ACE_LACKS_WCSNICMP) return ACE_OS::wcsnicmp_emulation (s, t, len); @@ -575,7 +574,7 @@ strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) #endif /* ACE_HAS_WCHAR */ ACE_INLINE char * -strnstr (char *s, const char *t, size_t len) +ACE_OS::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; @@ -586,14 +585,14 @@ strnstr (char *s, const char *t, size_t len) } ACE_INLINE ACE_WCHAR_T * -strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) +ACE_OS::strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) { return ACE_const_cast (ACE_WCHAR_T *, ACE_OS::strnstr (ACE_static_cast (const ACE_WCHAR_T *, s), t, len)); } ACE_INLINE char * -strtok_r (char *s, const char *tokens, char **lasts) +ACE_OS::strtok_r (char *s, const char *tokens, char **lasts) { #if defined (ACE_HAS_REENTRANT_FUNCTIONS) return ::strtok_r (s, tokens, lasts); @@ -604,7 +603,7 @@ strtok_r (char *s, const char *tokens, char **lasts) #if defined (ACE_HAS_WCHAR) ACE_INLINE wchar_t* -strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) +ACE_OS::strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) { #if defined (ACE_LACKS_WCSTOK) return ACE_OS::strtok_r_emulation (s, tokens, lasts); @@ -621,7 +620,7 @@ strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) #if !defined (ACE_LACKS_STRTOD) ACE_INLINE double -strtod (const char *s, char **endptr) +ACE_OS::strtod (const char *s, char **endptr) { return ::strtod (s, endptr); } @@ -629,14 +628,14 @@ strtod (const char *s, char **endptr) #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOD) ACE_INLINE double -strtod (const wchar_t *s, wchar_t **endptr) +ACE_OS::strtod (const wchar_t *s, wchar_t **endptr) { return ::wcstod (s, endptr); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */ ACE_INLINE long -strtol (const char *s, char **ptr, int base) +ACE_OS::strtol (const char *s, char **ptr, int base) { #if defined (ACE_LACKS_STRTOL) return ACE_OS::strtol_emulation (s, ptr, base); @@ -647,14 +646,14 @@ strtol (const char *s, char **ptr, int base) #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOL) ACE_INLINE long -strtol (const wchar_t *s, wchar_t **ptr, int base) +ACE_OS::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 -strtoul (const char *s, char **ptr, int base) +ACE_OS::strtoul (const char *s, char **ptr, int base) { #if defined (ACE_LACKS_STRTOUL) return ACE_OS::strtoul_emulation (s, ptr, base); @@ -665,9 +664,8 @@ strtoul (const char *s, char **ptr, int base) #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOUL) ACE_INLINE unsigned long -strtoul (const wchar_t *s, wchar_t **ptr, int base) +ACE_OS::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.inl b/ace/OS_TLI.inl index 51d28041afb..4b8ff91bbde 100644 --- a/ace/OS_TLI.inl +++ b/ace/OS_TLI.inl @@ -1,12 +1,10 @@ /* -*- C++ -*- */ // $Id$ -namespace ACE_OS { - ACE_INLINE int -t_accept (ACE_HANDLE handle, - ACE_HANDLE reshandle, - struct t_call *call) +ACE_OS::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); @@ -20,8 +18,8 @@ t_accept (ACE_HANDLE handle, } ACE_INLINE char * -t_alloc (ACE_HANDLE handle, int struct_type, - int fields) +ACE_OS::t_alloc (ACE_HANDLE handle, int struct_type, + int fields) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_alloc (handle, struct_type, fields), @@ -36,8 +34,8 @@ t_alloc (ACE_HANDLE handle, int struct_type, } ACE_INLINE int -t_bind (ACE_HANDLE handle, struct t_bind *req, - struct t_bind *ret) +ACE_OS::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); @@ -51,7 +49,7 @@ t_bind (ACE_HANDLE handle, struct t_bind *req, } ACE_INLINE int -t_close (ACE_HANDLE handle) +ACE_OS::t_close (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_close (handle), int, -1); @@ -63,9 +61,9 @@ t_close (ACE_HANDLE handle) } ACE_INLINE int -t_connect(ACE_HANDLE fildes, - struct t_call *sndcall, - struct t_call *rcvcall) +ACE_OS::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); @@ -79,7 +77,7 @@ t_connect(ACE_HANDLE fildes, } ACE_INLINE void -t_error (const char *errmsg) +ACE_OS::t_error (const char *errmsg) { #if defined (ACE_HAS_TLI) #if defined (ACE_HAS_BROKEN_T_ERROR) @@ -93,7 +91,7 @@ t_error (const char *errmsg) } ACE_INLINE int -t_free (char *ptr, int struct_type) +ACE_OS::t_free (char *ptr, int struct_type) { #if defined (ACE_HAS_TLI) if (ptr == 0) @@ -108,7 +106,7 @@ t_free (char *ptr, int struct_type) } ACE_INLINE int -t_getinfo (ACE_HANDLE handle, struct t_info *info) +ACE_OS::t_getinfo (ACE_HANDLE handle, struct t_info *info) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_getinfo (handle, info), int, -1); @@ -121,9 +119,9 @@ t_getinfo (ACE_HANDLE handle, struct t_info *info) } ACE_INLINE int -t_getname (ACE_HANDLE handle, - struct netbuf *namep, - int type) +ACE_OS::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); @@ -137,7 +135,7 @@ t_getname (ACE_HANDLE handle, } ACE_INLINE int -t_getstate (ACE_HANDLE handle) +ACE_OS::t_getstate (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_getstate (handle), int, -1); @@ -149,7 +147,7 @@ t_getstate (ACE_HANDLE handle) } ACE_INLINE int -t_listen (ACE_HANDLE handle, struct t_call *call) +ACE_OS::t_listen (ACE_HANDLE handle, struct t_call *call) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_listen (handle, call), int, -1); @@ -162,7 +160,7 @@ t_listen (ACE_HANDLE handle, struct t_call *call) } ACE_INLINE int -t_look (ACE_HANDLE handle) +ACE_OS::t_look (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_look (handle), int, -1); @@ -174,7 +172,7 @@ t_look (ACE_HANDLE handle) } ACE_INLINE ACE_HANDLE -t_open (char *path, int oflag, struct t_info *info) +ACE_OS::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); @@ -188,9 +186,9 @@ t_open (char *path, int oflag, struct t_info *info) } ACE_INLINE int -t_optmgmt (ACE_HANDLE handle, - struct t_optmgmt *req, - struct t_optmgmt *ret) +ACE_OS::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); @@ -204,10 +202,10 @@ t_optmgmt (ACE_HANDLE handle, } ACE_INLINE int -t_rcv (ACE_HANDLE handle, - char *buf, - unsigned int nbytes, - int *flags) +ACE_OS::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), @@ -223,7 +221,7 @@ t_rcv (ACE_HANDLE handle, } ACE_INLINE int -t_rcvdis (ACE_HANDLE handle, struct t_discon *discon) +ACE_OS::t_rcvdis (ACE_HANDLE handle, struct t_discon *discon) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvdis (handle, discon), int, -1); @@ -236,7 +234,7 @@ t_rcvdis (ACE_HANDLE handle, struct t_discon *discon) } ACE_INLINE int -t_rcvrel (ACE_HANDLE handle) +ACE_OS::t_rcvrel (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvrel (handle), int, -1); @@ -248,9 +246,9 @@ t_rcvrel (ACE_HANDLE handle) } ACE_INLINE int -t_rcvudata (ACE_HANDLE handle, - struct t_unitdata *unitdata, - int *flags) +ACE_OS::t_rcvudata (ACE_HANDLE handle, + struct t_unitdata *unitdata, + int *flags) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvudata (handle, unitdata, flags), @@ -265,7 +263,7 @@ t_rcvudata (ACE_HANDLE handle, } ACE_INLINE int -t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr) +ACE_OS::t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_rcvuderr (handle, uderr), int, -1); @@ -278,10 +276,10 @@ t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr) } ACE_INLINE int -t_snd (ACE_HANDLE handle, - const char *buf, - unsigned int nbytes, - int flags) +ACE_OS::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); @@ -296,7 +294,7 @@ t_snd (ACE_HANDLE handle, } ACE_INLINE int -t_snddis (ACE_HANDLE handle, struct t_call *call) +ACE_OS::t_snddis (ACE_HANDLE handle, struct t_call *call) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_snddis (handle, call), int, -1); @@ -309,7 +307,7 @@ t_snddis (ACE_HANDLE handle, struct t_call *call) } ACE_INLINE int -t_sndrel (ACE_HANDLE handle) +ACE_OS::t_sndrel (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_sndrel (handle), int, -1); @@ -321,7 +319,7 @@ t_sndrel (ACE_HANDLE handle) } ACE_INLINE int -t_sync (ACE_HANDLE handle) +ACE_OS::t_sync (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_sync (handle), int, -1); @@ -333,7 +331,7 @@ t_sync (ACE_HANDLE handle) } ACE_INLINE int -t_unbind (ACE_HANDLE handle) +ACE_OS::t_unbind (ACE_HANDLE handle) { #if defined (ACE_HAS_TLI) ACE_OSCALL_RETURN (::t_unbind (handle), int, -1); @@ -343,5 +341,3 @@ t_unbind (ACE_HANDLE handle) ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_TLI */ } - -} /* namespace ACE_OS */ |