summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-01 23:42:24 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-01 23:42:24 +0000
commitb5f2f9f0ee63c33455954bd7b4cd9c5d0f29ec20 (patch)
tree0a6b58fa305309e3b782293397fc26e534db9b00
parent7232ec93c2ee3ff71a0e85466752a37751ef1297 (diff)
downloadATCD-b5f2f9f0ee63c33455954bd7b4cd9c5d0f29ec20.tar.gz
ChangeLogTag:Sat Nov 1 23:45:49 UTC 2003 Don Hinton <dhinton@dresystems.com>
-rw-r--r--ChangeLog43
-rw-r--r--ace/ACE_export.h9
-rw-r--r--ace/OS_NS_Thread.h241
-rw-r--r--ace/OS_NS_arpa_inet.h15
-rw-r--r--ace/OS_NS_arpa_inet.inl50
-rw-r--r--ace/OS_NS_ctype.h11
-rw-r--r--ace/OS_NS_dirent.h29
-rw-r--r--ace/OS_NS_dlfcn.h10
-rw-r--r--ace/OS_NS_errno.h10
-rw-r--r--ace/OS_NS_fcntl.h9
-rw-r--r--ace/OS_NS_math.h9
-rw-r--r--ace/OS_NS_netdb.h46
-rw-r--r--ace/OS_NS_poll.h9
-rw-r--r--ace/OS_NS_pwd.h11
-rw-r--r--ace/OS_NS_regex.h10
-rw-r--r--ace/OS_NS_signal.h17
-rw-r--r--ace/OS_NS_stdio.h61
-rw-r--r--ace/OS_NS_stdlib.h54
-rw-r--r--ace/OS_NS_string.h78
-rw-r--r--ace/OS_NS_strings.h12
-rw-r--r--ace/OS_NS_stropts.h22
-rw-r--r--ace/OS_NS_sys_mman.h18
-rw-r--r--ace/OS_NS_sys_msg.h13
-rw-r--r--ace/OS_NS_sys_resource.h9
-rw-r--r--ace/OS_NS_sys_select.h9
-rw-r--r--ace/OS_NS_sys_shm.h13
-rw-r--r--ace/OS_NS_sys_socket.h37
-rw-r--r--ace/OS_NS_sys_stat.h15
-rw-r--r--ace/OS_NS_sys_time.h7
-rw-r--r--ace/OS_NS_sys_uio.h10
-rw-r--r--ace/OS_NS_sys_utsname.h12
-rw-r--r--ace/OS_NS_sys_wait.h9
-rw-r--r--ace/OS_NS_time.h35
-rw-r--r--ace/OS_NS_unistd.h73
-rw-r--r--ace/OS_NS_wchar.h58
-rw-r--r--ace/OS_TLI.h117
36 files changed, 1078 insertions, 113 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a8cf9d4736..0a5b6c65006 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+Sat Nov 1 23:45:49 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/ACE_export.h:
+ Added ACE_NAMESPACE_INLINE_FUNCTION and ACE_NAMESPACE_STORAGE_CLASS
+ macros to help control exporting of symbols from namespaces on
+ Windows.
+
+ * ace/OS_NS_Thread.h:
+ * ace/OS_NS_arpa_inet.{h,inl}:
+ * ace/OS_NS_ctype.h:
+ * ace/OS_NS_dirent.h:
+ * ace/OS_NS_dlfcn.h:
+ * ace/OS_NS_errno.h:
+ * ace/OS_NS_fcntl.h:
+ * ace/OS_NS_math.h:
+ * ace/OS_NS_netdb.h:
+ * ace/OS_NS_poll.h:
+ * ace/OS_NS_pwd.h:
+ * ace/OS_NS_regex.h:
+ * ace/OS_NS_signal.h:
+ * ace/OS_NS_stdio.h:
+ * ace/OS_NS_stdlib.h:
+ * ace/OS_NS_string.h:
+ * ace/OS_NS_strings.h:
+ * ace/OS_NS_stropts.h:
+ * ace/OS_NS_sys_mman.h:
+ * ace/OS_NS_sys_msg.h:
+ * ace/OS_NS_sys_resource.h:
+ * ace/OS_NS_sys_select.h:
+ * ace/OS_NS_sys_shm.h:
+ * ace/OS_NS_sys_socket.h:
+ * ace/OS_NS_sys_stat.h:
+ * ace/OS_NS_sys_time.h:
+ * ace/OS_NS_sys_uio.h:
+ * ace/OS_NS_sys_utsname.h:
+ * ace/OS_NS_sys_wait.h:
+ * ace/OS_NS_time.h:
+ * ace/OS_NS_unistd.h:
+ * ace/OS_NS_wchar.h:
+ * ace/OS_TLI.h:
+ Added extern ACE_Export to non-inlined method prototypes and
+ ACE_NAMESPACE_INLINE_FUNCTION to inlined ones.
+
Sat Nov 1 18:18:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/config-win32-mingw.h:
diff --git a/ace/ACE_export.h b/ace/ACE_export.h
index 9783eab8fc9..9a0adfb2b22 100644
--- a/ace/ACE_export.h
+++ b/ace/ACE_export.h
@@ -41,6 +41,15 @@
# define ACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
#endif /* ACE_HAS_DLL */
+// Added by hand to help with ACE_OS namespace
+#define ACE_NAMESPACE_STORAGE_CLASS extern ACE_EXPORT_MACRO
+
+#if defined (_MSC_VER) && defined (__ACE_INLINE__)
+# define ACE_NAMESPACE_INLINE_FUNCTION inline
+#else
+# define ACE_NAMESPACE_INLINE_FUNCTION ACE_NAMESPACE_STORAGE_CLASS
+#endif
+
#endif /* ACE_EXPORT_H */
// End of auto generated file.
diff --git a/ace/OS_NS_Thread.h b/ace/OS_NS_Thread.h
index 530fafd662d..fe15fbb3270 100644
--- a/ace/OS_NS_Thread.h
+++ b/ace/OS_NS_Thread.h
@@ -34,6 +34,12 @@
# include "ace/os_include/os_semaphore.h"
# include "ace/OS_Memory.h"
# include "ace/OS_NS_signal.h"
+# include "ace/ACE_export.h"
+
+# if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+# endif
+# define ACE_EXPORT_MACRO ACE_Export
# if defined (ACE_HAS_PRIOCNTL)
// Need to #include thread.h before #defining THR_BOUND, etc.,
@@ -62,7 +68,7 @@ typedef struct
# if defined (ACE_PSOS)
// Wrapper for NT events on pSOS.
-class ACE_OS_Export ACE_event_t
+class ACE_Export ACE_event_t
{
protected:
@@ -131,11 +137,11 @@ typedef sema_t ACE_sema_t;
# endif /* !ACE_HAS_POSIX_SEM */
typedef cond_t ACE_cond_t;
-struct ACE_OS_Export ACE_condattr_t
+struct ACE_Export ACE_condattr_t
{
int type;
};
-struct ACE_OS_Export ACE_mutexattr_t
+struct ACE_Export ACE_mutexattr_t
{
int type;
};
@@ -164,7 +170,7 @@ typedef u_long ACE_hthread_t;
# if defined (ACE_PSOS_HAS_COND_T)
typedef u_long ACE_cond_t;
typedef u_long ACE_condattr_t;
-struct ACE_OS_Export ACE_mutexattr_t
+struct ACE_Export ACE_mutexattr_t
{
int type;
};
@@ -222,11 +228,6 @@ typedef u_int ACE_thread_key_t;
/* #define T_NOFPU 0x00000000 Not using FPU */
/* #define T_FPU 0x00000002 Using FPU bit */
-
-
-
-
-
# elif defined (VXWORKS)
# include /**/ <sysLib.h> // for sysClkRateGet()
# include /**/ <taskLib.h>
@@ -332,7 +333,7 @@ typedef HANDLE ACE_sema_t;
*
* @brief Semaphore simulation for Windows CE.
*/
-class ACE_OS_Export ACE_sema_t
+class ACE_Export ACE_sema_t
{
public:
/// Serializes access to <count_>.
@@ -384,7 +385,7 @@ public:
* At the current time, this stuff only works for threads
* within the same process.
*/
-class ACE_OS_Export ACE_cond_t
+class ACE_Export ACE_cond_t
{
public:
@@ -423,12 +424,12 @@ public:
size_t was_broadcast_;
};
-struct ACE_OS_Export ACE_condattr_t
+struct ACE_Export ACE_condattr_t
{
int type;
};
-struct ACE_OS_Export ACE_mutexattr_t
+struct ACE_Export ACE_mutexattr_t
{
int type;
};
@@ -445,7 +446,7 @@ struct ACE_OS_Export ACE_mutexattr_t
* At the current time, this stuff only works for threads
* within the same process.
*/
-struct ACE_OS_Export ACE_rwlock_t
+struct ACE_Export ACE_rwlock_t
{
public:
//protected:
@@ -644,11 +645,11 @@ struct ACE_recursive_mutex_state
// These are dummies needed for class OS.h
typedef int ACE_cond_t;
-struct ACE_OS_Export ACE_condattr_t
+struct ACE_Export ACE_condattr_t
{
int type;
};
-struct ACE_OS_Export ACE_mutexattr_t
+struct ACE_Export ACE_mutexattr_t
{
int type;
};
@@ -683,7 +684,7 @@ typedef unsigned int ACE_thread_key_t;
*
* @brief Defines a platform-independent thread ID.
*/
-class ACE_OS_Export ACE_Thread_ID
+class ACE_Export ACE_Thread_ID
{
public:
// = Initialization method.
@@ -782,7 +783,7 @@ class ACE_TSS_Keys;
* native TSS, or have a TSS with limitations such as the
* number of keys or lack of support for removing keys.
*/
-class ACE_OS_Export ACE_TSS_Emulation
+class ACE_Export ACE_TSS_Emulation
{
public:
typedef void (*ACE_TSS_DESTRUCTOR)(void *value) /* throw () */;
@@ -1033,10 +1034,10 @@ extern "C" ACE_OS_Export void ace_mutex_lock_cleanup_adapter (void *args);
# define ACE_PTHREAD_CLEANUP_POP(A)
# endif /* ACE_HAS_THR_C_FUNC */
-#if !defined (ACE_WIN32)
+# if !defined (ACE_WIN32)
// forward decl's
class ACE_event_t;
-#endif
+# endif
namespace ACE_OS {
@@ -1071,20 +1072,20 @@ namespace ACE_OS {
/// This is necessary to deal with POSIX pthreads and their use of
/// structures for thread ids.
- extern ACE_thread_t NULL_thread;
+ extern ACE_Export ACE_thread_t NULL_thread;
/// This is necessary to deal with POSIX pthreads and their use of
/// structures for thread handles.
- extern ACE_hthread_t NULL_hthread;
+ extern ACE_Export ACE_hthread_t NULL_hthread;
/// This is necessary to deal with POSIX pthreads and their use of
/// structures for TSS keys.
- extern ACE_thread_key_t NULL_key;
+ extern ACE_Export ACE_thread_key_t NULL_key;
# if defined (CHORUS)
/// This is used to map an actor's id into a KnCap for killing and
/// waiting actors.
- KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS];
+ extern ACE_Export KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS];
# endif /* CHORUS */
//@}
@@ -1093,50 +1094,130 @@ namespace ACE_OS {
* thread is the main thread, then the argument must be 1.
* For private use of ACE_Object_Manager and ACE_Thread_Adapter only.
*/
+ extern ACE_Export
void cleanup_tss (const u_int main_thread);
//@{ @name A set of wrappers for condition variables.
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int condattr_init (ACE_condattr_t &attributes,
int type = ACE_DEFAULT_SYNCH_TYPE);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int condattr_destroy (ACE_condattr_t &attributes);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_broadcast (ACE_cond_t *cv);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_destroy (ACE_cond_t *cv);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_init (ACE_cond_t *cv,
short type = ACE_DEFAULT_SYNCH_TYPE,
const char *name = 0,
void *arg = 0);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_init (ACE_cond_t *cv,
ACE_condattr_t &attributes,
const char *name = 0,
void *arg = 0);
+
# if defined (ACE_HAS_WCHAR)
+# if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+# else
+ ACE_NAMESPACE_INLINE_FUNCTION
+# endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_init (ACE_cond_t *cv,
short type,
const wchar_t *name,
void *arg = 0);
+
+# if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+# else
+ ACE_NAMESPACE_INLINE_FUNCTION
+# endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_init (ACE_cond_t *cv,
ACE_condattr_t &attributes,
const wchar_t *name,
void *arg = 0);
# endif /* ACE_HAS_WCHAR */
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_signal (ACE_cond_t *cv);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_timedwait (ACE_cond_t *cv,
ACE_mutex_t *m,
ACE_Time_Value *);
+
+#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_wait (ACE_cond_t *cv,
ACE_mutex_t *m);
+
# if defined (ACE_WIN32) && defined (ACE_HAS_WTHREADS)
+# if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+# else
+ ACE_NAMESPACE_INLINE_FUNCTION
+# endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_timedwait (ACE_cond_t *cv,
ACE_thread_mutex_t *m,
ACE_Time_Value *);
+
+# if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
+ extern ACE_Export
+# else
+ ACE_NAMESPACE_INLINE_FUNCTION
+# endif /* ACE_LACKS_COND_T && !ACE_PSOS_DIAB_MIPS */
int cond_wait (ACE_cond_t *cv,
ACE_thread_mutex_t *m);
# endif /* ACE_WIN32 && ACE_HAS_WTHREADS */
//@{ @name A set of wrappers for auto-reset and manual events.
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_destroy (ACE_event_t *event);
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_init (ACE_event_t *event,
int manual_reset = 0,
int initial_state = 0,
@@ -1146,6 +1227,7 @@ namespace ACE_OS {
LPSECURITY_ATTRIBUTES sa = 0);
# if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_init (ACE_event_t *event,
int manual_reset,
int initial_state,
@@ -1155,29 +1237,38 @@ namespace ACE_OS {
LPSECURITY_ATTRIBUTES sa = 0);
# endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_pulse (ACE_event_t *event);
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_reset (ACE_event_t *event);
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_signal (ACE_event_t *event);
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_timedwait (ACE_event_t *event,
ACE_Time_Value *timeout,
int use_absolute_time = 1);
+ ACE_NAMESPACE_INLINE_FUNCTION
int event_wait (ACE_event_t *event);
//@}
+ extern ACE_Export
int lwp_getparams (ACE_Sched_Params &);
+ extern ACE_Export
int lwp_setparams (const ACE_Sched_Params &);
//@{ @name A set of wrappers for mutex locks.
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_destroy (ACE_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_init (ACE_mutex_t *m,
int type = ACE_DEFAULT_SYNCH_TYPE,
const char *name = 0,
@@ -1185,6 +1276,7 @@ namespace ACE_OS {
LPSECURITY_ATTRIBUTES sa = 0);
#if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_init (ACE_mutex_t *m,
int type,
const wchar_t *name,
@@ -1194,10 +1286,12 @@ namespace ACE_OS {
/// Win32 note: Abandoned mutexes are not treated differently. 0 is
/// returned since the calling thread does get the ownership.
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_lock (ACE_mutex_t *m);
/// This method is only implemented for Win32. For abandoned
/// mutexes, <abandoned> is set to 1 and 0 is returned.
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_lock (ACE_mutex_t *m,
int &abandoned);
@@ -1210,6 +1304,7 @@ namespace ACE_OS {
* Note that the mutex should not be a recursive one, i.e., it
* should only be a standard mutex or an error checking mutex.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_lock (ACE_mutex_t *m,
const ACE_Time_Value &timeout);
@@ -1222,21 +1317,26 @@ namespace ACE_OS {
* mutex should not be a recursive one, i.e., it should only be a
* standard mutex or an error checking mutex.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_lock (ACE_mutex_t *m,
const ACE_Time_Value *timeout);
/// Handle asynchronous thread cancellation cleanup.
+ extern ACE_Export
void mutex_lock_cleanup (void *mutex);
/// Win32 note: Abandoned mutexes are not treated differently. 0 is
/// returned since the calling thread does get the ownership.
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_trylock (ACE_mutex_t *m);
/// This method is only implemented for Win32. For abandoned
/// mutexes, <abandoned> is set to 1 and 0 is returned.
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_trylock (ACE_mutex_t *m,
int &abandoned);
+ ACE_NAMESPACE_INLINE_FUNCTION
int mutex_unlock (ACE_mutex_t *m);
//@}
@@ -1246,6 +1346,7 @@ namespace ACE_OS {
* Can't call the following priocntl, because that's a macro on
* Solaris.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
int priority_control (ACE_idtype_t, ACE_id_t, int, void *);
//@{ @name A set of wrappers for recursive mutex locks.
@@ -1253,23 +1354,30 @@ namespace ACE_OS {
// These two methods are primarily in support of
// ACE_Condition<ACE_Recursive_Thread_Mutex> and should probably not
// be called outside that context.
+ ACE_NAMESPACE_INLINE_FUNCTION
int recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m,
ACE_recursive_mutex_state &state);
+ ACE_NAMESPACE_INLINE_FUNCTION
void recursive_mutex_cond_relock (ACE_recursive_thread_mutex_t *m,
ACE_recursive_mutex_state &state);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recursive_mutex_init (ACE_recursive_thread_mutex_t *m,
const ACE_TCHAR *name = 0,
ACE_mutexattr_t *arg = 0,
LPSECURITY_ATTRIBUTES sa = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recursive_mutex_lock (ACE_recursive_thread_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m);
//@}
@@ -1277,20 +1385,28 @@ namespace ACE_OS {
//@{ @name A set of wrappers for readers/writer locks.
+ ACE_NAMESPACE_INLINE_FUNCTION
int rw_rdlock (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rw_tryrdlock (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rw_trywrlock (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rw_trywrlock_upgrade (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rw_unlock (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rw_wrlock (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rwlock_destroy (ACE_rwlock_t *rw);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rwlock_init (ACE_rwlock_t *rw,
int type = ACE_DEFAULT_SYNCH_TYPE,
const ACE_TCHAR *name = 0,
@@ -1301,16 +1417,20 @@ namespace ACE_OS {
//@{ @name Thread scheduler interface.
/// Set scheduling parameters. An id of ACE_SELF indicates, e.g.,
/// set the parameters on the calling thread.
+ extern ACE_Export
int sched_params (const ACE_Sched_Params &, ACE_id_t id = ACE_SELF);
//@}
/// Find the schedling class ID that corresponds to the class name.
+ extern ACE_Export
int scheduling_class (const char *class_name, ACE_id_t &);
//@{ @name A set of wrappers for semaphores.
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_destroy (ACE_sema_t *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_init (ACE_sema_t *s,
u_int count,
int type = ACE_DEFAULT_SYNCH_TYPE,
@@ -1320,6 +1440,7 @@ namespace ACE_OS {
LPSECURITY_ATTRIBUTES sa = 0);
# if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_init (ACE_sema_t *s,
u_int count,
int type,
@@ -1329,56 +1450,75 @@ namespace ACE_OS {
LPSECURITY_ATTRIBUTES sa = 0);
# endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_post (ACE_sema_t *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_post (ACE_sema_t *s,
u_int release_count);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_trywait (ACE_sema_t *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_wait (ACE_sema_t *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_wait (ACE_sema_t *s,
ACE_Time_Value &tv);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sema_wait (ACE_sema_t *s,
ACE_Time_Value *tv);
//@}
//@{ @name A set of wrappers for System V semaphores.
+ ACE_NAMESPACE_INLINE_FUNCTION
int semctl (int int_id,
int semnum,
int cmd,
semun);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int semget (key_t key,
int nsems,
int flags);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int semop (int int_id,
struct sembuf *sops,
size_t nsops);
//@}
/// Friendly interface to <priocntl>(2).
+ extern ACE_Export
int set_scheduling_params (const ACE_Sched_Params &,
ACE_id_t id = ACE_SELF);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigtimedwait (const sigset_t *set,
siginfo_t *info,
const ACE_Time_Value *timeout);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigwait (sigset_t *set,
int *sig = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigwaitinfo (const sigset_t *set,
siginfo_t *info);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_cancel (ACE_thread_t t_id);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_cmp (ACE_hthread_t t1,
ACE_hthread_t t2);
+
// These are non-portable since they use ACE_thread_t and
// ACE_hthread_t and will go away in a future release.
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_continue (ACE_hthread_t target_thread);
/*
@@ -1411,6 +1551,7 @@ namespace ACE_OS {
* Note that <thread_adapter> is always deleted by <thr_create>,
* therefore it must be allocated with global operator new.
*/
+ extern ACE_Export
int thr_create (ACE_THR_FUNC func,
void *args,
long flags,
@@ -1421,128 +1562,177 @@ namespace ACE_OS {
size_t stacksize = 0,
ACE_Base_Thread_Adapter *thread_adapter = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_equal (ACE_thread_t t1,
ACE_thread_t t2);
+ extern ACE_Export
void thr_exit (ACE_THR_FUNC_RETURN status = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_getconcurrency (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_getprio (ACE_hthread_t id,
int &priority);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_getprio (ACE_hthread_t id,
int &priority,
int &policy);
# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_getspecific (ACE_OS_thread_key_t key,
void **data);
# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_getspecific (ACE_thread_key_t key,
void **data);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
int thr_join (ACE_hthread_t waiter_id,
ACE_THR_FUNC_RETURN *status);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
int thr_join (ACE_thread_t waiter_id,
ACE_thread_t *thr_id,
ACE_THR_FUNC_RETURN *status);
+ extern ACE_Export
int thr_key_detach (void *inst);
+ extern ACE_Export
int thr_key_used (ACE_thread_key_t key);
# if defined (ACE_HAS_THR_C_DEST)
# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
+ extern ACE_Export
int thr_keycreate (ACE_OS_thread_key_t *key,
ACE_THR_C_DEST,
void *inst = 0);
# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
+
+ extern ACE_Export
int thr_keycreate (ACE_thread_key_t *key,
ACE_THR_C_DEST,
void *inst = 0);
# else
# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
+ extern ACE_Export
int thr_keycreate (ACE_OS_thread_key_t *key,
ACE_THR_DEST,
void *inst = 0);
# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
+
+ extern ACE_Export
int thr_keycreate (ACE_thread_key_t *key,
ACE_THR_DEST,
void *inst = 0);
# endif /* ACE_HAS_THR_C_DEST */
+ extern ACE_Export
int thr_keyfree (ACE_thread_key_t key);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_kill (ACE_thread_t thr_id,
int signum);
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t thr_min_stack (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_thread_t thr_self (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
void thr_self (ACE_hthread_t &);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_setcancelstate (int new_state,
int *old_state);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_setcanceltype (int new_type,
int *old_type);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_setconcurrency (int hint);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_setprio (ACE_hthread_t id,
int priority,
int policy = -1);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_setprio (const ACE_Sched_Priority prio);
# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
+ extern ACE_Export
int thr_setspecific (ACE_OS_thread_key_t key,
void *data);
# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
+ extern ACE_Export
int thr_setspecific (ACE_thread_key_t key,
void *data);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_sigsetmask (int how,
const sigset_t *nsm,
sigset_t *osm);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thr_suspend (ACE_hthread_t target_thread);
+ ACE_NAMESPACE_INLINE_FUNCTION
void thr_testcancel (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
void thr_yield (void);
//@{ @name A set of wrappers for mutex locks that only work within a single process.
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_destroy (ACE_thread_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_init (ACE_thread_mutex_t *m,
int type = ACE_DEFAULT_SYNCH_TYPE,
const char *name = 0,
ACE_mutexattr_t *arg = 0);
#if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_init (ACE_thread_mutex_t *m,
int type,
const wchar_t *name,
ACE_mutexattr_t *arg = 0);
#endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_lock (ACE_thread_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_lock (ACE_thread_mutex_t *m,
const ACE_Time_Value &timeout);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_lock (ACE_thread_mutex_t *m,
const ACE_Time_Value *timeout);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_trylock (ACE_thread_mutex_t *m);
+ ACE_NAMESPACE_INLINE_FUNCTION
int thread_mutex_unlock (ACE_thread_mutex_t *m);
//@}
@@ -1555,6 +1745,7 @@ namespace ACE_OS {
* the same process. The uniqueness of this name is therefore only
* valid for the life of <object>.
*/
+ extern ACE_Export
void unique_name (const void *object,
ACE_TCHAR *name,
size_t length);
@@ -1569,7 +1760,7 @@ namespace ACE_OS {
*
* @brief Wrapper for NT events on UNIX.
*/
-class ACE_OS_Export ACE_event_t
+class ACE_Export ACE_event_t
{
friend int ACE_OS::event_init(ACE_event_t*, int, int, int, const char*, void*,int);
friend int ACE_OS::event_destroy(ACE_event_t*);
diff --git a/ace/OS_NS_arpa_inet.h b/ace/OS_NS_arpa_inet.h
index f1bf66bd73d..821928944b1 100644
--- a/ace/OS_NS_arpa_inet.h
+++ b/ace/OS_NS_arpa_inet.h
@@ -26,21 +26,36 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/arpa/os_inet.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
unsigned long inet_addr (const char *name);
+ extern ACE_Export
int inet_aton (const char *strptr,
struct in_addr *addr);
+#if !defined (ACE_PSOS)
+ ACE_NAMESPACE_INLINE_FUNCTION
+#else
+ extern ACE_Export
+#endif /* ACE_PSOS */
char *inet_ntoa (const struct in_addr addr);
+ ACE_NAMESPACE_INLINE_FUNCTION
const char *inet_ntop (int family,
const void *addrptr,
char *strptr,
size_t len);
+ ACE_NAMESPACE_INLINE_FUNCTION
int inet_pton (int family,
const char *strptr,
void *addrptr);
diff --git a/ace/OS_NS_arpa_inet.inl b/ace/OS_NS_arpa_inet.inl
index ea427c7c1e7..92f665ee035 100644
--- a/ace/OS_NS_arpa_inet.inl
+++ b/ace/OS_NS_arpa_inet.inl
@@ -61,31 +61,6 @@ ACE_OS::inet_ntoa (const struct in_addr addr)
}
#endif /* defined (ACE_PSOS) */
-ACE_INLINE int
-ACE_OS::inet_pton (int family, const char *strptr, void *addrptr)
-{
- ACE_OS_TRACE ("ACE_OS::inet_pton");
-
-#if defined (ACE_HAS_IPV6)
- ACE_OSCALL_RETURN (::inet_pton (family, strptr, addrptr), int, -1);
-#else
- if (family == AF_INET)
- {
- struct in_addr in_val;
-
- if (ACE_OS::inet_aton (strptr, &in_val))
- {
- ACE_OS::memcpy (addrptr, &in_val, sizeof (struct in_addr));
- return 1; // Success
- }
-
- return 0; // Input is not a valid presentation format
- }
-
- ACE_NOTSUP_RETURN(-1);
-#endif /* ACE_HAS_IPV6 */
-}
-
ACE_INLINE const char *
ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
{
@@ -121,3 +96,28 @@ ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
ACE_NOTSUP_RETURN(0);
#endif /* ACE_HAS_IPV6 */
}
+ACE_INLINE int
+ACE_OS::inet_pton (int family, const char *strptr, void *addrptr)
+{
+ ACE_OS_TRACE ("ACE_OS::inet_pton");
+
+#if defined (ACE_HAS_IPV6)
+ ACE_OSCALL_RETURN (::inet_pton (family, strptr, addrptr), int, -1);
+#else
+ if (family == AF_INET)
+ {
+ struct in_addr in_val;
+
+ if (ACE_OS::inet_aton (strptr, &in_val))
+ {
+ ACE_OS::memcpy (addrptr, &in_val, sizeof (struct in_addr));
+ return 1; // Success
+ }
+
+ return 0; // Input is not a valid presentation format
+ }
+
+ ACE_NOTSUP_RETURN(-1);
+#endif /* ACE_HAS_IPV6 */
+}
+
diff --git a/ace/OS_NS_ctype.h b/ace/OS_NS_ctype.h
index 11740b2ccf1..fd887543f3d 100644
--- a/ace/OS_NS_ctype.h
+++ b/ace/OS_NS_ctype.h
@@ -25,6 +25,13 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
+
namespace ACE_OS {
// these are non-standard names...
@@ -44,16 +51,20 @@ namespace ACE_OS {
//@{
/// Returns true if the character is a printable character.
+ ACE_NAMESPACE_INLINE_FUNCTION
int ace_isprint (const ACE_TCHAR c);
/// Returns true if the character is a space character.
+ ACE_NAMESPACE_INLINE_FUNCTION
int ace_isspace (const ACE_TCHAR c);
/// Converts a character to lower case (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int to_lower (int c);
#if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER)
/// Converts a character to lower case (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wint_t to_lower (wint_t c);
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */
diff --git a/ace/OS_NS_dirent.h b/ace/OS_NS_dirent.h
index 2e355ac236c..5e39772e3ca 100644
--- a/ace/OS_NS_dirent.h
+++ b/ace/OS_NS_dirent.h
@@ -26,43 +26,60 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_dirent.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
void closedir (ACE_DIR *);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_DIR *opendir (const ACE_TCHAR *filename);
+ ACE_NAMESPACE_INLINE_FUNCTION
dirent *readdir (ACE_DIR *);
+ ACE_NAMESPACE_INLINE_FUNCTION
int readdir_r (ACE_DIR *dirp,
- struct dirent *entry,
- struct dirent **result);
+ struct dirent *entry,
+ struct dirent **result);
+ ACE_NAMESPACE_INLINE_FUNCTION
void rewinddir (ACE_DIR *);
+ ACE_NAMESPACE_INLINE_FUNCTION
int scandir (const ACE_TCHAR *dirname,
- struct dirent **namelist[],
- int (*selector) (const struct dirent *filename),
- int (*comparator) (const struct dirent **f1,
- const struct dirent **f2));
+ struct dirent **namelist[],
+ int (*selector) (const struct dirent *filename),
+ int (*comparator) (const struct dirent **f1,
+ const struct dirent **f2));
+ ACE_NAMESPACE_INLINE_FUNCTION
void seekdir (ACE_DIR *,
long loc);
+ ACE_NAMESPACE_INLINE_FUNCTION
long telldir (ACE_DIR *);
// Win32 emulation functions
ACE_DIR *opendir_emulation (const ACE_TCHAR *filename);
+ extern ACE_Export
int scandir_emulation (const ACE_TCHAR *dirname,
dirent **namelist[],
int (*selector)(const dirent *entry),
int (*comparator)(const dirent **f1,
const dirent**f2));
+ extern ACE_Export
void closedir_emulation (ACE_DIR *);
+ extern ACE_Export
dirent *readdir_emulation (ACE_DIR *);
} /* namespace ACE_OS */
diff --git a/ace/OS_NS_dlfcn.h b/ace/OS_NS_dlfcn.h
index 5698b227623..6bcaac31488 100644
--- a/ace/OS_NS_dlfcn.h
+++ b/ace/OS_NS_dlfcn.h
@@ -26,17 +26,27 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_dlfcn.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
//@{ @name A set of wrappers for explicit dynamic linking.
+ ACE_NAMESPACE_INLINE_FUNCTION
int dlclose (ACE_SHLIB_HANDLE handle);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *dlerror (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_SHLIB_HANDLE dlopen (const ACE_TCHAR *filename,
int mode = ACE_DEFAULT_SHLIB_MODE);
+ ACE_NAMESPACE_INLINE_FUNCTION
void *dlsym (ACE_SHLIB_HANDLE handle,
const ACE_TCHAR *symbol);
//@}
diff --git a/ace/OS_NS_errno.h b/ace/OS_NS_errno.h
index d35ad6eb665..3dbef6784ff 100644
--- a/ace/OS_NS_errno.h
+++ b/ace/OS_NS_errno.h
@@ -26,15 +26,25 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_errno.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
int last_error (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
void last_error (int);
+ ACE_NAMESPACE_INLINE_FUNCTION
int set_errno_to_last_error (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int set_errno_to_wsa_last_error (void);
} /* namespace ACE_OS */
diff --git a/ace/OS_NS_fcntl.h b/ace/OS_NS_fcntl.h
index 027f4dd93c3..b16465b4c3a 100644
--- a/ace/OS_NS_fcntl.h
+++ b/ace/OS_NS_fcntl.h
@@ -27,9 +27,16 @@
#include "ace/os_include/os_fcntl.h"
#include "ace/Global_Macros.h" // for LPSECURITY_ATTRIBUTES :-(
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
int fcntl (ACE_HANDLE handle,
int cmd,
long arg = 0);
@@ -57,11 +64,13 @@ namespace ACE_OS {
/// the end prior to each write, as specified by POSIX. This
/// is generally good enough for typical situations, but it is ``not
/// quite right'' in its semantics.
+ extern ACE_Export
ACE_HANDLE open (const char *filename,
int mode,
int perms = ACE_DEFAULT_OPEN_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
#if defined (ACE_HAS_WCHAR)
+ extern ACE_Export
ACE_HANDLE open (const wchar_t *filename,
int mode,
int perms = ACE_DEFAULT_OPEN_PERMS,
diff --git a/ace/OS_NS_math.h b/ace/OS_NS_math.h
index 350f6ebd046..370a65026f2 100644
--- a/ace/OS_NS_math.h
+++ b/ace/OS_NS_math.h
@@ -25,12 +25,21 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
+
namespace ACE_OS {
/// This method computes the largest integral value not greater than x.
+ ACE_NAMESPACE_INLINE_FUNCTION
double floor (double x);
/// This method computes the smallest integral value not less than x.
+ ACE_NAMESPACE_INLINE_FUNCTION
double ceil (double x);
diff --git a/ace/OS_NS_netdb.h b/ace/OS_NS_netdb.h
index 234e16f3f6b..f25d97c9426 100644
--- a/ace/OS_NS_netdb.h
+++ b/ace/OS_NS_netdb.h
@@ -26,13 +26,29 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_netdb.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
struct hostent *gethostbyaddr (const char *addr,
int length,
int type);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
struct hostent *gethostbyaddr_r (const char *addr,
int length,
int type,
@@ -40,17 +56,37 @@ namespace ACE_OS {
ACE_HOSTENT_DATA buffer,
int *h_errnop);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
struct hostent *gethostbyname (const char *name);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
struct hostent *gethostbyname_r (const char *name,
struct hostent *result,
ACE_HOSTENT_DATA buffer,
int *h_errnop);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
struct hostent *getipnodebyaddr (const void *src, size_t len,
int family);
+#if defined (VXWORKS)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* VXWORKS */
struct hostent *getipnodebyname (const char *name, int family,
int flags = 0);
@@ -62,30 +98,40 @@ namespace ACE_OS {
unsigned char node[6];
};
+ extern ACE_Export
int getmacaddress (struct macaddr_node_t *node);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct protoent *getprotobyname (const char *name);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct protoent *getprotobyname_r (const char *name,
struct protoent *result,
ACE_PROTOENT_DATA buffer);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct protoent *getprotobynumber (int proto);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct protoent *getprotobynumber_r (int proto,
struct protoent *result,
ACE_PROTOENT_DATA buffer);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct servent *getservbyname (const char *svc,
const char *proto);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct servent *getservbyname_r (const char *svc,
const char *proto,
struct servent *result,
ACE_SERVENT_DATA buf);
# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
+ extern ACE_Export
int netdb_acquire (void);
+
+ extern ACE_Export
int netdb_release (void);
# endif /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
diff --git a/ace/OS_NS_poll.h b/ace/OS_NS_poll.h
index 629fac2d4fe..43fe0a2f2fb 100644
--- a/ace/OS_NS_poll.h
+++ b/ace/OS_NS_poll.h
@@ -26,14 +26,23 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_poll.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
class ACE_Time_Value;
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
int poll (struct pollfd *pollfds,
unsigned long len,
const ACE_Time_Value *tv = 0);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int poll (struct pollfd *pollfds,
unsigned long len,
const ACE_Time_Value &tv);
diff --git a/ace/OS_NS_pwd.h b/ace/OS_NS_pwd.h
index b8db10658d5..9c61269f00b 100644
--- a/ace/OS_NS_pwd.h
+++ b/ace/OS_NS_pwd.h
@@ -26,6 +26,12 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_pwd.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
# if defined (ACE_HAS_BROKEN_R_ROUTINES)
# undef getpwnam_r
@@ -38,16 +44,21 @@ namespace ACE_OS {
//@{ @name A set of wrappers for password routines.
+ ACE_NAMESPACE_INLINE_FUNCTION
void endpwent (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct passwd *getpwent (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct passwd *getpwnam (const char *user);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct passwd *getpwnam_r (const char *name,
struct passwd *pwent,
char *buffer,
int buflen);
+ ACE_NAMESPACE_INLINE_FUNCTION
void setpwent (void);
//@}
diff --git a/ace/OS_NS_regex.h b/ace/OS_NS_regex.h
index f49ed62d58f..ac311494088 100644
--- a/ace/OS_NS_regex.h
+++ b/ace/OS_NS_regex.h
@@ -25,13 +25,23 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
+
namespace ACE_OS {
// non=standard..
//@{ @name A set of wrappers for regular expressions.
+ ACE_NAMESPACE_INLINE_FUNCTION
char *compile (const char *instring,
char *expbuf,
char *endbuf);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int step (const char *str,
char *expbuf);
//@}
diff --git a/ace/OS_NS_signal.h b/ace/OS_NS_signal.h
index d26c02cb9bf..633bfe135e8 100644
--- a/ace/OS_NS_signal.h
+++ b/ace/OS_NS_signal.h
@@ -26,6 +26,12 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_signal.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
# if !defined (SIG_BLOCK)
# define SIG_BLOCK 1
@@ -61,37 +67,48 @@ namespace ACE_OS {
//@{ @name A set of wrappers for Signals.
+ ACE_NAMESPACE_INLINE_FUNCTION
int kill (pid_t pid,
int signum);
+ ACE_NAMESPACE_INLINE_FUNCTION
int pthread_sigmask (int how,
const sigset_t *nsp,
sigset_t *osp);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigaction (int signum,
const struct sigaction *nsa,
struct sigaction *osa);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigaddset (sigset_t *s,
int signum);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigdelset (sigset_t *s,
int signum);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigemptyset (sigset_t *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigfillset (sigset_t *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigismember (sigset_t *s,
int signum);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_SignalHandler signal (int signum,
ACE_SignalHandler);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigprocmask (int how,
const sigset_t *nsp,
sigset_t *osp);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sigsuspend (const sigset_t *set);
//@}
diff --git a/ace/OS_NS_stdio.h b/ace/OS_NS_stdio.h
index 4471ad73139..1a27c7d2672 100644
--- a/ace/OS_NS_stdio.h
+++ b/ace/OS_NS_stdio.h
@@ -27,7 +27,12 @@
#include "ace/os_include/os_stdio.h"
#include "ace/os_include/os_fcntl.h"
-#include "ace/OS_Export.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
/**
* On some platforms clearerr is a macro. Defining ACE_OS::clearerr()
@@ -92,7 +97,7 @@ namespace ACE_OS {
*
* @brief OS file locking structure.
*/
- class ACE_OS_Export ace_flock_t
+ class ACE_Export ace_flock_t
{
public:
/// Dump state of the object.
@@ -120,10 +125,12 @@ namespace ACE_OS {
# if defined (ACE_USES_WCHAR)
// If fp points to the Unicode format file, the file pointer will be moved right next
// to the Unicode header (2 types). Otherwise, file pointer will be at the beginning.
+ extern ACE_Export
void checkUnicodeFormat (FILE* fp);
# endif // ACE_USES_WCHAR
# if !defined (ACE_LACKS_CLEARERR)
+ ACE_NAMESPACE_INLINE_FUNCTION
void clearerr (FILE* fp);
# endif /* !ACE_LACKS_CLEARERR */
@@ -134,69 +141,85 @@ namespace ACE_OS {
# undef cuserid
# endif /* cuserid */
+ ACE_NAMESPACE_INLINE_FUNCTION
char *cuserid (char *user,
size_t maxlen = ACE_MAX_USERID);
# if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *cuserid (wchar_t *user,
size_t maxlen = ACE_MAX_USERID);
# endif /* ACE_HAS_WCHAR */
# endif /* ACE_LACKS_CUSERID */
//@}
+ ACE_NAMESPACE_INLINE_FUNCTION
int fclose (FILE *fp);
# if defined (fdopen)
# undef fdopen
# endif /* fdopen */
+ ACE_NAMESPACE_INLINE_FUNCTION
FILE *fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode);
+ ACE_NAMESPACE_INLINE_FUNCTION
int fflush (FILE *fp);
+ ACE_NAMESPACE_INLINE_FUNCTION
int fgetc (FILE* fp);
+ ACE_NAMESPACE_INLINE_FUNCTION
int fgetpos (FILE* fp, fpos_t* pos);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *fgets (ACE_TCHAR *buf, int size, FILE *fp);
//@{ @name A set of wrappers for file locks.
# if defined (ACE_WIN32)
+ ACE_NAMESPACE_INLINE_FUNCTION
void flock_adjust_params (ace_flock_t *lock,
short whence,
off_t &start,
off_t &len);
# endif /* ACE_WIN32 */
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_init (ace_flock_t *lock,
int flags = 0,
const ACE_TCHAR *name = 0,
mode_t perms = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_destroy (ace_flock_t *lock,
int unlink_file = 1);
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_rdlock (ace_flock_t *lock,
short whence = 0,
off_t start = 0,
off_t len = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_tryrdlock (ace_flock_t *lock,
short whence = 0,
off_t start = 0,
off_t len = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_trywrlock (ace_flock_t *lock,
short whence = 0,
off_t start = 0,
off_t len = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_unlock (ace_flock_t *lock,
short whence = 0,
off_t start = 0,
off_t len = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int flock_wrlock (ace_flock_t *lock,
short whence = 0,
off_t start = 0,
@@ -204,6 +227,11 @@ namespace ACE_OS {
//@}
+#if defined (ACE_WIN32)
+ extern ACE_Export
+#else
+ ACE_NAMESPACE_INLINE_FUNCTION
+#endif /* ACE_WIN32 */
FILE *fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode);
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
@@ -213,56 +241,69 @@ namespace ACE_OS {
// = Win32 OS version determination function.
/// Return the win32 OSVERSIONINFO structure.
+ ACE_NAMESPACE_INLINE_FUNCTION
const OSVERSIONINFO &get_win32_versioninfo (void);
// = A pair of functions for modifying ACE's Win32 resource usage.
/// Return the handle of the module containing ACE's resources. By
/// default, for a DLL build of ACE this is a handle to the ACE DLL
/// itself, and for a static build it is a handle to the executable.
+ ACE_NAMESPACE_INLINE_FUNCTION
HINSTANCE get_win32_resource_module (void);
/// Allow an application to modify which module contains ACE's
/// resources. This is mainly useful for a static build of ACE where
/// the required resources reside somewhere other than the executable.
+ ACE_NAMESPACE_INLINE_FUNCTION
void set_win32_resource_module (HINSTANCE);
/// Translate fopen's mode char to open's mode. This helper function
/// is here to avoid maintaining several pieces of identical code.
+ extern ACE_Export
void fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode);
- extern OSVERSIONINFO win32_versioninfo_;
+ extern ACE_Export OSVERSIONINFO win32_versioninfo_;
- extern HINSTANCE win32_resource_module_;
+ extern ACE_Export HINSTANCE win32_resource_module_;
# endif /* ACE_WIN32 */
#endif
+ extern ACE_Export
int fprintf (FILE *fp, const char *format, ...);
# if defined (ACE_HAS_WCHAR)
+ extern ACE_Export
int fprintf (FILE *fp, const wchar_t *format, ...);
# endif /* ACE_HAS_WCHAR */
+ extern ACE_Export
int fputs (const ACE_TCHAR *s,
FILE *stream);
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t fread (void *ptr,
size_t size,
size_t nelems,
FILE *fp);
+ ACE_NAMESPACE_INLINE_FUNCTION
FILE *freopen (const ACE_TCHAR *filename,
const ACE_TCHAR *mode,
FILE* stream);
+ ACE_NAMESPACE_INLINE_FUNCTION
int fseek (FILE *fp,
long offset,
int ptrname);
+ ACE_NAMESPACE_INLINE_FUNCTION
int fsetpos (FILE* fp, fpos_t* pos);
+ ACE_NAMESPACE_INLINE_FUNCTION
long ftell (FILE* fp);
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t fwrite (const void *ptr,
size_t size,
size_t nitems,
@@ -277,38 +318,50 @@ namespace ACE_OS {
// Otherwise, reads up to n-1 bytes (not including the newline),
// then swallows rest up to newline
// then swallows newline
+ extern ACE_Export
char *gets (char *str, int n = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
void perror (const ACE_TCHAR *s);
int printf (const char *format, ...);
+ ACE_NAMESPACE_INLINE_FUNCTION
int puts (const ACE_TCHAR *s);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rename (const ACE_TCHAR *old_name,
const ACE_TCHAR *new_name,
int flags = -1);
+ ACE_NAMESPACE_INLINE_FUNCTION
void rewind (FILE *fp);
+ extern ACE_Export
int snprintf (char *buf, size_t maxlen, const char *format, ...);
# if defined (ACE_HAS_WCHAR)
+ extern ACE_Export
int snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format,...);
# endif /* ACE_HAS_WCHAR */
+ extern ACE_Export
int sprintf (char *buf, const char *format, ...);
# if defined (ACE_HAS_WCHAR)
+ extern ACE_Export
int sprintf (wchar_t *buf, const wchar_t *format, ...);
# endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *tempnam (const ACE_TCHAR *dir = 0,
const ACE_TCHAR *pfx = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int vsprintf (char *buffer, const char *format, va_list argptr);
# if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr);
# endif /* ACE_HAS_WCHAR */
diff --git a/ace/OS_NS_stdlib.h b/ace/OS_NS_stdlib.h
index 6ebc1d75c99..5e2934c6ff9 100644
--- a/ace/OS_NS_stdlib.h
+++ b/ace/OS_NS_stdlib.h
@@ -26,6 +26,12 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_stdlib.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
# if defined (ACE_HAS_BROKEN_R_ROUTINES)
# undef rand_r
@@ -46,15 +52,20 @@ namespace ACE_OS {
//@{
+ ACE_NAMESPACE_INLINE_FUNCTION
void _exit (int status = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
void abort (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int atexit (ACE_EXIT_HOOK func);
+ ACE_NAMESPACE_INLINE_FUNCTION
int atoi (const char *s);
# if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int atoi (const wchar_t *s);
# endif /* ACE_HAS_WCHAR */
@@ -63,119 +74,160 @@ namespace ACE_OS {
# undef atop
# endif /* atop */
+ ACE_NAMESPACE_INLINE_FUNCTION
void *atop (const char *s);
# if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
void *atop (const wchar_t *s);
# endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
void *bsearch (const void *key,
const void *base,
size_t nel,
size_t size,
ACE_COMPARE_FUNC);
+ extern ACE_Export
void *calloc (size_t elements, size_t sizeof_elements);
+ extern ACE_Export
void exit (int status = 0);
+ extern ACE_Export
void free (void *);
+ ACE_NAMESPACE_INLINE_FUNCTION
char *getenv (const char *symbol);
# if defined (ACE_HAS_WCHAR) && defined (ACE_WIN32)
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *getenv (const wchar_t *symbol);
# endif /* ACE_HAS_WCHAR && ACE_WIN32 */
// not in spec
+ extern ACE_Export
ACE_TCHAR *getenvstrings (void);
// itoa not in spec
/// Converts an integer to a string.
+ ACE_NAMESPACE_INLINE_FUNCTION
char *itoa (int value, char *string, int radix);
#if defined (ACE_HAS_WCHAR)
/// Converts an integer to a string.
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *itoa (int value, wchar_t *string, int radix);
#endif /* ACE_HAS_WCHAR */
#if !defined (ACE_HAS_ITOA)
/// Emulated itoa - Converts an integer to a string.
+ extern ACE_Export
char *itoa_emulation (int value, char *string, int radix);
#endif /* !ACE_HAS_ITOA */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_ITOW)
/// Emulated itow - Converts an integer to a string.
+ extern ACE_Export
wchar_t *itow_emulation (int value, wchar_t *string, int radix);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_ITOW */
+ extern ACE_Export
void *malloc (size_t);
+#if !defined (ACE_LACKS_MKSTEMP)
+ ACE_NAMESPACE_INLINE_FUNCTION
+#else
+ extern ACE_Export
+#endif /* !ACE_LACKS_MKSTEMP */
ACE_HANDLE mkstemp (ACE_TCHAR *t);
+#if !defined (ACE_LACKS_MKTEMP)
+ ACE_NAMESPACE_INLINE_FUNCTION
+#else
+ extern ACE_Export
+#endif /* !ACE_LACKS_MSTEMP */
ACE_TCHAR *mktemp (ACE_TCHAR *t);
+ ACE_NAMESPACE_INLINE_FUNCTION
int putenv (const ACE_TCHAR *string);
+ ACE_NAMESPACE_INLINE_FUNCTION
void qsort (void *base,
size_t nel,
size_t width,
ACE_COMPARE_FUNC);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rand (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int rand_r (ACE_RANDR_TYPE &seed);
+ extern ACE_Export
void *realloc (void *, size_t);
// exit_hook and set_exit_hook not in spec
/// Function that is called by <ACE_OS::exit>, if non-null.
- extern ACE_EXIT_HOOK exit_hook_;
+ extern ACE_Export ACE_EXIT_HOOK exit_hook_;
/// For use by ACE_Object_Manager only, to register its exit hook..
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_EXIT_HOOK set_exit_hook (ACE_EXIT_HOOK hook);
+ ACE_NAMESPACE_INLINE_FUNCTION
void srand (u_int seed);
// not in spec
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
#if !defined (ACE_LACKS_STRTOD)
/// Converts a string to a double value (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
double strtod (const char *s, char **endptr);
#endif /* !ACE_LACKS_STRTOD */
#if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOD)
/// Converts a string to a double value (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
double strtod (const wchar_t *s, wchar_t **endptr);
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */
/// Converts a string to a long value (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
long strtol (const char *s, char **ptr, int base);
#if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOL)
/// Converts a string to a long value (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
long strtol (const wchar_t *s, wchar_t **ptr, int base);
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOL */
#if defined (ACE_LACKS_STRTOL)
+ extern ACE_Export
long strtol_emulation (const char *nptr, char **endptr, int base);
#endif /* ACE_LACKS_STRTOL */
/// Converts a string to an unsigned long value (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
unsigned long strtoul (const char *s, char **ptr, int base);
#if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOUL)
/// Converts a string to an unsigned long value (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
unsigned long strtoul (const wchar_t *s, wchar_t **ptr, int base);
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOUL */
#if defined (ACE_LACKS_STRTOUL)
+ extern ACE_Export
unsigned long strtoul_emulation (const char *nptr,
char **endptr,
int base);
#endif /* ACE_LACKS_STRTOUL */
+ ACE_NAMESPACE_INLINE_FUNCTION
int system (const ACE_TCHAR *s);
diff --git a/ace/OS_NS_string.h b/ace/OS_NS_string.h
index 0af4da7c91b..1f1e59beffe 100644
--- a/ace/OS_NS_string.h
+++ b/ace/OS_NS_string.h
@@ -27,6 +27,12 @@
#include "ace/Basic_Types.h" // to get ACE_WCHAR_T,
// should be in os_stddef.h or not used like this.
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
class ACE_Time_Value;
@@ -46,155 +52,195 @@ namespace ACE_OS {
//@{
/// Finds characters in a buffer (const void version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const void *memchr (const void *s, int c, size_t len);
/// Finds characters in a buffer (void version).
+ ACE_NAMESPACE_INLINE_FUNCTION
void *memchr (void *s, int c, size_t len);
#if !defined (ACE_HAS_MEMCHR)
/// Emulated memchr - Finds a character in a buffer.
+ extern ACE_Export
const void *memchr_emulation (const void *s, int c, size_t len);
#endif /* ACE_HAS_MEMCHR */
/// Compares two buffers.
+ ACE_NAMESPACE_INLINE_FUNCTION
int memcmp (const void *t, const void *s, size_t len);
/// Copies one buffer to another.
+ ACE_NAMESPACE_INLINE_FUNCTION
void *memcpy (void *t, const void *s, size_t len);
/// Moves one buffer to another.
+ ACE_NAMESPACE_INLINE_FUNCTION
void *memmove (void *t, const void *s, size_t len);
/// Fills a buffer with a character value.
+ ACE_NAMESPACE_INLINE_FUNCTION
void *memset (void *s, int c, size_t len);
/// Appends a string to another string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strcat (char *s, const char *t);
#if defined (ACE_HAS_WCHAR)
/// Appends a string to another string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strcat (wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
/// Finds the first occurance of a character in a string (const char
/// version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const char *strchr (const char *s, int c);
#if defined (ACE_HAS_WCHAR)
/// Finds the first occurance of a character in a string (const wchar_t
/// version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const wchar_t *strchr (const wchar_t *s, wint_t c);
#endif /* ACE_HAS_WCHAR */
/// Finds the first occurance of a character in a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strchr (char *s, int c);
#if defined (ACE_HAS_WCHAR)
/// Finds the first occurance of a character in a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strchr (wchar_t *s, wint_t c);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_LACKS_STRCHR)
/// Emulated strchr (char version) - Finds the first occurance of a
/// character in a string.
+ extern ACE_Export
char *strchr_emulation (char *s, int c);
/// Emulated strchr (const char version) - Finds the first occurance of a
/// character in a string.
+ extern ACE_Export
const char *strchr_emulation (const char *s, int c);
#endif /* ACE_LACKS_STRCHR */
/// Compares two strings (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strcmp (const char *s, const char *t);
/// Compares two strings (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t);
/// Copies a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strcpy (char *s, const char *t);
#if defined (ACE_HAS_WCHAR)
/// Copies a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strcpy (wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
/// Searches for the first substring without any of the specified
/// characters and returns the size of the substring (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strcspn (const char *s, const char *reject);
#if defined (ACE_HAS_WCHAR)
/// Searches for the first substring without any of the specified
/// characters and returns the size of the substring (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strcspn (const wchar_t *s, const wchar_t *reject);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_LACKS_STRCSPN)
/// Emulated strcspn - Finds a substring in a string.
+ extern ACE_Export
size_t strcspn_emulation (const char *s, const char *reject);
#endif /* ACE_LACKS_STRCSPN */
/// Returns a malloced duplicated string (char version).
+ extern ACE_Export
char *strdup (const char *s);
#if defined (ACE_HAS_WCHAR)
/// Returns a malloced duplicated string (wchar_t version).
+ extern ACE_Export
wchar_t *strdup (const wchar_t *s);
#endif /* ACE_HAS_WCHAR */
/// Copies a string, but returns a pointer to the end of the
/// copied region (char version).
+ extern ACE_Export
char *strecpy (char *des, const char *src);
#if defined (ACE_HAS_WCHAR)
/// Copies a string, but returns a pointer to the end of the
/// copied region (wchar_t version).
+ extern ACE_Export
wchar_t *strecpy (wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
/// Returns a system error message.
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strerror (int errnum);
#if defined (ACE_LACKS_STRERROR)
/// Emulated strerror - Returns a system error message.
+ extern ACE_Export
char *strerror_emulation (int errnum);
#endif /* ACE_LACKS_STRERROR */
/// Finds the length of a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strlen (const char *s);
/// Finds the length of a string (ACE_WCHAR_T version).
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strlen (const ACE_WCHAR_T *s);
/// Appends part of a string to another string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strncat (char *s, const char *t, size_t len);
/// Appends part of a string to another string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_WCHAR_T *strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
/// Finds the first occurance of a character in an array (const char
/// version).
+ extern ACE_Export
const char *strnchr (const char *s, int c, size_t len);
/// Finds the first occurance of a character in an array (const ACE_WCHAR_T
/// version).
+ extern ACE_Export
const ACE_WCHAR_T *strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len);
/// Finds the first occurance of a character in an array (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strnchr (char *s, int c, size_t len);
/// Finds the first occurance of a character in an array (ACE_WCHAR_T version).
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_WCHAR_T *strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len);
/// Compares two arrays (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strncmp (const char *s, const char *t, size_t len);
/// Compares two arrays (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
/// Copies an array (char version)
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strncpy (char *s, const char *t, size_t len);
/// Copies an array (ACE_WCHAR_T version)
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_WCHAR_T *strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
/// Finds the length of a limited-length string (char version).
@@ -206,6 +252,7 @@ namespace ACE_OS {
* @return The length of @arg s, if the terminating nul character
* is located, else @arg maxlen.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strnlen (const char *s, size_t maxlen);
/// Finds the length of a limited-length string (ACE_WCHAR_T version).
@@ -217,71 +264,87 @@ namespace ACE_OS {
* @return The length of @arg s, if the terminating nul character
* is located, else @arg maxlen.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strnlen (const ACE_WCHAR_T *s, size_t maxlen);
/// Finds the first occurance of a substring in an array (const char
/// version).
+ extern ACE_Export
const char *strnstr (const char *s, const char *t, size_t len);
/// Finds the first occurance of a substring in an array (const wchar_t
/// version).
+ extern ACE_Export
const ACE_WCHAR_T *strnstr (const ACE_WCHAR_T *s,
const ACE_WCHAR_T *t,
size_t len);
/// Finds the first occurance of a substring in an array (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strnstr (char *s, const char *t, size_t len);
/// Finds the first occurance of a substring in an array (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_WCHAR_T *strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
/// Searches for characters in a string (const char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const char *strpbrk (const char *s1, const char *s2);
#if defined (ACE_HAS_WCHAR)
/// Searches for characters in a string (const wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2);
#endif /* ACE_HAS_WCHAR */
/// Searches for characters in a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strpbrk (char *s1, const char *s2);
#if defined (ACE_HAS_WCHAR)
/// Searches for characters in a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_LACKS_STRPBRK)
/// Emulated strpbrk - Searches for characters in a string.
+ extern ACE_Export
char *strpbrk_emulation (const char *string,
const char *charset);
#endif /* ACE_LACKS_STRPBRK */
/// Finds the last occurance of a character in a string (const char
/// version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const char *strrchr (const char *s, int c);
#if defined (ACE_HAS_WCHAR)
/// Finds the last occurance of a character in a string (const wchar_t
/// version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const wchar_t *strrchr (const wchar_t *s, wint_t c);
#endif /* ACE_HAS_WCHAR */
/// Finds the last occurance of a character in a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strrchr (char *s, int c);
#if defined (ACE_HAS_WCHAR)
/// Finds the last occurance of a character in a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strrchr (wchar_t *s, wint_t c);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_LACKS_STRRCHR)
/// Emulated strrchr (char version) - Finds the last occurance of a
/// character in a string.
+ extern ACE_Export
char *strrchr_emulation (char *s, int c);
/// Emulated strrchr (const char version) - Finds the last occurance of a
/// character in a string.
+ extern ACE_Export
const char *strrchr_emulation (const char *s, int c);
#endif /* ACE_LACKS_STRRCHR */
@@ -301,6 +364,7 @@ namespace ACE_OS {
* Very seldom it's possible that the '\0' padding feature from
* strncpy() is needed.
*/
+ extern ACE_Export
char *strsncpy (char *dst,
const char *src,
size_t maxlen);
@@ -321,68 +385,82 @@ namespace ACE_OS {
* Very seldom it's possible that the '\0' padding feature from
* strncpy() is needed.
*/
+ extern ACE_Export
ACE_WCHAR_T *strsncpy (ACE_WCHAR_T *dst,
const ACE_WCHAR_T *src,
size_t maxlen);
/// Searches for the first substring containing only the specified
/// characters and returns the size of the substring (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strspn (const char *s1, const char *s2);
#if defined (ACE_HAS_WCHAR)
/// Searches for the first substring containing only the specified
/// characters and returns the size of the substring (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strspn (const wchar_t *s1, const wchar_t *s2);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_LACKS_STRSPN)
/// Emulated wcsspn.
+ extern ACE_Export
size_t strspn_emulation (const char *string,
const char *charset);
#endif /* ACE_LACKS_STRSPN */
/// Finds the first occurance of a substring in a string (const char
/// version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const char *strstr (const char *s, const char *t);
#if defined (ACE_HAS_WCHAR)
/// Finds the first occurance of a substring in a string (const wchar_t
/// version).
+ ACE_NAMESPACE_INLINE_FUNCTION
const wchar_t *strstr (const wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
/// Finds the first occurance of a substring in a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strstr (char *s, const char *t);
#if defined (ACE_HAS_WCHAR)
/// Finds the first occurance of a substring in a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strstr (wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
/// Finds the next token in a string (char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strtok (char *s, const char *tokens);
#if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK)
/// Finds the next token in a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strtok (wchar_t *s, const wchar_t *tokens);
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOK */
//@}
/// Finds the next token in a string (safe char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
char *strtok_r (char *s, const char *tokens, char **lasts);
#if defined (ACE_HAS_WCHAR)
/// Finds the next token in a string (wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
#endif // ACE_HAS_WCHAR
#if !defined (ACE_HAS_REENTRANT_FUNCTIONS)
/// Emulated strtok_r.
+ extern ACE_Export
char *strtok_r_emulation (char *s, const char *tokens, char **lasts);
# if defined (ACE_HAS_WCHAR)
/// Emulated strtok_r (wchar_t version).
+ extern ACE_Export
wchar_t *strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
# endif // ACE_HAS_WCHAR
#endif /* !ACE_HAS_REENTRANT_FUNCTIONS */
diff --git a/ace/OS_NS_strings.h b/ace/OS_NS_strings.h
index e465ff94f64..c648047e829 100644
--- a/ace/OS_NS_strings.h
+++ b/ace/OS_NS_strings.h
@@ -26,32 +26,44 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/os_strings.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
class ACE_Time_Value;
namespace ACE_OS {
/// Compares two strings (case insensitive const char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strcasecmp (const char *s, const char *t);
#if defined (ACE_HAS_WCHAR)
/// Compares two strings (case insensitive const wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strcasecmp (const wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
/// Compares two arrays (case insensitive const char version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strncasecmp (const char *s, const char *t, size_t len);
#if defined (ACE_HAS_WCHAR)
/// Compares two arrays (case insensitive const wchar_t version).
+ ACE_NAMESPACE_INLINE_FUNCTION
int strncasecmp (const wchar_t *s, const wchar_t *t, size_t len);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_LACKS_STRCASECMP)
/// Emulated strcasecmp - Performs a case insensitive comparison of strings.
+ extern ACE_Export
int strcasecmp_emulation (const char *s, const char *t);
/// Emulated strncasecmp - Performs a case insensitvie comparison of arrays.
+ extern ACE_Export
int strncasecmp_emulation (const char *s, const char *t, size_t len);
#endif /* ACE_LACKS_STRCASECMP */
diff --git a/ace/OS_NS_stropts.h b/ace/OS_NS_stropts.h
index 4660a2ff1f9..b58a037beb2 100644
--- a/ace/OS_NS_stropts.h
+++ b/ace/OS_NS_stropts.h
@@ -25,9 +25,14 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/OS_Export.h"
#include "ace/os_include/os_stropts.h"
#include "ace/os_include/os_stdio.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
typedef WSAPROTOCOL_INFO ACE_Protocol_Info;
@@ -61,7 +66,7 @@ typedef unsigned long ACE_SOCK_GROUP;
*
* @brief Simple wrapper for STREAM pipes strbuf.
*/
-class ACE_OS_Export ACE_Str_Buf : public strbuf
+class ACE_Export ACE_Str_Buf : public strbuf
{
public:
// = Initialization method
@@ -76,10 +81,13 @@ class ACE_QoS;
namespace ACE_OS {
+ extern ACE_Export
int getmsg (ACE_HANDLE handle,
struct strbuf *ctl,
struct strbuf
*data, int *flags);
+
+ extern ACE_Export
int getpmsg (ACE_HANDLE handle,
struct strbuf *ctl,
struct strbuf
@@ -87,17 +95,22 @@ namespace ACE_OS {
int *band,
int *flags);
+ extern ACE_Export
int fattach (int handle,
const char *path);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int fdetach (const char *file);
/// UNIX-style <ioctl>.
+ ACE_NAMESPACE_INLINE_FUNCTION
int ioctl (ACE_HANDLE handle,
int cmd,
void * = 0);
#if !defined (ACE_HAS_WINCE)
/// QoS-enabled <ioctl>.
+ extern ACE_Export
int ioctl (ACE_HANDLE socket,
unsigned long io_control_code,
void *in_buffer_p,
@@ -110,6 +123,7 @@ namespace ACE_OS {
/// QoS-enabled <ioctl> when the I/O control code is either
/// SIO_SET_QOS or SIO_GET_QOS.
+ extern ACE_Export
int ioctl (ACE_HANDLE socket,
unsigned long io_control_code,
ACE_QoS &ace_qos,
@@ -120,12 +134,16 @@ namespace ACE_OS {
ACE_OVERLAPPED_COMPLETION_FUNC func = 0);
#endif // ACE_HAS_WINCE
+ ACE_NAMESPACE_INLINE_FUNCTION
int isastream (ACE_HANDLE handle);
+ ACE_NAMESPACE_INLINE_FUNCTION
int putmsg (ACE_HANDLE handle,
const struct strbuf *ctl,
const struct strbuf *data,
int flags);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int putpmsg (ACE_HANDLE handle,
const struct strbuf *ctl,
const struct strbuf *data,
diff --git a/ace/OS_NS_sys_mman.h b/ace/OS_NS_sys_mman.h
index f9bcb7e353b..bf0462afa26 100644
--- a/ace/OS_NS_sys_mman.h
+++ b/ace/OS_NS_sys_mman.h
@@ -27,13 +27,22 @@
#include "ace/Global_Macros.h"
#include "ace/os_include/sys/os_types.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
//@{ @name A set of wrappers for memory mapped files.
+ ACE_NAMESPACE_INLINE_FUNCTION
int madvise (caddr_t addr,
size_t len,
int map_advice);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
void *mmap (void *addr,
size_t len,
int prot,
@@ -43,20 +52,29 @@ namespace ACE_OS {
ACE_HANDLE *file_mapping = 0,
LPSECURITY_ATTRIBUTES sa = 0,
const ACE_TCHAR *file_mapping_name = 0);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int mprotect (void *addr,
size_t len,
int prot);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int msync (void *addr,
size_t len,
int sync);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int munmap (void *addr,
size_t len);
//@}
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE shm_open (const ACE_TCHAR *filename,
int mode,
int perms = 0,
LPSECURITY_ATTRIBUTES sa = 0);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int shm_unlink (const ACE_TCHAR *path);
} /* namespace ACE_OS */
diff --git a/ace/OS_NS_sys_msg.h b/ace/OS_NS_sys_msg.h
index 2a20bc77cf2..ad6bd2493b0 100644
--- a/ace/OS_NS_sys_msg.h
+++ b/ace/OS_NS_sys_msg.h
@@ -26,20 +26,33 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/os_msg.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
//@{ @name A set of wrappers for System V message queues.
+ ACE_NAMESPACE_INLINE_FUNCTION
int msgctl (int msqid,
int cmd,
struct msqid_ds *);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int msgget (key_t key,
int msgflg);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int msgrcv (int int_id,
void *buf,
size_t len,
long type,
int flags);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int msgsnd (int int_id,
const void *buf,
size_t len,
diff --git a/ace/OS_NS_sys_resource.h b/ace/OS_NS_sys_resource.h
index 54dcf186ef9..7841f7d9c52 100644
--- a/ace/OS_NS_sys_resource.h
+++ b/ace/OS_NS_sys_resource.h
@@ -26,16 +26,25 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/os_resource.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
int getrlimit (int resource,
struct rlimit *rl);
+ ACE_NAMESPACE_INLINE_FUNCTION
int getrusage (int who,
struct rusage *rusage);
+ ACE_NAMESPACE_INLINE_FUNCTION
int setrlimit (int resource,
ACE_SETRLIMIT_TYPE *rl);
diff --git a/ace/OS_NS_sys_select.h b/ace/OS_NS_sys_select.h
index 256f5fad57a..1507bf2d904 100644
--- a/ace/OS_NS_sys_select.h
+++ b/ace/OS_NS_sys_select.h
@@ -26,17 +26,26 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/os_select.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
class ACE_Time_Value;
namespace ACE_OS {
// Should be moved to cpp or inl.
+ ACE_NAMESPACE_INLINE_FUNCTION
int select (int width,
fd_set *rfds,
fd_set *wfds = 0,
fd_set *efds = 0,
const ACE_Time_Value *tv = 0);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int select (int width,
fd_set *rfds,
fd_set *wfds,
diff --git a/ace/OS_NS_sys_shm.h b/ace/OS_NS_sys_shm.h
index 1f45bf90a7a..9d9c6a93f36 100644
--- a/ace/OS_NS_sys_shm.h
+++ b/ace/OS_NS_sys_shm.h
@@ -26,17 +26,30 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/os_shm.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
//@{ @name A set of wrappers for System V shared memory.
+ ACE_NAMESPACE_INLINE_FUNCTION
void *shmat (int int_id,
void *shmaddr,
int shmflg);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int shmctl (int int_id,
int cmd,
struct shmid_ds *buf);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int shmdt (void *shmaddr);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int shmget (key_t key,
int size,
int flags);
diff --git a/ace/OS_NS_sys_socket.h b/ace/OS_NS_sys_socket.h
index afde45c8a5c..f771e592b52 100644
--- a/ace/OS_NS_sys_socket.h
+++ b/ace/OS_NS_sys_socket.h
@@ -27,6 +27,12 @@
#include "ace/os_include/sys/os_socket.h"
#include "ace/OS_NS_stropts.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
class ACE_Accept_QoS_Params;
class ACE_QoS_Params;
@@ -35,11 +41,12 @@ namespace ACE_OS {
# if defined (ACE_WIN32)
/// Keeps track of whether we've already initialized WinSock...
- extern int socket_initialized_;
+ extern ACE_Export int socket_initialized_;
# endif /* ACE_WIN32 */
//@{ @name A set of wrappers for sockets.
/// BSD-style <accept> (no QoS).
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE accept (ACE_HANDLE handle,
struct sockaddr *addr,
int *addrlen);
@@ -50,20 +57,24 @@ namespace ACE_OS {
* the OS platform doesn't support QoS-enabled <accept> then the
* <qos_params> are ignored and the BSD-style <accept> is called.
*/
+ extern ACE_Export
ACE_HANDLE accept (ACE_HANDLE handle,
struct sockaddr *addr,
int *addrlen,
const ACE_Accept_QoS_Params &qos_params);
#endif // ACE_HAS_WINCE
+ ACE_NAMESPACE_INLINE_FUNCTION
int bind (ACE_HANDLE s,
struct sockaddr *name,
int namelen);
// takes care of windows specific requirement to call closesocket
+ ACE_NAMESPACE_INLINE_FUNCTION
int closesocket (ACE_HANDLE s);
/// BSD-style <connect> (no QoS).
+ ACE_NAMESPACE_INLINE_FUNCTION
int connect (ACE_HANDLE handle,
struct sockaddr *addr,
int addrlen);
@@ -74,6 +85,7 @@ namespace ACE_OS {
* If the OS platform doesn't support QoS-enabled <connect> then the
* <qos_params> are ignored and the BSD-style <connect> is called.
*/
+ extern ACE_Export
int connect (ACE_HANDLE handle,
const sockaddr *addr,
int addrlen,
@@ -82,17 +94,21 @@ namespace ACE_OS {
/// Retrieve information about available transport protocols
/// installed on the local machine. Windows specific...
+ ACE_NAMESPACE_INLINE_FUNCTION
int enum_protocols (int *protocols,
ACE_Protocol_Info *protocol_buffer,
u_long *buffer_length);
+ ACE_NAMESPACE_INLINE_FUNCTION
int getpeername (ACE_HANDLE handle,
struct sockaddr *addr,
int *addrlen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int getsockname (ACE_HANDLE handle,
struct sockaddr *addr,
int *addrlen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int getsockopt (ACE_HANDLE handle,
int level,
int optname,
@@ -101,20 +117,24 @@ namespace ACE_OS {
#if !defined (ACE_HAS_WINCE)
/// Joins a leaf node into a QoS-enabled multi-point session.
+ extern ACE_Export
ACE_HANDLE join_leaf (ACE_HANDLE socket,
const sockaddr *name,
int namelen,
const ACE_QoS_Params &qos_params);
#endif // ACE_HAS_WINCE
+ ACE_NAMESPACE_INLINE_FUNCTION
int listen (ACE_HANDLE handle,
int backlog);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recv (ACE_HANDLE handle,
char *buf,
size_t len,
int flags = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recvfrom (ACE_HANDLE handle,
char *buf,
size_t len,
@@ -122,6 +142,7 @@ namespace ACE_OS {
struct sockaddr *addr,
int *addrlen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recvfrom (ACE_HANDLE handle,
iovec *buffers,
int buffer_count,
@@ -132,23 +153,28 @@ namespace ACE_OS {
ACE_OVERLAPPED *overlapped,
ACE_OVERLAPPED_COMPLETION_FUNC func);
+ ACE_NAMESPACE_INLINE_FUNCTION
int recvmsg (ACE_HANDLE handle,
struct msghdr *msg,
int flags);
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t recvv (ACE_HANDLE handle,
iovec *iov,
int iovlen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int send (ACE_HANDLE handle,
const char *buf,
size_t len,
int flags = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sendmsg (ACE_HANDLE handle,
const struct msghdr *msg,
int flags);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sendto (ACE_HANDLE handle,
const char *buf,
size_t len,
@@ -156,6 +182,7 @@ namespace ACE_OS {
const struct sockaddr *addr,
int addrlen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sendto (ACE_HANDLE handle,
const iovec *buffers,
int buffer_count,
@@ -166,36 +193,43 @@ namespace ACE_OS {
ACE_OVERLAPPED *overlapped,
ACE_OVERLAPPED_COMPLETION_FUNC func);
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t sendv (ACE_HANDLE handle,
const iovec *iov,
int iovcnt);
/// Manipulate the options associated with a socket.
+ ACE_NAMESPACE_INLINE_FUNCTION
int setsockopt (ACE_HANDLE handle,
int level,
int optname,
const char *optval,
int optlen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int shutdown (ACE_HANDLE handle,
int how);
/// Initialize WinSock before first use (e.g., when a DLL is first
/// loaded or the first use of a socket() call.
+ extern ACE_Export
int socket_init (int version_high = 1,
int version_low = 1);
/// Finalize WinSock after last use (e.g., when a DLL is unloaded).
+ extern ACE_Export
int socket_fini (void);
/// Create a BSD-style socket (no QoS).
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE socket (int protocol_family,
int type,
int proto);
/// Create a QoS-enabled socket. If the OS platform doesn't support
/// QoS-enabled <socket> then the BSD-style <socket> is called.
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE socket (int protocol_family,
int type,
int proto,
@@ -203,6 +237,7 @@ namespace ACE_OS {
ACE_SOCK_GROUP g,
u_long flags);
+ ACE_NAMESPACE_INLINE_FUNCTION
int socketpair (int domain,
int type,
int protocol,
diff --git a/ace/OS_NS_sys_stat.h b/ace/OS_NS_sys_stat.h
index cf2e0a339f1..40b1f73ed47 100644
--- a/ace/OS_NS_sys_stat.h
+++ b/ace/OS_NS_sys_stat.h
@@ -27,6 +27,12 @@
#include "ace/os_include/sys/os_types.h"
#include "ace/Default_Constants.h" // for ACE_DEFAULT_DIR_PERMS
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (__BORLANDC__)
typedef struct _stat ACE_stat;
@@ -36,33 +42,42 @@
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE creat (const ACE_TCHAR *filename,
mode_t mode);
//@{ @name A set of wrappers for low-level file operations.
// non-standard
+ ACE_NAMESPACE_INLINE_FUNCTION
long filesize (ACE_HANDLE handle);
+ ACE_NAMESPACE_INLINE_FUNCTION
long filesize (const ACE_TCHAR *handle);
//@}
+ ACE_NAMESPACE_INLINE_FUNCTION
int fstat (ACE_HANDLE,
ACE_stat *);
+ ACE_NAMESPACE_INLINE_FUNCTION
int lstat (const char *,
ACE_stat *);
+ ACE_NAMESPACE_INLINE_FUNCTION
int mkdir (const ACE_TCHAR *path,
mode_t mode = ACE_DEFAULT_DIR_PERMS);
+ ACE_NAMESPACE_INLINE_FUNCTION
int mkfifo (const ACE_TCHAR *file,
mode_t mode = ACE_DEFAULT_FILE_PERMS);
+ ACE_NAMESPACE_INLINE_FUNCTION
int stat (const ACE_TCHAR *file, ACE_stat *);
+ ACE_NAMESPACE_INLINE_FUNCTION
mode_t umask (mode_t cmask);
} /* namespace ACE_OS */
diff --git a/ace/OS_NS_sys_time.h b/ace/OS_NS_sys_time.h
index bb2ffd29882..8c6791f35e1 100644
--- a/ace/OS_NS_sys_time.h
+++ b/ace/OS_NS_sys_time.h
@@ -26,9 +26,16 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Time_Value.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_Time_Value gettimeofday (void);
} /* namespace ACE_OS */
diff --git a/ace/OS_NS_sys_uio.h b/ace/OS_NS_sys_uio.h
index 2910dbdde29..ac59b952c91 100644
--- a/ace/OS_NS_sys_uio.h
+++ b/ace/OS_NS_sys_uio.h
@@ -26,19 +26,28 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/os_uio.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t readv (ACE_HANDLE handle,
iovec *iov,
int iovlen);
#if defined (ACE_LACKS_READV)
+ extern ACE_Export
ssize_t readv_emulation (ACE_HANDLE handle,
ACE_READV_TYPE *iov,
int iovcnt);
#endif /* ACE_LACKS_READV */
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t writev (ACE_HANDLE handle,
const iovec *iov,
int iovcnt);
@@ -46,6 +55,7 @@ namespace ACE_OS {
// these don't need to be in the header, better to put them in the cpp
// or inl.
#if defined (ACE_LACKS_WRITEV)
+ extern ACE_Export
int writev_emulation (ACE_HANDLE handle,
ACE_WRITEV_TYPE *iov,
int iovcnt);
diff --git a/ace/OS_NS_sys_utsname.h b/ace/OS_NS_sys_utsname.h
index fd780b14afd..b65268a37f4 100644
--- a/ace/OS_NS_sys_utsname.h
+++ b/ace/OS_NS_sys_utsname.h
@@ -25,6 +25,13 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
+
#if defined (ACE_LACKS_UTSNAME_T)
# if !defined (SYS_NMLN)
# define SYS_NMLN 257
@@ -47,6 +54,11 @@ typedef struct utsname ACE_utsname;
namespace ACE_OS {
+#if !defined (ACE_WIN32) && !defined (VXWORKS) && !defined (CHORUS) && !defined (ACE_PSOS)
+ ACE_NAMESPACE_INLINE_FUNCTION
+#else
+ extern ACE_Export
+#endif /* ! ACE_WIN32 && ! VXWORKS && ! CHORUS */
int uname (ACE_utsname *name);
} /* namespace ACE_OS */
diff --git a/ace/OS_NS_sys_wait.h b/ace/OS_NS_sys_wait.h
index 6551a42fd2f..5fccad22916 100644
--- a/ace/OS_NS_sys_wait.h
+++ b/ace/OS_NS_sys_wait.h
@@ -26,11 +26,18 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/os_wait.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
/// Calls OS <::wait> function, so it's only portable to UNIX/POSIX
/// platforms.
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t wait (int * = 0);
/**
@@ -42,6 +49,7 @@ namespace ACE_OS {
* <pid> to wait on the project doesn't always work correctly
* if the waited process has already terminated.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t wait (pid_t pid,
ACE_exitcode *status,
int wait_options = 0,
@@ -55,6 +63,7 @@ namespace ACE_OS {
* <pid> to wait on the project doesn't always work correctly
* if the waited process has already terminated.
*/
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t waitpid (pid_t pid,
ACE_exitcode *status = 0,
int wait_options = 0,
diff --git a/ace/OS_NS_time.h b/ace/OS_NS_time.h
index 635e0a0e522..4da243ba58c 100644
--- a/ace/OS_NS_time.h
+++ b/ace/OS_NS_time.h
@@ -25,15 +25,20 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "ace/Basic_Types.h"
#include "ace/os_include/os_time.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
# if defined (ACE_HAS_BROKEN_R_ROUTINES)
# undef ctime_r
# undef asctime_r
# endif /* ACE_HAS_BROKEN_R_ROUTINES */
-#include "ace/Basic_Types.h"
-
// Type-safe, and unsigned.
static const ACE_UINT32 ACE_U_ONE_SECOND_IN_MSECS = 1000U;
static const ACE_UINT32 ACE_U_ONE_SECOND_IN_USECS = 1000000U;
@@ -42,7 +47,7 @@ static const ACE_UINT32 ACE_U_ONE_SECOND_IN_NSECS = 1000000000U;
#if defined (ACE_PSOS_HAS_TIME)
// Use pSOS time, wrapped . . .
-class ACE_OS_Export ACE_PSOS_Time_t
+class ACE_Export ACE_PSOS_Time_t
{
public:
/// default ctor: date, time, and ticks all zeroed.
@@ -233,73 +238,97 @@ namespace ACE_OS {
//@{ @name A set of wrappers for operations on time.
+ ACE_NAMESPACE_INLINE_FUNCTION
char *asctime (const struct tm *tm);
+ ACE_NAMESPACE_INLINE_FUNCTION
char *asctime_r (const struct tm *tm,
char *buf, int buflen);
+ ACE_NAMESPACE_INLINE_FUNCTION
int clock_gettime (clockid_t,
struct timespec *);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *ctime (const time_t *t);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen);
# if defined (difftime)
# undef difftime
# endif /* difftime */
+#if !defined (ACE_LACKS_DIFFTIME)
+ ACE_NAMESPACE_INLINE_FUNCTION
+#else
+ extern ACE_Export
+#endif /* ! ACE_LACKS_DIFFTIME */
double difftime (time_t t1,
time_t t0);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_hrtime_t gethrtime (const ACE_HRTimer_Op = ACE_HRTIMER_GETTIME);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct tm *gmtime (const time_t *clock);
+ extern ACE_Export
struct tm *gmtime_r (const time_t *clock,
struct tm *res);
+ ACE_NAMESPACE_INLINE_FUNCTION
struct tm *localtime (const time_t *clock);
+ extern ACE_Export
struct tm *localtime_r (const time_t *clock,
struct tm *res);
// Get the current time.
+ extern ACE_Export
time_t mktime (struct tm *timeptr);
+ ACE_NAMESPACE_INLINE_FUNCTION
int nanosleep (const struct timespec *requested,
struct timespec *remaining = 0);
# if defined (ACE_HAS_POWERPC_TIMER) && (defined (ghs) || defined (__GNUG__))
+ extern ACE_Export
void readPPCTimeBase (u_long &most,
u_long &least);
# endif /* ACE_HAS_POWERPC_TIMER && (ghs or __GNUG__) */
+ ACE_NAMESPACE_INLINE_FUNCTION
size_t strftime (char *s,
size_t maxsize,
const char *format,
const struct tm *timeptr);
#if defined (ACE_HAS_STRPTIME)
+ extern ACE_Export
char *strptime (char *buf,
const char *format,
struct tm *tm);
# if defined (ACE_LACKS_NATIVE_STRPTIME)
+ extern ACE_Export
int strptime_getnum (char *buf, int *num, int *bi,
int *fi, int min, int max);
# endif /* ACE_LACKS_NATIVE_STRPTIME */
#endif /* ACE_HAS_STRPTIME */
+ ACE_NAMESPACE_INLINE_FUNCTION
time_t time (time_t *tloc = 0);
# if defined (timezone)
# undef timezone
# endif /* timezone */
+ ACE_NAMESPACE_INLINE_FUNCTION
long timezone (void);
// wrapper for time zone information.
+ ACE_NAMESPACE_INLINE_FUNCTION
void tzset (void);
//@}
diff --git a/ace/OS_NS_unistd.h b/ace/OS_NS_unistd.h
index 51f67f62f74..1e1b1472870 100644
--- a/ace/OS_NS_unistd.h
+++ b/ace/OS_NS_unistd.h
@@ -28,6 +28,12 @@
#include "ace/os_include/os_unistd.h"
#include "ace/Time_Value.h"
#include "ace/os_include/os_stdio.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
// This should go in os_unistd.h, but since we don't yet implement any code
// at that level, we put it here. It used to be in OS.i.
@@ -37,135 +43,181 @@ extern "C" ACE_Export int ftruncate (ACE_HANDLE handle, long len);
namespace ACE_OS {
+ ACE_NAMESPACE_INLINE_FUNCTION
int access (const char *path, int amode);
#if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int access (const wchar_t *path, int amode);
#endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
unsigned int alarm (u_int secs);
+ ACE_NAMESPACE_INLINE_FUNCTION
int allocation_granularity (void);
// used by ARGV::argv_to_string() and ACE_OS::fork_exec()
+ extern ACE_Export
int argv_to_string (ACE_TCHAR **argv,
ACE_TCHAR *&buf,
int substitute_env_args = 1);
#if !defined (ACE_LACKS_CHDIR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int chdir (const char *path);
#if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int chdir (const wchar_t *path);
#endif /* ACE_HAS_WCHAR */
#endif /* ACE_LACKS_CHDIR */
+ ACE_NAMESPACE_INLINE_FUNCTION
int close (ACE_HANDLE handle);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE dup (ACE_HANDLE handle);
+ ACE_NAMESPACE_INLINE_FUNCTION
int dup2 (ACE_HANDLE oldfd,
ACE_HANDLE newfd);
+ extern ACE_Export
int execl (const char *path,
const char *arg0, ...);
+ extern ACE_Export
int execle (const char *path,
const char *arg0, ...);
+ extern ACE_Export
int execlp (const char *file,
const char *arg0, ...);
+ ACE_NAMESPACE_INLINE_FUNCTION
int execv (const char *path,
char *const argv[]);
+ ACE_NAMESPACE_INLINE_FUNCTION
int execve (const char *path,
char *const argv[],
char *const envp[]);
+ ACE_NAMESPACE_INLINE_FUNCTION
int execvp (const char *file,
char *const argv[]);
//@{
/// Forks and exec's a process in a manner that works on Solaris and
/// NT. argv[0] must be the full path name to the executable.
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t fork (void);
// not in susv3
+ extern ACE_Export
pid_t fork (const ACE_TCHAR *program_name);
+ extern ACE_Export
pid_t fork_exec (ACE_TCHAR *argv[]);
//@}
+#if !defined (ACE_WIN32)
+ ACE_NAMESPACE_INLINE_FUNCTION
+#else
+ extern ACE_Export
+#endif /* ACE_WIN32 */
int fsync (ACE_HANDLE handle);
+ ACE_NAMESPACE_INLINE_FUNCTION
int ftruncate (ACE_HANDLE,
off_t);
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *getcwd (ACE_TCHAR *, size_t);
+ ACE_NAMESPACE_INLINE_FUNCTION
gid_t getgid (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int getopt (int argc,
char *const *argv,
const char *optstring);
+ ACE_NAMESPACE_INLINE_FUNCTION
int getpagesize (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t getpgid (pid_t pid);
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t getpid (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t getppid (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
uid_t getuid (void);
// should call gethostname()
+ ACE_NAMESPACE_INLINE_FUNCTION
int hostname (char *name,
size_t maxnamelen);
#if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
int hostname (wchar_t *name,
size_t maxnamelen);
#endif /* ACE_HAS_WCHAR */
+ ACE_NAMESPACE_INLINE_FUNCTION
int isatty (int handle);
#if defined (ACE_WIN32)
+ ACE_NAMESPACE_INLINE_FUNCTION
int isatty (ACE_HANDLE handle);
#endif /* ACE_WIN32 */
+ ACE_NAMESPACE_INLINE_FUNCTION
off_t lseek (ACE_HANDLE handle,
off_t offset,
int whence);
#if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_LOFF_T llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence);
#endif /* ACE_HAS_LLSEEK */
/// Get the number of CPUs configured in the machine.
+ extern ACE_Export
long num_processors (void);
/// Get the number of CPUs currently online.
+ extern ACE_Export
long num_processors_online (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int pipe (ACE_HANDLE handles[]);
+ extern ACE_Export
ssize_t pread (ACE_HANDLE handle,
void *buf,
size_t nbyte,
off_t offset);
+ extern ACE_Export
ssize_t pwrite (ACE_HANDLE handle,
const void *buf,
size_t nbyte,
off_t offset);
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t read (ACE_HANDLE handle,
void *buf,
size_t len);
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t read (ACE_HANDLE handle,
void *buf,
size_t len,
@@ -179,60 +231,80 @@ namespace ACE_OS {
* read will be returned to the caller through<bytes_transferred>.
*
*/
+ extern ACE_Export
ssize_t read_n (ACE_HANDLE handle,
void *buf,
size_t len,
size_t *bytes_transferred = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
int readlink (const char *path,
char *buf,
size_t bufsiz);
+ ACE_NAMESPACE_INLINE_FUNCTION
void *sbrk (int brk);
+ ACE_NAMESPACE_INLINE_FUNCTION
int setgid (gid_t);
+ ACE_NAMESPACE_INLINE_FUNCTION
int setpgid (pid_t pid, pid_t pgid);
+ ACE_NAMESPACE_INLINE_FUNCTION
int setregid (gid_t rgid, gid_t egid);
+ ACE_NAMESPACE_INLINE_FUNCTION
int setreuid (uid_t ruid, uid_t euid);
+ ACE_NAMESPACE_INLINE_FUNCTION
pid_t setsid (void);
+ ACE_NAMESPACE_INLINE_FUNCTION
int setuid (uid_t);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sleep (u_int seconds);
+ ACE_NAMESPACE_INLINE_FUNCTION
int sleep (const ACE_Time_Value &tv);
// used by ARGV::string_to_argv
+ extern ACE_Export
int string_to_argv (ACE_TCHAR *buf,
int &argc,
ACE_TCHAR **&argv,
int substitute_env_args = 1);
+ ACE_NAMESPACE_INLINE_FUNCTION
long sysconf (int);
// not in susv3
+ ACE_NAMESPACE_INLINE_FUNCTION
long sysinfo (int cmd,
char *buf,
long count);
+ ACE_NAMESPACE_INLINE_FUNCTION
int truncate (const ACE_TCHAR *filename, off_t length);
+ ACE_NAMESPACE_INLINE_FUNCTION
u_int ualarm (u_int usecs,
u_int interval = 0);
+ ACE_NAMESPACE_INLINE_FUNCTION
u_int ualarm (const ACE_Time_Value &tv,
const ACE_Time_Value &tv_interval = ACE_Time_Value::zero);
+ ACE_NAMESPACE_INLINE_FUNCTION
int unlink (const ACE_TCHAR *path);
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t write (ACE_HANDLE handle,
const void *buf,
size_t nbyte);
+ ACE_NAMESPACE_INLINE_FUNCTION
ssize_t write (ACE_HANDLE handle,
const void *buf,
size_t nbyte,
@@ -245,6 +317,7 @@ namespace ACE_OS {
* EOF occurs, 0 is returned. Whatever data has been transmitted
* will be returned to the caller through <bytes_transferred>.
*/
+ extern ACE_Export
ssize_t write_n (ACE_HANDLE handle,
const void *buf,
size_t len,
diff --git a/ace/OS_NS_wchar.h b/ace/OS_NS_wchar.h
index 9d113747232..d35d2c8a445 100644
--- a/ace/OS_NS_wchar.h
+++ b/ace/OS_NS_wchar.h
@@ -27,124 +27,154 @@
#include "ace/os_include/os_wchar.h"
#include "ace/Basic_Types.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS {
//#if defined (ACE_HAS_WCHAR)
typedef ACE_WCHAR_T WChar;
+ ACE_NAMESPACE_INLINE_FUNCTION
wint_t fgetwc (FILE* fp);
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT)
/// Emulated wcscat - Appends a string.
+ extern ACE_Export
wchar_t *wcscat_emulation (wchar_t *destination,
const wchar_t *source);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCAT */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR)
/// Emulated wcschr - Finds a character in a string.
+ extern ACE_Export
wchar_t *wcschr_emulation (const wchar_t *string, wint_t c);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCHR */
#if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP)
/// Emulated wcscmp - Compares strings.
+ extern ACE_Export
int wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2);
#endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCMP */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY)
/// Emulated wcscpy - Copies a string.
+ extern ACE_Export
wchar_t *wcscpy_emulation (wchar_t *destination,
- const wchar_t *source);
+ const wchar_t *source);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCPY */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN)
/// Emulated wcscspn.
+ extern ACE_Export
size_t wcscspn_emulation (const wchar_t *string,
- const wchar_t *reject);
+ const wchar_t *reject);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCSPN */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP)
/// Emulated wcsicmp - Performs a case insensitive comparison of strings.
+ extern ACE_Export
int wcsicmp_emulation (const wchar_t *string1,
- const wchar_t *string2);
+ const wchar_t *string2);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSICMP */
#if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN)
/// Emulated wcslen - Returns the length of a string.
+ extern ACE_Export
size_t wcslen_emulation (const ACE_WCHAR_T *string);
#endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSLEN */
#if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT)
/// Emulated wcscat - Appends a string.
+ extern ACE_Export
ACE_WCHAR_T *wcsncat_emulation (ACE_WCHAR_T *destination,
- const ACE_WCHAR_T *source,
- size_t count);
+ const ACE_WCHAR_T *source,
+ size_t count);
#endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCAT */
#if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP)
/// Emulated wcsncmp - Compares two arrays.
+ extern ACE_Export
int wcsncmp_emulation (const ACE_WCHAR_T *string1,
- const ACE_WCHAR_T *string2,
- size_t len);
+ const ACE_WCHAR_T *string2,
+ size_t len);
#endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCMP */
#if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY)
/// Emulated wcsncpy - Copies an array.
+ extern ACE_Export
ACE_WCHAR_T *wcsncpy_emulation (ACE_WCHAR_T *destination,
- const ACE_WCHAR_T *source,
- size_t len);
+ const ACE_WCHAR_T *source,
+ size_t len);
#endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCPY */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP)
/// Emulated wcsnicmp - Performs a case insensitive comparison of two
/// arrays
+ extern ACE_Export
int wcsnicmp_emulation (const wchar_t *string1,
- const wchar_t *string2,
- size_t len);
+ const wchar_t *string2,
+ size_t len);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSNICMP */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK)
/// Emulated wcspbrk - Searches for characters in a string.
+ extern ACE_Export
wchar_t *wcspbrk_emulation (const wchar_t *string,
- const wchar_t *charset);
+ const wchar_t *charset);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSPBRK */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR)
/// Emulated wcsrchr (wchar_t version) - Finds the last occurance of a
/// character in a string.
+ extern ACE_Export
wchar_t *wcsrchr_emulation (wchar_t *string, wint_t c);
/// Emulated wcsrchr (const wchar_t version) - Finds the last occurance of a
/// character in a string.
+ extern ACE_Export
const wchar_t *wcsrchr_emulation (const wchar_t *string, wint_t c);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSRCHR */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN)
/// Emulated wcsspn.
+ extern ACE_Export
size_t wcsspn_emulation (const wchar_t *string,
- const wchar_t *charset);
+ const wchar_t *charset);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSPN */
#if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR)
/// Emulated wcsstr - Performs a case insensitive comparison of two strings.
+ extern ACE_Export
wchar_t *wcsstr_emulation (const wchar_t *string,
- const wchar_t *charset);
+ const wchar_t *charset);
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSTR */
// these are named wrong. should be wcslen, etc... dhinton
+ ACE_NAMESPACE_INLINE_FUNCTION
u_int wslen (const WChar *);
+ ACE_NAMESPACE_INLINE_FUNCTION
WChar *wscpy (WChar *,
const WChar *);
+ ACE_NAMESPACE_INLINE_FUNCTION
int wscmp (const WChar *,
const WChar *);
+ ACE_NAMESPACE_INLINE_FUNCTION
int wsncmp (const WChar *,
const WChar *,
size_t len);
+#if defined (ACE_HAS_WCHAR)
+ ACE_NAMESPACE_INLINE_FUNCTION
wint_t ungetwc (wint_t c, FILE* fp);
+#endif /* ACE_HAS_WCHAR */
} /* namespace ACE_OS */
diff --git a/ace/OS_TLI.h b/ace/OS_TLI.h
index 3615805a1bd..2639612a9ab 100644
--- a/ace/OS_TLI.h
+++ b/ace/OS_TLI.h
@@ -16,13 +16,18 @@
#include /**/ "ace/pre.h"
#include "ace/config-all.h"
-#include "ace/OS_Export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/OS_Errno.h"
+#include "ace/ACE_export.h"
+
+#if defined (ACE_EXPORT_MACRO)
+# undef ACE_EXPORT_MACRO
+#endif
+#define ACE_EXPORT_MACRO ACE_Export
# if !defined (ACE_HAS_TLI)
// Dummies to help compilation.
@@ -128,61 +133,109 @@ extern "C" int _xti_error(char *);
namespace ACE_OS
{
// = A set of wrappers for TLI.
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_accept (ACE_HANDLE fildes,
- ACE_HANDLE resfd,
- struct t_call
- *call);
+ ACE_HANDLE resfd,
+ struct t_call
+ *call);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
char *t_alloc (ACE_HANDLE fildes,
- int struct_type,
- int
- fields);
+ int struct_type,
+ int
+ fields);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_bind (ACE_HANDLE fildes,
- struct t_bind *req,
- struct
- t_bind *ret);
+ struct t_bind *req,
+ struct
+ t_bind *ret);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_close (ACE_HANDLE fildes);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_connect (ACE_HANDLE fildes,
- struct t_call *sndcall,
- struct t_call *rcvcall);
+ struct t_call *sndcall,
+ struct t_call *rcvcall);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
void t_error (const char *errmsg);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_free (char *ptr,
- int struct_type);
+ int struct_type);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_getinfo (ACE_HANDLE fildes,
- struct t_info *info);
+ struct t_info *info);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_getname (ACE_HANDLE fildes,
- struct netbuf *namep,
- int type);
+ struct netbuf *namep,
+ int type);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_getstate (ACE_HANDLE fildes);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_listen (ACE_HANDLE fildes,
- struct t_call *call);
+ struct t_call *call);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_look (ACE_HANDLE fildes);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE t_open (char *path,
- int oflag,
- struct t_info *info);
+ int oflag,
+ struct t_info *info);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_optmgmt (ACE_HANDLE fildes,
- struct t_optmgmt *req,
- struct t_optmgmt *ret);
+ struct t_optmgmt *req,
+ struct t_optmgmt *ret);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_rcv (ACE_HANDLE fildes,
- char *buf,
- unsigned int nbytes,
- int *flags);
+ char *buf,
+ unsigned int nbytes,
+ int *flags);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_rcvdis (ACE_HANDLE fildes,
- struct t_discon *discon);
+ struct t_discon *discon);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_rcvrel (ACE_HANDLE fildes);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_rcvudata (ACE_HANDLE fildes,
- struct t_unitdata *unitdata,
- int *flags);
+ struct t_unitdata *unitdata,
+ int *flags);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_rcvuderr (ACE_HANDLE fildes,
- struct t_uderr *uderr);
+ struct t_uderr *uderr);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_snd (ACE_HANDLE fildes,
- const char *buf,
- unsigned int nbytes,
- int flags);
+ const char *buf,
+ unsigned int nbytes,
+ int flags);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_snddis (ACE_HANDLE fildes,
- struct t_call *call);
+ struct t_call *call);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_sndrel (ACE_HANDLE fildes);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_sync (ACE_HANDLE fildes);
+
+ ACE_NAMESPACE_INLINE_FUNCTION
int t_unbind (ACE_HANDLE fildes);
+
}; /* namespace ACE_OS */
# if defined (ACE_HAS_INLINED_OSCALLS)