summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-14 22:59:13 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-14 22:59:13 +0000
commit1b239a62112c9e0a84623b43fcce63006f61d7d7 (patch)
treed381cb31134769954ee65d8268e4f2df238fa5d6
parentcc2406ad9442569e354a29568e4e460d37c2a57d (diff)
downloadATCD-1b239a62112c9e0a84623b43fcce63006f61d7d7.tar.gz
ChangeLogTag:Wed May 14 17:40:28 UTC 2003 Don Hinton <dhinton@dresystems.com>
-rw-r--r--ChangeLog122
-rw-r--r--ace/Default_Constants.h127
-rw-r--r--ace/Global_Macros.h210
-rw-r--r--ace/Handle_Set.h8
-rw-r--r--ace/OS.h1058
-rw-r--r--ace/SV_Semaphore_Simple.h17
-rw-r--r--ace/config-all.h61
-rw-r--r--ace/config-psosim-g++.h4
-rw-r--r--ace/config-win32-msvc.h34
-rw-r--r--ace/os_include/aio.h10
-rw-r--r--ace/os_include/arpa/inet.h14
-rw-r--r--ace/os_include/assert.h14
-rw-r--r--ace/os_include/complex.h10
-rw-r--r--ace/os_include/cpio.h10
-rw-r--r--ace/os_include/ctype.h10
-rw-r--r--ace/os_include/dirent.h10
-rw-r--r--ace/os_include/dlfcn.h69
-rw-r--r--ace/os_include/errno.h129
-rw-r--r--ace/os_include/fcntl.h66
-rw-r--r--ace/os_include/fenv.h10
-rw-r--r--ace/os_include/float.h10
-rw-r--r--ace/os_include/fmtmsg.h10
-rw-r--r--ace/os_include/fnmatch.h10
-rw-r--r--ace/os_include/ftw.h10
-rw-r--r--ace/os_include/glob.h10
-rw-r--r--ace/os_include/grp.h10
-rw-r--r--ace/os_include/iconv.h10
-rw-r--r--ace/os_include/inttypes.h10
-rw-r--r--ace/os_include/iso646.h10
-rw-r--r--ace/os_include/langinfo.h10
-rw-r--r--ace/os_include/libgen.h10
-rw-r--r--ace/os_include/limits.h42
-rw-r--r--ace/os_include/local.h10
-rw-r--r--ace/os_include/math.h10
-rw-r--r--ace/os_include/monetary.h10
-rw-r--r--ace/os_include/mqueue.h10
-rw-r--r--ace/os_include/ndbm.h10
-rw-r--r--ace/os_include/net/if.h32
-rw-r--r--ace/os_include/netdb.h57
-rw-r--r--ace/os_include/netinet/in.h51
-rw-r--r--ace/os_include/netinet/tcp.h16
-rw-r--r--ace/os_include/nl_types.h10
-rw-r--r--ace/os_include/poll.h10
-rw-r--r--ace/os_include/pthread.h18
-rw-r--r--ace/os_include/pwd.h10
-rw-r--r--ace/os_include/regex.h10
-rw-r--r--ace/os_include/sched.h10
-rw-r--r--ace/os_include/search.h10
-rw-r--r--ace/os_include/semaphore.h10
-rw-r--r--ace/os_include/setjmp.h10
-rw-r--r--ace/os_include/signal.h104
-rw-r--r--ace/os_include/spawn.h10
-rw-r--r--ace/os_include/stdarg.h10
-rw-r--r--ace/os_include/stdbool.h10
-rw-r--r--ace/os_include/stddef.h64
-rw-r--r--ace/os_include/stdint.h108
-rw-r--r--ace/os_include/stdio.h38
-rw-r--r--ace/os_include/stdlib.h42
-rw-r--r--ace/os_include/string.h16
-rw-r--r--ace/os_include/strings.h12
-rw-r--r--ace/os_include/stropts.h28
-rw-r--r--ace/os_include/sys/ipc.h43
-rw-r--r--ace/os_include/sys/mman.h32
-rw-r--r--ace/os_include/sys/msg.h28
-rw-r--r--ace/os_include/sys/resource.h38
-rw-r--r--ace/os_include/sys/select.h22
-rw-r--r--ace/os_include/sys/sem.h50
-rw-r--r--ace/os_include/sys/shm.h14
-rw-r--r--ace/os_include/sys/socket.h128
-rw-r--r--ace/os_include/sys/stat.h109
-rw-r--r--ace/os_include/sys/statvfs.h12
-rw-r--r--ace/os_include/sys/time.h12
-rw-r--r--ace/os_include/sys/timeb.h20
-rw-r--r--ace/os_include/sys/times.h12
-rw-r--r--ace/os_include/sys/types.h26
-rw-r--r--ace/os_include/sys/uio.h74
-rw-r--r--ace/os_include/sys/un.h12
-rw-r--r--ace/os_include/sys/utsname.h12
-rw-r--r--ace/os_include/sys/wait.h12
-rw-r--r--ace/os_include/syslog.h12
-rw-r--r--ace/os_include/tar.h12
-rw-r--r--ace/os_include/termios.h12
-rw-r--r--ace/os_include/tgmath.h12
-rw-r--r--ace/os_include/time.h34
-rw-r--r--ace/os_include/trace.h12
-rw-r--r--ace/os_include/ucontext.h12
-rw-r--r--ace/os_include/ulimit.h12
-rw-r--r--ace/os_include/unistd.h67
-rw-r--r--ace/os_include/utime.h12
-rw-r--r--ace/os_include/utmpx.h12
-rw-r--r--ace/os_include/wchar.h12
-rw-r--r--ace/os_include/wctype.h12
-rw-r--r--ace/os_include/wordexp.h13
93 files changed, 1957 insertions, 1836 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e4362686d4..9b9e065a09a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,125 @@
+Wed May 14 17:40:28 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Moved more code, as listed below.
+
+ * ace/Default_Constants.h:
+ Moved ACE_DIRECTORY_SEPERATOR_*, ACE_PLATFORM_*,
+ ACE_LD_SEARCH_PATH_*, ACE_DLL_*, ACE_DEFAULT_SVC_CONF,
+ ACE_DEFAULT_[LOCAL|GLOBAL]NAME_*, ACE_DEFAULT_NAMESPACE_*,
+ ACE_DEFAULT_THREAD_PRIORITY, and ACE_MAX_DEFAULT_PORT
+ defines here.
+
+ * ace/Global_Macros.h:
+ Moved the Service Configurator macros here.
+
+ * ace/Handle_Set.h:
+ * ace/os_include/sys/select.h:
+ Moved the fd_mask typedef from ace/Handle_Set.h to
+ ace/os_include/sys/select.h.
+
+ * ace/config-all.h:
+ Moved ACE_OSTREAM, ACE_DEFAULT_LOG_STREAM, ACE_SYNCH_*,
+ ACE_WSOCK_VERSION, _REENTRANT, ACE_USING, ACE_TYPENAME_*,
+ and ACE_TEMPLATE_SPECIALIZATION defines here.
+
+ * ace/config-psosim-g++:
+ Moved the size_t define here.
+
+ * ace/config-win32-msvc.h:
+ Moved the pragma warning disable's and ACE_HAS_STRICT here.
+
+ * ace/os_include/*h:
+ Changed the @file and include guards to include an OS/os
+ prefix. The file names will be changed when we merge to
+ the main trunk.
+
+ * ace/os_include/dlfcn.h:
+ Moved extern "C" {} wrapper around the include of dlfcn.h when
+ ACE_HAS_DLFCN_H_BROKEN_EXTERN_C defined, ACE_SHLIB_*,
+ ACE_DEFAULT_SHLIB_MODE, and RTLD_* defines here.
+
+ * ace/os_include/errno.h:
+ Moved the ACE_PSOS and ACE_WIN32 E* defines here.
+
+ * ace/os_include/fcntl.h:
+ Moved the ACE_WIN32 O_* and ACE_NONBLOCK defines here.
+
+ * ace/os_include/limits.h:
+ Added POSIX NAME_MAX and HOST_NAME_MAX. Moved MAXNAMLEN,
+ MAXNAMELEN, and MAXHOSTNAMELEN here.
+
+ * ace/os_include/netdb.h:
+ Move queue define when ACE_HAS_STL_QUEUE_CONFLICT is defined here.
+ Added extern "C" {} around netdb.h include. Moved hostent,
+ servent structs and ACE_[HOSTENT|SERVENT|PROTOENT]_DATA*
+ defines here.
+
+ * ace/os_include/pthread.h:
+ Added extern "C" {} wrapper around pthread.h include.
+
+ * ace/os_include/signal.h:
+ Moved siginfo_t typedef here. Added extern "C" {} wrapper
+ around signal.h include and moved sigset_t typedef here. Moved
+ ACE_SignalHandler and ACE_SignalHandlerV function typedefs
+ and sigaction struct definition here.
+
+ * ace/os_include/stdint.h:
+ Moved ACE_PSOS typedefs here.
+
+ * ace/os_include/stdlib.h:
+ Moved alloca.h include here.
+
+ * ace/os_include/string.h:
+ Changed extern to extern "C" to the strdup() declaration.
+
+ * ace/os_include/unistd.h:
+ Changed extern to extern"C" to the getopt() declaration.
+
+ * ace/os_include/arpa/inet.h:
+ Added extern "C" {} around arpa/inet.h include.
+
+ * ace/os_include/net/if.h:
+ Move map define when ACE_HAS_STL_MAP_CONFLICT is defined here.
+ Added extern "C" {} around net/if.h include. Moved
+ IFF_LOOPBACK define here. Moved struct ifafilt declare when
+ ACE_HAS_BROKEN_IF_HEADER is defined.
+
+ * ace/os_include/netinet/in.h:
+ Move queue define when ACE_HAS_STL_QUEUE_CONFLICT is defined here.
+ Added extern "C" {} around netinet/in.h include. Moved
+ IPPORT_RESERVED, IPPORT_USERRESERVED, INADDR_LOOPBACK,
+ INADDR_NONE, INET_ADDRSTRLEN, and INET6_ADDRSTRLEN defines here.
+
+ * ace/os_include/netinet/tcp.h:
+ Moved TCP_NODELAY define here.
+
+ * ace/os_include/sys/ipc.h:
+ Moved ACE_INVALID_SEM_KEY and the IPC_* defines here.
+
+ * ace/os_include/sys/mman.h:
+ Moved extern "C" {} around sys/mman.h when ACE_HAS_BROKEN_MMAP_H
+ is defined. Moved the PROT* and MAP_* defines here.
+
+ * ace/os_include/sys/sem.h:
+ Moved union semun definition here.
+
+ * ace/os_include/sys/socket.h:
+ Moved cygwin32/socket.h include here. Moved __cplusplus
+ undef/def around sys/socket.h include when
+ ACE_HAS_AIX_BROKEN_SOCKET_HEADER is defined. Moved AF_*, PF_*,
+ ACE_ADDRESS_FAMILY_INET and ACE_PROTOCOL_FAMILY_INET defines
+ here.
+
+ * ace/os_include/sys/stat.h:
+ Added undef ACE_LACKS_SYS_STAT_H if ACE_PSOS is defined (should
+ go in the ACE_PSOS headers, eventually). Changed umask(),
+ mkfifo(), and mkdir() declarations from extern to extern "C".
+
+ * ace/os_include/sys/uio.h:
+ Moved iovec definition for ACE_WIN32 here. Moved
+ ACE_[READ|WRITE]_TYPE typedefs here.
+
Sun May 11 15:51:51 UTC 2003 Don Hinton <dhinton@dresystems.com>
Merged dre_osh_01 up to the main and rebranched to dre_osh_01
diff --git a/ace/Default_Constants.h b/ace/Default_Constants.h
index 36d75e2acce..9d56ba07c30 100644
--- a/ace/Default_Constants.h
+++ b/ace/Default_Constants.h
@@ -26,7 +26,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-
// Define the default constants for ACE. Many of these are used for
// the ACE tests and applications. You can change these values by
// defining the macros in your config.h file.
@@ -394,5 +393,131 @@
const unsigned int ACE_CONNECTOR_HANDLER_MAP_SIZE = 16;
#endif /*ACE_CONNECTOR_HANDLER_MAP_SIZE*/
+#if defined (ACE_WIN32)
+ // Define the pathname separator characters for Win32 (ugh).
+# define ACE_DIRECTORY_SEPARATOR_STR_A "\\"
+# define ACE_DIRECTORY_SEPARATOR_CHAR_A '\\'
+#else
+ // Define the pathname separator characters for UNIX.
+# define ACE_DIRECTORY_SEPARATOR_STR_A ACE_LIB_TEXT ("/")
+# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/'
+#endif /* ACE_WIN32 */
+
+// Define the Wide character and normal versions of some of the string macros
+#if defined (ACE_HAS_WCHAR)
+# define ACE_DIRECTORY_SEPARATOR_STR_W ACE_TEXT_WIDE(ACE_DIRECTORY_SEPARATOR_STR_A)
+# define ACE_DIRECTORY_SEPARATOR_CHAR_W ACE_TEXT_WIDE(ACE_DIRECTORY_SEPARATOR_CHAR_A)
+#endif /* ACE_HAS_WCHAR */
+
+#define ACE_DIRECTORY_SEPARATOR_STR ACE_LIB_TEXT (ACE_DIRECTORY_SEPARATOR_STR_A)
+#define ACE_DIRECTORY_SEPARATOR_CHAR ACE_LIB_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A)
+
+#if !defined (ACE_DEFAULT_THREAD_PRIORITY)
+# define ACE_DEFAULT_THREAD_PRIORITY (-0x7fffffffL - 1L)
+#endif /* ACE_DEFAULT_THREAD_PRIORITY */
+
+#if !defined (ACE_MAX_DEFAULT_PORT)
+# define ACE_MAX_DEFAULT_PORT 65535
+#endif /* ACE_MAX_DEFAULT_PORT */
+
+#if defined (ACE_WIN32)
+ // We're on WinNT or Win95
+# define ACE_PLATFORM_A "Win32"
+# define ACE_PLATFORM_EXE_SUFFIX_A ".exe"
+#elif defined (ACE_PSOS)
+# define ACE_PLATFORM_A "pSOS"
+# define ACE_PLATFORM_EXE_SUFFIX_A ""
+#else /* !ACE_WIN32 && !ACE_PSOS */
+ // We're some kind of UNIX...
+# define ACE_PLATFORM_A "UNIX"
+# define ACE_PLATFORM_EXE_SUFFIX_A ""
+#endif /* ACE_WIN32 */
+
+// Define the Wide character and normal versions of some of the string macros
+#if defined (ACE_HAS_WCHAR)
+# define ACE_PLATFORM_W ACE_TEXT_WIDE(ACE_PLATFORM_A)
+# define ACE_PLATFORM_EXE_SUFFIX_W ACE_TEXT_WIDE(ACE_PLATFORM_EXE_SUFFIX_A)
+#endif /* ACE_HAS_WCHAR */
+
+#define ACE_PLATFORM ACE_LIB_TEXT (ACE_PLATFORM_A)
+#define ACE_PLATFORM_EXE_SUFFIX ACE_LIB_TEXT (ACE_PLATFORM_EXE_SUFFIX_A)
+
+#if defined (ACE_WIN32)
+# define ACE_LD_SEARCH_PATH ACE_LIB_TEXT ("PATH")
+# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_LIB_TEXT (";")
+# define ACE_DLL_SUFFIX ACE_LIB_TEXT (".dll")
+# if defined (__MINGW32__)
+# define ACE_DLL_PREFIX ACE_LIB_TEXT ("lib")
+# else /* __MINGW32__ */
+# define ACE_DLL_PREFIX ACE_LIB_TEXT ("")
+# endif /* __MINGW32__ */
+#else /* !ACE_WIN32 */
+# define ACE_LD_SEARCH_PATH ACE_LIB_TEXT ("LD_LIBRARY_PATH")
+# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_LIB_TEXT (":")
+#endif /* ACE_WIN32 */
+
+#if !defined (ACE_DLL_SUFFIX)
+# define ACE_DLL_SUFFIX ACE_LIB_TEXT (".so")
+#endif /* ACE_DLL_SUFFIX */
+
+#if !defined (ACE_DLL_PREFIX)
+# define ACE_DLL_PREFIX ACE_LIB_TEXT ("lib")
+#endif /* ACE_DLL_PREFIX */
+
+#if defined (ACE_WIN32)
+// Used for dynamic linking
+# if !defined (ACE_DEFAULT_SVC_CONF)
+# if (ACE_USES_CLASSIC_SVC_CONF == 1)
+# define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT (".\\svc.conf")
+# else
+# define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT (".\\svc.conf.xml")
+# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */
+# endif /* ACE_DEFAULT_SVC_CONF */
+#endif /* ACE_WIN32 */
+
+ // Used for dynamic linking.
+#if !defined (ACE_DEFAULT_SVC_CONF)
+# if (ACE_USES_CLASSIC_SVC_CONF == 1)
+# define ACE_DEFAULT_SVC_CONF "./svc.conf"
+# else
+# define ACE_DEFAULT_SVC_CONF "./svc.conf.xml"
+# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */
+#endif /* ACE_DEFAULT_SVC_CONF */
+
+#if !defined (ACE_LOGGER_KEY)
+# define ACE_LOGGER_KEY ACE_LIB_TEXT ("/tmp/server_daemon")
+#endif /* ACE_LOGGER_KEY */
+
+// Theses defines are used by the ACE Name Server.
+#if !defined (ACE_DEFAULT_LOCALNAME_A)
+# define ACE_DEFAULT_LOCALNAME_A "localnames"
+#endif /* ACE_DEFAULT_LOCALNAME_A */
+#if !defined (ACE_DEFAULT_GLOBALNAME_A)
+# define ACE_DEFAULT_GLOBALNAME_A "globalnames"
+#endif /* ACE_DEFAULT_GLOBALNAME_A */
+
+// ACE_DEFAULT_NAMESPACE_DIR is for legacy mode apps. A better
+// way of doing this is something like ACE_Lib_Find::get_temp_dir, since
+// this directory may not exist
+#if defined (ACE_LEGACY_MODE)
+# if defined (ACE_WIN32)
+# define ACE_DEFAULT_NAMESPACE_DIR_A "C:\\temp"
+# else /* ACE_WIN32 */
+# define ACE_DEFAULT_NAMESPACE_DIR_A "/tmp"
+# endif /* ACE_WIN32 */
+# if defined (ACE_HAS_WCHAR)
+# define ACE_DEFAULT_NAMESPACE_DIR_W ACE_TEXT_WIDE(ACE_DEFAULT_NAMESPACE_DIR_A)
+# endif /* ACE_HAS_WCHAR */
+# define ACE_DEFAULT_NAMESPACE_DIR ACE_LIB_TEXT(ACE_DEFAULT_NAMESPACE_DIR_A)
+#endif /* ACE_LEGACY_MODE */
+
+#if defined (ACE_HAS_WCHAR)
+# define ACE_DEFAULT_LOCALNAME_W ACE_TEXT_WIDE(ACE_DEFAULT_LOCALNAME_A)
+# define ACE_DEFAULT_GLOBALNAME_W ACE_TEXT_WIDE(ACE_DEFAULT_GLOBALNAME_A)
+#endif /* ACE_HAS_WCHAR */
+
+#define ACE_DEFAULT_LOCALNAME ACE_LIB_TEXT (ACE_DEFAULT_LOCALNAME_A)
+#define ACE_DEFAULT_GLOBALNAME ACE_LIB_TEXT (ACE_DEFAULT_GLOBALNAME_A)
+
#include "ace/post.h"
#endif /*ACE_DEFAULT_CONSTANTS_H*/
diff --git a/ace/Global_Macros.h b/ace/Global_Macros.h
index 01df20a4d65..ae8380af3c3 100644
--- a/ace/Global_Macros.h
+++ b/ace/Global_Macros.h
@@ -432,6 +432,216 @@ friend class ace_dewarn_gplusplus
# endif /* defined (__Lynx__) && __LYNXOS_SDK_VERSION == 199701L */
# endif /* defined ! ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR */
+
+/*******************************************************************/
+
+/// Service Objects, i.e., objects dynamically loaded via the service
+/// configurator, must provide a destructor function with the
+/// following prototype to perform object cleanup.
+typedef void (*ACE_Service_Object_Exterminator)(void *);
+
+/** @name Service Configurator macros
+ *
+ * The following macros are used to define helper objects used in
+ * ACE's Service Configurator. This is an implementation of the
+ * Service Configurator pattern:
+ *
+ * http://www.cs.wustl.edu/~schmidt/PDF/SvcConf.pdf
+ *
+ * The intent of this pattern is to allow developers to dynamically
+ * load and configure services into a system. With a little help from
+ * this macros statically linked services can also be dynamically
+ * configured.
+ *
+ * More details about this component are available in the documentation
+ * of the ACE_Service_Configurator class and also
+ * ACE_Dynamic_Service.
+ *
+ * Notice that in all the macros the SERVICE_CLASS parameter must be
+ * the name of a class derived from ACE_Service_Object.
+ */
+//@{
+/// Declare a the data structure required to register a statically
+/// linked service into the service configurator.
+/**
+ * The macro should be used in the header file where the service is
+ * declared, its only argument is usually the name of the class that
+ * implements the service.
+ *
+ * @param SERVICE_CLASS The name of the class implementing the
+ * service.
+ */
+# define ACE_STATIC_SVC_DECLARE(SERVICE_CLASS) \
+extern ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS ;
+
+/// As ACE_STATIC_SVC_DECLARE, but using an export macro for NT
+/// compilers.
+/**
+ * NT compilers require the use of explicit directives to export and
+ * import symbols from a DLL. If you need to define a service in a
+ * dynamic library you should use this version instead.
+ * Normally ACE uses a macro to inject the correct export/import
+ * directives on NT. Naturally it also the macro expands to a blank
+ * on platforms that do not require such directives.
+ * The first argument (EXPORT_NAME) is the prefix for this export
+ * macro, the full name is formed by appending _Export.
+ * ACE provides tools to generate header files that define the macro
+ * correctly on all platforms, please see
+ * $ACE_ROOT/bin/generate_export_file.pl
+ *
+ * @param EXPORT_NAME The export macro name prefix.
+ * @param SERVICE_CLASS The name of the class implementing the service.
+ */
+#define ACE_STATIC_SVC_DECLARE_EXPORT(EXPORT_NAME,SERVICE_CLASS) \
+extern EXPORT_NAME##_Export ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS;
+
+/// Define the data structure used to register a statically linked
+/// service into the Service Configurator.
+/**
+ * The service configurator requires several arguments to build and
+ * control an statically linked service, including its name, the
+ * factory function used to construct the service, and some flags.
+ * All those parameters are configured in a single structure, an
+ * instance of this structure is statically initialized using the
+ * following macro.
+ *
+ * @param SERVICE_CLASS The name of the class that implements the
+ * service, must be derived (directly or indirectly) from
+ * ACE_Service_Object.
+ * @param NAME The name for this service, this name is used by the
+ * service configurator to match configuration options provided in
+ * the svc.conf file.
+ * @param TYPE The type of object. Objects can be streams or service
+ * objects. Please read the ACE_Service_Configurator and ASX
+ * documentation for more details.
+ * @param FN The name of the factory function, usually the
+ * ACE_SVC_NAME macro can be used to generate the name. The
+ * factory function is often defined using ACE_FACTORY_DECLARE and
+ * ACE_FACTORY_DEFINE.
+ * @param FLAGS Flags to control the ownership and lifecycle of the
+ * object. Please read the ACE_Service_Configurator documentation
+ * for more details.
+ * @param ACTIVE If not zero then a thread will be dedicate to the
+ * service. Please read the ACE_Service_Configurator documentation
+ * for more details.
+ */
+#define ACE_STATIC_SVC_DEFINE(SERVICE_CLASS, NAME, TYPE, FN, FLAGS, ACTIVE) \
+ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS = { NAME, TYPE, FN, FLAGS, ACTIVE };
+
+/// Automatically register a service with the service configurator
+/**
+ * In some applications the services must be automatically registered
+ * with the service configurator, before main() starts.
+ * The ACE_STATIC_SVC_REQUIRE macro defines a class whose constructor
+ * register the service, it also defines a static instance of that
+ * class to ensure that the service is registered before main.
+ *
+ * On platforms that lack adequate support for static C++ objects the
+ * macro ACE_STATIC_SVC_REGISTER can be used to explicitly register
+ * the service.
+ *
+ * @todo One class per-Service_Object seems wasteful. It should be
+ * possible to define a single class and re-use it for all the
+ * service objects, just by passing the Service_Descriptor as an
+ * argument to the constructor.
+ */
+#if defined(ACE_LACKS_STATIC_CONSTRUCTORS)
+# define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)\
+class ACE_Static_Svc_##SERVICE_CLASS {\
+public:\
+ ACE_Static_Svc_##SERVICE_CLASS() { \
+ ACE_Service_Config::static_svcs ()->insert (\
+ &ace_svc_desc_##SERVICE_CLASS); \
+ } \
+};
+#define ACE_STATIC_SVC_REGISTER(SERVICE_CLASS)\
+ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS
+
+#else /* !ACE_LACKS_STATIC_CONSTRUCTORS */
+
+# define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)\
+class ACE_Static_Svc_##SERVICE_CLASS {\
+public:\
+ ACE_Static_Svc_##SERVICE_CLASS() { \
+ ACE_Service_Config::static_svcs ()->insert (\
+ &ace_svc_desc_##SERVICE_CLASS); \
+ } \
+};\
+static ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS;
+#define ACE_STATIC_SVC_REGISTER(SERVICE_CLASS) do {} while (0)
+
+#endif /* !ACE_LACKS_STATIC_CONSTRUCTORS */
+
+/// Declare the factory method used to create dynamically loadable
+/// services.
+/**
+ * Once the service implementation is dynamically loaded the Service
+ * Configurator uses a factory method to create the object.
+ * This macro declares such a factory function with the proper
+ * interface and export macros.
+ * Normally used in the header file that declares the service
+ * implementation.
+ *
+ * @param CLS must match the prefix of the export macro used for this
+ * service.
+ * @param SERVICE_CLASS must match the name of the class that
+ * implements the service.
+ *
+ */
+#define ACE_FACTORY_DECLARE(CLS,SERVICE_CLASS) \
+extern "C" CLS##_Export ACE_Service_Object *\
+_make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *);
+
+/// Define the factory method (and destructor) for a dynamically
+/// loadable service.
+/**
+ * Use with arguments matching ACE_FACTORY_DECLARE.
+ * Normally used in the .cpp file that defines the service
+ * implementation.
+ *
+ * This macro defines both the factory method and the function used to
+ * cleanup the service object.
+ *
+ * If this macro is used to define a factory function that need not be
+ * exported (for example, in a static service situation), CLS can be
+ * specified as ACE_Local_Service.
+ */
+# define ACE_Local_Service_Export
+
+# define ACE_FACTORY_DEFINE(CLS,SERVICE_CLASS) \
+void _gobble_##SERVICE_CLASS (void *p) { \
+ ACE_Service_Object *_p = ACE_static_cast (ACE_Service_Object *, p); \
+ ACE_ASSERT (_p != 0); \
+ delete _p; } \
+extern "C" CLS##_Export ACE_Service_Object *\
+_make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *gobbler) \
+{ \
+ ACE_TRACE (#SERVICE_CLASS); \
+ if (gobbler != 0) \
+ *gobbler = (ACE_Service_Object_Exterminator) _gobble_##SERVICE_CLASS; \
+ return new SERVICE_CLASS; \
+}
+
+/// The canonical name for a service factory method
+#define ACE_SVC_NAME(SERVICE_CLASS) _make_##SERVICE_CLASS
+
+/// The canonical way to invoke (i.e. construct) a service factory
+/// method.
+#define ACE_SVC_INVOKE(SERVICE_CLASS) _make_##SERVICE_CLASS (0)
+
+//@}
+
+/** @name Helper macros for services defined in the netsvcs library.
+ *
+ * The ACE services defined in netsvcs use this helper macros for
+ * simplicity.
+ *
+ */
+//@{
+# define ACE_SVC_FACTORY_DECLARE(X) ACE_FACTORY_DECLARE (ACE_Svc, X)
+# define ACE_SVC_FACTORY_DEFINE(X) ACE_FACTORY_DEFINE (ACE_Svc, X)
+//@}
+
#include "ace/post.h"
#endif /*ACE_GLOBAL_MACROS_H*/
diff --git a/ace/Handle_Set.h b/ace/Handle_Set.h
index c4de6d79248..1963a47769e 100644
--- a/ace/Handle_Set.h
+++ b/ace/Handle_Set.h
@@ -20,10 +20,16 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#if (defined (ACE_PSOS) && !defined (ACE_PSOSIM)) || defined (__QNX__)
+ typedef long fd_mask;
+#elif defined (ACE_WIN32) && defined (CHORUS) && !defined (CHORUS_4)
+ typedef cx_fd_mask fd_mask;
+#endif /* ACE_PSOS */
+
// Default size of the ACE Reactor.
#if defined (FD_SETSIZE)
int const ACE_FD_SETSIZE = FD_SETSIZE;
-#else
+#else /* !FD_SETSIZE */
# define ACE_FD_SETSIZE FD_SETSIZE
#endif /* ACE_FD_SETSIZE */
diff --git a/ace/OS.h b/ace/OS.h
index 9afdeba1e1c..844f9ca4c4c 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -34,6 +34,13 @@
#include "ace/OS_TLI.h"
#include "ace/OS_Errno.h"
+#include "ace/os_include/dlfcn.h"
+#include "ace/os_include/sys/mman.h"
+#include "ace/os_include/dirent.h"
+#include "ace/os_include/netdb.h"
+#include "ace/os_include/sys/socket.h"
+#include "ace/os_include/net/if.h"
+
#include "ace/Time_Value.h"
class ACE_Timeout_Manager;
@@ -61,18 +68,12 @@ class ACE_Timeout_Manager;
# if defined (ACE_PSOS)
-# if defined (ACE_LACKS_ASSERT_MACRO)
-# define assert(expr)
-# endif
-
# if defined (ACE_PSOSIM)
# include /**/x "ace/sys_conf.h" /* system configuration file */
# include /**/x <psos.h> /* pSOS+ system calls */
# include /**/x <pna.h> /* pNA+ TCP/IP Network Manager calls */
- /* In the *simulator* environment, use unsigned int for size_t */
-# define size_t unsigned int
/* include <rpc.h> pRPC+ Remote Procedure Call Library calls */
@@ -88,52 +89,10 @@ class ACE_Timeout_Manager;
/* put includes for necessary UNIX file system calls here */
# include "ace/os_include/sys/stat.h"
# include "ace/os_include/stropts.h" // instead of <sys/ioctl.h>
-//# include /**/x <sys/sockio.h> // again, for ioctl
# include "ace/os_include/netinet/tcp.h"
-# define TCP_
-# if ! defined (BUFSIZ)
-# define BUFSIZ 1024
-# endif /* ! defined (BUFSIZ) */
-
-
# else
-# if defined (ACE_PSOS_CANT_USE_SYS_TYPES)
- // these are missing from the pSOS types.h file, and the compiler
- // supplied types.h file collides with the pSOS version.
-# if !defined (ACE_SHOULD_NOT_DEFINE_SYS_TYPES)
- typedef unsigned char u_char;
- typedef unsigned short u_short;
-# endif /* ACE_SHOULD_NOT_DEFINE_SYS_TYPES */
- typedef unsigned int u_int;
-# if !defined (ACE_SHOULD_NOT_DEFINE_SYS_TYPES)
- typedef unsigned long u_long;
-# endif /* ACE_SHOULD_NOT_DEFINE_SYS_TYPES */
-
- // These are defined in types.h included by (among others) pna.h
-# if 0
- typedef unsigned char uchar_t;
- typedef unsigned short ushort_t;
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
-# endif /* 0 */
- typedef char * caddr_t;
-
-# if defined (ACE_PSOS_DIAB_PPC)
- // pid_t is defined in sys/types.h
-# if 0
- typedef unsigned long pid_t;
-# endif /* 0 */
-# define ACE_INVALID_PID ((pid_t) ~0)
-# else /* !defined (ACE_PSOS_DIAB_PPC) */
- typedef long pid_t;
-# define ACE_INVALID_PID ((pid_t) -1)
-# endif /* defined (ACE_PSOS_DIAB_PPC) */
-
-// typedef unsigned char wchar_t;
-# endif /* ACE_PSOS_CANT_USE_SYS_TYPES */
-
# include /**/x "ace/sys_conf.h" /* system configuration file */
# include /**/x <configs.h> /* includes all pSOS headers */
// #include /**/x <psos.h> /* pSOS system calls */
@@ -149,36 +108,6 @@ class ACE_Timeout_Manager;
# include "ace/os_include/sys/wait.h" /* Diab Data supplied header file */
# endif /* ACE_PSOS_DIAB_MIPS */
-// This collides with phile.h
-// #include /**/x <sys/stat.h> /* Diab Data supplied header file */
-
-// Some versions have missing preprocessor definitions
-# if !defined (AF_UNIX)
-# define AF_UNIX 0x1
-# endif /* AF_UNIX */
-# define PF_UNIX AF_UNIX
-# define PF_INET AF_INET
-# if !defined (AF_MAX)
-# define AF_MAX AF_INET
-# endif /* AF_MAX */
-# if !defined (IFF_LOOPBACK)
-# define IFF_LOOPBACK IFF_EXTLOOPBACK
-# endif /* IFF_LOOPBACK */
-
- typedef long fd_mask;
-# define IPPORT_RESERVED 1024
-# define IPPORT_USERRESERVED 5000
-
- extern "C"
- {
- typedef void (* ACE_SignalHandler) (void);
- typedef void (* ACE_SignalHandlerV) (void);
- }
-
-# if !defined(SIG_DFL)
-# define SIG_DFL (ACE_SignalHandler) 0
-# endif /* philabs */
-
# endif /* defined (ACE_PSOSIM) */
// Some versions of pSOS do not define error numbers, but newer
@@ -186,88 +115,6 @@ class ACE_Timeout_Manager;
// yet defined.
# include "ace/os_include/errno.h"
-# if !defined (EPERM)
-# define EPERM 1 /* Not super-user */
-# endif /* EPERM */
-# if !defined (ENOENT)
-# define ENOENT 2 /* No such file or directory */
-# endif /* ENOENT */
-# if !defined (ESRCH)
-# define ESRCH 3 /* No such process */
-# endif /* ESRCH */
-# if ! defined (EINTR)
-# define EINTR 4 /* interrupted system call */
-# endif /* EINTR */
-# if !defined (EBADF)
-# define EBADF 9 /* Bad file number */
-# endif /* EBADF */
-# if !defined (EAGAIN)
-# define EAGAIN 11 /* Resource temporarily unavailable */
-# endif /* EAGAIN */
-# if !defined (EWOULDBLOCK)
-# define EWOULDBLOCK EAGAIN /* Blocking resource request would block */
-# endif /* EWOULDBLOCK */
-# if !defined (ENOMEM)
-# define ENOMEM 12 /* Not enough core */
-# endif /* ENOMEM */
-# if !defined (EACCES)
-# define EACCES 13 /* Permission denied */
-# endif /* EACCES */
-# if !defined (EFAULT)
-# define EFAULT 14 /* Bad access */
-# endif /* EFAULT */
-# if !defined (EEXIST)
-# define EEXIST 17 /* File exists */
-# endif /* EEXIST */
-# if !defined (ENOSPC)
-# define ENOSPC 28 /* No space left on device */
-# endif /* ENOSPC */
-# if !defined (EPIPE)
-# define EPIPE 32 /* Broken pipe */
-# endif /* EPIPE */
-# if !defined (ETIME)
-# define ETIME 62 /* timer expired */
-# endif /* ETIME */
-# if !defined (ENAMETOOLONG)
-# define ENAMETOOLONG 78 /* path name is too long */
-# endif /* ENAMETOOLONG */
-# if !defined (ENOSYS)
-# define ENOSYS 89 /* Unsupported file system operation */
-# endif /* ENOSYS */
-# if !defined (EADDRINUSE)
-# define EADDRINUSE 125 /* Address already in use */
-# endif /* EADDRINUSE */
-# if !defined (ENETUNREACH)
-# define ENETUNREACH 128 /* Network is unreachable */
-# endif /* ENETUNREACH */
-# if !defined (EISCONN)
-# define EISCONN 133 /* Socket is already connected */
-# endif /* EISCONN */
-# if !defined (ESHUTDOWN)
-# define ESHUTDOWN 143 /* Can't send after socket shutdown */
-# endif /* ESHUTDOWN */
-# if !defined (ECONNREFUSED)
-# define ECONNREFUSED 146 /* Connection refused */
-# endif /* ECONNREFUSED */
-# if !defined (EINPROGRESS)
-# define EINPROGRESS 150 /* operation now in progress */
-# endif /* EINPROGRESS */
-# if !defined (ERRMAX)
-# define ERRMAX 151 /* Last error number */
-# endif /* ERRMAX */
-
-# if ! defined (NSIG)
-# define NSIG 32
-# endif /* NSIG */
-
-# if ! defined (TCP_NODELAY)
-# define TCP_NODELAY 1
-# endif /* TCP_NODELAY */
-
-// For general purpose portability
-
-# define ACE_BITS_PER_ULONG (8 * sizeof (u_long))
-
typedef u_long ACE_idtype_t;
typedef u_long ACE_id_t;
# define ACE_SELF (0)
@@ -288,67 +135,9 @@ typedef struct
char name_[4];
} ACE_sema_t;
-// Used for dynamic linking.
-# if !defined (ACE_DEFAULT_SVC_CONF)
-# if (ACE_USES_CLASSIC_SVC_CONF == 1)
-# define ACE_DEFAULT_SVC_CONF "./svc.conf"
-# else
-# define ACE_DEFAULT_SVC_CONF "./svc.conf.xml"
-# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */
-# endif /* ACE_DEFAULT_SVC_CONF */
-
-# define ACE_DIRECTORY_SEPARATOR_STR_A "/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/'
-# define ACE_PLATFORM_A "pSOS"
-# define ACE_PLATFORM_EXE_SUFFIX_A ""
-
-# define ACE_DLL_SUFFIX ACE_LIB_TEXT (".so")
-# define ACE_DLL_PREFIX ACE_LIB_TEXT ("lib")
-# define ACE_LD_SEARCH_PATH ACE_LIB_TEXT ("LD_LIBRARY_PATH")
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_LIB_TEXT (":")
-# define ACE_LOGGER_KEY ACE_LIB_TEXT ("/tmp/server_daemon")
-
-# define ACE_MAX_DEFAULT_PORT 65535
-
-# if ! defined(MAXNAMLEN)
-# define MAXNAMLEN 255
-# endif /* MAXNAMLEN */
-
-# if defined (ACE_LACKS_MMAP)
-# define PROT_READ 0
-# define PROT_WRITE 0
-# define PROT_EXEC 0
-# define PROT_NONE 0
-# define PROT_RDWR 0
-# define MAP_PRIVATE 0
-# define MAP_SHARED 0
-# define MAP_FIXED 0
-# endif /* ACE_LACKS_MMAP */
typedef int ACE_exitcode;
-typedef ACE_HANDLE ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE ACE_INVALID_HANDLE
-# define ACE_DEFAULT_SHLIB_MODE 0
-
-# define ACE_INVALID_SEM_KEY -1
-
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* address length */
- char **h_addr_list; /* (first, only) address from name server */
-# define h_addr h_addr_list[0] /* the first address */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
# define ACE_SEH_TRY if (1)
# define ACE_SEH_EXCEPT(X) while (0)
# define ACE_SEH_FINALLY if (1)
@@ -538,30 +327,6 @@ private:
int stopped_;
};
-# if defined (ACE_HAS_USING_KEYWORD)
-# define ACE_USING using
-# else
-# define ACE_USING
-# endif /* ACE_HAS_USING_KEYWORD */
-
-# if defined (ACE_HAS_TYPENAME_KEYWORD)
-# define ACE_TYPENAME typename
-# else
-# define ACE_TYPENAME
-# endif /* ACE_HAS_TYPENAME_KEYWORD */
-
-# if defined (ACE_HAS_STD_TEMPLATE_SPECIALIZATION)
-# define ACE_TEMPLATE_SPECIALIZATION template<>
-# else
-# define ACE_TEMPLATE_SPECIALIZATION
-# endif /* ACE_HAS_STD_TEMPLATE_SPECIALIZATION */
-
-# if defined (ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION)
-# define ACE_TEMPLATE_METHOD_SPECIALIZATION template<>
-# else
-# define ACE_TEMPLATE_METHOD_SPECIALIZATION
-# endif /* ACE_HAS_STD_TEMPLATE_SPECIALIZATION */
-
// The following is necessary since many C++ compilers don't support
// typedef'd types inside of classes used as formal template
// arguments... ;-(. Luckily, using the C++ preprocessor I can hide
@@ -757,223 +522,6 @@ private:
# define ACE_PAGEFILE_MEMORY_POOL ACE_Pagefile_Memory_Pool, ACE_Pagefile_Memory_Pool_Options
# endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-// These two are only for backward compatibility. You should avoid
-// using them if not necessary.
-# define ACE_SYNCH_1 ACE_SYNCH_DECL
-# define ACE_SYNCH_2 ACE_SYNCH_USE
-
-// For Win32 compatibility... todo: should go in cpp
-# if !defined (ACE_WSOCK_VERSION)
-# define ACE_WSOCK_VERSION 0, 0
-# endif /* ACE_WSOCK_VERSION */
-
-/// Service Objects, i.e., objects dynamically loaded via the service
-/// configurator, must provide a destructor function with the
-/// following prototype to perform object cleanup.
-typedef void (*ACE_Service_Object_Exterminator)(void *);
-
-/** @name Service Configurator macros
- *
- * The following macros are used to define helper objects used in
- * ACE's Service Configurator. This is an implementation of the
- * Service Configurator pattern:
- *
- * http://www.cs.wustl.edu/~schmidt/PDF/SvcConf.pdf
- *
- * The intent of this pattern is to allow developers to dynamically
- * load and configure services into a system. With a little help from
- * this macros statically linked services can also be dynamically
- * configured.
- *
- * More details about this component are available in the documentation
- * of the ACE_Service_Configurator class and also
- * ACE_Dynamic_Service.
- *
- * Notice that in all the macros the SERVICE_CLASS parameter must be
- * the name of a class derived from ACE_Service_Object.
- */
-//@{
-/// Declare a the data structure required to register a statically
-/// linked service into the service configurator.
-/**
- * The macro should be used in the header file where the service is
- * declared, its only argument is usually the name of the class that
- * implements the service.
- *
- * @param SERVICE_CLASS The name of the class implementing the
- * service.
- */
-# define ACE_STATIC_SVC_DECLARE(SERVICE_CLASS) \
-extern ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS ;
-
-/// As ACE_STATIC_SVC_DECLARE, but using an export macro for NT
-/// compilers.
-/**
- * NT compilers require the use of explicit directives to export and
- * import symbols from a DLL. If you need to define a service in a
- * dynamic library you should use this version instead.
- * Normally ACE uses a macro to inject the correct export/import
- * directives on NT. Naturally it also the macro expands to a blank
- * on platforms that do not require such directives.
- * The first argument (EXPORT_NAME) is the prefix for this export
- * macro, the full name is formed by appending _Export.
- * ACE provides tools to generate header files that define the macro
- * correctly on all platforms, please see
- * $ACE_ROOT/bin/generate_export_file.pl
- *
- * @param EXPORT_NAME The export macro name prefix.
- * @param SERVICE_CLASS The name of the class implementing the service.
- */
-#define ACE_STATIC_SVC_DECLARE_EXPORT(EXPORT_NAME,SERVICE_CLASS) \
-extern EXPORT_NAME##_Export ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS;
-
-/// Define the data structure used to register a statically linked
-/// service into the Service Configurator.
-/**
- * The service configurator requires several arguments to build and
- * control an statically linked service, including its name, the
- * factory function used to construct the service, and some flags.
- * All those parameters are configured in a single structure, an
- * instance of this structure is statically initialized using the
- * following macro.
- *
- * @param SERVICE_CLASS The name of the class that implements the
- * service, must be derived (directly or indirectly) from
- * ACE_Service_Object.
- * @param NAME The name for this service, this name is used by the
- * service configurator to match configuration options provided in
- * the svc.conf file.
- * @param TYPE The type of object. Objects can be streams or service
- * objects. Please read the ACE_Service_Configurator and ASX
- * documentation for more details.
- * @param FN The name of the factory function, usually the
- * ACE_SVC_NAME macro can be used to generate the name. The
- * factory function is often defined using ACE_FACTORY_DECLARE and
- * ACE_FACTORY_DEFINE.
- * @param FLAGS Flags to control the ownership and lifecycle of the
- * object. Please read the ACE_Service_Configurator documentation
- * for more details.
- * @param ACTIVE If not zero then a thread will be dedicate to the
- * service. Please read the ACE_Service_Configurator documentation
- * for more details.
- */
-#define ACE_STATIC_SVC_DEFINE(SERVICE_CLASS, NAME, TYPE, FN, FLAGS, ACTIVE) \
-ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS = { NAME, TYPE, FN, FLAGS, ACTIVE };
-
-/// Automatically register a service with the service configurator
-/**
- * In some applications the services must be automatically registered
- * with the service configurator, before main() starts.
- * The ACE_STATIC_SVC_REQUIRE macro defines a class whose constructor
- * register the service, it also defines a static instance of that
- * class to ensure that the service is registered before main.
- *
- * On platforms that lack adequate support for static C++ objects the
- * macro ACE_STATIC_SVC_REGISTER can be used to explicitly register
- * the service.
- *
- * @todo One class per-Service_Object seems wasteful. It should be
- * possible to define a single class and re-use it for all the
- * service objects, just by passing the Service_Descriptor as an
- * argument to the constructor.
- */
-#if defined(ACE_LACKS_STATIC_CONSTRUCTORS)
-# define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)\
-class ACE_Static_Svc_##SERVICE_CLASS {\
-public:\
- ACE_Static_Svc_##SERVICE_CLASS() { \
- ACE_Service_Config::static_svcs ()->insert (\
- &ace_svc_desc_##SERVICE_CLASS); \
- } \
-};
-#define ACE_STATIC_SVC_REGISTER(SERVICE_CLASS)\
-ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS
-
-#else /* !ACE_LACKS_STATIC_CONSTRUCTORS */
-
-# define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)\
-class ACE_Static_Svc_##SERVICE_CLASS {\
-public:\
- ACE_Static_Svc_##SERVICE_CLASS() { \
- ACE_Service_Config::static_svcs ()->insert (\
- &ace_svc_desc_##SERVICE_CLASS); \
- } \
-};\
-static ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS;
-#define ACE_STATIC_SVC_REGISTER(SERVICE_CLASS) do {} while (0)
-
-#endif /* !ACE_LACKS_STATIC_CONSTRUCTORS */
-
-/// Declare the factory method used to create dynamically loadable
-/// services.
-/**
- * Once the service implementation is dynamically loaded the Service
- * Configurator uses a factory method to create the object.
- * This macro declares such a factory function with the proper
- * interface and export macros.
- * Normally used in the header file that declares the service
- * implementation.
- *
- * @param CLS must match the prefix of the export macro used for this
- * service.
- * @param SERVICE_CLASS must match the name of the class that
- * implements the service.
- *
- */
-#define ACE_FACTORY_DECLARE(CLS,SERVICE_CLASS) \
-extern "C" CLS##_Export ACE_Service_Object *\
-_make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *);
-
-/// Define the factory method (and destructor) for a dynamically
-/// loadable service.
-/**
- * Use with arguments matching ACE_FACTORY_DECLARE.
- * Normally used in the .cpp file that defines the service
- * implementation.
- *
- * This macro defines both the factory method and the function used to
- * cleanup the service object.
- *
- * If this macro is used to define a factory function that need not be
- * exported (for example, in a static service situation), CLS can be
- * specified as ACE_Local_Service.
- */
-# define ACE_Local_Service_Export
-
-# define ACE_FACTORY_DEFINE(CLS,SERVICE_CLASS) \
-void _gobble_##SERVICE_CLASS (void *p) { \
- ACE_Service_Object *_p = ACE_static_cast (ACE_Service_Object *, p); \
- ACE_ASSERT (_p != 0); \
- delete _p; } \
-extern "C" CLS##_Export ACE_Service_Object *\
-_make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *gobbler) \
-{ \
- ACE_TRACE (#SERVICE_CLASS); \
- if (gobbler != 0) \
- *gobbler = (ACE_Service_Object_Exterminator) _gobble_##SERVICE_CLASS; \
- return new SERVICE_CLASS; \
-}
-
-/// The canonical name for a service factory method
-#define ACE_SVC_NAME(SERVICE_CLASS) _make_##SERVICE_CLASS
-
-/// The canonical way to invoke (i.e. construct) a service factory
-/// method.
-#define ACE_SVC_INVOKE(SERVICE_CLASS) _make_##SERVICE_CLASS (0)
-
-//@}
-
-/** @name Helper macros for services defined in the netsvcs library.
- *
- * The ACE services defined in netsvcs use this helper macros for
- * simplicity.
- *
- */
-//@{
-# define ACE_SVC_FACTORY_DECLARE(X) ACE_FACTORY_DECLARE (ACE_Svc, X)
-# define ACE_SVC_FACTORY_DEFINE(X) ACE_FACTORY_DEFINE (ACE_Svc, X)
-//@}
-
# if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))
# define ACE_TSS_TYPE(T) ACE_TSS< T >
# if defined (ACE_HAS_BROKEN_CONVERSIONS)
@@ -990,18 +538,10 @@ _make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *gobbler) \
# include /**/x <sys/procfs.h>
# endif /* ACE_HAS_PROC_FS */
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# define ACE_MT(X) X
-# if !defined (_REENTRANT)
-# define _REENTRANT
-# endif /* _REENTRANT */
-# else
-# define ACE_MT(X)
-# endif /* ACE_MT_SAFE todo: this needs to go in a header higher up...*/
-
-# if !defined (ACE_DEFAULT_THREAD_PRIORITY)
-# define ACE_DEFAULT_THREAD_PRIORITY (-0x7fffffffL - 1L)
-# endif /* ACE_DEFAULT_THREAD_PRIORITY */
+// 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;
+static const ACE_UINT32 ACE_U_ONE_SECOND_IN_NSECS = 1000000000U;
# if defined (ACE_HAS_POSIX_SEM)
# include "ace/os_include/semaphore.h"
@@ -1175,7 +715,6 @@ struct sockaddr_un {
char sun_path[108]; // path name.
};
-# define MAXNAMLEN 255
# define NSIG (_NSIGS + 1)
// task options: the other options are either obsolete, internal, or for
@@ -1683,22 +1222,6 @@ protected:
# include "ace/os_include/sched.h"
# endif /* ACE_NEEDS_SCHED_H */
-#if !defined (ACE_OSTREAM_TYPE)
-# if defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# define ACE_OSTREAM_TYPE FILE
-# else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-# define ACE_OSTREAM_TYPE ostream
-# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-#endif /* ! ACE_OSTREAM_TYPE */
-
-#if !defined (ACE_DEFAULT_LOG_STREAM)
-# if defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# define ACE_DEFAULT_LOG_STREAM 0
-# else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-# define ACE_DEFAULT_LOG_STREAM (&cerr)
-# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-#endif /* ! ACE_DEFAULT_LOG_STREAM */
-
// If the user wants minimum IOStream inclusion, we will just include
// the forward declarations
# if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
@@ -1720,127 +1243,17 @@ protected:
# endif /* ACE_HAS_BYTESEX_H */
# 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;
-static const ACE_UINT32 ACE_U_ONE_SECOND_IN_NSECS = 1000000000U;
-
# if defined (ACE_HAS_UTIME)
# include "ace/os_include/utime.h"
# endif /* ACE_HAS_UTIME */
-# if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES)
-// Prototypes for both signal() and struct sigaction are consistent..
-# if defined (ACE_HAS_SIG_C_FUNC)
-extern "C" {
-# endif /* ACE_HAS_SIG_C_FUNC */
-# if !defined (ACE_PSOS)
-typedef void (*ACE_SignalHandler)(int);
-typedef void (*ACE_SignalHandlerV)(int);
-# endif /* !defined (ACE_PSOS) */
-# if defined (ACE_HAS_SIG_C_FUNC)
-}
-# endif /* ACE_HAS_SIG_C_FUNC */
-# elif defined (ACE_HAS_LYNXOS_SIGNALS)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_TANDEM_SIGNALS)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_IRIX_53_SIGNALS)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_SPARCWORKS_401_SIGNALS)
-typedef void (*ACE_SignalHandler)(int, ...);
-typedef void (*ACE_SignalHandlerV)(int,...);
-# elif defined (ACE_HAS_SUNOS4_SIGNAL_T)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_SVR4_SIGNAL_T)
-// SVR4 Signals are inconsistent (e.g., see struct sigaction)..
-typedef void (*ACE_SignalHandler)(int);
-# if !defined (m88k) /* with SVR4_SIGNAL_T */
-typedef void (*ACE_SignalHandlerV)(void);
-# else
-typedef void (*ACE_SignalHandlerV)(int);
-# endif /* m88k */ /* with SVR4_SIGNAL_T */
-# elif defined (ACE_WIN32)
-typedef void (__cdecl *ACE_SignalHandler)(int);
-typedef void (__cdecl *ACE_SignalHandlerV)(int);
-# elif defined (ACE_HAS_UNIXWARE_SVR4_SIGNAL_T)
-typedef void (*ACE_SignalHandler)(int);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (INTEGRITY)
-typedef void (*ACE_SignalHandler)();
-typedef void (*ACE_SignalHandlerV)(int);
-# else /* This is necessary for some older broken version of cfront */
-# if defined (SIG_PF)
-# define ACE_SignalHandler SIG_PF
-# else
-typedef void (*ACE_SignalHandler)(int);
-# endif /* SIG_PF */
-typedef void (*ACE_SignalHandlerV)(...);
-# endif /* ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES */
# if defined (ACE_WIN32)
-// Turn off warnings for /W4
-// To resume any of these warning: #pragma warning(default: 4xxx)
-// which should be placed after these defines
-
-# if !defined (ALL_WARNINGS) && defined(_MSC_VER) && !defined(ghs) && !defined(__MINGW32__)
-// #pragma warning(disable: 4101) // unreferenced local variable
-# pragma warning(disable: 4127) /* constant expression for TRACE/ASSERT */
-# pragma warning(disable: 4134) /* message map member fxn casts */
-# pragma warning(disable: 4511) /* private copy constructors are good to have */
-# pragma warning(disable: 4512) /* private operator= are good to have */
-# pragma warning(disable: 4514) /* unreferenced inlines are common */
-# pragma warning(disable: 4710) /* private constructors are disallowed */
-# pragma warning(disable: 4705) /* statement has no effect in optimized code */
-// #pragma warning(disable: 4701) // local variable *may* be used without init
-// #pragma warning(disable: 4702) // unreachable code caused by optimizations
-# pragma warning(disable: 4791) /* loss of debugging info in retail version */
-// #pragma warning(disable: 4204) // non-constant aggregate initializer
-# pragma warning(disable: 4275) /* deriving exported class from non-exported */
-# pragma warning(disable: 4251) /* using non-exported as public in exported */
-# pragma warning(disable: 4786) /* identifier was truncated to '255' characters in the browser information */
-# pragma warning(disable: 4097) /* typedef-name used as synonym for class-name */
-# endif /* !ALL_WARNINGS && _MSV_VER && !ghs && !__MINGW32__ */
-
-// STRICT type checking in WINDOWS.H enhances type safety for Windows
-// programs by using distinct types to represent all the different
-// HANDLES in Windows. So for example, STRICT prevents you from
-// mistakenly passing an HPEN to a routine expecting an HBITMAP.
-// Note that we only use this if we
-# if defined (ACE_HAS_STRICT) && (ACE_HAS_STRICT != 0)
-# if !defined (STRICT) /* may already be defined */
-# define STRICT
-# endif /* !STRICT */
-# endif /* ACE_HAS_STRICT */
# if !defined (ACE_HAS_WINCE)
# include "ace/os_include/sys/timeb.h"
# endif /* ACE_HAS_WINCE */
-// Need to work around odd glitches with NT.
-# if !defined (ACE_MAX_DEFAULT_PORT)
-# define ACE_MAX_DEFAULT_PORT 65535
-# endif /* ACE_MAX_DEFAULT_PORT */
-
-// We're on WinNT or Win95
-# define ACE_PLATFORM_A "Win32"
-# define ACE_PLATFORM_EXE_SUFFIX_A ".exe"
-
-// Used for dynamic linking
-# if !defined (ACE_DEFAULT_SVC_CONF)
-# if (ACE_USES_CLASSIC_SVC_CONF == 1)
-# define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT (".\\svc.conf")
-# else
-# define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT (".\\svc.conf.xml")
-# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */
-# endif /* ACE_DEFAULT_SVC_CONF */
-
-# define ACE_INVALID_SEM_KEY 0
-
# if !defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
# define ACE_SEH_TRY if (1)
# define ACE_SEH_EXCEPT(X) while (0)
@@ -1868,68 +1281,12 @@ typedef void (*ACE_SignalHandlerV)(...);
// The "null" device on Win32.
# define ACE_DEV_NULL "nul"
-// Define the pathname separator characters for Win32 (ugh).
-# define ACE_DIRECTORY_SEPARATOR_STR_A "\\"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A '\\'
-# define ACE_LD_SEARCH_PATH ACE_LIB_TEXT ("PATH")
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_LIB_TEXT (";")
-# define ACE_DLL_SUFFIX ACE_LIB_TEXT (".dll")
-# if defined (__MINGW32__)
-# define ACE_DLL_PREFIX ACE_LIB_TEXT ("lib")
-# else /* __MINGW32__ */
-# define ACE_DLL_PREFIX ACE_LIB_TEXT ("")
-# endif /* __MINGW32__ */
-
#include "ace/os_include/sys/mman.h" //// MMAP flags
# if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
# include "ace/os_include/netinet/in.h" // <ws2tcpip.h>
# endif /* ACE_HAS_WINSOCK2 */
-// error code mapping
-# define ETIME ERROR_SEM_TIMEOUT
-# define EWOULDBLOCK WSAEWOULDBLOCK
-# define EINPROGRESS WSAEINPROGRESS
-# define EALREADY WSAEALREADY
-# define ENOTSOCK WSAENOTSOCK
-# define EDESTADDRREQ WSAEDESTADDRREQ
-# define EMSGSIZE WSAEMSGSIZE
-# define EPROTOTYPE WSAEPROTOTYPE
-# define ENOPROTOOPT WSAENOPROTOOPT
-# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
-# define EOPNOTSUPP WSAEOPNOTSUPP
-# define EPFNOSUPPORT WSAEPFNOSUPPORT
-# define EAFNOSUPPORT WSAEAFNOSUPPORT
-# define EADDRINUSE WSAEADDRINUSE
-# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
-# define ENETDOWN WSAENETDOWN
-# define ENETUNREACH WSAENETUNREACH
-# define ENETRESET WSAENETRESET
-# define ECONNABORTED WSAECONNABORTED
-# define ECONNRESET WSAECONNRESET
-# define ENOBUFS WSAENOBUFS
-# define EISCONN WSAEISCONN
-# define ENOTCONN WSAENOTCONN
-# define ESHUTDOWN WSAESHUTDOWN
-# define ETOOMANYREFS WSAETOOMANYREFS
-# define ETIMEDOUT WSAETIMEDOUT
-# define ECONNREFUSED WSAECONNREFUSED
-# define ELOOP WSAELOOP
-# define EHOSTDOWN WSAEHOSTDOWN
-# define EHOSTUNREACH WSAEHOSTUNREACH
-# define EPROCLIM WSAEPROCLIM
-# define EUSERS WSAEUSERS
-# define EDQUOT WSAEDQUOT
-# define ESTALE WSAESTALE
-# define EREMOTE WSAEREMOTE
-// Grrr! ENAMETOOLONG and ENOTEMPTY are already defined by the horrible
-// 'standard' library.
-// #define ENAMETOOLONG WSAENAMETOOLONG
-
-# if defined (__BORLANDC__) && (__BORLANDC__ <= 0x540)
-# define ENOTEMPTY WSAENOTEMPTY
-# endif /* __BORLANDC__ && __BORLANDC__ <= 0x540*/
# if !defined (ACE_HAS_WINCE)
@@ -1989,84 +1346,22 @@ typedef DWORD ACE_exitcode;
// Reliance on CRT - I don't really like this.
-# define MAXNAMLEN _MAX_FNAME
-# define EADDRINUSE WSAEADDRINUSE
-
-/// The ordering of the fields in this struct is important. It has to
-/// match those in WSABUF.
-struct iovec
-{
- /// byte count to read/write
- u_long iov_len;
- /// data to be read/written
- char *iov_base;
-
- // WSABUF is a Winsock2-only type.
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- operator WSABUF &(void) { return *((WSABUF *) this); }
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
-};
typedef int ACE_idtype_t;
typedef DWORD ACE_id_t;
# define ACE_SELF (0)
typedef int ACE_pri_t;
-// Dynamic loading-related types - used for dlopen and family.
-typedef HINSTANCE ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# define ACE_DEFAULT_SHLIB_MODE 0
-
# elif defined (ACE_PSOS)
typedef ACE_UINT64 ACE_hrtime_t;
-# if defined (ACE_SIGINFO_IS_SIGINFO_T)
- typedef struct siginfo siginfo_t;
-# endif /* ACE_LACKS_SIGINFO_H */
-
# else /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */
# if defined (m88k)
# define RUSAGE_SELF 1
# endif /* m88k */
-// Default port is MAX_SHORT.
-# define ACE_MAX_DEFAULT_PORT 65535
-
-# define ACE_INVALID_SEM_KEY -1
-
-// Define the pathname separator characters for UNIX.
-# define ACE_DIRECTORY_SEPARATOR_STR_A "/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/'
-
-// We're some kind of UNIX...
-# define ACE_PLATFORM_A "UNIX"
-# define ACE_PLATFORM_EXE_SUFFIX_A ""
-
-# if !defined (ACE_LD_SEARCH_PATH)
-# define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
-# endif /* ACE_LD_SEARCH_PATH */
-# if !defined (ACE_LD_SEARCH_PATH_SEPARATOR_STR)
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ":"
-# endif /* ACE_LD_SEARCH_PATH_SEPARATOR_STR */
-
-# if !defined (ACE_DLL_SUFFIX)
-# define ACE_DLL_SUFFIX ".so"
-# endif /* ACE_DLL_SUFFIX */
-# if !defined (ACE_DLL_PREFIX)
-# define ACE_DLL_PREFIX "lib"
-# endif /* ACE_DLL_PREFIX */
-
-// Used for dynamic linking.
-# if !defined (ACE_DEFAULT_SVC_CONF)
-# if (ACE_USES_CLASSIC_SVC_CONF == 1)
-# define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT ("./svc.conf")
-# else
-# define ACE_DEFAULT_SVC_CONF ACE_LIB_TEXT ("./svc.conf.xml")
-# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */
-# endif /* ACE_DEFAULT_SVC_CONF */
-
// Be consistent with Winsock naming
typedef int ACE_exitcode;
# define ACE_INVALID_HANDLE -1
@@ -2165,59 +1460,7 @@ struct ACE_OVERLAPPED
# define PIPE_TYPE_MESSAGE 0
# endif /* !defined PIPE_TYPE_MESSAGE */
-# if defined (ACE_HAS_BROKEN_IF_HEADER)
-struct ifafilt;
-# endif /* ACE_HAS_BROKEN_IF_HEADER */
-
-# if defined (ACE_HAS_AIX_BROKEN_SOCKET_HEADER)
-# undef __cplusplus
-# include "ace/os_include/sys/socket.h"
-# define __cplusplus
-# else
-# include "ace/os_include/sys/socket.h"
-# endif /* ACE_HAS_AIX_BROKEN_SOCKET_HEADER */
-extern "C"
-{
-# if defined (VXWORKS)
- struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* aliases: not used on VxWorks */
- int h_addrtype; /* host address type */
- int h_length; /* address length */
- char **h_addr_list; /* (first, only) address from name server */
-# define h_addr h_addr_list[0] /* the first address */
- };
-# elif defined (ACE_HAS_CYGWIN32_SOCKET_H)
-# include /**/x <cygwin32/socket.h>
-# else
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# include "ace/os_include/netdb.h"
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# undef queue
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# endif /* VXWORKS */
-
-
-// This part if to avoid STL name conflict with the map structure
-// in net/if.h.
-# if defined (ACE_HAS_STL_MAP_CONFLICT)
-# define map _Resource_Allocation_Map_
-# endif /* ACE_HAS_STL_MAP_CONFLICT */
-# include "ace/os_include/net/if.h"
-# if defined (ACE_HAS_STL_MAP_CONFLICT)
-# undef map
-# endif /* ACE_HAS_STL_MAP_CONFLICT */
-
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# include "ace/os_include/netinet/in.h"
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# undef queue
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
# if defined (ACE_VXWORKS) && ACE_VXWORKS <= 0x540
// Work around a lack of ANSI prototypes for these functions on VxWorks.
@@ -2228,7 +1471,7 @@ extern "C"
# else /* ! (ACE_VXWORKS) && ACE_VXWORKS <= 0x540 */
# include "ace/os_include/arpa/inet.h"
# endif /* ! (ACE_VXWORKS) && ACE_VXWORKS <= 0x540 */
-}
+
# if !defined (ACE_LACKS_TCP_H)
# if defined(ACE_HAS_CONFLICTING_XTI_MACROS)
# if defined(TCP_NODELAY)
@@ -2264,7 +1507,6 @@ extern_C int pipe __((int* fildes));
extern_C int gethostname __((char*, size_t));
# if !defined(CHORUS_4)
-typedef cx_fd_mask fd_mask;
typedef void (*__sighandler_t)(int); // keep Signal compilation happy
# endif
# elif defined (CYGWIN32)
@@ -2285,7 +1527,6 @@ typedef void (*__sighandler_t)(int); // keep Signal compilation happy
// sets O_NDELAY
# include /**/x <unix.h>
# include "ace/os_include/limits.h" // <sys/param.h> /* for NBBY */
- typedef long fd_mask;
# if !defined (NFDBITS)
# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
# endif /* ! NFDBITS */
@@ -2414,57 +1655,6 @@ extern "C"
# include "ace/os_include/sys/select.h"
# endif /* ACE_HAS_SELECT_H */
-# if defined (ACE_HAS_ALLOCA_H)
-//# include /**/ <alloca.h>
-# endif /* ACE_HAS_ALLOCA_H */
-
-/* Set the proper handle type for dynamically-loaded libraries. */
-/* Also define a default 'mode' for loading a library - the names and values */
-/* differ between OSes, so if you write code that uses the mode, be careful */
-/* of the platform differences. */
-# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
-# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
-extern "C" {
-# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */
-# include "ace/os_include/dlfcn.h"
-# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
-}
-# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */
- typedef void *ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# if defined (__KCC) && defined(RTLD_GROUP) && defined(RTLD_NODELETE)
-# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GROUP | RTLD_NODELETE
-# else
-# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
-# endif /* KCC */
-# elif defined (__hpux)
-# if defined(__GNUC__) || __cplusplus >= 199707L
-# include /**/x <dl.h>
-# else
-# include /**/x <cxxdl.h>
-# endif /* (g++ || HP aC++) vs. HP C++ */
- typedef shl_t ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED
-# else
- typedef void *ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
-
-# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-
-#if !defined (RTLD_LAZY)
-#define RTLD_LAZY 1
-#endif /* !RTLD_LAZY */
-
-#if !defined (RTLD_NOW)
-#define RTLD_NOW 2
-#endif /* !RTLD_NOW */
-
-#if !defined (RTLD_GLOBAL)
-#define RTLD_GLOBAL 3
-#endif /* !RTLD_GLOBAL */
-
// There must be a better way to do this...
# if !defined (RLIMIT_NOFILE)
# if defined (linux) || defined (AIX) || defined (SCO)
@@ -2476,27 +1666,6 @@ extern "C" {
# endif /* defined (linux) || defined (AIX) || defined (SCO) */
# endif /* RLIMIT_NOFILE */
-# if defined (ACE_LACKS_MMAP)
-# define PROT_READ 0
-# define PROT_WRITE 0
-# define PROT_EXEC 0
-# define PROT_NONE 0
-# define PROT_RDWR 0
-# define MAP_PRIVATE 0
-# define MAP_SHARED 0
-# define MAP_FIXED 0
-# endif /* ACE_LACKS_MMAP */
-
-// Fixes a problem with HP/UX.
-# if defined (ACE_HAS_BROKEN_MMAP_H)
-extern "C"
-{
-# include "ace/os_include/sys/mman.h"
-}
-# elif !defined (ACE_LACKS_MMAP)
-# include "ace/os_include/sys/mman.h"
-# endif /* ACE_HAS_BROKEN_MMAP_H */
-
# include "ace/os_include/sys/msg.h"
# if defined (ACE_HAS_PRIOCNTL)
@@ -2531,70 +1700,6 @@ extern "C"
# endif /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */
-// Define the Wide character and normal versions of some of the string macros
-# if defined (ACE_HAS_WCHAR)
-# define ACE_DIRECTORY_SEPARATOR_STR_W ACE_TEXT_WIDE(ACE_DIRECTORY_SEPARATOR_STR_A)
-# define ACE_DIRECTORY_SEPARATOR_CHAR_W ACE_TEXT_WIDE(ACE_DIRECTORY_SEPARATOR_CHAR_A)
-# define ACE_PLATFORM_W ACE_TEXT_WIDE(ACE_PLATFORM_A)
-# define ACE_PLATFORM_EXE_SUFFIX_W ACE_TEXT_WIDE(ACE_PLATFORM_EXE_SUFFIX_A)
-# endif /* ACE_HAS_WCHAR */
-
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_LIB_TEXT (ACE_DIRECTORY_SEPARATOR_STR_A)
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_LIB_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A)
-# define ACE_PLATFORM ACE_LIB_TEXT (ACE_PLATFORM_A)
-# define ACE_PLATFORM_EXE_SUFFIX ACE_LIB_TEXT (ACE_PLATFORM_EXE_SUFFIX_A)
-
-// Theses defines are used by the ACE Name Server.
-# if !defined (ACE_DEFAULT_LOCALNAME_A)
-# define ACE_DEFAULT_LOCALNAME_A "localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_A */
-# if !defined (ACE_DEFAULT_GLOBALNAME_A)
-# define ACE_DEFAULT_GLOBALNAME_A "globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_A */
-
-// ACE_DEFAULT_NAMESPACE_DIR is for legacy mode apps. A better
-// way of doing this is something like ACE_Lib_Find::get_temp_dir, since
-// this directory may not exist
-# if defined (ACE_LEGACY_MODE)
-# if defined (ACE_WIN32)
-# define ACE_DEFAULT_NAMESPACE_DIR_A "C:\\temp"
-# else /* ACE_WIN32 */
-# define ACE_DEFAULT_NAMESPACE_DIR_A "/tmp"
-# endif /* ACE_WIN32 */
-# if defined (ACE_HAS_WCHAR)
-# define ACE_DEFAULT_NAMESPACE_DIR_W ACE_TEXT_WIDE(ACE_DEFAULT_NAMESPACE_DIR_A)
-# endif /* ACE_HAS_WCHAR */
-# define ACE_DEFAULT_NAMESPACE_DIR ACE_LIB_TEXT(ACE_DEFAULT_NAMESPACE_DIR_A)
-# endif /* ACE_LEGACY_MODE */
-
-# if defined (ACE_HAS_WCHAR)
-# define ACE_DEFAULT_LOCALNAME_W ACE_TEXT_WIDE(ACE_DEFAULT_LOCALNAME_A)
-# define ACE_DEFAULT_GLOBALNAME_W ACE_TEXT_WIDE(ACE_DEFAULT_GLOBALNAME_A)
-# endif /* ACE_HAS_WCHAR */
-
-# define ACE_DEFAULT_LOCALNAME ACE_LIB_TEXT (ACE_DEFAULT_LOCALNAME_A)
-# define ACE_DEFAULT_GLOBALNAME ACE_LIB_TEXT (ACE_DEFAULT_GLOBALNAME_A)
-
-// defined Win32 specific macros for UNIX platforms
-# if !defined (O_BINARY)
-# define O_BINARY 0
-# endif /* O_BINARY */
-# if !defined (_O_BINARY)
-# define _O_BINARY O_BINARY
-# endif /* _O_BINARY */
-# if !defined (O_TEXT)
-# define O_TEXT 0
-# endif /* O_TEXT */
-# if !defined (_O_TEXT)
-# define _O_TEXT O_TEXT
-# endif /* _O_TEXT */
-# if !defined (O_RAW)
-# define O_RAW 0
-# endif /* O_RAW */
-# if !defined (_O_RAW)
-# define _O_RAW O_RAW
-# endif /* _O_RAW */
-
# if !defined (ACE_DEFAULT_SYNCH_TYPE)
# define ACE_DEFAULT_SYNCH_TYPE USYNC_THREAD
# endif /* ! ACE_DEFAULT_SYNCH_TYPE */
@@ -2631,90 +1736,6 @@ struct ACE_utsname
typedef struct utsname ACE_utsname;
# endif /* ACE_LACKS_UTSNAME_T */
-// Increase the range of "address families". Please note that this
-// must appear _after_ the include of sys/socket.h, for the AF_FILE
-// definition on Linux/glibc2.
-#if !defined (AF_ANY)
-# define AF_ANY (-1)
-#endif /* AF_ANY */
-
-# define AF_SPIPE (AF_MAX + 1)
-# if !defined (AF_FILE)
-# define AF_FILE (AF_MAX + 2)
-# endif /* ! AF_FILE */
-# define AF_DEV (AF_MAX + 3)
-# define AF_UPIPE (AF_SPIPE)
-
-# if defined (ACE_SELECT_USES_INT)
-typedef int ACE_FD_SET_TYPE;
-# else
-typedef fd_set ACE_FD_SET_TYPE;
-# endif /* ACE_SELECT_USES_INT */
-
-# if !defined (MAXNAMELEN)
-# if defined (FILENAME_MAX)
-# define MAXNAMELEN FILENAME_MAX
-# else
-# define MAXNAMELEN 256
-# endif /* FILENAME_MAX */
-# endif /* MAXNAMELEN */
-
-# if !defined(MAXHOSTNAMELEN)
-# define MAXHOSTNAMELEN 256
-# endif /* MAXHOSTNAMELEN */
-
-// Define INET loopback address constant if it hasn't been defined
-// Dotted Decimal 127.0.0.1 == Hexidecimal 0x7f000001
-# if !defined (INADDR_LOOPBACK)
-# define INADDR_LOOPBACK ((ACE_UINT32) 0x7f000001)
-# endif /* INADDR_LOOPBACK */
-
-// The INADDR_NONE address is generally 255.255.255.255.
-# if !defined (INADDR_NONE)
-# define INADDR_NONE ((ACE_UINT32) 0xffffffff)
-# endif /* INADDR_NONE */
-
-// Define INET string length constants if they haven't been defined
-//
-// for IPv4 dotted-decimal
-# if !defined (INET_ADDRSTRLEN)
-# define INET_ADDRSTRLEN 16
-# endif /* INET_ADDRSTRLEN */
-//
-// for IPv6 hex string
-# if !defined (INET6_ADDRSTRLEN)
-# define INET6_ADDRSTRLEN 46
-# endif /* INET6_ADDRSTRLEN */
-
-#if defined (ACE_HAS_IPV6)
-
-# if defined (ACE_USES_IPV4_IPV6_MIGRATION)
-# define ACE_ADDRESS_FAMILY_INET AF_UNSPEC
-# define ACE_PROTOCOL_FAMILY_INET PF_UNSPEC
-# else
-# define ACE_ADDRESS_FAMILY_INET AF_INET6
-# define ACE_PROTOCOL_FAMILY_INET PF_INET6
-# endif /* ACE_USES_IPV4_IPV6_MIGRATION */
-
-#else
-# define ACE_ADDRESS_FAMILY_INET AF_INET
-# define ACE_PROTOCOL_FAMILY_INET PF_INET
-#endif
-
-# if defined (ACE_LACKS_SIGSET)
-# if !defined(__MINGW32__)
-typedef u_int sigset_t;
-# endif /* !__MINGW32__*/
-# endif /* ACE_LACKS_SIGSET */
-
-# if defined (ACE_LACKS_SIGACTION)
-struct sigaction
-{
- int sa_flags;
- ACE_SignalHandlerV sa_handler;
- sigset_t sa_mask;
-};
-# endif /* ACE_LACKS_SIGACTION */
# if !defined (O_NONBLOCK)
# define O_NONBLOCK 1
@@ -2732,22 +1753,6 @@ struct sigaction
# define SIG_SETMASK 3
# endif /* SIG_SETMASK */
-# if !defined (IPC_CREAT)
-# define IPC_CREAT 0
-# endif /* IPC_CREAT */
-
-# if !defined (IPC_NOWAIT)
-# define IPC_NOWAIT 0
-# endif /* IPC_NOWAIT */
-
-# if !defined (IPC_RMID)
-# define IPC_RMID 0
-# endif /* IPC_RMID */
-
-# if !defined (IPC_EXCL)
-# define IPC_EXCL 0
-# endif /* IPC_EXCL */
-
# if !defined (IP_DROP_MEMBERSHIP)
# define IP_DROP_MEMBERSHIP 0
# endif /* IP_DROP_MEMBERSHIP */
@@ -2785,14 +1790,6 @@ struct sigaction
# define SIOCGIFADDR 0
# endif /* SIOCGIFADDR */
-# if !defined (IPC_PRIVATE)
-# define IPC_PRIVATE ACE_INVALID_SEM_KEY
-# endif /* IPC_PRIVATE */
-
-# if !defined (IPC_STAT)
-# define IPC_STAT 0
-# endif /* IPC_STAT */
-
# if !defined (GETVAL)
# define GETVAL 0
# endif /* GETVAL */
@@ -2906,36 +1903,7 @@ struct sigaction
# define ACE_DEFAULT_TIMERS _SC_TIMER_MAX
# endif /* ACE_DEFAULT_TIMERS */
-# if defined (ACE_HAS_STRUCT_NETDB_DATA)
-typedef char ACE_HOSTENT_DATA[sizeof(struct hostent_data)];
-typedef char ACE_SERVENT_DATA[sizeof(struct servent_data)];
-typedef char ACE_PROTOENT_DATA[sizeof(struct protoent_data)];
-# else
-# if !defined ACE_HOSTENT_DATA_SIZE
-# define ACE_HOSTENT_DATA_SIZE (4*1024)
-# endif /*ACE_HOSTENT_DATA_SIZE */
-# if !defined ACE_SERVENT_DATA_SIZE
-# define ACE_SERVENT_DATA_SIZE (4*1024)
-# endif /*ACE_SERVENT_DATA_SIZE */
-# if !defined ACE_PROTOENT_DATA_SIZE
-# define ACE_PROTOENT_DATA_SIZE (2*1024)
-# endif /*ACE_PROTOENT_DATA_SIZE */
-typedef char ACE_HOSTENT_DATA[ACE_HOSTENT_DATA_SIZE];
-typedef char ACE_SERVENT_DATA[ACE_SERVENT_DATA_SIZE];
-typedef char ACE_PROTOENT_DATA[ACE_PROTOENT_DATA_SIZE];
-# endif /* ACE_HAS_STRUCT_NETDB_DATA */
-
-# if !defined (ACE_HAS_SEMUN) || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED))
-union semun
-{
- /// value for SETVAL
- int val;
- /// buffer for IPC_STAT & IPC_SET
- struct semid_ds *buf;
- /// array for GETALL & SETALL
- u_short *array;
-};
-# endif /* !ACE_HAS_SEMUN || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED)) */
+
// Create some useful typedefs.
diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h
index 9d4457c39a3..a9479833a2b 100644
--- a/ace/SV_Semaphore_Simple.h
+++ b/ace/SV_Semaphore_Simple.h
@@ -24,18 +24,17 @@
#include "ace/OS.h"
#if defined (ACE_WIN32) && !defined (ACE_PSOS)
-// Default semaphore key and mutex name
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY "ACE_SEM_KEY"
-# endif /* ACE_DEFAULT_SEM_KEY */
+ // Default semaphore key and mutex name
+# if !defined (ACE_DEFAULT_SEM_KEY)
+# define ACE_DEFAULT_SEM_KEY "ACE_SEM_KEY"
+# endif /* ACE_DEFAULT_SEM_KEY */
#else /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */
-// Default semaphore key
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY 1234
-# endif /* ACE_DEFAULT_SEM_KEY */
+ // Default semaphore key
+# if !defined (ACE_DEFAULT_SEM_KEY)
+# define ACE_DEFAULT_SEM_KEY 1234
+# endif /* ACE_DEFAULT_SEM_KEY */
#endif /* ACE_WIN32 */
-
/**
* @class ACE_SV_Semaphore_Simple
*
diff --git a/ace/config-all.h b/ace/config-all.h
index 3026090db47..548314b6a88 100644
--- a/ace/config-all.h
+++ b/ace/config-all.h
@@ -22,6 +22,67 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+# define ACE_BITS_PER_ULONG (8 * sizeof (u_long))
+
+#if !defined (ACE_OSTREAM_TYPE)
+# if defined (ACE_LACKS_IOSTREAM_TOTALLY)
+# define ACE_OSTREAM_TYPE FILE
+# else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
+# define ACE_OSTREAM_TYPE ostream
+# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
+#endif /* ! ACE_OSTREAM_TYPE */
+
+#if !defined (ACE_DEFAULT_LOG_STREAM)
+# if defined (ACE_LACKS_IOSTREAM_TOTALLY)
+# define ACE_DEFAULT_LOG_STREAM 0
+# else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
+# define ACE_DEFAULT_LOG_STREAM (&cerr)
+# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
+#endif /* ! ACE_DEFAULT_LOG_STREAM */
+
+// These two are only for backward compatibility. You should avoid
+// using them if not necessary.
+# define ACE_SYNCH_1 ACE_SYNCH_DECL
+# define ACE_SYNCH_2 ACE_SYNCH_USE
+
+// For Win32 compatibility...
+# if !defined (ACE_WSOCK_VERSION)
+# define ACE_WSOCK_VERSION 0, 0
+# endif /* ACE_WSOCK_VERSION */
+
+# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
+# define ACE_MT(X) X
+# if !defined (_REENTRANT)
+# define _REENTRANT
+# endif /* _REENTRANT */
+# else
+# define ACE_MT(X)
+# endif /* ACE_MT_SAFE todo: this needs to go in a header higher up...*/
+
+# if defined (ACE_HAS_USING_KEYWORD)
+# define ACE_USING using
+# else
+# define ACE_USING
+# endif /* ACE_HAS_USING_KEYWORD */
+
+# if defined (ACE_HAS_TYPENAME_KEYWORD)
+# define ACE_TYPENAME typename
+# else
+# define ACE_TYPENAME
+# endif /* ACE_HAS_TYPENAME_KEYWORD */
+
+# if defined (ACE_HAS_STD_TEMPLATE_SPECIALIZATION)
+# define ACE_TEMPLATE_SPECIALIZATION template<>
+# else
+# define ACE_TEMPLATE_SPECIALIZATION
+# endif /* ACE_HAS_STD_TEMPLATE_SPECIALIZATION */
+
+# if defined (ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION)
+# define ACE_TEMPLATE_METHOD_SPECIALIZATION template<>
+# else
+# define ACE_TEMPLATE_METHOD_SPECIALIZATION
+# endif /* ACE_HAS_STD_TEMPLATE_SPECIALIZATION */
+
// =========================================================================
// Perfect Multicast filting refers to RFC 3376, where a socket is only
// delivered dgrams for groups joined even if it didn't bind the group
diff --git a/ace/config-psosim-g++.h b/ace/config-psosim-g++.h
index f288b93f18e..cf3b843cea7 100644
--- a/ace/config-psosim-g++.h
+++ b/ace/config-psosim-g++.h
@@ -126,6 +126,10 @@
// //
////////////////////////////////////////////////////////////////
+/* In the *simulator* environment, use unsigned int for size_t */
+#define size_t unsigned int
+
+#define TCP_
#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
diff --git a/ace/config-win32-msvc.h b/ace/config-win32-msvc.h
index b9295786117..b407a569dfa 100644
--- a/ace/config-win32-msvc.h
+++ b/ace/config-win32-msvc.h
@@ -75,5 +75,39 @@
#define ACE_LACKS_SYS_WAIT_H
#define ACE_LACKS_UCONTEXT_H
+// Turn off warnings for /W4
+// To resume any of these warning: #pragma warning(default: 4xxx)
+// which should be placed after these defines
+
+# if !defined (ALL_WARNINGS) && defined(_MSC_VER) && !defined(ghs) && !defined(__MINGW32__)
+// #pragma warning(disable: 4101) // unreferenced local variable
+# pragma warning(disable: 4127) /* constant expression for TRACE/ASSERT */
+# pragma warning(disable: 4134) /* message map member fxn casts */
+# pragma warning(disable: 4511) /* private copy constructors are good to have */
+# pragma warning(disable: 4512) /* private operator= are good to have */
+# pragma warning(disable: 4514) /* unreferenced inlines are common */
+# pragma warning(disable: 4710) /* private constructors are disallowed */
+# pragma warning(disable: 4705) /* statement has no effect in optimized code */
+// #pragma warning(disable: 4701) // local variable *may* be used without init
+// #pragma warning(disable: 4702) // unreachable code caused by optimizations
+# pragma warning(disable: 4791) /* loss of debugging info in retail version */
+// #pragma warning(disable: 4204) // non-constant aggregate initializer
+# pragma warning(disable: 4275) /* deriving exported class from non-exported */
+# pragma warning(disable: 4251) /* using non-exported as public in exported */
+# pragma warning(disable: 4786) /* identifier was truncated to '255' characters in the browser information */
+# pragma warning(disable: 4097) /* typedef-name used as synonym for class-name */
+# endif /* !ALL_WARNINGS && _MSV_VER && !ghs && !__MINGW32__ */
+
+// STRICT type checking in WINDOWS.H enhances type safety for Windows
+// programs by using distinct types to represent all the different
+// HANDLES in Windows. So for example, STRICT prevents you from
+// mistakenly passing an HPEN to a routine expecting an HBITMAP.
+// Note that we only use this if we
+# if defined (ACE_HAS_STRICT) && (ACE_HAS_STRICT != 0)
+# if !defined (STRICT) /* may already be defined */
+# define STRICT
+# endif /* !STRICT */
+# endif /* ACE_HAS_STRICT */
+
#include "ace/post.h"
#endif /* ACE_CONFIG_WIN32_MSVC_H */
diff --git a/ace/os_include/aio.h b/ace/os_include/aio.h
index b7c377d4f21..320c5c382da 100644
--- a/ace/os_include/aio.h
+++ b/ace/os_include/aio.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file aio.h
+ * @file os_aio.h
*
* asynchronous input and output (REALTIME)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_AIO_H
-#define ACE_OS_INCLUDE_AIO_H
+#ifndef ACE_OS_INCLUDE_OS_AIO_H
+#define ACE_OS_INCLUDE_OS_AIO_H
#include "ace/pre.h"
@@ -34,4 +34,4 @@
#endif /* !ACE_LACKS_AIO_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_AIO_H */
+#endif /* ACE_OS_INCLUDE_OS_AIO_H */
diff --git a/ace/os_include/arpa/inet.h b/ace/os_include/arpa/inet.h
index 86e583af18f..fa2006374cb 100644
--- a/ace/os_include/arpa/inet.h
+++ b/ace/os_include/arpa/inet.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file inet.h
+ * @file os_inet.h
*
* definitions for internet operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_ARPA_INET_H
-#define ACE_OS_INCLUDE_ARPA_INET_H
+#ifndef ACE_OS_INCLUDE_ARPA_OS_INET_H
+#define ACE_OS_INCLUDE_ARPA_OS_INET_H
#include "ace/pre.h"
@@ -27,10 +27,12 @@
#include "ace/os_include/netinet/in.h"
#if !defined (ACE_LACKS_ARPA_INET_H)
-# include /**/ <arpa/inet.h>
+ extern "C" {
+# include /**/ <arpa/inet.h>
+ }
#endif /* !ACE_LACKS_ARPA_INET_H */
// @todo move the ACE_HTONL, etc macros here
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_ARPA_INET_H */
+#endif /* ACE_OS_INCLUDE_ARPA_OS_INET_H */
diff --git a/ace/os_include/assert.h b/ace/os_include/assert.h
index 58864cf9961..113785d8e11 100644
--- a/ace/os_include/assert.h
+++ b/ace/os_include/assert.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file assert.h
+ * @file os_assert.h
*
* verify program assertion
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_ASSERT_H
-#define ACE_OS_INCLUDE_ASSERT_H
+#ifndef ACE_OS_INCLUDE_OS_ASSERT_H
+#define ACE_OS_INCLUDE_OS_ASSERT_H
#include "ace/pre.h"
@@ -28,7 +28,9 @@
# include /**/ <assert.h>
#endif /* !ACE_LACKS_ASSERT_H */
-// @todo define assert macro if needed..
+#if defined (ACE_LACKS_ASSERT_MACRO)
+# define assert(expr)
+#endif
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_ASSERT_H */
+#endif /* ACE_OS_INCLUDE_OS_ASSERT_H */
diff --git a/ace/os_include/complex.h b/ace/os_include/complex.h
index 525591906cf..c7672917e63 100644
--- a/ace/os_include/complex.h
+++ b/ace/os_include/complex.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file complex.h
+ * @file os_complex.h
*
* complex arithmetic
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_COMPLEX_H
-#define ACE_OS_INCLUDE_COMPLEX_H
+#ifndef ACE_OS_INCLUDE_OS_COMPLEX_H
+#define ACE_OS_INCLUDE_OS_COMPLEX_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_COMPLEX_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_COMPLEX_H */
+#endif /* ACE_OS_INCLUDE_OS_COMPLEX_H */
diff --git a/ace/os_include/cpio.h b/ace/os_include/cpio.h
index 184ce37bee8..005c7150427 100644
--- a/ace/os_include/cpio.h
+++ b/ace/os_include/cpio.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file cpio.h
+ * @file os_cpio.h
*
* cpio archive values
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_CPIO_H
-#define ACE_OS_INCLUDE_CPIO_H
+#ifndef ACE_OS_INCLUDE_OS_CPIO_H
+#define ACE_OS_INCLUDE_OS_CPIO_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_CPIO_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_CPIO_H */
+#endif /* ACE_OS_INCLUDE_OS_CPIO_H */
diff --git a/ace/os_include/ctype.h b/ace/os_include/ctype.h
index 28300737ec5..804be82f4dc 100644
--- a/ace/os_include/ctype.h
+++ b/ace/os_include/ctype.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file ctype.h
+ * @file os_ctype.h
*
* character types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_CTYPE_H
-#define ACE_OS_INCLUDE_CTYPE_H
+#ifndef ACE_OS_INCLUDE_OS_CTYPE_H
+#define ACE_OS_INCLUDE_OS_CTYPE_H
#include "ace/pre.h"
@@ -32,4 +32,4 @@
// and let ACE_OS just call them.
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_CTYPE_H */
+#endif /* ACE_OS_INCLUDE_OS_CTYPE_H */
diff --git a/ace/os_include/dirent.h b/ace/os_include/dirent.h
index 8f21ba552f4..7f073b03418 100644
--- a/ace/os_include/dirent.h
+++ b/ace/os_include/dirent.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file dirent.h
+ * @file os_dirent.h
*
* format of directory entries
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_DIRENT_H
-#define ACE_OS_INCLUDE_DIRENT_H
+#ifndef ACE_OS_INCLUDE_OS_DIRENT_H
+#define ACE_OS_INCLUDE_OS_DIRENT_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_DIRENT_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_DIRENT_H */
+#endif /* ACE_OS_INCLUDE_OS_DIRENT_H */
diff --git a/ace/os_include/dlfcn.h b/ace/os_include/dlfcn.h
index d000684a3cf..d60c0205c28 100644
--- a/ace/os_include/dlfcn.h
+++ b/ace/os_include/dlfcn.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file dlfcn.h
+ * @file os_dlfcn.h
*
* dynamic linking
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_DLFCN_H
-#define ACE_OS_INCLUDE_DLFCN_H
+#ifndef ACE_OS_INCLUDE_OS_DLFCN_H
+#define ACE_OS_INCLUDE_OS_DLFCN_H
#include "ace/pre.h"
@@ -25,8 +25,65 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_DLFCN_H)
-# include /**/ <dlfcn.h>
+# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
+ extern "C" {
+# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */
+# include /**/ <dlfcn.h>
+# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
+ }
+# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */
#endif /* !ACE_LACKS_DLFCN_H */
+#if defined (ACE_PSOS)
+ typedef ACE_HANDLE ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE ACE_INVALID_HANDLE
+# define ACE_DEFAULT_SHLIB_MODE 0
+#elif defined (ACE_WIN32)
+ // Dynamic loading-related types - used for dlopen and family.
+ typedef HINSTANCE ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE 0
+# define ACE_DEFAULT_SHLIB_MODE 0
+#endif /* ACE_PSOS */
+
+/* Set the proper handle type for dynamically-loaded libraries. */
+/* Also define a default 'mode' for loading a library - the names and values */
+/* differ between OSes, so if you write code that uses the mode, be careful */
+/* of the platform differences. */
+# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
+ typedef void *ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE 0
+# if defined (__KCC) && defined(RTLD_GROUP) && defined(RTLD_NODELETE)
+# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GROUP | RTLD_NODELETE
+# else
+# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
+# endif /* KCC */
+# elif defined (__hpux)
+# if defined(__GNUC__) || __cplusplus >= 199707L
+# include /**/x <dl.h>
+# else
+# include /**/x <cxxdl.h>
+# endif /* (g++ || HP aC++) vs. HP C++ */
+ typedef shl_t ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE 0
+# define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED
+# else
+ typedef void *ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE 0
+# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
+
+# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
+
+#if !defined (RTLD_LAZY)
+#define RTLD_LAZY 1
+#endif /* !RTLD_LAZY */
+
+#if !defined (RTLD_NOW)
+#define RTLD_NOW 2
+#endif /* !RTLD_NOW */
+
+#if !defined (RTLD_GLOBAL)
+#define RTLD_GLOBAL 3
+#endif /* !RTLD_GLOBAL */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_DLFCN_H */
+#endif /* ACE_OS_INCLUDE_OS_DLFCN_H */
diff --git a/ace/os_include/errno.h b/ace/os_include/errno.h
index 5b08beb68c8..4ba19821398 100644
--- a/ace/os_include/errno.h
+++ b/ace/os_include/errno.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file errno.h
+ * @file os_errno.h
*
* system error numbers
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_ERRNO_H
-#define ACE_OS_INCLUDE_ERRNO_H
+#ifndef ACE_OS_INCLUDE_OS_ERRNO_H
+#define ACE_OS_INCLUDE_OS_ERRNO_H
#include "ace/pre.h"
@@ -28,5 +28,124 @@
# include /**/ <errno.h>
#endif /* !ACE_LACKS_ERRNO_H */
+#if defined (ACE_PSOS)
+# if !defined (EPERM)
+# define EPERM 1 /* Not super-user */
+# endif /* EPERM */
+# if !defined (ENOENT)
+# define ENOENT 2 /* No such file or directory */
+# endif /* ENOENT */
+# if !defined (ESRCH)
+# define ESRCH 3 /* No such process */
+# endif /* ESRCH */
+# if ! defined (EINTR)
+# define EINTR 4 /* interrupted system call */
+# endif /* EINTR */
+# if !defined (EBADF)
+# define EBADF 9 /* Bad file number */
+# endif /* EBADF */
+# if !defined (EAGAIN)
+# define EAGAIN 11 /* Resource temporarily unavailable */
+# endif /* EAGAIN */
+# if !defined (EWOULDBLOCK)
+# define EWOULDBLOCK EAGAIN /* Blocking resource request would block */
+# endif /* EWOULDBLOCK */
+# if !defined (ENOMEM)
+# define ENOMEM 12 /* Not enough core */
+# endif /* ENOMEM */
+# if !defined (EACCES)
+# define EACCES 13 /* Permission denied */
+# endif /* EACCES */
+# if !defined (EFAULT)
+# define EFAULT 14 /* Bad access */
+# endif /* EFAULT */
+# if !defined (EEXIST)
+# define EEXIST 17 /* File exists */
+# endif /* EEXIST */
+# if !defined (ENOSPC)
+# define ENOSPC 28 /* No space left on device */
+# endif /* ENOSPC */
+# if !defined (EPIPE)
+# define EPIPE 32 /* Broken pipe */
+# endif /* EPIPE */
+# if !defined (ETIME)
+# define ETIME 62 /* timer expired */
+# endif /* ETIME */
+# if !defined (ENAMETOOLONG)
+# define ENAMETOOLONG 78 /* path name is too long */
+# endif /* ENAMETOOLONG */
+# if !defined (ENOSYS)
+# define ENOSYS 89 /* Unsupported file system operation */
+# endif /* ENOSYS */
+# if !defined (EADDRINUSE)
+# define EADDRINUSE 125 /* Address already in use */
+# endif /* EADDRINUSE */
+# if !defined (ENETUNREACH)
+# define ENETUNREACH 128 /* Network is unreachable */
+# endif /* ENETUNREACH */
+# if !defined (EISCONN)
+# define EISCONN 133 /* Socket is already connected */
+# endif /* EISCONN */
+# if !defined (ESHUTDOWN)
+# define ESHUTDOWN 143 /* Can't send after socket shutdown */
+# endif /* ESHUTDOWN */
+# if !defined (ECONNREFUSED)
+# define ECONNREFUSED 146 /* Connection refused */
+# endif /* ECONNREFUSED */
+# if !defined (EINPROGRESS)
+# define EINPROGRESS 150 /* operation now in progress */
+# endif /* EINPROGRESS */
+# if !defined (ERRMAX)
+# define ERRMAX 151 /* Last error number */
+# endif /* ERRMAX */
+#endif /* ACE_PSOS */
+
+#if defined (ACE_WIN32)
+ // error code mapping for windows
+# define ETIME ERROR_SEM_TIMEOUT
+# define EWOULDBLOCK WSAEWOULDBLOCK
+# define EINPROGRESS WSAEINPROGRESS
+# define EALREADY WSAEALREADY
+# define ENOTSOCK WSAENOTSOCK
+# define EDESTADDRREQ WSAEDESTADDRREQ
+# define EMSGSIZE WSAEMSGSIZE
+# define EPROTOTYPE WSAEPROTOTYPE
+# define ENOPROTOOPT WSAENOPROTOOPT
+# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+# define EOPNOTSUPP WSAEOPNOTSUPP
+# define EPFNOSUPPORT WSAEPFNOSUPPORT
+# define EAFNOSUPPORT WSAEAFNOSUPPORT
+# define EADDRINUSE WSAEADDRINUSE
+# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+# define ENETDOWN WSAENETDOWN
+# define ENETUNREACH WSAENETUNREACH
+# define ENETRESET WSAENETRESET
+# define ECONNABORTED WSAECONNABORTED
+# define ECONNRESET WSAECONNRESET
+# define ENOBUFS WSAENOBUFS
+# define EISCONN WSAEISCONN
+# define ENOTCONN WSAENOTCONN
+# define ESHUTDOWN WSAESHUTDOWN
+# define ETOOMANYREFS WSAETOOMANYREFS
+# define ETIMEDOUT WSAETIMEDOUT
+# define ECONNREFUSED WSAECONNREFUSED
+# define ELOOP WSAELOOP
+# define EHOSTDOWN WSAEHOSTDOWN
+# define EHOSTUNREACH WSAEHOSTUNREACH
+# define EPROCLIM WSAEPROCLIM
+# define EUSERS WSAEUSERS
+# define EDQUOT WSAEDQUOT
+# define ESTALE WSAESTALE
+# define EREMOTE WSAEREMOTE
+ // Grrr! ENAMETOOLONG and ENOTEMPTY are already defined by the horrible
+ // 'standard' library.
+ // #define ENAMETOOLONG WSAENAMETOOLONG
+# if defined (__BORLANDC__) && (__BORLANDC__ <= 0x540)
+# define ENOTEMPTY WSAENOTEMPTY
+# endif /* __BORLANDC__ && __BORLANDC__ <= 0x540*/
+# define EADDRINUSE WSAEADDRINUSE
+#endif /* ACE_WIN32 */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_ERRNO_H */
+#endif /* ACE_OS_INCLUDE_OS_ERRNO_H */
diff --git a/ace/os_include/fcntl.h b/ace/os_include/fcntl.h
index e5aa841ba8a..b6de1b0ee01 100644
--- a/ace/os_include/fcntl.h
+++ b/ace/os_include/fcntl.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file fcntl.h
+ * @file os_fcntl.h
*
* file control options
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_FCNTL_H
-#define ACE_OS_INCLUDE_FCNTL_H
+#ifndef ACE_OS_INCLUDE_OS_FCNTL_H
+#define ACE_OS_INCLUDE_OS_FCNTL_H
#include "ace/pre.h"
@@ -31,29 +31,49 @@
# include /**/ <fcntl.h>
#endif /* !ACE_LACKS_FCNTL_H */
-# if defined (__BORLANDC__)
-# define _O_CREAT O_CREAT
-# define _O_EXCL O_EXCL
-# define _O_TRUNC O_TRUNC
- // 0x0800 is used for O_APPEND. 0x08 looks free.
-# define _O_TEMPORARY 0x08 /* see fcntl.h */
-# define _O_RDWR O_RDWR
-# define _O_WRONLY O_WRONLY
-# define _O_RDONLY O_RDONLY
-# define _O_APPEND O_APPEND
-# define _O_BINARY O_BINARY
-# define _O_TEXT O_TEXT
-# endif /* __BORLANDC__ */
+#if defined (__BORLANDC__)
+# define _O_CREAT O_CREAT
+# define _O_EXCL O_EXCL
+# define _O_TRUNC O_TRUNC
+ // 0x0800 is used for O_APPEND. 0x08 looks free.
+# define _O_TEMPORARY 0x08 /* see fcntl.h */
+# define _O_RDWR O_RDWR
+# define _O_WRONLY O_WRONLY
+# define _O_RDONLY O_RDONLY
+# define _O_APPEND O_APPEND
+# define _O_BINARY O_BINARY
+# define _O_TEXT O_TEXT
+#endif /* __BORLANDC__ */
+
+// defined Win32 specific macros for UNIX platforms
+#if !defined (O_BINARY)
+# define O_BINARY 0
+#endif /* O_BINARY */
+#if !defined (_O_BINARY)
+# define _O_BINARY O_BINARY
+#endif /* _O_BINARY */
+#if !defined (O_TEXT)
+# define O_TEXT 0
+#endif /* O_TEXT */
+#if !defined (_O_TEXT)
+# define _O_TEXT O_TEXT
+#endif /* _O_TEXT */
+#if !defined (O_RAW)
+# define O_RAW 0
+#endif /* O_RAW */
+#if !defined (_O_RAW)
+# define _O_RAW O_RAW
+#endif /* _O_RAW */
#if defined (ACE_WIN32)
# define O_NDELAY 1
#endif /* ACE_WIN32 */
-# if defined (ACE_HAS_POSIX_NONBLOCK)
-# define ACE_NONBLOCK O_NONBLOCK
-# else
-# define ACE_NONBLOCK O_NDELAY
-# endif /* ACE_HAS_POSIX_NONBLOCK */
+#if defined (ACE_HAS_POSIX_NONBLOCK)
+# define ACE_NONBLOCK O_NONBLOCK
+#else
+# define ACE_NONBLOCK O_NDELAY
+#endif /* ACE_HAS_POSIX_NONBLOCK */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_FCNTL_H */
+#endif /* ACE_OS_INCLUDE_OS_FCNTL_H */
diff --git a/ace/os_include/fenv.h b/ace/os_include/fenv.h
index a0d317f03c3..dd3fb4f06dc 100644
--- a/ace/os_include/fenv.h
+++ b/ace/os_include/fenv.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file fenv.h
+ * @file os_fenv.h
*
* floating-point environment
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_FENV_H
-#define ACE_OS_INCLUDE_FENV_H
+#ifndef ACE_OS_INCLUDE_OS_FENV_H
+#define ACE_OS_INCLUDE_OS_FENV_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_FENV_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_FENV_H */
+#endif /* ACE_OS_INCLUDE_OS_FENV_H */
diff --git a/ace/os_include/float.h b/ace/os_include/float.h
index 4b65f62e4cf..9cd5eb62c30 100644
--- a/ace/os_include/float.h
+++ b/ace/os_include/float.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file float.h
+ * @file os_float.h
*
* floating types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_FLOAT_H
-#define ACE_OS_INCLUDE_FLOAT_H
+#ifndef ACE_OS_INCLUDE_OS_FLOAT_H
+#define ACE_OS_INCLUDE_OS_FLOAT_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_FLOAT_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_FLOAT_H */
+#endif /* ACE_OS_INCLUDE_OS_FLOAT_H */
diff --git a/ace/os_include/fmtmsg.h b/ace/os_include/fmtmsg.h
index d87d4276d5d..38cba7b8fc2 100644
--- a/ace/os_include/fmtmsg.h
+++ b/ace/os_include/fmtmsg.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file fmtmsg.h
+ * @file os_fmtmsg.h
*
* message display structures
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_FMTMSG_H
-#define ACE_OS_INCLUDE_FMTMSG_H
+#ifndef ACE_OS_INCLUDE_OS_FMTMSG_H
+#define ACE_OS_INCLUDE_OS_FMTMSG_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_FMTMSG_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_FMTMSG_H */
+#endif /* ACE_OS_INCLUDE_OS_FMTMSG_H */
diff --git a/ace/os_include/fnmatch.h b/ace/os_include/fnmatch.h
index d2eae502c45..89e21db90e7 100644
--- a/ace/os_include/fnmatch.h
+++ b/ace/os_include/fnmatch.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file fnmatch.h
+ * @file os_fnmatch.h
*
* filename-matching types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_FNMATCH_H
-#define ACE_OS_INCLUDE_FNMATCH_H
+#ifndef ACE_OS_INCLUDE_OS_FNMATCH_H
+#define ACE_OS_INCLUDE_OS_FNMATCH_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_FNMATCH_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_FNMATCH_H */
+#endif /* ACE_OS_INCLUDE_OS_FNMATCH_H */
diff --git a/ace/os_include/ftw.h b/ace/os_include/ftw.h
index f3736fc601c..f520965fcbf 100644
--- a/ace/os_include/ftw.h
+++ b/ace/os_include/ftw.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file ftw.h
+ * @file os_ftw.h
*
* file tree traversal
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_FTW_H
-#define ACE_OS_INCLUDE_FTW_H
+#ifndef ACE_OS_INCLUDE_OS_FTW_H
+#define ACE_OS_INCLUDE_OS_FTW_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_FTW_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_FTW_H */
+#endif /* ACE_OS_INCLUDE_OS_FTW_H */
diff --git a/ace/os_include/glob.h b/ace/os_include/glob.h
index 5fbf747077c..43e41b6dd2c 100644
--- a/ace/os_include/glob.h
+++ b/ace/os_include/glob.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file glob.h
+ * @file os_glob.h
*
* pathname pattern-matching types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_GLOB_H
-#define ACE_OS_INCLUDE_GLOB_H
+#ifndef ACE_OS_INCLUDE_OS_GLOB_H
+#define ACE_OS_INCLUDE_OS_GLOB_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_GLOB_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_GLOB_H */
+#endif /* ACE_OS_INCLUDE_OS_GLOB_H */
diff --git a/ace/os_include/grp.h b/ace/os_include/grp.h
index 1cfdd579433..af754fa38ee 100644
--- a/ace/os_include/grp.h
+++ b/ace/os_include/grp.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file grp.h
+ * @file os_grp.h
*
* group structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_GRP_H
-#define ACE_OS_INCLUDE_GRP_H
+#ifndef ACE_OS_INCLUDE_OS_GRP_H
+#define ACE_OS_INCLUDE_OS_GRP_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_GRP_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_GRP_H */
+#endif /* ACE_OS_INCLUDE_OS_GRP_H */
diff --git a/ace/os_include/iconv.h b/ace/os_include/iconv.h
index 19c7b98186a..32084532e11 100644
--- a/ace/os_include/iconv.h
+++ b/ace/os_include/iconv.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file iconv.h
+ * @file os_iconv.h
*
* codeset conversion facility
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_ICONV_H
-#define ACE_OS_INCLUDE_ICONV_H
+#ifndef ACE_OS_INCLUDE_OS_ICONV_H
+#define ACE_OS_INCLUDE_OS_ICONV_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_ICONV_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_ICONV_H */
+#endif /* ACE_OS_INCLUDE_OS_ICONV_H */
diff --git a/ace/os_include/inttypes.h b/ace/os_include/inttypes.h
index 68f83c74775..87c8bf4907d 100644
--- a/ace/os_include/inttypes.h
+++ b/ace/os_include/inttypes.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file inttypes.h
+ * @file os_inttypes.h
*
* fixed size integer types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_INTTYPES_H
-#define ACE_OS_INCLUDE_INTTYPES_H
+#ifndef ACE_OS_INCLUDE_OS_INTTYPES_H
+#define ACE_OS_INCLUDE_OS_INTTYPES_H
#include "ace/pre.h"
@@ -33,4 +33,4 @@
// @todo if needbe, we can define the macros if they aren't available.
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_INTTYPES_H */
+#endif /* ACE_OS_INCLUDE_OS_INTTYPES_H */
diff --git a/ace/os_include/iso646.h b/ace/os_include/iso646.h
index 31053ce9179..f5df4de4b40 100644
--- a/ace/os_include/iso646.h
+++ b/ace/os_include/iso646.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file iso646.h
+ * @file os_iso646.h
*
* alternative spellings
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_ISO646_H
-#define ACE_OS_INCLUDE_ISO646_H
+#ifndef ACE_OS_INCLUDE_OS_ISO646_H
+#define ACE_OS_INCLUDE_OS_ISO646_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_ISO646_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_ISO646_H */
+#endif /* ACE_OS_INCLUDE_OS_ISO646_H */
diff --git a/ace/os_include/langinfo.h b/ace/os_include/langinfo.h
index 81760b656da..b1a95c11859 100644
--- a/ace/os_include/langinfo.h
+++ b/ace/os_include/langinfo.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file langinfo.h
+ * @file os_langinfo.h
*
* language information constants
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystem.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_LANGINFO_H
-#define ACE_OS_INCLUDE_LANGINFO_H
+#ifndef ACE_OS_INCLUDE_OS_LANGINFO_H
+#define ACE_OS_INCLUDE_OS_LANGINFO_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_LANGINFO_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_LANGINFO_H */
+#endif /* ACE_OS_INCLUDE_OS_LANGINFO_H */
diff --git a/ace/os_include/libgen.h b/ace/os_include/libgen.h
index 3b52219453a..4dcb52a7bdd 100644
--- a/ace/os_include/libgen.h
+++ b/ace/os_include/libgen.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file libgen.h
+ * @file os_libgen.h
*
* definitions for pattern matching functions
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_LIBGEN_H
-#define ACE_OS_INCLUDE_LIBGEN_H
+#ifndef ACE_OS_INCLUDE_OS_LIBGEN_H
+#define ACE_OS_INCLUDE_OS_LIBGEN_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_LIBGEN_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_LIBGEN_H */
+#endif /* ACE_OS_INCLUDE_OS_LIBGEN_H */
diff --git a/ace/os_include/limits.h b/ace/os_include/limits.h
index 3f83460e5f3..4115e507ee7 100644
--- a/ace/os_include/limits.h
+++ b/ace/os_include/limits.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file limits.h
+ * @file os_limits.h
*
* implementation-defined constants
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_LIMITS_H
-#define ACE_OS_INCLUDE_LIMITS_H
+#ifndef ACE_OS_INCLUDE_OS_LIMITS_H
+#define ACE_OS_INCLUDE_OS_LIMITS_H
#include "ace/pre.h"
@@ -39,11 +39,38 @@
#endif /* howmany */
#if !defined (NAME_MAX)
+# if defined (MAXNAMLEN)
+# define NAME_MAX MAXNAMLEN
+# elif defined (MAXNAMELEN)
+# define NAME_MAX MAXNAMELEN
+# elif defined (FILENAME_MAX)
+# define NAME_MAX FILENAME_MAX
+# elif defined (_MAX_FNAME)
+# define NAME_MAX _MAX_FNAME
+# else /* _MAX_FNAME */
+# define NAME_MAX 256
+# endif /* MAXNAMLEN */
#endif /* !NAME_MAX */
+#if !defined (MAXNAMLEN)
+# define MAXNAMLEN NAME_MAX
+#endif /* !MAXNAMLEN */
+
+#if !defined (MAXNAMELEN)
+# define MAXNAMELEN NAME_MAX
+#endif /* MAXNAMELEN */
+
+#if !defined (HOST_NAME_MAX)
+# define HOST_NAME_MAX 256
+#endif /* !HOST_NAME_MAX */
+
+# if !defined(MAXHOSTNAMELEN)
+# define MAXHOSTNAMELEN HOST_NAME_MAX
+# endif /* MAXHOSTNAMELEN */
+
// Note that we are using PATH_MAX instead of _POSIX_PATH_MAX, since
// _POSIX_PATH_MAX is the *minimun* maximum value for PATH_MAX and is
-// defined by POSIX as 255 (or 256 depending on how you read it).
+// defined by POSIX as 256.
#if !defined (PATH_MAX)
# if defined (_MAX_PATH)
# define PATH_MAX _MAX_PATH
@@ -58,8 +85,5 @@
# define MAXPATHLEN PATH_MAX
#endif /* !MAXPATHLEN */
-//# define MAXNAMLEN _MAX_FNAME
-//# define EADDRINUSE WSAEADDRINUSE
-
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_LIMITS_H */
+#endif /* ACE_OS_INCLUDE_OS_LIMITS_H */
diff --git a/ace/os_include/local.h b/ace/os_include/local.h
index 2dffcb17a43..d4a87cde6b7 100644
--- a/ace/os_include/local.h
+++ b/ace/os_include/local.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file local.h
+ * @file os_local.h
*
* category macros
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_LOCAL_H
-#define ACE_OS_INCLUDE_LOCAL_H
+#ifndef ACE_OS_INCLUDE_OS_LOCAL_H
+#define ACE_OS_INCLUDE_OS_LOCAL_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_LOCAL_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_LOCAL_H */
+#endif /* ACE_OS_INCLUDE_OS_LOCAL_H */
diff --git a/ace/os_include/math.h b/ace/os_include/math.h
index 15d5f241040..432e1d61e08 100644
--- a/ace/os_include/math.h
+++ b/ace/os_include/math.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file math.h
+ * @file os_math.h
*
* mathematical declarations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_MATH_H
-#define ACE_OS_INCLUDE_MATH_H
+#ifndef ACE_OS_INCLUDE_OS_MATH_H
+#define ACE_OS_INCLUDE_OS_MATH_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_MATH_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_MATH_H */
+#endif /* ACE_OS_INCLUDE_OS_MATH_H */
diff --git a/ace/os_include/monetary.h b/ace/os_include/monetary.h
index 8ae04fa870b..7c04ddad385 100644
--- a/ace/os_include/monetary.h
+++ b/ace/os_include/monetary.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file monetary.h
+ * @file os_monetary.h
*
* monetary types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_MONETARY_H
-#define ACE_OS_INCLUDE_MONETARY_H
+#ifndef ACE_OS_INCLUDE_OS_MONETARY_H
+#define ACE_OS_INCLUDE_OS_MONETARY_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_MONETARY_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_MONETARY_H */
+#endif /* ACE_OS_INCLUDE_OS_MONETARY_H */
diff --git a/ace/os_include/mqueue.h b/ace/os_include/mqueue.h
index b03a867950e..6ff0e46538b 100644
--- a/ace/os_include/mqueue.h
+++ b/ace/os_include/mqueue.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file mqueue.h
+ * @file os_mqueue.h
*
* message queues (REALTIME)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_MQUEUE_H
-#define ACE_OS_INCLUDE_MQUEUE_H
+#ifndef ACE_OS_INCLUDE_OS_MQUEUE_H
+#define ACE_OS_INCLUDE_OS_MQUEUE_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_MQUEUE_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_MQUEUE_H */
+#endif /* ACE_OS_INCLUDE_OS_MQUEUE_H */
diff --git a/ace/os_include/ndbm.h b/ace/os_include/ndbm.h
index a0309691467..7410b6507a4 100644
--- a/ace/os_include/ndbm.h
+++ b/ace/os_include/ndbm.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file ndbm.h
+ * @file os_ndbm.h
*
* definitions for ndbm database operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NDBM_H
-#define ACE_OS_INCLUDE_NDBM_H
+#ifndef ACE_OS_INCLUDE_OS_NDBM_H
+#define ACE_OS_INCLUDE_OS_NDBM_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_NDBM_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NDBM_H */
+#endif /* ACE_OS_INCLUDE_OS_NDBM_H */
diff --git a/ace/os_include/net/if.h b/ace/os_include/net/if.h
index e14c85ab0fe..eefbe32095f 100644
--- a/ace/os_include/net/if.h
+++ b/ace/os_include/net/if.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file if.h
+ * @file os_if.h
*
* sockets local interfaces
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NET_IF_H
-#define ACE_OS_INCLUDE_NET_IF_H
+#ifndef ACE_OS_INCLUDE_NET_OS_IF_H
+#define ACE_OS_INCLUDE_NET_OS_IF_H
#include "ace/pre.h"
@@ -25,8 +25,28 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_NET_IF_H)
-# include /**/ <net/if.h>
+ // This part if to avoid STL name conflict with the map structure
+ // in net/if.h.
+# if defined (ACE_HAS_STL_MAP_CONFLICT)
+# define map _Resource_Allocation_Map_
+# endif /* ACE_HAS_STL_MAP_CONFLICT */
+ extern "C" {
+# include /**/ <net/if.h>
+ }
+# if defined (ACE_HAS_STL_MAP_CONFLICT)
+# undef map
+# endif /* ACE_HAS_STL_MAP_CONFLICT */
#endif /* !ACE_LACKS_NET_IF_H */
+#if defined (ACE_PSOS)
+# if !defined (IFF_LOOPBACK)
+# define IFF_LOOPBACK IFF_EXTLOOPBACK
+# endif /* IFF_LOOPBACK */
+#endif /* ACE_PSOS */
+
+#if defined (ACE_HAS_BROKEN_IF_HEADER)
+ struct ifafilt;
+#endif /* ACE_HAS_BROKEN_IF_HEADER */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NET_IF_H */
+#endif /* ACE_OS_INCLUDE_NET_OS_IF_H */
diff --git a/ace/os_include/netdb.h b/ace/os_include/netdb.h
index 049973a2666..9517b5fd077 100644
--- a/ace/os_include/netdb.h
+++ b/ace/os_include/netdb.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file netdb.h
+ * @file os_netdb.h
*
* definitions for network database operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NETDB_H
-#define ACE_OS_INCLUDE_NETDB_H
+#ifndef ACE_OS_INCLUDE_OS_NETDB_H
+#define ACE_OS_INCLUDE_OS_NETDB_H
#include "ace/pre.h"
@@ -27,8 +27,53 @@
#include "ace/os_include/netinet/in.h"
#if !defined (ACE_LACKS_NETDB_H)
-# include /**/ <netdb.h>
+# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
+# define queue _Queue_
+# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
+ extern "C" {
+# include /**/ <netdb.h>
+ }
+# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
+# undef queue
+# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
#endif /* !ACE_LACKS_NETDB_H */
+#if defined (ACE_PSOS) || defined (VXWORKS)
+ struct hostent {
+ char *h_name; /* official name of host */
+ char **h_aliases; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* address length */
+ char **h_addr_list; /* (first, only) address from name server */
+# define h_addr h_addr_list[0] /* the first address */
+ };
+
+ struct servent {
+ char *s_name; /* official service name */
+ char **s_aliases; /* alias list */
+ int s_port; /* port # */
+ char *s_proto; /* protocol to use */
+ };
+#endif /* ACE_PSOS */
+
+#if defined (ACE_HAS_STRUCT_NETDB_DATA)
+ typedef char ACE_HOSTENT_DATA[sizeof(struct hostent_data)];
+ typedef char ACE_SERVENT_DATA[sizeof(struct servent_data)];
+ typedef char ACE_PROTOENT_DATA[sizeof(struct protoent_data)];
+#else
+# if !defined ACE_HOSTENT_DATA_SIZE
+# define ACE_HOSTENT_DATA_SIZE (4*1024)
+# endif /*ACE_HOSTENT_DATA_SIZE */
+# if !defined ACE_SERVENT_DATA_SIZE
+# define ACE_SERVENT_DATA_SIZE (4*1024)
+# endif /*ACE_SERVENT_DATA_SIZE */
+# if !defined ACE_PROTOENT_DATA_SIZE
+# define ACE_PROTOENT_DATA_SIZE (2*1024)
+# endif /*ACE_PROTOENT_DATA_SIZE */
+ typedef char ACE_HOSTENT_DATA[ACE_HOSTENT_DATA_SIZE];
+ typedef char ACE_SERVENT_DATA[ACE_SERVENT_DATA_SIZE];
+ typedef char ACE_PROTOENT_DATA[ACE_PROTOENT_DATA_SIZE];
+#endif /* ACE_HAS_STRUCT_NETDB_DATA */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NETDB_H */
+#endif /* ACE_OS_INCLUDE_OS_NETDB_H */
diff --git a/ace/os_include/netinet/in.h b/ace/os_include/netinet/in.h
index 97ccb19fc52..845ecc6977c 100644
--- a/ace/os_include/netinet/in.h
+++ b/ace/os_include/netinet/in.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file in.h
+ * @file os_in.h
*
* Internet address family
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NETINET_IN_H
-#define ACE_OS_INCLUDE_NETINET_IN_H
+#ifndef ACE_OS_INCLUDE_NETINET_OS_IN_H
+#define ACE_OS_INCLUDE_NETINET_OS_IN_H
#include "ace/pre.h"
@@ -32,8 +32,47 @@
#endif /* ACE_HAS_WINSOCK2 */
#if !defined (ACE_LACKS_NETINET_IN_H)
-# include /**/ <netinet/in.h>
+# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
+# define queue _Queue_
+# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
+ extern "C" {
+# include /**/ <netinet/in.h>
+ }
+# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
+# undef queue
+# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
#endif /* !ACE_LACKS_NETINET_IN_H */
+#if !defined (IPPORT_RESERVED)
+# define IPPORT_RESERVED 1024
+#endif /* !IPPORT_RESERVED */
+
+#if !defined (IPPORT_USERRESERVED)
+# define IPPORT_USERRESERVED 5000
+#endif /* !IPPORT_USERRESERVED */
+
+// Define INET loopback address constant if it hasn't been defined
+// Dotted Decimal 127.0.0.1 == Hexidecimal 0x7f000001
+#if !defined (INADDR_LOOPBACK)
+# define INADDR_LOOPBACK ((ACE_UINT32) 0x7f000001)
+#endif /* INADDR_LOOPBACK */
+
+// The INADDR_NONE address is generally 255.255.255.255.
+#if !defined (INADDR_NONE)
+# define INADDR_NONE ((ACE_UINT32) 0xffffffff)
+#endif /* INADDR_NONE */
+
+// Define INET string length constants if they haven't been defined
+//
+// for IPv4 dotted-decimal
+#if !defined (INET_ADDRSTRLEN)
+# define INET_ADDRSTRLEN 16
+#endif /* INET_ADDRSTRLEN */
+//
+// for IPv6 hex string
+#if !defined (INET6_ADDRSTRLEN)
+# define INET6_ADDRSTRLEN 46
+#endif /* INET6_ADDRSTRLEN */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NETINET_IN_H */
+#endif /* ACE_OS_INCLUDE_NETINET_OS_IN_H */
diff --git a/ace/os_include/netinet/tcp.h b/ace/os_include/netinet/tcp.h
index ae6d21d0692..b3e2a6faab2 100644
--- a/ace/os_include/netinet/tcp.h
+++ b/ace/os_include/netinet/tcp.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file tcp.h
+ * @file os_tcp.h
*
* definitions for the Internet Transmission Control Protocol (TCP)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NETINET_TCP_H
-#define ACE_OS_INCLUDE_NETINET_TCP_H
+#ifndef ACE_OS_INCLUDE_NETINET_OS_TCP_H
+#define ACE_OS_INCLUDE_NETINET_OS_TCP_H
#include "ace/pre.h"
@@ -28,5 +28,11 @@
# include /**/ <netinet/tcp.h>
#endif /* !ACE_LACKS_NETIINET_TCP_H */
+#if defined (ACE_PSOS)
+# if ! defined (TCP_NODELAY)
+# define TCP_NODELAY 1
+# endif /* TCP_NODELAY */
+#endif /* ACE_PSOS */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NETINET_TCP_H */
+#endif /* ACE_OS_INCLUDE_NETINET_OS_TCP_H */
diff --git a/ace/os_include/nl_types.h b/ace/os_include/nl_types.h
index e7d347a6542..ea6c1078574 100644
--- a/ace/os_include/nl_types.h
+++ b/ace/os_include/nl_types.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file nl_types.h
+ * @file os_nl_types.h
*
* data types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NL_TYPES_H
-#define ACE_OS_INCLUDE_NL_TYPES_H
+#ifndef ACE_OS_INCLUDE_OS_NL_TYPES_H
+#define ACE_OS_INCLUDE_OS_NL_TYPES_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_nl_types_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NL_TYPES_H */
+#endif /* ACE_OS_INCLUDE_OS_NL_TYPES_H */
diff --git a/ace/os_include/poll.h b/ace/os_include/poll.h
index 765a580df8e..20ba6f0b608 100644
--- a/ace/os_include/poll.h
+++ b/ace/os_include/poll.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file poll.h
+ * @file os_poll.h
*
* definitions for the poll() function
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_POLL_H
-#define ACE_OS_INCLUDE_POLL_H
+#ifndef ACE_OS_INCLUDE_OS_POLL_H
+#define ACE_OS_INCLUDE_OS_POLL_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_POLL_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_POLL_H */
+#endif /* ACE_OS_INCLUDE_OS_POLL_H */
diff --git a/ace/os_include/pthread.h b/ace/os_include/pthread.h
index d2a40cfd761..221681dbf95 100644
--- a/ace/os_include/pthread.h
+++ b/ace/os_include/pthread.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file pthread.h
+ * @file os_pthread.h
*
* threads
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_PTHREAD_H
-#define ACE_OS_INCLUDE_PTHREAD_H
+#ifndef ACE_OS_INCLUDE_OS_PTHREAD_H
+#define ACE_OS_INCLUDE_OS_PTHREAD_H
#include "ace/pre.h"
@@ -28,16 +28,14 @@
// This needs to go here *first* to avoid problems with AIX.
# if defined (ACE_HAS_PTHREADS)
-//extern "C" {
# define ACE_DONT_INCLUDE_ACE_SIGNAL_H
# include "ace/os_include/signal.h"
# undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
- //# include "ace/os_include/pthread.h"
# if defined (DIGITAL_UNIX)
# define pthread_self __pthread_self
extern "C" pthread_t pthread_self (void);
# endif /* DIGITAL_UNIX */
-//}
+
# if defined (HPUX_10)
// HP-UX 10 needs to see cma_sigwait, and since _CMA_NOWRAPPERS_ is defined,
// this header does not get included from pthreads.h.
@@ -47,7 +45,9 @@ extern "C" pthread_t pthread_self (void);
#if !defined (ACE_LACKS_PTHREAD_H)
-# include /**/ <pthread.h>
+ extern "C" {
+# include /**/ <pthread.h>
+ }
#endif /* !ACE_LACKS_PTHREAD_H */
@@ -394,4 +394,4 @@ protected:
#endif /* ACE_HAS_PTHREADS */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_PTHREAD_H */
+#endif /* ACE_OS_INCLUDE_OS_PTHREAD_H */
diff --git a/ace/os_include/pwd.h b/ace/os_include/pwd.h
index c1440848e8a..4032aa59bf7 100644
--- a/ace/os_include/pwd.h
+++ b/ace/os_include/pwd.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file pwd.h
+ * @file os_pwd.h
*
* password structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_PWD_H
-#define ACE_OS_INCLUDE_PWD_H
+#ifndef ACE_OS_INCLUDE_OS_PWD_H
+#define ACE_OS_INCLUDE_OS_PWD_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_PWD_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_PWD_H */
+#endif /* ACE_OS_INCLUDE_OS_PWD_H */
diff --git a/ace/os_include/regex.h b/ace/os_include/regex.h
index 410c61a5aa1..8cfde9a1001 100644
--- a/ace/os_include/regex.h
+++ b/ace/os_include/regex.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file regex.h
+ * @file os_regex.h
*
* regular expression matching types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_REGEX_H
-#define ACE_OS_INCLUDE_REGEX_H
+#ifndef ACE_OS_INCLUDE_OS_REGEX_H
+#define ACE_OS_INCLUDE_OS_REGEX_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_REGEX_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_REGEX_H */
+#endif /* ACE_OS_INCLUDE_OS_REGEX_H */
diff --git a/ace/os_include/sched.h b/ace/os_include/sched.h
index ba64c501a65..27ebd4e2f1a 100644
--- a/ace/os_include/sched.h
+++ b/ace/os_include/sched.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file sched.h
+ * @file os_sched.h
*
* execution scheduling (REALTIME)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SCHED_H
-#define ACE_OS_INCLUDE_SCHED_H
+#ifndef ACE_OS_INCLUDE_OS_SCHED_H
+#define ACE_OS_INCLUDE_OS_SCHED_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_SCHED_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SCHED_H */
+#endif /* ACE_OS_INCLUDE_OS_SCHED_H */
diff --git a/ace/os_include/search.h b/ace/os_include/search.h
index 6a91958efcd..c141685d32b 100644
--- a/ace/os_include/search.h
+++ b/ace/os_include/search.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file search.h
+ * @file os_search.h
*
* search tables
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SEARCH_H
-#define ACE_OS_INCLUDE_SEARCH_H
+#ifndef ACE_OS_INCLUDE_OS_SEARCH_H
+#define ACE_OS_INCLUDE_OS_SEARCH_H
#include "ace/pre.h"
@@ -31,4 +31,4 @@
#endif /* !ACE_LACKS_SEARCH_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SEARCH_H */
+#endif /* ACE_OS_INCLUDE_OS_SEARCH_H */
diff --git a/ace/os_include/semaphore.h b/ace/os_include/semaphore.h
index ae5e0eff724..e7c027dd5ba 100644
--- a/ace/os_include/semaphore.h
+++ b/ace/os_include/semaphore.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file semaphore.h
+ * @file os_semaphore.h
*
* semaphores (REALTIME)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SEMAPHORE_H
-#define ACE_OS_INCLUDE_SEMAPHORE_H
+#ifndef ACE_OS_INCLUDE_OS_SEMAPHORE_H
+#define ACE_OS_INCLUDE_OS_SEMAPHORE_H
#include "ace/pre.h"
@@ -56,4 +56,4 @@ typedef struct
# endif /* ACE_HAS_POSIX_SEM */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SEMAPHORE_H */
+#endif /* ACE_OS_INCLUDE_OS_SEMAPHORE_H */
diff --git a/ace/os_include/setjmp.h b/ace/os_include/setjmp.h
index 8d0d801126b..b4f692ca4e6 100644
--- a/ace/os_include/setjmp.h
+++ b/ace/os_include/setjmp.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file setjmp.h
+ * @file os_setjmp.h
*
* stack environment declarations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SETJMP_H
-#define ACE_OS_INCLUDE_SETJMP_H
+#ifndef ACE_OS_INCLUDE_OS_SETJMP_H
+#define ACE_OS_INCLUDE_OS_SETJMP_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_SETJMP_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SETJMP_H */
+#endif /* ACE_OS_INCLUDE_OS_SETJMP_H */
diff --git a/ace/os_include/signal.h b/ace/os_include/signal.h
index 743a9a991d8..363d901a812 100644
--- a/ace/os_include/signal.h
+++ b/ace/os_include/signal.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file signal.h
+ * @file os_signal.h
*
* signals
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SIGNAL_H
-#define ACE_OS_INCLUDE_SIGNAL_H
+#ifndef ACE_OS_INCLUDE_OS_SIGNAL_H
+#define ACE_OS_INCLUDE_OS_SIGNAL_H
#include "ace/pre.h"
@@ -30,21 +30,31 @@
# if !defined (ACE_LACKS_SIGINFO_H)
# if defined (__QNX__) || defined (__OpenBSD__)
# include /**/ <sys/siginfo.h>
-# elif defined(__rtems__)
-//# include "ace/os_include/signal.h"
# else /* __QNX__ || __OpenBSD__ */
# include /**/ <siginfo.h>
# endif /* __QNX__ || __OpenBSD__ */
# endif /* ACE_LACKS_SIGINFO_H */
#endif /* ACE_HAS_SIGINFO_T */
+#if defined (ACE_SIGINFO_IS_SIGINFO_T)
+ typedef struct siginfo siginfo_t;
+#endif /* ACE_LACKS_SIGINFO_H */
+
#include "ace/os_include/ucontext.h"
#include "ace/os_include/time.h"
#if !defined (ACE_LACKS_SINGNAL_H)
-# include /**/ <signal.h>
+ extern "C" {
+# include /**/ <signal.h>
+ }
#endif /* !ACE_LACKS_SIGNAL_H */
+#if defined (ACE_LACKS_SIGSET)
+# if !defined(__MINGW32__)
+ typedef u_int sigset_t;
+# endif /* !__MINGW32__*/
+#endif /* ACE_LACKS_SIGSET */
+
#if defined (ACE_HAS_SIG_MACROS)
# undef sigemptyset
# undef sigfillset
@@ -148,5 +158,83 @@
# define ACE_SIGURG -2
# define ACE_CLOEXEC -3
+#if defined (ACE_PSOS)
+# if !defined (ACE_PSOSIM)
+ extern "C"
+ {
+ typedef void (* ACE_SignalHandler) (void);
+ typedef void (* ACE_SignalHandlerV) (void);
+ }
+# if !defined(SIG_DFL)
+# define SIG_DFL (ACE_SignalHandler) 0
+# endif /* philabs */
+# endif /* !ACE_PSOSIM */
+# if ! defined (NSIG)
+# define NSIG 32
+# endif /* NSIG */
+#endif /* ACE_PSOS && !ACE_PSOSIM */
+
+#if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES)
+ // Prototypes for both signal() and struct sigaction are consistent..
+# if defined (ACE_HAS_SIG_C_FUNC)
+ extern "C" {
+# endif /* ACE_HAS_SIG_C_FUNC */
+# if !defined (ACE_PSOS)
+ typedef void (*ACE_SignalHandler)(int);
+ typedef void (*ACE_SignalHandlerV)(int);
+# endif /* !defined (ACE_PSOS) */
+# if defined (ACE_HAS_SIG_C_FUNC)
+ }
+# endif /* ACE_HAS_SIG_C_FUNC */
+#elif defined (ACE_HAS_LYNXOS_SIGNALS)
+ typedef void (*ACE_SignalHandler)(...);
+ typedef void (*ACE_SignalHandlerV)(...);
+#elif defined (ACE_HAS_TANDEM_SIGNALS)
+ typedef void (*ACE_SignalHandler)(...);
+ typedef void (*ACE_SignalHandlerV)(...);
+#elif defined (ACE_HAS_IRIX_53_SIGNALS)
+ typedef void (*ACE_SignalHandler)(...);
+ typedef void (*ACE_SignalHandlerV)(...);
+#elif defined (ACE_HAS_SPARCWORKS_401_SIGNALS)
+ typedef void (*ACE_SignalHandler)(int, ...);
+ typedef void (*ACE_SignalHandlerV)(int,...);
+#elif defined (ACE_HAS_SUNOS4_SIGNAL_T)
+ typedef void (*ACE_SignalHandler)(...);
+ typedef void (*ACE_SignalHandlerV)(...);
+#elif defined (ACE_HAS_SVR4_SIGNAL_T)
+ // SVR4 Signals are inconsistent (e.g., see struct sigaction)..
+ typedef void (*ACE_SignalHandler)(int);
+# if !defined (m88k) /* with SVR4_SIGNAL_T */
+ typedef void (*ACE_SignalHandlerV)(void);
+# else
+ typedef void (*ACE_SignalHandlerV)(int);
+# endif /* m88k */ /* with SVR4_SIGNAL_T */
+#elif defined (ACE_WIN32)
+ typedef void (__cdecl *ACE_SignalHandler)(int);
+ typedef void (__cdecl *ACE_SignalHandlerV)(int);
+#elif defined (ACE_HAS_UNIXWARE_SVR4_SIGNAL_T)
+ typedef void (*ACE_SignalHandler)(int);
+ typedef void (*ACE_SignalHandlerV)(...);
+#elif defined (INTEGRITY)
+ typedef void (*ACE_SignalHandler)();
+ typedef void (*ACE_SignalHandlerV)(int);
+#else /* This is necessary for some older broken version of cfront */
+# if defined (SIG_PF)
+# define ACE_SignalHandler SIG_PF
+# else
+ typedef void (*ACE_SignalHandler)(int);
+# endif /* SIG_PF */
+ typedef void (*ACE_SignalHandlerV)(...);
+#endif /* ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES */
+
+#if defined (ACE_LACKS_SIGACTION)
+ struct sigaction
+ {
+ int sa_flags;
+ ACE_SignalHandlerV sa_handler;
+ sigset_t sa_mask;
+ };
+#endif /* ACE_LACKS_SIGACTION */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SIGNAL_H */
+#endif /* ACE_OS_INCLUDE_OS_SIGNAL_H */
diff --git a/ace/os_include/spawn.h b/ace/os_include/spawn.h
index 79d2f12f221..b4313f1f209 100644
--- a/ace/os_include/spawn.h
+++ b/ace/os_include/spawn.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file spawn.h
+ * @file os_spawn.h
*
* spawn (ADVANCED REALTIME)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SPAWN_H
-#define ACE_OS_INCLUDE_SPAWN_H
+#ifndef ACE_OS_INCLUDE_OS_SPAWN_H
+#define ACE_OS_INCLUDE_OS_SPAWN_H
#include "ace/pre.h"
@@ -33,4 +33,4 @@
#endif /* !ACE_LACKS_SPAWN_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SPAWN_H */
+#endif /* ACE_OS_INCLUDE_OS_SPAWN_H */
diff --git a/ace/os_include/stdarg.h b/ace/os_include/stdarg.h
index e51bc6a43be..82da0314525 100644
--- a/ace/os_include/stdarg.h
+++ b/ace/os_include/stdarg.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stdarg.h
+ * @file os_stdarg.h
*
* handle variable argument list
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STDARG_H
-#define ACE_OS_INCLUDE_STDARG_H
+#ifndef ACE_OS_INCLUDE_OS_STDARG_H
+#define ACE_OS_INCLUDE_OS_STDARG_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_STDARG_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STDARG_H */
+#endif /* ACE_OS_INCLUDE_OS_STDARG_H */
diff --git a/ace/os_include/stdbool.h b/ace/os_include/stdbool.h
index 67fcab7caac..b67754d0b85 100644
--- a/ace/os_include/stdbool.h
+++ b/ace/os_include/stdbool.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stdbool.h
+ * @file os_stdbool.h
*
* boolean type and values
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STDBOOL_H
-#define ACE_OS_INCLUDE_STDBOOL_H
+#ifndef ACE_OS_INCLUDE_OS_STDBOOL_H
+#define ACE_OS_INCLUDE_OS_STDBOOL_H
#include "ace/pre.h"
@@ -29,4 +29,4 @@
#endif /* !ACE_LACKS_STDBOOL_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STDBOOL_H */
+#endif /* ACE_OS_INCLUDE_OS_STDBOOL_H */
diff --git a/ace/os_include/stddef.h b/ace/os_include/stddef.h
index 08d26400185..d2f64cb9a98 100644
--- a/ace/os_include/stddef.h
+++ b/ace/os_include/stddef.h
@@ -2,21 +2,21 @@
//=============================================================================
/**
- * @file stddef.h
+ * @file os_stddef.h
*
* standard type definitions
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
// From http://www.UNIX-systems.org/single_unix_specification/
-#ifndef ACE_OS_INCLUDE_STDDEF_H
-#define ACE_OS_INCLUDE_STDDEF_H
+#ifndef ACE_OS_INCLUDE_OS_STDDEF_H
+#define ACE_OS_INCLUDE_OS_STDDEF_H
#include "ace/pre.h"
@@ -29,24 +29,24 @@
// @todo move this to a windows config file
// Add new macro ACE_LACKS_STDDEF_H
#if defined (ACE_HAS_WINCE) && _WIN32_WCE < 400
-# if !define (ACE_LACKS_STDDEF_H)
-# define ACE_LACKS_STDDEF_H
-# define ACE_LACKS_PTRDIFF_T
-# endif /* !ACE_LACKS_STDDEF_H */
+# if !define (ACE_LACKS_STDDEF_H)
+# define ACE_LACKS_STDDEF_H
+# define ACE_LACKS_PTRDIFF_T
+# endif /* !ACE_LACKS_STDDEF_H */
#endif /* ACE_HAS_WINCE && _WIN32_WCE < 400 */
#if !defined (ACE_LACKS_STDDEF_H)
-# include /**/ <stddef.h>
+# include /**/ <stddef.h>
#endif /* !ACE_LACKS_STDDEF_H */
// NULL pointer constant
#if defined (ACE_LACKS_NULL)
-# undef NULL
-# if defined(__cplusplus)
-# define NULL 0
-# else
-# define NULL ((void *)0)
-# endif
+# undef NULL
+# if defined(__cplusplus)
+# define NULL 0
+# else
+# define NULL ((void *)0)
+# endif
#endif /* ACE_LACKS_NULL */
/*
@@ -55,16 +55,16 @@
its structure (type).
*/
#if defined (ACE_LACKS_OFFSETOF)
-# undef offsetof
-# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+# undef offsetof
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif /* ACE_LACKS_OFFSETOF */
// Signed integer type of the result of subtracting two pointers.
#if defined (ACE_LACKS_PTRDIFF_T)
-# if !defined (ACE_PTRDIFF_T_TYPE)
-# define ACE_PTRDIFF_T_TYPE unsigned long
-# endif /* !ACE_PTRDIFF_T_TYPE */
-typedef ACE_PTRDIFF_T_TYPE ptrdiff_t;
+# if !defined (ACE_PTRDIFF_T_TYPE)
+# define ACE_PTRDIFF_T_TYPE unsigned long
+# endif /* !ACE_PTRDIFF_T_TYPE */
+ typedef ACE_PTRDIFF_T_TYPE ptrdiff_t;
#endif /* ACE_LACKS_PTRDIFF_T */
/*
@@ -76,24 +76,24 @@ typedef ACE_PTRDIFF_T_TYPE ptrdiff_t;
character constant.
*/
#if defined (ACE_LACKS_WCHAR_T)
-# if !defined (ACE_WCHAR_T_TYPE)
-# define ACE_WCHAR_T_TYPE long;
-# endif /* !ACE_WCHAR_T_TYPE */
-typedef ACE_WCHAR_T_TYPE wchar_t;
+# if !defined (ACE_WCHAR_T_TYPE)
+# define ACE_WCHAR_T_TYPE long;
+# endif /* !ACE_WCHAR_T_TYPE */
+ typedef ACE_WCHAR_T_TYPE wchar_t;
#endif /* ACE_LACKS_WCHAR_T */
// Unsigned integer type of the result of the sizeof operator.
#if defined (ACE_LACKS_SIZE_T)
-# if !defined (ACE_SIZE_T_TYPE)
-# define ACE_SIZE_T_TYPE unsigned int;
-# endif /* !ACE_SIZE_T_TYPE */
-typedef ACE_SIZE_T_TYPE size_t;
+# if !defined (ACE_SIZE_T_TYPE)
+# define ACE_SIZE_T_TYPE unsigned int;
+# endif /* !ACE_SIZE_T_TYPE */
+ typedef ACE_SIZE_T_TYPE size_t;
#endif /* ACE_LACKS_SIZE_T */
#if defined (ACE_PSOS_DIAB_MIPS)
-#undef size_t
-typedef unsigned int size_t;
+# undef size_t
+ typedef unsigned int size_t;
#endif
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STDDEF_H */
+#endif /* ACE_OS_INCLUDE_OS_STDDEF_H */
diff --git a/ace/os_include/stdint.h b/ace/os_include/stdint.h
index 3fdba84de37..6597b657c29 100644
--- a/ace/os_include/stdint.h
+++ b/ace/os_include/stdint.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stdint.h
+ * @file os_stdint.h
*
* integer types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STDINT_H
-#define ACE_OS_INCLUDE_STDINT_H
+#ifndef ACE_OS_INCLUDE_OS_STDINT_H
+#define ACE_OS_INCLUDE_OS_STDINT_H
#include "ace/pre.h"
@@ -25,7 +25,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_STDINT_H)
-# include /**/ <stdint.h>
+# include /**/ <stdint.h>
#endif /* !ACE_LACKS_STDINT_H */
// BSD style types
@@ -44,50 +44,80 @@
# endif /* ! defined (ACE_PSOS) */
#endif /* ACE_LACKS_SYS_TYPES_H */
-
+#if !defined (ACE_PSOSIM) && defined (ACE_PSOS_CANT_USE_SYS_TYPES)
+ // these are missing from the pSOS types.h file, and the compiler
+ // supplied types.h file collides with the pSOS version.
+# if !defined (ACE_SHOULD_NOT_DEFINE_SYS_TYPES)
+ typedef unsigned char u_char;
+ typedef unsigned short u_short;
+# endif /* ACE_SHOULD_NOT_DEFINE_SYS_TYPES */
+ typedef unsigned int u_int;
+# if !defined (ACE_SHOULD_NOT_DEFINE_SYS_TYPES)
+ typedef unsigned long u_long;
+# endif /* ACE_SHOULD_NOT_DEFINE_SYS_TYPES */
+ // These are defined in types.h included by (among others) pna.h
+# if 0
+ typedef unsigned char uchar_t;
+ typedef unsigned short ushort_t;
+ typedef unsigned int uint_t;
+ typedef unsigned long ulong_t;
+# endif /* 0 */
+ typedef char * caddr_t;
+# if defined (ACE_PSOS_DIAB_PPC)
+ // pid_t is defined in sys/types.h
+# if 0
+ typedef unsigned long pid_t;
+# endif /* 0 */
+# define ACE_INVALID_PID ((pid_t) ~0)
+# else /* !defined (ACE_PSOS_DIAB_PPC) */
+ typedef long pid_t;
+# define ACE_INVALID_PID ((pid_t) -1)
+# endif /* defined (ACE_PSOS_DIAB_PPC) */
+// typedef unsigned char wchar_t;
+#endif /* ACE_PSOS_CANT_USE_SYS_TYPES */
/* Define required types if missing */
#if defined (ACE_LACKS_INT8_T)
-# if !defined (ACE_INT8_T_TYPE)
-# define ACE_INT8_T_TYPE char
-# endif /* !ACE_INT8_T_TYPE */
-typedef ACE_INT8_T_TYPE int8_t;
+# if !defined (ACE_INT8_T_TYPE)
+# define ACE_INT8_T_TYPE char
+# endif /* !ACE_INT8_T_TYPE */
+ typedef ACE_INT8_T_TYPE int8_t;
#endif /* ACE_LACKS_INT8_T */
#if defined (ACE_LACKS_UINT8_T)
-# if !defined (ACE_UINT8_T_TYPE)
-# define ACE_UINT8_T_TYPE unsigned char
-# endif /* !ACE_UINT8_T_TYPE */
-typedef ACE_UINT8_T_TYPE int8_t;
+# if !defined (ACE_UINT8_T_TYPE)
+# define ACE_UINT8_T_TYPE unsigned char
+# endif /* !ACE_UINT8_T_TYPE */
+ typedef ACE_UINT8_T_TYPE int8_t;
#endif /* ACE_LACKS_UINT8_T */
#if defined (ACE_LACKS_INT16_T)
-# if !defined (ACE_INT16_T_TYPE)
-# define ACE_INT16_T_TYPE short
-# endif /* !ACE_INT16_T_TYPE */
-typedef ACE_INT16_T_TYPE int16_t;
+# if !defined (ACE_INT16_T_TYPE)
+# define ACE_INT16_T_TYPE short
+# endif /* !ACE_INT16_T_TYPE */
+ typedef ACE_INT16_T_TYPE int16_t;
#endif /* ACE_LACKS_INT16_T */
#if defined (ACE_LACKS_UINT16_T)
-# if !defined (ACE_UINT16_T_TYPE)
-# define ACE_UINT16_T_TYPE unsigned short
-# endif /* !ACE_UINT16_T_TYPE */
-typedef ACE_UINT16_T_TYPE int16_t;
+# if !defined (ACE_UINT16_T_TYPE)
+# define ACE_UINT16_T_TYPE unsigned short
+# endif /* !ACE_UINT16_T_TYPE */
+ typedef ACE_UINT16_T_TYPE int16_t;
#endif /* ACE_LACKS_UINT16_T */
#if defined (ACE_LACKS_INT32_T)
-# if !defined (ACE_INT32_T_TYPE)
-# define ACE_INT32_T_TYPE long
-# endif /* !ACE_INT32_T_TYPE */
-typedef ACE_INT32_T_TYPE int32_t;
+# if !defined (ACE_INT32_T_TYPE)
+# define ACE_INT32_T_TYPE long
+# endif /* !ACE_INT32_T_TYPE */
+ typedef ACE_INT32_T_TYPE int32_t;
#endif /* ACE_LACKS_INT32_T */
#if defined (ACE_LACKS_UINT32_T)
-# if !defined (ACE_UINT32_T_TYPE)
-# define ACE_UINT32_T_TYPE unsigned long
-# endif /* !ACE_UINT32_T_TYPE */
-typedef ACE_UINT32_T_TYPE int32_t;
+# if !defined (ACE_UINT32_T_TYPE)
+# define ACE_UINT32_T_TYPE unsigned long
+# endif /* !ACE_UINT32_T_TYPE */
+ typedef ACE_UINT32_T_TYPE int32_t;
#endif /* ACE_LACKS_UIN32_T */
// @todo pull in ACE class here
@@ -112,17 +142,17 @@ environment and the application is being built in the
_POSIX_V6_LPBIG_OFFBIG programming environment.
*/
#if defined (ACE_LACKS_INT64_T)
-# if !defined (ACE_INT64_T_TYPE)
-# define ACE_INT64_T_TYPE long
-# endif /* !ACE_INT64_T_TYPE */
-typedef ACE_INT64_T_TYPE int64_t;
+# if !defined (ACE_INT64_T_TYPE)
+# define ACE_INT64_T_TYPE long
+# endif /* !ACE_INT64_T_TYPE */
+ typedef ACE_INT64_T_TYPE int64_t;
#endif /* ACE_LACKS_INT64_T */
#if defined (ACE_LACKS_UINT64_T)
-# if !defined (ACE_UINT64_T_TYPE)
-# define ACE_UINT64_T_TYPE unsigned long
-# endif /* !ACE_UINT64_T_TYPE */
-typedef ACE_UINT64_T_TYPE int64_t;
+# if !defined (ACE_UINT64_T_TYPE)
+# define ACE_UINT64_T_TYPE unsigned long
+# endif /* !ACE_UINT64_T_TYPE */
+ typedef ACE_UINT64_T_TYPE int64_t;
#endif /* ACE_LACKS_UIN64_T */
// @todo move the ACE_INT## typedefs here so that ACE_INT64 will
@@ -132,4 +162,4 @@ typedef ACE_UINT64_T_TYPE int64_t;
// @todo perhaps add macros
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STDINT_H */
+#endif /* ACE_OS_INCLUDE_OS_STDINT_H */
diff --git a/ace/os_include/stdio.h b/ace/os_include/stdio.h
index b731e3dee4e..34b71d2886e 100644
--- a/ace/os_include/stdio.h
+++ b/ace/os_include/stdio.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stdio.h
+ * @file os_stdio.h
*
* standard buffered input/output
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STDIO_H
-#define ACE_OS_INCLUDE_STDIO_H
+#ifndef ACE_OS_INCLUDE_OS_STDIO_H
+#define ACE_OS_INCLUDE_OS_STDIO_H
#include "ace/pre.h"
@@ -29,28 +29,28 @@
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_STDIO_H)
-# include /**/ <stdio.h>
+# include /**/ <stdio.h>
#endif /* !ACE_LACKS_STDIO_H */
#if !defined (ACE_WIN32) && !defined (INTEGRITY)
-#define ACE_MAX_USERID L_cuserid
+# define ACE_MAX_USERID L_cuserid
#endif /*!ACE_WIN32*/
// this is a nasty hack to get around problems with the
// pSOS definition of BUFSIZ as the config table entry
// (which is valued using the LC_BUFSIZ value anyway)
-# if defined (ACE_PSOS)
-# if defined (BUFSIZ)
-# undef BUFSIZ
-# endif /* defined (BUFSIZ) */
-# define BUFSIZ LC_BUFSIZ
-# endif /* defined (ACE_PSOS) */
+#if defined (ACE_PSOS)
+# if defined (BUFSIZ)
+# undef BUFSIZ
+# endif /* defined (BUFSIZ) */
+# define BUFSIZ LC_BUFSIZ
+#endif /* defined (ACE_PSOS) */
-# if defined (BUFSIZ)
-# define ACE_STREAMBUF_SIZE BUFSIZ
-# else
-# define ACE_STREAMBUF_SIZE 1024
-# endif /* BUFSIZ */
+#if defined (BUFSIZ)
+# define ACE_STREAMBUF_SIZE BUFSIZ
+#else
+# define ACE_STREAMBUF_SIZE 1024
+#endif /* BUFSIZ */
#if defined (ACE_WIN32) && !defined (ACE_PSOS)
// The following are #defines and #includes that are specific to
@@ -79,7 +79,7 @@
extern FILE *fdopen(int, const char *);
extern char *tempnam(const char *, const char *);
extern "C" int fileno(FILE *);
-# endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STDIO_H */
+#endif /* ACE_OS_INCLUDE_OS_STDIO_H */
diff --git a/ace/os_include/stdlib.h b/ace/os_include/stdlib.h
index b6447a4f2ce..52f2fb69e8a 100644
--- a/ace/os_include/stdlib.h
+++ b/ace/os_include/stdlib.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stdlib.h
+ * @file os_stdlib.h
*
* standard library definitions
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STDLIB_H
-#define ACE_OS_INCLUDE_STDLIB_H
+#ifndef ACE_OS_INCLUDE_OS_STDLIB_H
+#define ACE_OS_INCLUDE_OS_STDLIB_H
#include "ace/pre.h"
@@ -27,23 +27,27 @@
#include "ace/os_include/stddef.h"
#include "ace/os_include/sys/wait.h"
+#if defined (ACE_HAS_ALLOCA_H)
+# include /**/ <alloca.h>
+#endif /* ACE_HAS_ALLOCA_H */
+
#if !defined (ACE_LACKS_STDLIB_H)
-# include /**/ <stdlib.h>
+# include /**/ <stdlib.h>
#endif /* !ACE_LACKS_STDLIB_H */
-# if defined (ACE_HAS_BROKEN_RANDR)
-// The SunOS 5.4.X version of rand_r is inconsistent with the header
-// files...
-typedef u_int ACE_RANDR_TYPE;
-extern "C" int rand_r (ACE_RANDR_TYPE seed);
-# else
-# if defined (HPUX_10)
-// HP-UX 10.x's stdlib.h (long *) doesn't match that man page (u_int *)
-typedef long ACE_RANDR_TYPE;
-# else
-typedef u_int ACE_RANDR_TYPE;
-# endif /* HPUX_10 */
-# endif /* ACE_HAS_BROKEN_RANDR */
+#if defined (ACE_HAS_BROKEN_RANDR)
+ // The SunOS 5.4.X version of rand_r is inconsistent with the header
+ // files...
+ typedef u_int ACE_RANDR_TYPE;
+ extern "C" int rand_r (ACE_RANDR_TYPE seed);
+#else
+# if defined (HPUX_10)
+ // HP-UX 10.x's stdlib.h (long *) doesn't match that man page (u_int *)
+ typedef long ACE_RANDR_TYPE;
+# else
+ typedef u_int ACE_RANDR_TYPE;
+# endif /* HPUX_10 */
+#endif /* ACE_HAS_BROKEN_RANDR */
#if defined (ACE_PSOS_SNARFS_HEADER_INFO)
// Header information snarfed from compiler provided header files
@@ -54,4 +58,4 @@ typedef u_int ACE_RANDR_TYPE;
#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STDLIB_H */
+#endif /* ACE_OS_INCLUDE_OS_STDLIB_H */
diff --git a/ace/os_include/string.h b/ace/os_include/string.h
index a9e14388c2e..5be5306a119 100644
--- a/ace/os_include/string.h
+++ b/ace/os_include/string.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file string.h
+ * @file os_string.h
*
* string operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STRING_H
-#define ACE_OS_INCLUDE_STRING_H
+#ifndef ACE_OS_INCLUDE_OS_STRING_H
+#define ACE_OS_INCLUDE_OS_STRING_H
#include "ace/pre.h"
@@ -27,11 +27,11 @@
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_STRING_H)
-# include /**/ <string.h>
+# include /**/ <string.h>
#endif /* !ACE_LACKS_STRING_H */
#if defined (ACE_LACKS_STRTOK_R_PROTOTYPE) && !defined (_POSIX_SOURCE)
-extern "C" char *strtok_r (char *s, const char *delim, char **save_ptr);
+ extern "C" char *strtok_r (char *s, const char *delim, char **save_ptr);
#endif /* ACE_LACKS_STRTOK_R_PROTOTYPE */
#if defined (__BORLANDC__)
@@ -50,8 +50,8 @@ extern "C" char *strtok_r (char *s, const char *delim, char **save_ptr);
// that are not included because there is already an identically
// named file provided with pSOS, which does not have this info
// from compiler supplied header
- extern char *strdup (const char *); // string.h
+ extern "C" char *strdup (const char *); // string.h
#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STRING_H */
+#endif /* ACE_OS_INCLUDE_OS_STRING_H */
diff --git a/ace/os_include/strings.h b/ace/os_include/strings.h
index 3644b72b05c..99613b3d24d 100644
--- a/ace/os_include/strings.h
+++ b/ace/os_include/strings.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file strings.h
+ * @file os_strings.h
*
* string operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STRINGS_H
-#define ACE_OS_INCLUDE_STRINGS_H
+#ifndef ACE_OS_INCLUDE_OS_STRINGS_H
+#define ACE_OS_INCLUDE_OS_STRINGS_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_STRINGS_H)
-# include /**/ <strings.h>
+# include /**/ <strings.h>
#endif /* !ACE_LACKS_STRINGS_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STRINGS_H */
+#endif /* ACE_OS_INCLUDE_OS_STRINGS_H */
diff --git a/ace/os_include/stropts.h b/ace/os_include/stropts.h
index c33dcbf0f85..d4674daffc6 100644
--- a/ace/os_include/stropts.h
+++ b/ace/os_include/stropts.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stropts.h
+ * @file os_stropts.h
*
* STREAMS interface (STREAMS)
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_STROPTS_H
-#define ACE_OS_INCLUDE_STROPTS_H
+#ifndef ACE_OS_INCLUDE_OS_STROPTS_H
+#define ACE_OS_INCLUDE_OS_STROPTS_H
#include "ace/pre.h"
@@ -39,24 +39,24 @@
#endif /* ACE_HAS_TIMOD_H */
#if !defined (ACE_LACKS_SYS_IOCTL_H)
-# include /**/ <sys/ioctl.h>
+# include /**/ <sys/ioctl.h>
#endif /* !ACE_LACKS_IOCTL_H */
-# if defined (ACE_HAS_SYS_FILIO_H)
-# include /**/ <sys/filio.h>
-# endif /* ACE_HAS_SYS_FILIO_H */
+#if defined (ACE_HAS_SYS_FILIO_H)
+# include /**/ <sys/filio.h>
+#endif /* ACE_HAS_SYS_FILIO_H */
#if defined (ACE_HAS_SOCKIO_H)
-# include /**/ <sys/sockio.h>
+# include /**/ <sys/sockio.h>
#endif /* ACE_HAS_SOCKIO_ */
#if !defined (ACE_LACKS_STROPTS_H)
-# include /**/ <stropts.h>
+# include /**/ <stropts.h>
#endif /* !ACE_LACKS_STROPTS_H */
-# if defined (ACE_LACKS_STRRECVFD)
-struct strrecvfd {};
-# endif /* ACE_LACKS_STRRECVFD */
+#if defined (ACE_LACKS_STRRECVFD)
+ struct strrecvfd {};
+#endif /* ACE_LACKS_STRRECVFD */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_STROPTS_H */
+#endif /* ACE_OS_INCLUDE_OS_STROPTS_H */
diff --git a/ace/os_include/sys/ipc.h b/ace/os_include/sys/ipc.h
index 626a4c2996d..92ace0594fd 100644
--- a/ace/os_include/sys/ipc.h
+++ b/ace/os_include/sys/ipc.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file ipc.h
+ * @file os_ipc.h
*
* XSI interprocess communication access structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_IPC_H
-#define ACE_OS_INCLUDE_SYS_IPC_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_IPC_H
+#define ACE_OS_INCLUDE_SYS_OS_IPC_H
#include "ace/pre.h"
@@ -27,8 +27,39 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_SYS_IPC_H)
-# include /**/ <sys/ipc.h>
+# include /**/ <sys/ipc.h>
#endif /* !ACE_LACKS_SYS_IPC_H */
+#if defined (ACE_WIN32) && !defined (ACE_PSOS)
+# define ACE_INVALID_SEM_KEY 0
+#else /* !ACE_WIN32 */
+# define ACE_INVALID_SEM_KEY -1
+#endif /* ACE_WIN32 && !ACE_PSOS */
+
+#if !defined (IPC_PRIVATE)
+# define IPC_PRIVATE ACE_INVALID_SEM_KEY
+#endif /* IPC_PRIVATE */
+
+#if !defined (IPC_STAT)
+# define IPC_STAT 0
+#endif /* IPC_STAT */
+
+#if !defined (IPC_CREAT)
+# define IPC_CREAT 0
+#endif /* IPC_CREAT */
+
+#if !defined (IPC_NOWAIT)
+# define IPC_NOWAIT 0
+#endif /* IPC_NOWAIT */
+
+#if !defined (IPC_RMID)
+# define IPC_RMID 0
+#endif /* IPC_RMID */
+
+#if !defined (IPC_EXCL)
+# define IPC_EXCL 0
+#endif /* IPC_EXCL */
+
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_IPC_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_IPC_H */
diff --git a/ace/os_include/sys/mman.h b/ace/os_include/sys/mman.h
index 7faea2d21ce..202c29312d6 100644
--- a/ace/os_include/sys/mman.h
+++ b/ace/os_include/sys/mman.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file mman.h
+ * @file os_mman.h
*
* memory management declarations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_MMAN_H
-#define ACE_OS_INCLUDE_SYS_MMAN_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_MMAN_H
+#define ACE_OS_INCLUDE_SYS_OS_MMAN_H
#include "ace/pre.h"
@@ -26,8 +26,28 @@
#include "ace/os_include/sys/types.h"
+#if defined (ACE_LACKS_MMAP)
+# define ACE_LACKS_SYS_MMAN_H
+#endif /* ACE_LACKS_MMAP */
+
#if !defined (ACE_LACKS_SYS_MMAN_H)
-# include /**/ <sys/mman.h>
+ // Fixes a problem with HP/UX.
+# if defined (ACE_HAS_BROKEN_MMAP_H)
+ extern "C" {
+# endif /* ACE_HAS_BROKEN_MMAP_H */
+# include /**/ <sys/mman.h>
+# if defined (ACE_HAS_BROKEN_MMAP_H)
+ }
+# endif /* ACE_HAS_BROKEN_MMAP_H */
+#else /* ACE_LACKS_SYS_MMAH */
+# define PROT_READ 0
+# define PROT_WRITE 0
+# define PROT_EXEC 0
+# define PROT_NONE 0
+# define PROT_RDWR 0
+# define MAP_PRIVATE 0
+# define MAP_SHARED 0
+# define MAP_FIXED 0
#endif /* !ACE_LACKS_SYS_MMAN_H */
#if defined (ACE_WIN32)
@@ -56,4 +76,4 @@ PAGE_NOCACHE */
#endif /* PROT_RDWR */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_MMAN_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_MMAN_H */
diff --git a/ace/os_include/sys/msg.h b/ace/os_include/sys/msg.h
index 61d658291c2..c0897fcef16 100644
--- a/ace/os_include/sys/msg.h
+++ b/ace/os_include/sys/msg.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file msg.h
+ * @file os_msg.h
*
* XSI message queue structures
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_MSG_H
-#define ACE_OS_INCLUDE_SYS_MSG_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_MSG_H
+#define ACE_OS_INCLUDE_SYS_OS_MSG_H
#include "ace/pre.h"
@@ -38,22 +38,22 @@
#endif /* !ACE_LACKS_SYS_MSG_H */
#if defined (ACE_LACKS_MSGBUF_T)
-struct msgbuf {};
+ struct msgbuf {};
#endif /* ACE_LACKS_MSGBUF_T */
#if defined (ACE_LACKS_SYSV_MSQ_PROTOS)
-extern "C"
-{
- int msgget (key_t, int);
- int msgrcv (int, void *, size_t, long, int);
- int msgsnd (int, const void *, size_t, int);
- int msgctl (int, int, struct msqid_ds *);
-}
+ extern "C"
+ {
+ int msgget (key_t, int);
+ int msgrcv (int, void *, size_t, long, int);
+ int msgsnd (int, const void *, size_t, int);
+ int msgctl (int, int, struct msqid_ds *);
+ }
#endif /* ACE_LACKS_SYSV_MSQ_PROTOS */
#if defined (ACE_WIN32)
-struct msqid_ds {};
+ struct msqid_ds {};
#endif /* ACE_WIN32 */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_MSG_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_MSG_H */
diff --git a/ace/os_include/sys/resource.h b/ace/os_include/sys/resource.h
index 0947e252675..c2ad2a0ac7d 100644
--- a/ace/os_include/sys/resource.h
+++ b/ace/os_include/sys/resource.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file resource.h
+ * @file os_resource.h
*
* definitions for XSI resource operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_RESOURCE_H
-#define ACE_OS_INCLUDE_SYS_RESOURCE_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_RESOURCE_H
+#define ACE_OS_INCLUDE_SYS_OS_RESOURCE_H
#include "ace/pre.h"
@@ -28,25 +28,25 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_SYS_RESOURCE_H)
-# include /**/ <sys/resource.h>
+# include /**/ <sys/resource.h>
#endif /* !ACE_LACKS_SYS_RESOURCE_H */
-# if defined (ACE_HAS_BROKEN_SETRLIMIT)
-typedef struct rlimit ACE_SETRLIMIT_TYPE;
-# else
-typedef const struct rlimit ACE_SETRLIMIT_TYPE;
-# endif /* ACE_HAS_BROKEN_SETRLIMIT */
+#if defined (ACE_HAS_BROKEN_SETRLIMIT)
+ typedef struct rlimit ACE_SETRLIMIT_TYPE;
+#else
+ typedef const struct rlimit ACE_SETRLIMIT_TYPE;
+#endif /* ACE_HAS_BROKEN_SETRLIMIT */
#if defined (ACE_WIN32)
-# define RUSAGE_SELF 1
-/// Fake the UNIX rusage structure. Perhaps we can add more to this
-/// later on?
-struct rusage
-{
- FILETIME ru_utime;
- FILETIME ru_stime;
-};
+# define RUSAGE_SELF 1
+ /// Fake the UNIX rusage structure. Perhaps we can add more to this
+ /// later on?
+ struct rusage
+ {
+ FILETIME ru_utime;
+ FILETIME ru_stime;
+ };
#endif /* ACE_WIN32 */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_RESOURCE_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_RESOURCE_H */
diff --git a/ace/os_include/sys/select.h b/ace/os_include/sys/select.h
index 21073340a5c..8c6dde3660e 100644
--- a/ace/os_include/sys/select.h
+++ b/ace/os_include/sys/select.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file select.h
+ * @file os_select.h
*
* select types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_SELECT_H
-#define ACE_OS_INCLUDE_SYS_SELECT_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_SELECT_H
+#define ACE_OS_INCLUDE_SYS_OS_SELECT_H
#include "ace/pre.h"
@@ -28,13 +28,19 @@
#include "ace/os_include/signal.h"
#if !defined (ACE_LACKS_SYS_SELECT_H)
-# include /**/ <sys/select.h>
+# include /**/ <sys/select.h>
#endif /* !ACE_LACKS_SYS_SELECT_H */
#if defined (ACE_WIN32)
-// This will help until we figure out everything:
-# define NFDBITS 32 /* only used in unused functions... */
+ // This will help until we figure out everything:
+# define NFDBITS 32 /* only used in unused functions... */
#endif /* ACE_WIN32 */
+#if defined (ACE_SELECT_USES_INT)
+ typedef int ACE_FD_SET_TYPE;
+#else
+ typedef fd_set ACE_FD_SET_TYPE;
+#endif /* ACE_SELECT_USES_INT */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_SELECT_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_SELECT_H */
diff --git a/ace/os_include/sys/sem.h b/ace/os_include/sys/sem.h
index 3bf69b8301d..8f7a3ade3fa 100644
--- a/ace/os_include/sys/sem.h
+++ b/ace/os_include/sys/sem.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file sem.h
+ * @file os_sem.h
*
* XSI semaphore facility
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_SEM_H
-#define ACE_OS_INCLUDE_SYS_SEM_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_SEM_H
+#define ACE_OS_INCLUDE_SYS_OS_SEM_H
#include "ace/pre.h"
@@ -27,22 +27,34 @@
#include "ace/os_include/sys/ipc.h"
#if !defined (ACE_LACKS_SYS_SEM_H)
-# include /**/ <sys/sem.h>
+# include /**/ <sys/sem.h>
#endif /* !ACE_LACKS_SYS_SEM_H */
-# if defined (ACE_LACKS_SEMBUF_T)
-struct sembuf
-{
- /// semaphore #
- unsigned short sem_num;
-
- /// semaphore operation
- short sem_op;
-
- /// operation flags
- short sem_flg;
-};
-# endif /* ACE_LACKS_SEMBUF_T */
+#if defined (ACE_LACKS_SEMBUF_T)
+ struct sembuf
+ {
+ /// semaphore #
+ unsigned short sem_num;
+
+ /// semaphore operation
+ short sem_op;
+
+ /// operation flags
+ short sem_flg;
+ };
+#endif /* ACE_LACKS_SEMBUF_T */
+
+#if !defined (ACE_HAS_SEMUN) || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED))
+ union semun
+ {
+ /// value for SETVAL
+ int val;
+ /// buffer for IPC_STAT & IPC_SET
+ struct semid_ds *buf;
+ /// array for GETALL & SETALL
+ u_short *array;
+ };
+#endif /* !ACE_HAS_SEMUN || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED)) */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_SEM_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_SEM_H */
diff --git a/ace/os_include/sys/shm.h b/ace/os_include/sys/shm.h
index d54ede7f8c3..a1b2f36ddee 100644
--- a/ace/os_include/sys/shm.h
+++ b/ace/os_include/sys/shm.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file shm.h
+ * @file os_shm.h
*
* XSI shared memory facility
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_SHM_H
-#define ACE_OS_INCLUDE_SYS_SHM_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_SHM_H
+#define ACE_OS_INCLUDE_SYS_OS_SHM_H
#include "ace/pre.h"
@@ -27,12 +27,12 @@
#include "ace/os_include/sys/ipc.h"
#if !defined (ACE_LACKS_SYS_SHM_H)
-# include /**/ <sys/shm.h>
+# include /**/ <sys/shm.h>
#endif /* !ACE_LACKS_SYS_SHM_H */
#if defined (ACE_WIN32)
-struct shmaddr { };
+ struct shmaddr {};
#endif /* ACE_WIN32 */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_SHM_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_SHM_H */
diff --git a/ace/os_include/sys/socket.h b/ace/os_include/sys/socket.h
index 4927b262a05..a0afb5f7149 100644
--- a/ace/os_include/sys/socket.h
+++ b/ace/os_include/sys/socket.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file socket.h
+ * @file os_socket.h
*
* main sockets header
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_SOCKET_H
-#define ACE_OS_INCLUDE_SYS_SOCKET_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_SOCKET_H
+#define ACE_OS_INCLUDE_SYS_OS_SOCKET_H
#include "ace/pre.h"
@@ -26,53 +26,64 @@
#include "ace/os_include/sys/uio.h"
+#if defined (ACE_HAS_CYGWIN32_SOCKET_H)
+ extern "C" {
+# include /**/ <cygwin32/socket.h>
+ }
+#endif /* ACE_HAS_CYGWIN32_SOCKET_H */
+
#if !defined (ACE_LACKS_SYS_SOCKET_H)
-# include /**/ <sys/socket.h>
+# if defined (ACE_HAS_AIX_BROKEN_SOCKET_HEADER)
+# undef __cplusplus
+# endif /* ACE_HAS_AIX_BROKEN_SOCKET_HEADER */
+# include /**/ <sys/socket.h>
+# if defined (ACE_HAS_AIX_BROKEN_SOCKET_HEADER)
+# define __cplusplus
+# endif /* ACE_HAS_AIX_BROKEN_SOCKET_HEADER */
#endif /* !ACE_LACKS_SYS_SOCKET_H */
-# if !defined (ACE_HAS_MSG) && !defined (SCO)
-struct msghdr {};
-# endif /* ACE_HAS_MSG */
+#if !defined (ACE_HAS_MSG) && !defined (SCO)
+ struct msghdr {};
+#endif /* ACE_HAS_MSG */
-# if defined (ACE_HAS_BROKEN_SENDMSG)
-typedef struct msghdr ACE_SENDMSG_TYPE;
-# else
-typedef const struct msghdr ACE_SENDMSG_TYPE;
-# endif /* ACE_HAS_BROKEN_SENDMSG */
+#if defined (ACE_HAS_BROKEN_SENDMSG)
+ typedef struct msghdr ACE_SENDMSG_TYPE;
+#else
+ typedef const struct msghdr ACE_SENDMSG_TYPE;
+#endif /* ACE_HAS_BROKEN_SENDMSG */
-# if defined (ACE_HAS_MSG) && defined (ACE_LACKS_MSG_ACCRIGHTS)
-# if !defined (msg_accrights)
-# undef msg_control
-# define msg_accrights msg_control
-# endif /* ! msg_accrights */
+#if defined (ACE_HAS_MSG) && defined (ACE_LACKS_MSG_ACCRIGHTS)
+# if !defined (msg_accrights)
+# undef msg_control
+# define msg_accrights msg_control
+# endif /* ! msg_accrights */
-# if !defined (msg_accrightslen)
-# undef msg_controllen
-# define msg_accrightslen msg_controllen
-# endif /* ! msg_accrightslen */
-# endif /* ACE_HAS_MSG && ACE_LACKS_MSG_ACCRIGHTS */
+# if !defined (msg_accrightslen)
+# undef msg_controllen
+# define msg_accrightslen msg_controllen
+# endif /* ! msg_accrightslen */
+#endif /* ACE_HAS_MSG && ACE_LACKS_MSG_ACCRIGHTS */
#if defined (ACE_WIN32)
+ struct msghdr
+ {
+ /// Optional address
+ sockaddr * msg_name;
-struct msghdr
-{
- /// Optional address
- sockaddr * msg_name;
-
- /// Size of address
- int msg_namelen;
+ /// Size of address
+ int msg_namelen;
- /// Scatter/gather array
- iovec *msg_iov;
+ /// Scatter/gather array
+ iovec *msg_iov;
- /// # elements in msg_iov
- int msg_iovlen;
+ /// # elements in msg_iov
+ int msg_iovlen;
- /// Access rights sent/received
- caddr_t msg_accrights;
+ /// Access rights sent/received
+ caddr_t msg_accrights;
- int msg_accrightslen;
-};
+ int msg_accrightslen;
+ };
#endif /* ACE_WIN32 */
#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
@@ -87,5 +98,44 @@ struct msghdr
# endif /* ACE_LACKS_CMSG_DATA_MACRO */
#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
+#if defined (ACE_PSOS)
+ // Some versions have missing preprocessor definitions
+# if !defined (AF_UNIX)
+# define AF_UNIX 0x1
+# endif /* AF_UNIX */
+# define PF_UNIX AF_UNIX
+# define PF_INET AF_INET
+# if !defined (AF_MAX)
+# define AF_MAX AF_INET
+# endif /* AF_MAX */
+#endif /* ACE_PSOS */
+
+// Increase the range of "address families". Please note that this
+// must appear _after_ the include of sys/socket.h, for the AF_FILE
+// definition on Linux/glibc2.
+#if !defined (AF_ANY)
+# define AF_ANY (-1)
+#endif /* AF_ANY */
+
+#define AF_SPIPE (AF_MAX + 1)
+#if !defined (AF_FILE)
+# define AF_FILE (AF_MAX + 2)
+#endif /* ! AF_FILE */
+#define AF_DEV (AF_MAX + 3)
+#define AF_UPIPE (AF_SPIPE)
+
+#if defined (ACE_HAS_IPV6)
+# if defined (ACE_USES_IPV4_IPV6_MIGRATION)
+# define ACE_ADDRESS_FAMILY_INET AF_UNSPEC
+# define ACE_PROTOCOL_FAMILY_INET PF_UNSPEC
+# else
+# define ACE_ADDRESS_FAMILY_INET AF_INET6
+# define ACE_PROTOCOL_FAMILY_INET PF_INET6
+# endif /* ACE_USES_IPV4_IPV6_MIGRATION */
+#else /* !ACE_HAS_IPV6 */
+# define ACE_ADDRESS_FAMILY_INET AF_INET
+# define ACE_PROTOCOL_FAMILY_INET PF_INET
+#endif /* ACE_HAS_IPV6 */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_SOCKET_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_SOCKET_H */
diff --git a/ace/os_include/sys/stat.h b/ace/os_include/sys/stat.h
index 1f00680de53..f3c25d046d5 100644
--- a/ace/os_include/sys/stat.h
+++ b/ace/os_include/sys/stat.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file stat.h
+ * @file os_stat.h
*
* data returned by the stat() function
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_STAT_H
-#define ACE_OS_INCLUDE_SYS_STAT_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_STAT_H
+#define ACE_OS_INCLUDE_SYS_OS_STAT_H
#include "ace/pre.h"
@@ -30,69 +30,76 @@
# include <direct.h>
#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
+// This collides with phile.h on PSOS
+#if defined (ACE_PSOS)
+# if !defined (ACE_LACKS_SYS_STAT_H)
+# define ACE_LACKS_SYS_STAT_H
+# endif /* !ACE_LACKS_SYS_STAT_H */
+#endif /* ACE_PSOS */
+
#if !defined (ACE_LACKS_SYS_STAT_H)
-# include /**/ <sys/stat.h>
+# include /**/ <sys/stat.h>
#endif /* !ACE_LACKS_SYS_STAT_H */
-# if defined (ACE_LACKS_MODE_MASKS)
+#if defined (ACE_LACKS_MODE_MASKS)
// MODE MASKS
// the following macros are for POSIX conformance.
-# if !defined (ACE_HAS_USER_MODE_MASKS)
-# define S_IRWXU 00700 /* read, write, execute: owner. */
-# define S_IRUSR 00400 /* read permission: owner. */
-# define S_IWUSR 00200 /* write permission: owner. */
-# define S_IXUSR 00100 /* execute permission: owner. */
-# endif /* ACE_HAS_USER_MODE_MASKS */
-# define S_IRWXG 00070 /* read, write, execute: group. */
-# define S_IRGRP 00040 /* read permission: group. */
-# define S_IWGRP 00020 /* write permission: group. */
-# define S_IXGRP 00010 /* execute permission: group. */
-# define S_IRWXO 00007 /* read, write, execute: other. */
-# define S_IROTH 00004 /* read permission: other. */
-# define S_IWOTH 00002 /* write permission: other. */
-# define S_IXOTH 00001 /* execute permission: other. */
+# if !defined (ACE_HAS_USER_MODE_MASKS)
+# define S_IRWXU 00700 /* read, write, execute: owner. */
+# define S_IRUSR 00400 /* read permission: owner. */
+# define S_IWUSR 00200 /* write permission: owner. */
+# define S_IXUSR 00100 /* execute permission: owner. */
+# endif /* ACE_HAS_USER_MODE_MASKS */
+# define S_IRWXG 00070 /* read, write, execute: group. */
+# define S_IRGRP 00040 /* read permission: group. */
+# define S_IWGRP 00020 /* write permission: group. */
+# define S_IXGRP 00010 /* execute permission: group. */
+# define S_IRWXO 00007 /* read, write, execute: other. */
+# define S_IROTH 00004 /* read permission: other. */
+# define S_IWOTH 00002 /* write permission: other. */
+# define S_IXOTH 00001 /* execute permission: other. */
// eVC doesn't define these bits, but MSVC does. The bit settings are copied
// from the MSVC defs.
-# if defined (ACE_HAS_WINCE)
-# define S_IFDIR 0040000
-# define S_IFREG 0100000
-# endif /* ACE_HAS_WINCE */
-# endif /* ACE_LACKS_MODE_MASKS */
+# if defined (ACE_HAS_WINCE)
+# define S_IFDIR 0040000
+# define S_IFREG 0100000
+# endif /* ACE_HAS_WINCE */
+#endif /* ACE_LACKS_MODE_MASKS */
#if defined (ACE_HAS_WINCE)
-struct stat
-{
- /// always 0 on Windows platforms
- dev_t st_dev;
+ struct stat
+ {
+ /// always 0 on Windows platforms
+ dev_t st_dev;
- /// always 0 on Windows platforms
- dev_t st_rdev;
+ /// always 0 on Windows platforms
+ dev_t st_rdev;
- /// file attribute
- unsigned short st_mode;
+ /// file attribute
+ unsigned short st_mode;
- /// number of hard links
- short st_nlink;
+ /// number of hard links
+ short st_nlink;
- /// time of last access
- ACE_Time_Value st_atime;
+ /// time of last access
+ ACE_Time_Value st_atime;
- /// time of last data modification
- ACE_Time_Value st_mtime;
+ /// time of last data modification
+ ACE_Time_Value st_mtime;
- /// time of creation
- ACE_Time_Value st_ctime;
+ /// time of creation
+ ACE_Time_Value st_ctime;
- /// file size, in bytes
- off_t st_size;
+ /// file size, in bytes
+ off_t st_size;
- // Following members do not have direct conversion in Window platforms.
-// u_long st_blksize; // optimal blocksize for I/O
-// u_long st_flags; // user defined flags for file
-};
+ // Following members do not have direct conversion in Window platforms.
+ //u_long st_blksize; // optimal blocksize for I/O
+ //u_long st_flags; // user defined flags for file
+ };
#endif /* ACE_HAS_WINCE */
#if defined (__BORLANDC__)
@@ -108,10 +115,10 @@ struct stat
// that are not included because there is already an identically
// named file provided with pSOS, which does not have this info
// from compiler supplied header
- extern mode_t umask (mode_t);
- extern int mkfifo (const char *, mode_t);
- extern int mkdir (const char *, mode_t);
+ extern "C" mode_t umask (mode_t);
+ extern "C" int mkfifo (const char *, mode_t);
+ extern "C" int mkdir (const char *, mode_t);
#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_STAT_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_STAT_H */
diff --git a/ace/os_include/sys/statvfs.h b/ace/os_include/sys/statvfs.h
index 9f3ae9e3d0b..bd41331c6d5 100644
--- a/ace/os_include/sys/statvfs.h
+++ b/ace/os_include/sys/statvfs.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file statvfs.h
+ * @file os_statvfs.h
*
* VFS File System information structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_STATVFS_H
-#define ACE_OS_INCLUDE_SYS_STATVFS_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_STATVFS_H
+#define ACE_OS_INCLUDE_SYS_OS_STATVFS_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_SYS_STATVFS_H)
-# include /**/ <sys/statvfs.h>
+# include /**/ <sys/statvfs.h>
#endif /* !ACE_LACKS_SYS_STATVFS_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_STATVFS_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_STATVFS_H */
diff --git a/ace/os_include/sys/time.h b/ace/os_include/sys/time.h
index db8845f418b..e23b5d366e7 100644
--- a/ace/os_include/sys/time.h
+++ b/ace/os_include/sys/time.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file time.h
+ * @file os_time.h
*
* time types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_TIME_H
-#define ACE_OS_INCLUDE_SYS_TIME_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_TIME_H
+#define ACE_OS_INCLUDE_SYS_OS_TIME_H
#include "ace/pre.h"
@@ -28,8 +28,8 @@
#include "ace/os_include/sys/select.h"
#if !defined (ACE_LACKS_SYS_TIME_H)
-# include /**/ <sys/time.h>
+# include /**/ <sys/time.h>
#endif /* !ACE_LACKS_SYS_TIME_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_TIME_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_TIME_H */
diff --git a/ace/os_include/sys/timeb.h b/ace/os_include/sys/timeb.h
index 84a07c47911..125ac812105 100644
--- a/ace/os_include/sys/timeb.h
+++ b/ace/os_include/sys/timeb.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file timeb.h
+ * @file os_timeb.h
*
* additional definitions for date and time
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_TIMEB_H
-#define ACE_OS_INCLUDE_SYS_TIMEB_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_TIMEB_H
+#define ACE_OS_INCLUDE_SYS_OS_TIMEB_H
#include "ace/pre.h"
@@ -27,13 +27,13 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_SYS_TIMEB_H)
-# include /**/ <sys/timeb.h>
+# include /**/ <sys/timeb.h>
#endif /* !ACE_LACKS_SYS_TIMEB_H */
-# if defined (__BORLANDC__)
-# define _ftime ftime
-# define _timeb timeb
-# endif /* __BORLANDC__ */
+#if defined (__BORLANDC__)
+# define _ftime ftime
+# define _timeb timeb
+#endif /* __BORLANDC__ */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_TIMEB_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_TIMEB_H */
diff --git a/ace/os_include/sys/times.h b/ace/os_include/sys/times.h
index 18f5a17e773..2c48f0e0ec7 100644
--- a/ace/os_include/sys/times.h
+++ b/ace/os_include/sys/times.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file times.h
+ * @file os_times.h
*
* file access and modification times structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_TIMES_H
-#define ACE_OS_INCLUDE_SYS_TIMES_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_TIMES_H
+#define ACE_OS_INCLUDE_SYS_OS_TIMES_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_SYS_TIMES_H)
-# include /**/ <sys/times.h>
+# include /**/ <sys/times.h>
#endif /* !ACE_LACKS_SYS_TIMES_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_TIMES_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_TIMES_H */
diff --git a/ace/os_include/sys/types.h b/ace/os_include/sys/types.h
index 369a51324e8..b96e90956a0 100644
--- a/ace/os_include/sys/types.h
+++ b/ace/os_include/sys/types.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file types.h
+ * @file os_types.h
*
* data types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_TYPES_H
-#define ACE_OS_INCLUDE_SYS_TYPES_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_TYPES_H
+#define ACE_OS_INCLUDE_SYS_OS_TYPES_H
#include "ace/pre.h"
@@ -27,18 +27,16 @@
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_SYS_TYPES_H)
-# include /**/ <sys/types.h>
+# include /**/ <sys/types.h>
#endif /* !ACE_LACKS_SYS_TYPES_H */
// todo: don't forget to clean this up! ;-)
-# if !defined (ACE_HAS_CLOCK_GETTIME) && !(defined (_CLOCKID_T_) || defined (_CLOCKID_T))
-typedef int clockid_t;
-# if !defined (CLOCK_REALTIME)
-# define CLOCK_REALTIME 0
-# endif /* CLOCK_REALTIME */
-# endif /* ! ACE_HAS_CLOCK_GETTIME && ! _CLOCKID_T_ */
-
-
+#if !defined (ACE_HAS_CLOCK_GETTIME) && !(defined (_CLOCKID_T_) || defined (_CLOCKID_T))
+ typedef int clockid_t;
+# if !defined (CLOCK_REALTIME)
+# define CLOCK_REALTIME 0
+# endif /* CLOCK_REALTIME */
+#endif /* ! ACE_HAS_CLOCK_GETTIME && ! _CLOCKID_T_ */
#if defined (ACE_HAS_WINCE)
# include /**/ <types.h>
@@ -106,4 +104,4 @@ typedef int clockid_t;
#endif /* ACE_WIN32 && !__MINGW32__ */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_TYPES_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_TYPES_H */
diff --git a/ace/os_include/sys/uio.h b/ace/os_include/sys/uio.h
index e22917ebd3c..319985dcb52 100644
--- a/ace/os_include/sys/uio.h
+++ b/ace/os_include/sys/uio.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file uio.h
+ * @file os_uio.h
*
* definitions for vector I/O operations
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_UIO_H
-#define ACE_OS_INCLUDE_SYS_UIO_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_UIO_H
+#define ACE_OS_INCLUDE_SYS_OS_UIO_H
#include "ace/pre.h"
@@ -27,41 +27,57 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_SYS_UIO_H)
-# include /**/ <sys/uio.h>
+# include /**/ <sys/uio.h>
#endif /* !ACE_LACKS_SYS_UIO_H */
// todo: make this a regular ACE_LACKS macro test...
-# if defined(__rtems__)
-struct iovec {
- /// Base address.
- char *iov_base;
- /// Length.
- size_t iov_len;
-};
-# endif
+#if defined(__rtems__)
+ struct iovec {
+ /// Base address.
+ char *iov_base;
+ /// Length.
+ size_t iov_len;
+ };
+#elif defined (ACE_WIN32)
+ /// The ordering of the fields in this struct is important. It has to
+ /// match those in WSABUF.
+ struct iovec
+ {
+ /// byte count to read/write
+ u_long iov_len;
+ /// data to be read/written
+ char *iov_base;
-# if defined (ACE_HAS_BROKEN_WRITEV)
-typedef struct iovec ACE_WRITEV_TYPE;
-# else
-typedef const struct iovec ACE_WRITEV_TYPE;
-# endif /* ACE_HAS_BROKEN_WRITEV */
+ // WSABUF is a Winsock2-only type.
+# if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
+ operator WSABUF &(void) { return *((WSABUF *) this); }
+# endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
+ };
+#endif /* __rtems__ */
-# if defined (ACE_HAS_BROKEN_READV)
-typedef const struct iovec ACE_READV_TYPE;
-# else
-typedef struct iovec ACE_READV_TYPE;
-# endif /* ACE_HAS_BROKEN_READV */
+
+#if defined (ACE_HAS_BROKEN_WRITEV)
+ typedef struct iovec ACE_WRITEV_TYPE;
+#else
+ typedef const struct iovec ACE_WRITEV_TYPE;
+#endif /* ACE_HAS_BROKEN_WRITEV */
+
+#if defined (ACE_HAS_BROKEN_READV)
+ typedef const struct iovec ACE_READV_TYPE;
+#else
+ typedef struct iovec ACE_READV_TYPE;
+#endif /* ACE_HAS_BROKEN_READV */
// This is defined by XOPEN to be a minimum of 16. POSIX.1g
// also defines this value. platform-specific config.h can
// override this if need be.
-# if !defined (IOV_MAX)
+#if !defined (IOV_MAX)
# define IOV_MAX 16
-# endif /* IOV_MAX */
+#endif /* IOV_MAX */
-# if !defined (ACE_IOV_MAX)
-#define ACE_IOV_MAX IOV_MAX
-# endif /* ACE_IOV_MAX */
+#if !defined (ACE_IOV_MAX)
+# define ACE_IOV_MAX IOV_MAX
+#endif /* ACE_IOV_MAX */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_UIO_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_UIO_H */
diff --git a/ace/os_include/sys/un.h b/ace/os_include/sys/un.h
index 989f5a607e0..1882060a208 100644
--- a/ace/os_include/sys/un.h
+++ b/ace/os_include/sys/un.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file un.h
+ * @file os_un.h
*
* definitions for UNIX domain sockets
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_UN_H
-#define ACE_OS_INCLUDE_SYS_UN_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_UN_H
+#define ACE_OS_INCLUDE_SYS_OS_UN_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/sys/socket.h"
#if !defined (ACE_LACKS_SYS_UN_H)
-# include /**/ <sys/un.h>
+# include /**/ <sys/un.h>
#endif /* !ACE_LACKS_SYS_UN_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_UN_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_UN_H */
diff --git a/ace/os_include/sys/utsname.h b/ace/os_include/sys/utsname.h
index 54aca6c612a..0372ba990ae 100644
--- a/ace/os_include/sys/utsname.h
+++ b/ace/os_include/sys/utsname.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file utsname.h
+ * @file os_utsname.h
*
* system name structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_UTSNAME_H
-#define ACE_OS_INCLUDE_SYS_UTSNAME_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_UTSNAME_H
+#define ACE_OS_INCLUDE_SYS_OS_UTSNAME_H
#include "ace/pre.h"
@@ -25,8 +25,8 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_SYS_UTSNAME_H)
-# include /**/ <sys/utsname.h>
+# include /**/ <sys/utsname.h>
#endif /* !ACE_LACKS_SYS_UTSNAME_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_UTSNAME_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_UTSNAME_H */
diff --git a/ace/os_include/sys/wait.h b/ace/os_include/sys/wait.h
index 6184d8fb7b4..c8cd2c127ad 100644
--- a/ace/os_include/sys/wait.h
+++ b/ace/os_include/sys/wait.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file wait.h
+ * @file os_wait.h
*
* declarations for waiting
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYS_WAIT_H
-#define ACE_OS_INCLUDE_SYS_WAIT_H
+#ifndef ACE_OS_INCLUDE_SYS_OS_WAIT_H
+#define ACE_OS_INCLUDE_SYS_OS_WAIT_H
#include "ace/pre.h"
@@ -28,8 +28,8 @@
#include "ace/os_include/sys/resource.h"
#if !defined (ACE_LACKS_SYS_WAIT_H)
-# include /**/ <sys/wait.h>
+# include /**/ <sys/wait.h>
#endif /* !ACE_LACKS_SYS_WAIT_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYS_WAIT_H */
+#endif /* ACE_OS_INCLUDE_SYS_OS_WAIT_H */
diff --git a/ace/os_include/syslog.h b/ace/os_include/syslog.h
index d8254c014d3..4880cf1c302 100644
--- a/ace/os_include/syslog.h
+++ b/ace/os_include/syslog.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file syslog.h
+ * @file os_syslog.h
*
* definitions for system error logging
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_SYSLOG_H
-#define ACE_OS_INCLUDE_SYSLOG_H
+#ifndef ACE_OS_INCLUDE_OS_SYSLOG_H
+#define ACE_OS_INCLUDE_OS_SYSLOG_H
#include "ace/pre.h"
@@ -25,8 +25,8 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_SYSLOG_H)
-# include /**/ <syslog.h>
+# include /**/ <syslog.h>
#endif /* !ACE_LACKS_SYSLOG_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_SYSLOG_H */
+#endif /* ACE_OS_INCLUDE_OS_SYSLOG_H */
diff --git a/ace/os_include/tar.h b/ace/os_include/tar.h
index 8b374c0c5c9..8d6218b6eaf 100644
--- a/ace/os_include/tar.h
+++ b/ace/os_include/tar.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file tar.h
+ * @file os_tar.h
*
* extended tar definitions
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_TAR_H
-#define ACE_OS_INCLUDE_TAR_H
+#ifndef ACE_OS_INCLUDE_OS_TAR_H
+#define ACE_OS_INCLUDE_OS_TAR_H
#include "ace/pre.h"
@@ -25,8 +25,8 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_TAR_H)
-# include /**/ <tar.h>
+# include /**/ <tar.h>
#endif /* !ACE_LACKS_TAR_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_TAR_H */
+#endif /* ACE_OS_INCLUDE_OS_TAR_H */
diff --git a/ace/os_include/termios.h b/ace/os_include/termios.h
index 0f4c99b0cb7..321d2851c86 100644
--- a/ace/os_include/termios.h
+++ b/ace/os_include/termios.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file termios.h
+ * @file os_termios.h
*
* define values for termios
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_TERMIOS_H
-#define ACE_OS_INCLUDE_TERMIOS_H
+#ifndef ACE_OS_INCLUDE_OS_TERMIOS_H
+#define ACE_OS_INCLUDE_OS_TERMIOS_H
#include "ace/pre.h"
@@ -25,8 +25,8 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_TERMIOS_H)
-# include /**/ <termios.h>
+# include /**/ <termios.h>
#endif /* !ACE_LACKS_TERMIOS_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_TERMIOS_H */
+#endif /* ACE_OS_INCLUDE_OS_TERMIOS_H */
diff --git a/ace/os_include/tgmath.h b/ace/os_include/tgmath.h
index 7f232d7f8f8..f14f4b08c34 100644
--- a/ace/os_include/tgmath.h
+++ b/ace/os_include/tgmath.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file tgmath.h
+ * @file os_tgmath.h
*
* type-generic macros
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_TGMATH_H
-#define ACE_OS_INCLUDE_TGMATH_H
+#ifndef ACE_OS_INCLUDE_OS_TGMATH_H
+#define ACE_OS_INCLUDE_OS_TGMATH_H
#include "ace/pre.h"
@@ -28,8 +28,8 @@
#include "ace/os_include/complex.h"
#if !defined (ACE_LACKS_TGMATH_H)
-# include /**/ <tgmath.h>
+# include /**/ <tgmath.h>
#endif /* !ACE_LACKS_TGMATH_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_TGMATH_H */
+#endif /* ACE_OS_INCLUDE_OS_TGMATH_H */
diff --git a/ace/os_include/time.h b/ace/os_include/time.h
index 15e07f9679c..ffd9e5467c4 100644
--- a/ace/os_include/time.h
+++ b/ace/os_include/time.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file time.h
+ * @file os_time.h
*
* time types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_TIME_H
-#define ACE_OS_INCLUDE_TIME_H
+#ifndef ACE_OS_INCLUDE_OS_TIME_H
+#define ACE_OS_INCLUDE_OS_TIME_H
#include "ace/pre.h"
@@ -28,28 +28,28 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_TIME_H)
-# include /**/ <time.h>
+# include /**/ <time.h>
#endif /* !ACE_LACKS_TIME_H */
-# if defined (ACE_HAS_BROKEN_CTIME)
-# undef ctime
-# endif /* ACE_HAS_BROKEN_CTIME */
+#if defined (ACE_HAS_BROKEN_CTIME)
+# undef ctime
+#endif /* ACE_HAS_BROKEN_CTIME */
// There are a lot of threads-related macro definitions in the config files.
// They came in at different times and from different places and platform
// requirements as threads evolved. They are probably not all needed - some
// overlap or are otherwise confused. This is an attempt to start
// straightening them out.
-# if defined (ACE_HAS_PTHREADS_STD) /* POSIX.1c threads (pthreads) */
- // ... and 2-parameter asctime_r and ctime_r
-# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \
- !defined (ACE_HAS_STHREADS)
-# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-# endif
-# endif /* ACE_HAS_PTHREADS_STD */
+#if defined (ACE_HAS_PTHREADS_STD) /* POSIX.1c threads (pthreads) */
+ // ... and 2-parameter asctime_r and ctime_r
+# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \
+ !defined (ACE_HAS_STHREADS)
+# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
+# endif
+#endif /* ACE_HAS_PTHREADS_STD */
#if defined (ACE_LACKS_STRPTIME_PROTOTYPE) && !defined (_XOPEN_SOURCE)
-extern "C" char *strptime (const char *s, const char *fmt, struct tm *tp);
+ extern "C" char *strptime (const char *s, const char *fmt, struct tm *tp);
#endif /* ACE_LACKS_STRPTIME_PROTOTYPE */
#if defined (ACE_PSOS) && !defined (USER_INCLUDE_SYS_TIME_TM)
@@ -65,4 +65,4 @@ extern "C" char *strptime (const char *s, const char *fmt, struct tm *tp);
#endif /* defined (ACE_PSOS) && !defined (USER_INCLUDE_SYS_TIME_TM) */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_TIME_H */
+#endif /* ACE_OS_INCLUDE_OS_TIME_H */
diff --git a/ace/os_include/trace.h b/ace/os_include/trace.h
index f87728d8897..af25ab338c3 100644
--- a/ace/os_include/trace.h
+++ b/ace/os_include/trace.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file trace.h
+ * @file os_trace.h
*
* tracing
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_TRACE_H
-#define ACE_OS_INCLUDE_TRACE_H
+#ifndef ACE_OS_INCLUDE_OS_TRACE_H
+#define ACE_OS_INCLUDE_OS_TRACE_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_TRACE_H)
-# include /**/ <trace.h>
+# include /**/ <trace.h>
#endif /* !ACE_LACKS_TRACE_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_TRACE_H */
+#endif /* ACE_OS_INCLUDE_OS_TRACE_H */
diff --git a/ace/os_include/ucontext.h b/ace/os_include/ucontext.h
index db1c1588ad3..cc280ff3e1a 100644
--- a/ace/os_include/ucontext.h
+++ b/ace/os_include/ucontext.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file ucontext.h
+ * @file os_ucontext.h
*
* user context
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_UCONTEXT_H
-#define ACE_OS_INCLUDE_UCONTEXT_H
+#ifndef ACE_OS_INCLUDE_OS_UCONTEXT_H
+#define ACE_OS_INCLUDE_OS_UCONTEXT_H
#include "ace/pre.h"
@@ -29,8 +29,8 @@
//#include "ace/os_include/signal.h"
#if !defined (ACE_LACKS_UCONTEXT_H)
-# include /**/ <ucontext.h>
+# include /**/ <ucontext.h>
#endif /* !ACE_LACKS_ucontext_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_UCONTEXT_H */
+#endif /* ACE_OS_INCLUDE_OS_UCONTEXT_H */
diff --git a/ace/os_include/ulimit.h b/ace/os_include/ulimit.h
index acc6abb12da..495fbfbac8c 100644
--- a/ace/os_include/ulimit.h
+++ b/ace/os_include/ulimit.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file ulimit.h
+ * @file os_ulimit.h
*
* ulimit commands
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_ULIMIT_H
-#define ACE_OS_INCLUDE_ULIMIT_H
+#ifndef ACE_OS_INCLUDE_OS_ULIMIT_H
+#define ACE_OS_INCLUDE_OS_ULIMIT_H
#include "ace/pre.h"
@@ -25,8 +25,8 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_ULIMIT_H)
-# include /**/ <ulimit.h>
+# include /**/ <ulimit.h>
#endif /* !ACE_LACKS_ULIMIT_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_ULIMIT_H */
+#endif /* ACE_OS_INCLUDE_OS_ULIMIT_H */
diff --git a/ace/os_include/unistd.h b/ace/os_include/unistd.h
index a99ae3183be..fe3fc37359d 100644
--- a/ace/os_include/unistd.h
+++ b/ace/os_include/unistd.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file unistd.h
+ * @file os_unistd.h
*
* standard symbolic constants and types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_UNISTD_H
-#define ACE_OS_INCLUDE_UNISTD_H
+#ifndef ACE_OS_INCLUDE_OS_UNISTD_H
+#define ACE_OS_INCLUDE_OS_UNISTD_H
#include "ace/pre.h"
@@ -33,47 +33,47 @@
#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
#if !defined (ACE_LACKS_UNISTD_H)
-# include /**/ <unistd.h>
+# include /**/ <unistd.h>
#endif /* !ACE_LACKS_UNISTD_H */
-# if defined (ACE_LACKS_UALARM_PROTOTYPE)
-extern "C" u_int ualarm (u_int usecs, u_int interval);
-# endif /* ACE_LACKS_UALARM_PROTOTYPE */
+#if defined (ACE_LACKS_UALARM_PROTOTYPE)
+ extern "C" u_int ualarm (u_int usecs, u_int interval);
+#endif /* ACE_LACKS_UALARM_PROTOTYPE */
#if defined (ACE_LACKS_PREAD_PROTOTYPE) && (_XOPEN_SOURCE - 0) < 500
-// _XOPEN_SOURCE == 500 Single Unix conformance
-// It seems that _XOPEN_SOURCE == 500 means that the prototypes are
-// already defined in the system headers.
-extern "C" ssize_t pread (int fd,
- void *buf,
- size_t nbytes,
- off_t offset);
-
-extern "C" ssize_t pwrite (int fd,
- const void *buf,
- size_t n,
- off_t offset);
+ // _XOPEN_SOURCE == 500 Single Unix conformance
+ // It seems that _XOPEN_SOURCE == 500 means that the prototypes are
+ // already defined in the system headers.
+ extern "C" ssize_t pread (int fd,
+ void *buf,
+ size_t nbytes,
+ off_t offset);
+
+ extern "C" ssize_t pwrite (int fd,
+ const void *buf,
+ size_t n,
+ off_t offset);
#endif /* ACE_LACKS_PREAD_PROTOTYPE && (_XOPEN_SOURCE - 0) < 500 */
#if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \
!defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)
-extern "C" pid_t getpgid (pid_t pid);
+ extern "C" pid_t getpgid (pid_t pid);
#endif /* ACE_LACKS_GETPGID_PROTOTYPE &&
!_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */
#if !defined (_LARGEFILE64_SOURCE)
-# if defined (ACE_LACKS_LSEEK64_PROTOTYPE) && \
- defined (ACE_LACKS_LLSEEK_PROTOTYPE)
-# error Define either ACE_LACKS_LSEEK64_PROTOTYPE or ACE_LACKS_LLSEEK_PROTOTYPE, not both!
-# elif defined (ACE_LACKS_LSEEK64_PROTOTYPE)
-extern "C" ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence);
-# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE)
-extern "C" ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence);
-# endif
+# if defined (ACE_LACKS_LSEEK64_PROTOTYPE) && \
+ defined (ACE_LACKS_LLSEEK_PROTOTYPE)
+# error Define either ACE_LACKS_LSEEK64_PROTOTYPE or ACE_LACKS_LLSEEK_PROTOTYPE, not both!
+# elif defined (ACE_LACKS_LSEEK64_PROTOTYPE)
+ extern "C" ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence);
+# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE)
+ extern "C" ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence);
+# endif
#endif /* _LARGEFILE64_SOURCE */
#if !defined (_SC_AIO_MAX)
-#define _SC_AIO_MAX 1
+# define _SC_AIO_MAX 1
#endif /* _SC_AIO_MAX */
#if defined (__BORLANDC__)
@@ -92,12 +92,9 @@ extern "C" ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence);
// that are not included because there is already an identically
// named file provided with pSOS, which does not have this info
// from compiler supplied header
- extern int getopt(int, char *const *, const char *);
+ extern "C" int getopt(int, char *const *, const char *);
int isatty (int h);
#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
-
-
-
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_UNISTD_H */
+#endif /* ACE_OS_INCLUDE_OS_UNISTD_H */
diff --git a/ace/os_include/utime.h b/ace/os_include/utime.h
index 0b10b412802..4f99fa7031f 100644
--- a/ace/os_include/utime.h
+++ b/ace/os_include/utime.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file utime.h
+ * @file os_utime.h
*
* access and modification times structure
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_UTIME_H
-#define ACE_OS_INCLUDE_UTIME_H
+#ifndef ACE_OS_INCLUDE_OS_UTIME_H
+#define ACE_OS_INCLUDE_OS_UTIME_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_UTIME_H)
-# include /**/ <utime.h>
+# include /**/ <utime.h>
#endif /* !ACE_LACKS_UTIME_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_UTIME_H */
+#endif /* ACE_OS_INCLUDE_OS_UTIME_H */
diff --git a/ace/os_include/utmpx.h b/ace/os_include/utmpx.h
index 8549fc6d038..577b2811d91 100644
--- a/ace/os_include/utmpx.h
+++ b/ace/os_include/utmpx.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file utmpx.h
+ * @file os_utmpx.h
*
* user accounting database definitions
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_UTMPX_H
-#define ACE_OS_INCLUDE_UTMPX_H
+#ifndef ACE_OS_INCLUDE_OS_UTMPX_H
+#define ACE_OS_INCLUDE_OS_UTMPX_H
#include "ace/pre.h"
@@ -27,8 +27,8 @@
#include "ace/os_include/sys/time.h"
#if !defined (ACE_LACKS_UTMPX_H)
-# include /**/ <utmpx.h>
+# include /**/ <utmpx.h>
#endif /* !ACE_LACKS_UTMPX_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_UTMPX_H */
+#endif /* ACE_OS_INCLUDE_OS_UTMPX_H */
diff --git a/ace/os_include/wchar.h b/ace/os_include/wchar.h
index 4697fb77dbf..a6479ac6b5c 100644
--- a/ace/os_include/wchar.h
+++ b/ace/os_include/wchar.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file wchar.h
+ * @file os_wchar.h
*
* wide-character handling
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_WCHAR_H
-#define ACE_OS_INCLUDE_WCHAR_H
+#ifndef ACE_OS_INCLUDE_OS_WCHAR_H
+#define ACE_OS_INCLUDE_OS_WCHAR_H
#include "ace/pre.h"
@@ -32,8 +32,8 @@
#include "ace/os_include/ctype.h"
#if !defined (ACE_LACKS_WCHAR_H)
-# include /**/ <wchar.h>
+# include /**/ <wchar.h>
#endif /* !ACE_LACKS_WCHAR_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_WCHAR_H */
+#endif /* ACE_OS_INCLUDE_OS_WCHAR_H */
diff --git a/ace/os_include/wctype.h b/ace/os_include/wctype.h
index 628a930ef32..b0e081ddef7 100644
--- a/ace/os_include/wctype.h
+++ b/ace/os_include/wctype.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file wctype.h
+ * @file os_wctype.h
*
* wide-character classification and mapping utilities
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_WCTYPE_H
-#define ACE_OS_INCLUDE_WCTYPE_H
+#ifndef ACE_OS_INCLUDE_OS_WCTYPE_H
+#define ACE_OS_INCLUDE_OS_WCTYPE_H
#include "ace/pre.h"
@@ -28,8 +28,8 @@
#include "ace/os_include/wchar.h"
#if !defined (ACE_LACKS_WCTYPE_H)
-# include /**/ <wctype.h>
+# include /**/ <wctype.h>
#endif /* !ACE_LACKS_WCTYPE_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_WCTYPE_H */
+#endif /* ACE_OS_INCLUDE_OS_WCTYPE_H */
diff --git a/ace/os_include/wordexp.h b/ace/os_include/wordexp.h
index 1351c540f82..418c2b237d4 100644
--- a/ace/os_include/wordexp.h
+++ b/ace/os_include/wordexp.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file wordexp.h
+ * @file os_wordexp.h
*
* word-expansion types
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_WORDEXP_H
-#define ACE_OS_INCLUDE_WORDEXP_H
+#ifndef ACE_OS_INCLUDE_OS_WORDEXP_H
+#define ACE_OS_INCLUDE_OS_WORDEXP_H
#include "ace/pre.h"
@@ -24,12 +24,11 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-// @todo make sure that size_t is in stddef.h and sys/types.h includes stddef.h
#include "ace/os_include/stddef.h" // size_t
#if !defined (ACE_LACKS_WORDEXP_H)
-# include /**/ <wordexp.h>
+# include /**/ <wordexp.h>
#endif /* !ACE_LACKS_WORDEXP_H */
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_WORDEXP_H */
+#endif /* ACE_OS_INCLUDE_OS_WORDEXP_H */