summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-22 02:52:30 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-22 02:52:30 +0000
commitf8e5d94ceae7cbe173a39c0ea993977771cb6c4e (patch)
treec9586b0b38b8179bc6f92792ce079d1fb5217c0d
parentcac4707bbbf6b80d7e88d84a0e76d2078236445c (diff)
downloadATCD-dre_osh_03.tar.gz
ChangeLogTag:Thu May 22 02:28:28 UTC 2003 Don Hinton <dhinton@dresystems.com>dre_osh_03
-rw-r--r--ChangeLog482
-rw-r--r--ace/Basic_Types.h27
-rw-r--r--ace/Default_Constants.h133
-rw-r--r--ace/Global_Macros.h210
-rw-r--r--ace/Handle_Set.h17
-rw-r--r--ace/Malloc.h26
-rw-r--r--ace/OS.h2450
-rw-r--r--ace/OS.i4
-rw-r--r--ace/SPIPE_Stream.h1
-rw-r--r--ace/SV_Semaphore_Complex.cpp7
-rw-r--r--ace/SV_Semaphore_Simple.cpp1
-rw-r--r--ace/SV_Semaphore_Simple.h12
-rw-r--r--ace/Thread.h10
-rw-r--r--ace/Timer_Queue_T.cpp7
-rw-r--r--ace/config-all.h61
-rw-r--r--ace/config-cygwin32.h8
-rw-r--r--ace/config-freebsd.h6
-rw-r--r--ace/config-linux-common.h3
-rw-r--r--ace/config-psosim-g++.h4
-rw-r--r--ace/config-sunos5.5.h2
-rw-r--r--ace/config-win32-msvc.h54
-rw-r--r--ace/os_include/aio.h24
-rw-r--r--ace/os_include/arpa/inet.h24
-rw-r--r--ace/os_include/assert.h24
-rw-r--r--ace/os_include/complex.h20
-rw-r--r--ace/os_include/cpio.h20
-rw-r--r--ace/os_include/ctype.h20
-rw-r--r--ace/os_include/dirent.h25
-rw-r--r--ace/os_include/dlfcn.h79
-rw-r--r--ace/os_include/errno.h139
-rw-r--r--ace/os_include/fcntl.h64
-rw-r--r--ace/os_include/fenv.h20
-rw-r--r--ace/os_include/float.h20
-rw-r--r--ace/os_include/fmtmsg.h20
-rw-r--r--ace/os_include/fnmatch.h20
-rw-r--r--ace/os_include/ftw.h20
-rw-r--r--ace/os_include/glob.h20
-rw-r--r--ace/os_include/grp.h20
-rw-r--r--ace/os_include/iconv.h22
-rw-r--r--ace/os_include/inttypes.h20
-rw-r--r--ace/os_include/iso646.h20
-rw-r--r--ace/os_include/langinfo.h20
-rw-r--r--ace/os_include/libgen.h20
-rw-r--r--ace/os_include/limits.h69
-rw-r--r--ace/os_include/local.h20
-rw-r--r--ace/os_include/math.h20
-rw-r--r--ace/os_include/monetary.h20
-rw-r--r--ace/os_include/mqueue.h20
-rw-r--r--ace/os_include/ndbm.h20
-rw-r--r--ace/os_include/net/if.h42
-rw-r--r--ace/os_include/netdb.h72
-rw-r--r--ace/os_include/netinet/in.h65
-rw-r--r--ace/os_include/netinet/tcp.h26
-rw-r--r--ace/os_include/nl_types.h20
-rw-r--r--ace/os_include/poll.h20
-rw-r--r--ace/os_include/pthread.h376
-rw-r--r--ace/os_include/pwd.h20
-rw-r--r--ace/os_include/regex.h20
-rw-r--r--ace/os_include/sched.h20
-rw-r--r--ace/os_include/search.h20
-rw-r--r--ace/os_include/semaphore.h45
-rw-r--r--ace/os_include/setjmp.h20
-rw-r--r--ace/os_include/signal.h222
-rw-r--r--ace/os_include/spawn.h20
-rw-r--r--ace/os_include/stdarg.h20
-rw-r--r--ace/os_include/stdbool.h20
-rw-r--r--ace/os_include/stddef.h91
-rw-r--r--ace/os_include/stdint.h149
-rw-r--r--ace/os_include/stdio.h72
-rw-r--r--ace/os_include/stdlib.h48
-rw-r--r--ace/os_include/string.h45
-rw-r--r--ace/os_include/strings.h22
-rw-r--r--ace/os_include/stropts.h50
-rw-r--r--ace/os_include/sys/ipc.h52
-rw-r--r--ace/os_include/sys/mman.h66
-rw-r--r--ace/os_include/sys/msg.h44
-rw-r--r--ace/os_include/sys/resource.h39
-rw-r--r--ace/os_include/sys/select.h33
-rw-r--r--ace/os_include/sys/sem.h48
-rw-r--r--ace/os_include/sys/shm.h26
-rw-r--r--ace/os_include/sys/socket.h129
-rw-r--r--ace/os_include/sys/stat.h114
-rw-r--r--ace/os_include/sys/statvfs.h22
-rw-r--r--ace/os_include/sys/time.h22
-rw-r--r--ace/os_include/sys/timeb.h27
-rw-r--r--ace/os_include/sys/times.h22
-rw-r--r--ace/os_include/sys/types.h98
-rw-r--r--ace/os_include/sys/uio.h71
-rw-r--r--ace/os_include/sys/un.h22
-rw-r--r--ace/os_include/sys/utsname.h22
-rw-r--r--ace/os_include/sys/wait.h22
-rw-r--r--ace/os_include/syslog.h22
-rw-r--r--ace/os_include/tar.h22
-rw-r--r--ace/os_include/termios.h22
-rw-r--r--ace/os_include/tgmath.h22
-rw-r--r--ace/os_include/time.h55
-rw-r--r--ace/os_include/trace.h22
-rw-r--r--ace/os_include/ucontext.h24
-rw-r--r--ace/os_include/ulimit.h22
-rw-r--r--ace/os_include/unistd.h90
-rw-r--r--ace/os_include/utime.h22
-rw-r--r--ace/os_include/utmpx.h22
-rw-r--r--ace/os_include/wchar.h22
-rw-r--r--ace/os_include/wctype.h22
-rw-r--r--ace/os_include/wordexp.h23
-rw-r--r--apps/gperf/src/Vectors.h12
106 files changed, 4304 insertions, 2899 deletions
diff --git a/ChangeLog b/ChangeLog
index c0bac564b51..81409cd4f23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,483 @@
+Thu May 22 02:28:28 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ Merged dre_osh_02 up to the main and rebranched to dre_osh_03
+
+Sat May 17 13:41:38 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/config-freebsd.h:
+ Added ACE_LACKS_STROPTS_H.
+
+Fri May 16 18:26:11 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/os_include/aio.h:
+ * ace/os_include/iconv.h:
+ * ace/os_include/pthread.h:
+ * ace/os_include/signal.h:
+ * ace/os_include/stddef.h:
+ * ace/os_include/stdint.h:
+ * ace/os_include/ucontext.h:
+ * ace/os_include/sys/stat.h:
+ Nuked trailing whitespace.
+
+Fri May 16 18:03:09 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ Merged dre_osh_01 up to the main and rebranched to dre_osh_02
+
+ * ace/config-all.h:
+ Cosmetic changes.
+
+ * ace/os_include/*.h:
+ Added extern "C" begin and end brackets to all files, even those
+ with not additions, and places all additions inside the extern
+ "C" {}'s. Rearranged some of the #ifdef's and moved includes to
+ the top of the files so that only those headers that need to be
+ are couched in extern "C".
+
+Thu May 15 17:01:28 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Adding #include of ace/os_include/sys/sem.h and
+ ace/os_include/errno.h/
+
+ * ace/config-win32-msvc.h:
+ Added ACE_LACKS_DIRENT_H, ACE_LACKS_DLFCN_H,
+ ACE_LACKS_NETDB_H, and ACE_LACKS_NET_IF_H defines.
+
+ * ace/os_include/dlfcn.h:
+ * ace/os_include/sys/mman.h:
+ Rearranged ACE_WIN32 #ifdef's.
+
+ * ace/os_include/limits.h:
+ Fixed a typo.
+
+Thu May 15 00:12:34 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/os_include/limits.h:
+ * ace/os_include/dirent.h:
+ * ace/os_include/netdb.h:
+ Moved MAXNAMLEN define from limits.h to dirent.h, and
+ MAXHOSTNAMELEN from limits.h to netdb.h to clear up
+ warnings on Solaris.
+
+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_00 up to the main and rebranched to dre_osh_01
+
+ * ace/Basic_Types.h:
+ Resolved conflicts.
+
+Sun May 11 14:42:23 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Moved more code, as listed below.
+
+ * ace/Basic_Types.h:
+ Changed #includes to use new headers. Moved MAXPATHLEN
+ to ace/os_include/limits.h.
+
+ * ace/Malloc.h:
+ * ace/Default_Constants.h:
+ Moved ACE_DEFAULT_BASE_ADDR here.
+
+ * ace/os_include/limits.h:
+ Added conditional include of <sys/param.h>. Moved howmany
+ macro and MAXPATHLEN here. Added POSIX PATH_MAX.
+
+ * ace/os_include/time.h:
+ Moved timespec_t typedef for ACE_PSOS here.
+
+Sat May 10 21:39:05 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Removed commented and moved more code, as listed below.
+
+ * ace/Handle_Set.h:
+ Moved ACE_FD_SETSIZE and ACE_DEFAULT_SELECT_REACTOR_SIZE
+ defines here.
+
+ * ace/Malloc.h:
+ Moved ACE_DEFAULT_BASE_ADDR define here. Fixed #ifdef
+ indentation.
+
+ * ace/Timer_Queue_T.cpp:
+ Moved ACE_TIMER_SKEW define here.
+
+ * ace/os_include/pthread.h:
+ Moved a large section of pthread defines and typedefs here.
+
+ * ace/os_include/stdio.h:
+ Moved ACE_PSOS_SNARFS_HEADER_INFO decl's for fdopen(), tempnam(),
+ and fileno() here.
+
+ * ace/os_include/stdlib.h:
+ Moved ACE_PSOS_SNARFS_HEADER_INFO decl for putenv() here.
+
+ * ace/os_include/string.h:
+ Moved ACE_PSOS_SNARFS_HEADER_INFO decl for strdup() here.
+
+ * ace/os_include/unistd.h:
+ Moved ACE_PSOS_SNARFS_HEADER_INFO decl's for getopt() and
+ isatty() here.
+
+ * ace/os_include/sys/stat.h:
+ Moved ACE_PSOS_SNARFS_HEADER_INFO decl's for umask(), mkfifo(),
+ and mkdir() here.
+
+ * apps/gperf/src/Vectors.h:
+ Moved ACE_ASCII_SIZE, ACE_EBCDIC_SIZE, and
+ ACE_STANDARD_CHARACTER_SET_SIZE defines here.
+
+Sat May 10 18:59;32 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/config-cygwin32.h:
+ Added ACE_LACKS_SYS_IPC_H ACE_LACKS_SYS_MSG_H.
+
+Sat May 10 16:18:24 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Commented and moved more code, as listed below.
+
+ * ace/SV_Semaphore_Simple.h:
+ Moved ACE_DEFAULT_SEM_KEY define here.
+
+ * ace/os_include/fcntl.h:
+ Moved O_NDELAY, ACE_NONBLOCK, and O_* defines for __BORLANDC__
+ here.
+
+ * ace/os_include/signal.h:
+ Moved SIG* and ACE_SIG* defines here.
+
+ * ace/os_include/stddef.h:
+ Moved size_t for ACE_PSOS_DIAB_MIPS here.
+
+ * ace/os_include/stdio.h:
+ Moved ACE_MAX_USERID, BUFSIZ, ACE_STRBUF_SIZE, and ACE_STD*
+ defines here.
+
+ * ace/os_include/string.h:
+ Moved str[n]imp() for __BORLANDC__ and ACE_SPRINTF_ADAPTER
+ defines here.
+
+ * ace/os_include/unistd.h:
+ Moved _SC_AIO_MAX, chdir(), access(), getcwd(), and isatty()
+ defines for __BORLANDC__ here.
+
+ * ace/os_include/sys/mman.h:
+ Moved PROT_RDWR define here.
+
+ * ace/os_include/sys/socket.h:
+ Moved CMSG_DATA define here.
+
+ * ace/os_include/sys/stat.h:
+ Moved stat(), umask(), and fstat() defines for __BORLANDC__ here.
+
+ * ace/os_include/sys/timeb.h:
+ Moved ftime() and timeb defines for __BORLANDC__ here.
+
+ * ace/os_include/sys/types.h:
+ Moved longlong_t, key_t, and pid_t here.
+
+Sat May 10 19:19:09 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Commented and moved more code, as listed below.
+
+ * ace/os_include/sys/types.h:
+ Added ACE_LACKS_SYS_MMAN_H define.
+
+ * ace/os_include/sys/types.h:
+ Moved nlink_t, uid_t, gid_t, and caddr_t typedefs for
+ ACE_WIN32 here.
+
+Fri May 9 22:45:24 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Commented and moved more code, as listed below.
+
+ * ace/os_include/signal.h:
+ Moved ACE_HAS_SIG_MACROS and ACE_HAS_SIG_ATOMIC_T ifdefs,
+ sigemptyset undefs, and SCO SIGIO def and include of
+ sys/regset.h here.
+
+ * ace/os_include/stdlib.h:
+ Move rand_r() declaration here.
+
+ * ace/os_include/string.h:
+ Moved strtok_r() declaration here.
+
+ * ace/os_include/time.h:
+ Moved strptime() declaration here.
+
+ * ace/os_include/unistd.h:
+ Moved ualarm(), pread/pwrite(), getpgid(), and lseek64/llseek()
+ declarations here.
+
+ * ace/os_include/sys/mman.h:
+ Moved MAP_* and PROT_* defines for ACE_WIN32 here.
+
+ * ace/os_include/sys/msg.h:
+ Moved struct msqid_sh declaration for ACE_WIN32 here.
+
+ * ace/os_include/sys/resource.h:
+ Moved struct rusage declaration for ACE_WIN32 here.
+
+ * ace/os_include/sys/select.h:
+ Moved NFDBITS define for ACE_WIN32 here.
+
+ * ace/os_include/sys/shm.h:
+ Moved struct shmaddr declaration for ACE_WIN32 here.
+
+ * ace/os_include/sys/socket.h:
+ Moved struct msghdr and related declarations here.
+
+ * ace/os_include/sys/uio.h:
+ Moved [ACE_]IOV_MAX defines here.
+
+Fri May 9 16:10:50 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Commented and moved more code, as listed below.
+
+ * ace/config-sunos5.5.h:
+ Added ACE_LACKS_STDINT_H.
+
+ * ace/os_include/stropts.h:
+ Moved includes of [sys/]timod.h, sys/filio.h, and sys/sockio.h
+ here.
+
+ * ace/os_include/sys/msg.h:
+ Moved ACE_HAS_BROKEN_MSG_H and ACE_LACKS_SYSV_MSQ_PROTOS
+ #ifdef's here.
+
+Fri May 9 01:20:49 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/config-cygwin32.h:
+ Added ACE_LACKS_SYS_SEM_H macro.
+
+Fri May 9 00:20:32 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/config-win32-msvc.h:
+ Added following ACE_LACKS macros: INTTYPES_H, STROPTS_H,
+ SYS_IOCTL_H, SYS_IPC_H, and SYS_SEM_H.
+
+ * ace/SV_Semaphore_Complex.cpp:
+ * ace/SV_Semaphore_Simple.cpp:
+ Added #include "ace/os_include/sys/sem.h".
+
+ * ace/SPIPE_Stream.h:
+ Added #include "ace/os_include/stropts.h".
+
+Thu May 8 23:24:43 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Commented out a ton of code and moved it into the following
+ files as noted. The commented out code will be removed once the
+ other platforms have been tested and we are ready to commit to
+ the main trunk.
+
+ * ace/Thread.h:
+ Moved struct cancel_state here.
+
+ * ace/os_include/pthread.h:
+ Moved pthead_self() declaration here.
+
+ * ace/os_include/semaphore.h:
+ Moved struct ACE_sema_t and SEM_FAILED here.
+
+ * ace/os_include/stdint.h:
+ Moved BSD style types, e.g., u_char, here.
+
+ * ace/os_include/stropts.h:
+ Moved struct strrecvfd declaration here.
+
+ * ace/os_include/time.h:
+ Moved ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R define and
+ undef of ctime when ACE_HAS_BROKEN_CTIME here.
+
+ * ace/os_include/sys/msg.h:
+ Moved struct msgbuf declaration here.
+
+ * ace/os_include/sys/resource.h:
+ Moved rlimit typedef here.
+
+ * ace/os_include/sys/sem.h:
+ Moved struct sembuf declartion here.
+
+ * ace/os_include/sys/stat.h:
+ Moved ACE_LACKS_MODE_MASK, e.g., S_IRWXG, definitions
+ and struct stat here.
+
+ * ace/os_include/sys/types.h:
+ Moved clockid_t and dev_t typedefs and conditional include
+ of <types.h> here.
+
+ * ace/os_include/sys/uio.h:
+ Moved struct iovec and related typedefs here.
+
+Thu May 7 02:04:00 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Replaced Windows specific includes for ws2tcpip.h, direct.h,
+ process.h, and io.h with the appropriate new headers listed
+ below.
+
+ * ace/config-cygwin32.h:
+ Added following ACE_LACKS macros: STDINT_H, INTTYPES_H,
+ STROPTS_H, and UCONTEXT_H.
+
+ * ace/config-win32-msvc.h:
+ Added several ACE_LACKS macros: UCONTEXT_H, STDINT_H,
+ SYS_SELECT_H, TIME_H, SYS_RESOURCE_H, SYS_WAIT_H,
+ SYS_UIO_H, SYS_SOCKET_H, and NETINET_IN_H.
+
+ * ace/os_include/unistd.h:
+ Added include for <process.h> and <io.h> on Windows,
+ but not WINCE.
+
+ * ace/os_include/sys/stat.h:
+ Added include for <direct.h> on Windows, but not WINCE.
+
+ * ace/os_include/netinet/in.h:
+ Added include for <ws2tcpip.h> when ACE_HAS_WINSOCK2 is
+ defined and != 0.
+
+Wed May 7 00:02:10 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ Created branch dre_osh00.
+
+ * ace/OS.{i,h}:
+ * ace/os_include/signal.h:
+ * ace/os_include/stropts.h:
+ Modified most of the #includes of systems headers to use the
+ ace/os_include/*.h headers, and started moving some of the
+ #ifdef'd code to the new headers.
+
+ * ace/config-linux-common.h:
+ Removed #define ACE_LACKS_STRRECVFD and added #define
+ ACE_HAS_STRBUF_T.
+
Thu May 22 00:16:11 UTC 2003 Don Hinton <dhinton@dresystems.com>
* ace/os_include/math.h:
@@ -47,7 +527,7 @@ Wed May 21 14:32:13 UTC 2003 Don Hinton <dhinton@dresystems.com>
* tests/Test_Output.dsp:
Removed post build step that cleaned up old versions of
- Test_Output*.dll.
+ Test_Output*.dll.
Wed May 21 09:25:16 2003 Chad Elliott <elliott_c@ociweb.com>
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
index 06e237055ac..6d04a200781 100644
--- a/ace/Basic_Types.h
+++ b/ace/Basic_Types.h
@@ -53,19 +53,17 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
// Pull in definitions
-# include /**/ <limits.h> // Integer limits
-# include /**/ <float.h> // Floating point limits
-# include /**/ <stdlib.h> // Other types
-# include /**/ <stddef.h> // Get ptrdiff_t - see further comments below
+# include "ace/os_include/limits.h" // Integer limits
+# include "ace/os_include/float.h" // Floating point limits
+# include "ace/os_include/stdlib.h" // Other types
+# include "ace/os_include/stddef.h" // Get ptrdiff_t - see further comments below
# if defined(ACE_LACKS_LONGLONG_T)
-# include /**/ <stdarg.h> // LynxOS requires this before stdio.h
-# include /**/ <stdio.h> // For long long emulation
+# include "ace/os_include/stdarg.h" // LynxOS requires this before stdio.h
+# include "ace/os_include/stdio.h" // For long long emulation
# endif /* ACE_LACKS_LONGLONG_T */
-# if !defined (ACE_LACKS_SYS_TYPES_H)
-# include /**/ <sys/types.h>
-# endif /* ACE_LACKS_SYS_TYPES_H */
+# include "ace/os_include/sys/types.h"
# if !defined (ACE_LACKS_PARAM_H)
# include /**/ <sys/param.h>
@@ -73,17 +71,6 @@
# include "ace/ACE_export.h"
-// Pick up MAXPATHLEN without need of OS.h.
-#if !defined (MAXPATHLEN)
-# if defined (ACE_WIN32)
-# define MAXPATHLEN _MAX_PATH
-# elif defined (_POSIX_PATH_MAX)
-# define MAXPATHLEN _POSIX_PATH_MAX
-# else
-# define MAXPATHLEN 1024
-# endif /* ACE_WIN32 */
-#endif /* MAXPATHLEN */
-
// A char always has 1 byte, by definition.
# define ACE_SIZEOF_CHAR 1
diff --git a/ace/Default_Constants.h b/ace/Default_Constants.h
index 87c0934d555..8a200fe5743 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.
@@ -223,6 +222,12 @@
# define ACE_DEFAULT_SHM_KEY 1234
# endif /* ACE_DEFAULT_SHM_KEY */
+// Default address for shared memory mapped files and SYSV shared memory
+// (defaults to 64 M).
+# if !defined (ACE_DEFAULT_BASE_ADDR)
+# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024))
+# endif /* ACE_DEFAULT_BASE_ADDR */
+
// Default segment size used by SYSV shared memory (128 K)
# if !defined (ACE_DEFAULT_SEGMENT_SIZE)
# define ACE_DEFAULT_SEGMENT_SIZE 1024 * 128
@@ -388,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 731ca256f7f..1963a47769e 100644
--- a/ace/Handle_Set.h
+++ b/ace/Handle_Set.h
@@ -20,6 +20,23 @@
# 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 /* !FD_SETSIZE */
+# define ACE_FD_SETSIZE FD_SETSIZE
+#endif /* ACE_FD_SETSIZE */
+
+#if !defined (ACE_DEFAULT_SELECT_REACTOR_SIZE)
+# define ACE_DEFAULT_SELECT_REACTOR_SIZE ACE_FD_SETSIZE
+#endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */
+
/**
* @class ACE_Handle_Set
*
diff --git a/ace/Malloc.h b/ace/Malloc.h
index eb2c65fa31b..696a74c0836 100644
--- a/ace/Malloc.h
+++ b/ace/Malloc.h
@@ -25,14 +25,14 @@
#include "ace/Log_Msg.h"
#if defined (ACE_HAS_MALLOC_STATS)
-#include "ace/Atomic_Op.h"
-#if defined (ACE_HAS_THREADS)
-#include "ace/Process_Mutex.h"
-#define ACE_PROCESS_MUTEX ACE_Process_Mutex
-#else
-#include "ace/SV_Semaphore_Simple.h"
-#define ACE_PROCESS_MUTEX ACE_SV_Semaphore_Simple
-#endif /* ACE_HAS_THREADS */
+# include "ace/Atomic_Op.h"
+# if defined (ACE_HAS_THREADS)
+# include "ace/Process_Mutex.h"
+# define ACE_PROCESS_MUTEX ACE_Process_Mutex
+# else /* ACE_HAS_THREADS */
+# include "ace/SV_Semaphore_Simple.h"
+# define ACE_PROCESS_MUTEX ACE_SV_Semaphore_Simple
+# endif /* ACE_HAS_THREADS */
typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT;
@@ -199,9 +199,9 @@ struct ACE_Export ACE_Malloc_Stats
/// Number of blocks in use
ACE_INT ninuse_;
};
-#define ACE_MALLOC_STATS(X) X
+# define ACE_MALLOC_STATS(X) X
#else
-#define ACE_MALLOC_STATS(X)
+# define ACE_MALLOC_STATS(X)
#endif /* ACE_HAS_MALLOC_STATS */
#if !defined (ACE_MALLOC_PADDING)
@@ -210,7 +210,7 @@ struct ACE_Export ACE_Malloc_Stats
// when you want areas to be at least a page long, or 32K long, or
// something like that.
-#define ACE_MALLOC_PADDING 1
+# define ACE_MALLOC_PADDING 1
#endif /* ACE_MALLOC_PADDING */
union ACE_max_align_info
@@ -223,11 +223,11 @@ union ACE_max_align_info
#if !defined (ACE_MALLOC_ALIGN)
// Align the malloc header size to a multiple of a double.
-#define ACE_MALLOC_ALIGN (sizeof (ACE_max_align_info))
+# define ACE_MALLOC_ALIGN (sizeof (ACE_max_align_info))
#endif /* ACE_MALLOC_ALIGN */
#if !defined ACE_MALLOC_ROUNDUP
-#define ACE_MALLOC_ROUNDUP(X, Y) ((X) + ((Y) - 1) & ~((Y) - 1))
+# define ACE_MALLOC_ROUNDUP(X, Y) ((X) + ((Y) - 1) & ~((Y) - 1))
#endif
// ACE_MALLOC_HEADER_SIZE is the normalized malloc header size.
diff --git a/ace/OS.h b/ace/OS.h
index e40c4eb196c..1fc27e9fa2b 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -20,7 +20,7 @@
#include "ace/config-all.h"
#if defined (ACE_HAS_VIRTUAL_TIME)
-#include /**/ <sys/times.h>
+#include "ace/os_include/sys/times.h"
#endif /*ACE_HAS_VIRTUAL_TIME*/
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -34,86 +34,31 @@
#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/os_include/sys/sem.h"
+#include "ace/os_include/errno.h"
+
#include "ace/Time_Value.h"
class ACE_Timeout_Manager;
-#if !defined (_SC_AIO_MAX)
-#define _SC_AIO_MAX 1
-#endif /* _SC_AIO_MAX */
-
-// Do not change these values wantonly since GPERF depends on them..
-#define ACE_ASCII_SIZE 128
-#define ACE_EBCDIC_SIZE 256
-
-#if 'a' < 'A'
-#define ACE_HAS_EBCDIC
-#define ACE_STANDARD_CHARACTER_SET_SIZE 256
-#else
-#define ACE_HAS_ASCII
-#define ACE_STANDARD_CHARACTER_SET_SIZE 128
-#endif /* 'a' < 'A' */
-
-# if defined (ACE_PSOS_TM)
-typedef long long longlong_t;
-typedef long id_t;
-# endif /* ACE_PSOS_TM */
-
// Here are all ACE-specific default constants, needed throughout ACE
// and its applications. The values can be over written by user
// specific values in config.h files.
#include "ace/Default_Constants.h"
-# if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- // Control message size to pass a file descriptor.
-# define ACE_BSD_CONTROL_MSG_LEN sizeof (struct cmsghdr) + sizeof (ACE_HANDLE)
-# if defined (ACE_LACKS_CMSG_DATA_MACRO)
-# if defined (ACE_LACKS_CMSG_DATA_MEMBER)
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-# else
-# define CMSG_DATA(cmsg) ((cmsg)->cmsg_data)
-# endif /* ACE_LACKS_CMSG_DATA_MEMBER */
-# endif /* ACE_LACKS_CMSG_DATA_MACRO */
-# endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
-
-// Default size of the ACE Reactor.
-# if defined (FD_SETSIZE)
-int const ACE_FD_SETSIZE = FD_SETSIZE;
-# else
-# define ACE_FD_SETSIZE FD_SETSIZE
-# endif /* ACE_FD_SETSIZE */
-
-# if !defined (ACE_DEFAULT_SELECT_REACTOR_SIZE)
-# define ACE_DEFAULT_SELECT_REACTOR_SIZE ACE_FD_SETSIZE
-# endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */
-
-
// Here are all ACE-specific global declarations needed throughout
// ACE.
#include "ace/Global_Macros.h"
-#if !defined (ACE_WIN32) && !defined (INTEGRITY)
-#define ACE_MAX_USERID L_cuserid
-#endif /*!ACE_WIN32*/
-
// include the ACE min()/max() functions.
# include "ace/Min_Max.h"
-
-// These hooks enable ACE to have all dynamic memory management
-// automatically handled on a per-object basis.
-
-# if defined (ACE_LACKS_KEY_T)
-# if defined (ACE_WIN32)
- // Win32 doesn't use numeric values to name its semaphores, it uses
- // strings!
-typedef char *key_t;
-# else
-typedef int key_t;
-# endif /* ACE_WIN32 */
-# endif /* ACE_LACKS_KEY_T */
-
///////////////////////////////////////////
// //
// NOTE: Please do not add any #includes //
@@ -125,18 +70,12 @@ typedef int key_t;
# if defined (ACE_PSOS)
-# if defined (ACE_LACKS_ASSERT_MACRO)
-# define assert(expr)
-# endif
-
# if defined (ACE_PSOSIM)
-# include /**/ "ace/sys_conf.h" /* system configuration file */
-# include /**/ <psos.h> /* pSOS+ system calls */
-# include /**/ <pna.h> /* pNA+ TCP/IP Network Manager calls */
+# 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 */
@@ -150,191 +89,33 @@ typedef int key_t;
/* use the wrappers under pSOSim */
/* put includes for necessary UNIX file system calls here */
-# include /**/ <sys/stat.h>
-# include /**/ <sys/ioctl.h>
-# include /**/ <sys/sockio.h>
-# include /**/ <netinet/tcp.h>
-
-# define TCP_
-# if ! defined (BUFSIZ)
-# define BUFSIZ 1024
-# endif /* ! defined (BUFSIZ) */
-
+# include "ace/os_include/sys/stat.h"
+# include "ace/os_include/stropts.h" // instead of <sys/ioctl.h>
+# include "ace/os_include/netinet/tcp.h"
# 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 /**/ "ace/sys_conf.h" /* system configuration file */
-# include /**/ <configs.h> /* includes all pSOS headers */
-// #include /**/ <psos.h> /* pSOS system calls */
-# include /**/ <pna.h> /* pNA+ TCP/IP Network Manager calls */
-# include /**/ <phile.h> /* pHILE+ file system calls */
-// #include /**/ <prepccfg.h> /* pREPC+ file system calls */
+# include /**/x "ace/sys_conf.h" /* system configuration file */
+# include /**/x <configs.h> /* includes all pSOS headers */
+// #include /**/x <psos.h> /* pSOS system calls */
+# include /**/x <pna.h> /* pNA+ TCP/IP Network Manager calls */
+# include /**/x <phile.h> /* pHILE+ file system calls */
+// #include /**/x <prepccfg.h> /* pREPC+ file system calls */
# if defined (ACE_PSOS_DIAB_MIPS)
# if defined (ACE_PSOS_USES_DIAB_SYS_CALLS)
-# include /**/ <unistd.h> /* Diab Data supplied file system calls */
+# include "ace/os_include/unistd.h" /* Diab Data supplied file system calls */
# else
-# include /**/ <prepc.h>
+# include /**/x <prepc.h>
# endif /* ACE_PSOS_USES_DIAB_SYS_CALLS */
-# include /**/ <sys/wait.h> /* Diab Data supplied header file */
+# include "ace/os_include/sys/wait.h" /* Diab Data supplied header file */
# endif /* ACE_PSOS_DIAB_MIPS */
-// This collides with phile.h
-// #include /**/ <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
-
-# if !defined (howmany)
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
-
- 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
// versions do. So, include errno.h and then see which ones are not
// yet defined.
-# 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))
+# include "ace/os_include/errno.h"
typedef u_long ACE_idtype_t;
typedef u_long ACE_id_t;
@@ -356,79 +137,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 */
-
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY 1234
-# endif /* ACE_DEFAULT_SEM_KEY */
-
-# define ACE_STDIN 0
-# define ACE_STDOUT 1
-# define ACE_STDERR 2
-
-# 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(MAXPATHLEN)
-# define MAXPATHLEN 1024
-# endif /* MAXPATHLEN */
-
-# 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)
@@ -488,18 +199,6 @@ struct ACE_OVERLAPPED
ACE_HANDLE hEvent;
};
-# if !defined (USER_INCLUDE_SYS_TIME_TM)
-# if defined (ACE_PSOS_DIAB_PPC)
-typedef struct timespec timespec_t;
-# else /* ! defined (ACE_PSOS_DIAB_PPC) */
-typedef struct timespec
-{
- time_t tv_sec; // Seconds
- long tv_nsec; // Nanoseconds
-} timespec_t;
-# endif /* defined (ACE_PSOS_DIAB_PPC) */
-# endif /* !defined (USER_INCLUDE_SYS_TIME_TM) */
-
#if defined (ACE_PSOS_HAS_TIME)
// Use pSOS time, wrapped . . .
@@ -560,59 +259,13 @@ private:
} ;
#endif /* ACE_PSOS_HAS_TIME */
-# endif /* defined (ACE_PSOS) */
-
-# if defined (ACE_HAS_CHARPTR_SPRINTF)
-# define ACE_SPRINTF_ADAPTER(X) ::strlen (X)
-# else
-# define ACE_SPRINTF_ADAPTER(X) X
-# endif /* ACE_HAS_CHARPTR_SPRINTF */
-
-// Default address for shared memory mapped files and SYSV shared memory
-// (defaults to 64 M).
-# if !defined (ACE_DEFAULT_BASE_ADDR)
-# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024))
-# endif /* ACE_DEFAULT_BASE_ADDR */
-
-// This fudge factor can be overriden for timers that need it, such as on
-// Solaris, by defining the ACE_TIMER_SKEW symbol in the appropriate config
-// header.
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 0
-#endif /* ACE_TIMER_SKEW */
+# endif /* defined (ACE_PSOS) **********************************************/
// 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 /**/ <signal.h>
-# undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# 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.
-# include /**/ <dce/cma_sigwait.h>
-# endif /* HPUX_10 */
+# include "ace/os_include/pthread.h"
# endif /* ACE_HAS_PTHREADS */
-// 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 */
-
// By default we perform no tracing on the OS layer, otherwise the
// coupling between the OS layer and Log_Msg is too tight. But the
// application can override the default if they wish to.
@@ -632,17 +285,6 @@ using std::timezone;
using std::difftime;
# endif /* ACE_USES_STD_NAMESPACE_FOR_STDC_LIB */
-# 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 (E2BIG)
-# define E2BIG 7
-#endif /* E2BIG */
-
/**
* @class ACE_Countdown_Time
*
@@ -687,30 +329,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
@@ -906,227 +524,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...
-# if !defined (ACE_WSOCK_VERSION)
-# define ACE_WSOCK_VERSION 0, 0
-# endif /* ACE_WSOCK_VERSION */
-
-# if defined (ACE_HAS_BROKEN_CTIME)
-# undef ctime
-# endif /* ACE_HAS_BROKEN_CTIME */
-
-/// 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)
@@ -1139,217 +536,24 @@ _make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *gobbler) \
# define ACE_TSS_GET(I, T) (I)
# endif /* ACE_HAS_THREADS && (ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATIOND) */
-# 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. */
-
-// 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_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_MSGBUF_T)
-struct msgbuf {};
-# endif /* ACE_LACKS_MSGBUF_T */
-
-# if defined (ACE_LACKS_STRRECVFD)
-struct strrecvfd {};
-# endif /* ACE_LACKS_STRRECVFD */
-
# if defined (ACE_HAS_PROC_FS)
-# include /**/ <sys/procfs.h>
+# include /**/x <sys/procfs.h>
# endif /* ACE_HAS_PROC_FS */
-# if defined(__rtems__)
-struct iovec {
- /// Base address.
- char *iov_base;
- /// Length.
- size_t iov_len;
-};
-# endif
-
-# 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 */
-
-# 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_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 */
-
-# 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 /**/ <semaphore.h>
-# if !defined (SEM_FAILED) && !defined (ACE_LACKS_NAMED_POSIX_SEM)
-# define SEM_FAILED ((sem_t *) -1)
-# endif /* !SEM_FAILED */
-
-typedef struct
-{
- /// Pointer to semaphore handle. This is allocated by ACE if we are
- /// working with an unnamed POSIX semaphore or by the OS if we are
- /// working with a named POSIX semaphore.
- sem_t *sema_;
-
- /// Name of the semaphore (if this is non-NULL then this is a named
- /// POSIX semaphore, else its an unnamed POSIX semaphore).
- char *name_;
-
-# if defined (ACE_LACKS_NAMED_POSIX_SEM)
- /// this->sema_ doesn't always get created dynamically if a platform
- /// doesn't support named posix semaphores. We use this flag to
- /// remember if we need to delete <sema_> or not.
- int new_sema_;
-# endif /* ACE_LACKS_NAMED_POSIX_SEM */
-} ACE_sema_t;
+# include "ace/os_include/semaphore.h"
# endif /* ACE_HAS_POSIX_SEM */
-struct cancel_state
-{
- /// e.g., PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE,
- /// PTHREAD_CANCELED.
- int cancelstate;
-
- /// e.g., PTHREAD_CANCEL_DEFERRED and PTHREAD_CANCEL_ASYNCHRONOUS.
- int canceltype;
-};
-
-# if defined (ACE_HAS_WINCE)
-# include /**/ <types.h>
-
-# if (_WIN32_WCE < 400)
-typedef unsigned long ptrdiff_t; // evc3, PocketPC don't defined ptrdiff_t
-# else
-# include /**/ <stddef.h> // WinCE .NET puts it in stddef.h
-# endif
-
-//typedef DWORD nlink_t;
-
-// CE's add-on for c-style fstat/stat functionalities. This struct is
-// by no mean complete compared to what you usually find in UNIX
-// platforms. Only members that have direct conversion using Win32's
-// BY_HANDLE_FILE_INFORMATION are defined so that users can discover
-// non-supported members at compile time. Time values are of type
-// ACE_Time_Value for easy comparison.
-
-// Since CE does not have _stat by default as NT/2000 does, the 'stat'
-// struct defined here will be used. Also note that CE file system
-// struct is only for the CE 3.0 or later.
-// Refer to the WCHAR.H from Visual C++ and WIBASE.H from eVC 3.0.
-
-typedef unsigned int dev_t;
-
-struct stat
-{
- /// always 0 on Windows platforms
- dev_t st_dev;
-
- /// always 0 on Windows platforms
- dev_t st_rdev;
-
- /// file attribute
- unsigned short st_mode;
-
- /// number of hard links
- short st_nlink;
-
- /// time of last access
- ACE_Time_Value st_atime;
-
- /// time of last data modification
- ACE_Time_Value st_mtime;
-
- /// time of creation
- ACE_Time_Value st_ctime;
-
- /// 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
-};
-
-# else /* ! ACE_HAS_WINCE */
-# if defined (ACE_LACKS_SYS_TYPES_H) \
- || (defined (__GLIBC__) && !defined (_BSD_SOURCE))
-# if ! defined (ACE_PSOS)
- typedef unsigned char u_char;
- typedef unsigned short u_short;
- typedef unsigned int u_int;
- typedef unsigned long u_long;
-
- typedef unsigned char uchar_t;
- typedef unsigned short ushort_t;
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
-# endif /* ! defined (ACE_PSOS) */
-# else
-# include /**/ <sys/types.h>
-# endif /* ACE_LACKS_SYS_TYPES_H */
-
-# if ! defined (ACE_PSOS)
-# include /**/ <sys/stat.h>
-# endif
-# endif /* ACE_HAS_WINCE */
+# include "ace/os_include/sys/types.h" // /**/ <types.h>
+# include "ace/os_include/stddef.h" // WinCE .NET puts it in stddef.h
#if !defined (ACE_LACKS_UNISTD_H)
-# include /**/ <unistd.h>
+# include "ace/os_include/unistd.h"
#endif /* ACE_LACKS_UNISTD_H */
#if defined (ACE_HAS_PRIOCNTL)
@@ -1385,341 +589,7 @@ struct stat
# endif /* ! ACE_HAS_PTHREADS */
# if defined (ACE_HAS_PTHREADS)
-# define ACE_SCHED_OTHER SCHED_OTHER
-# define ACE_SCHED_FIFO SCHED_FIFO
-# define ACE_SCHED_RR SCHED_RR
-
-// Definitions for mapping POSIX pthreads draft 6 into 1003.1c names
-
-# if defined (ACE_HAS_PTHREADS_DRAFT6)
-# define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
-# define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
-# define PTHREAD_CREATE_UNDETACHED 0
-# define PTHREAD_CREATE_DETACHED 1
-# define PTHREAD_CREATE_JOINABLE 0
-# define PTHREAD_EXPLICIT_SCHED 0
-# define PTHREAD_MIN_PRIORITY 0
-# define PTHREAD_MAX_PRIORITY 126
-# endif /* ACE_HAS_PTHREADS_DRAFT6 */
-
-// Definitions for THREAD- and PROCESS-LEVEL priorities...some
-// implementations define these while others don't. In order to
-// further complicate matters, we don't redefine the default (*_DEF)
-// values if they've already been defined, which allows individual
-// programs to have their own ACE-wide "default".
-
-// PROCESS-level values
-# if defined (_POSIX_PRIORITY_SCHEDULING) && \
- !defined(_UNICOS) && !defined(UNIXWARE_7_1)
-# define ACE_PROC_PRI_FIFO_MIN (sched_get_priority_min(SCHED_FIFO))
-# define ACE_PROC_PRI_RR_MIN (sched_get_priority_min(SCHED_RR))
-# if defined (HPUX)
- // HP-UX's other is the SCHED_HPUX class, which uses historical
- // values that have reverse semantics from POSIX (low value is
- // more important priority). To use these in pthreads calls,
- // the values need to be converted. The other scheduling classes
- // don't need this special treatment.
-# define ACE_PROC_PRI_OTHER_MIN \
- (sched_get_priority_min(SCHED_OTHER))
-# else
-# define ACE_PROC_PRI_OTHER_MIN (sched_get_priority_min(SCHED_OTHER))
-# endif /* HPUX */
-# else /* UNICOS is missing a sched_get_priority_min() implementation,
- SCO too */
-# define ACE_PROC_PRI_FIFO_MIN 0
-# define ACE_PROC_PRI_RR_MIN 0
-# define ACE_PROC_PRI_OTHER_MIN 0
-# endif
-
-# if defined (_POSIX_PRIORITY_SCHEDULING) && !defined(UNIXWARE_7_1)
-# define ACE_PROC_PRI_FIFO_MAX (sched_get_priority_max(SCHED_FIFO))
-# define ACE_PROC_PRI_RR_MAX (sched_get_priority_max(SCHED_RR))
-# if defined (HPUX)
-# define ACE_PROC_PRI_OTHER_MAX \
- (sched_get_priority_max(SCHED_OTHER))
-# else
-# define ACE_PROC_PRI_OTHER_MAX (sched_get_priority_max(SCHED_OTHER))
-# endif /* HPUX */
-# else /* SCO missing sched_get_priority_max() implementation */
-# define ACE_PROC_PRI_FIFO_MAX 59
-# define ACE_PROC_PRI_RR_MAX 59
-# define ACE_PROC_PRI_OTHER_MAX 59
-# endif
-
-# if !defined(ACE_PROC_PRI_FIFO_DEF)
-# define ACE_PROC_PRI_FIFO_DEF (ACE_PROC_PRI_FIFO_MIN + (ACE_PROC_PRI_FIFO_MAX - ACE_PROC_PRI_FIFO_MIN)/2)
-# endif
-# if !defined(ACE_PROC_PRI_RR_DEF)
-# define ACE_PROC_PRI_RR_DEF (ACE_PROC_PRI_RR_MIN + (ACE_PROC_PRI_RR_MAX - ACE_PROC_PRI_RR_MIN)/2)
-# endif
-# if !defined(ACE_PROC_PRI_OTHER_DEF)
-# define ACE_PROC_PRI_OTHER_DEF (ACE_PROC_PRI_OTHER_MIN + (ACE_PROC_PRI_OTHER_MAX - ACE_PROC_PRI_OTHER_MIN)/2)
-# endif
-
-// THREAD-level values
-# if defined(PRI_FIFO_MIN) && defined(PRI_FIFO_MAX) && defined(PRI_RR_MIN) && defined(PRI_RR_MAX) && defined(PRI_OTHER_MIN) && defined(PRI_OTHER_MAX)
-# if !defined (ACE_THR_PRI_FIFO_MIN)
-# define ACE_THR_PRI_FIFO_MIN (long) PRI_FIFO_MIN
-# endif /* !ACE_THR_PRI_FIFO_MIN */
-# if !defined (ACE_THR_PRI_FIFO_MAX)
-# define ACE_THR_PRI_FIFO_MAX (long) PRI_FIFO_MAX
-# endif /* !ACE_THR_PRI_FIFO_MAX */
-# if !defined (ACE_THR_PRI_RR_MIN)
-# define ACE_THR_PRI_RR_MIN (long) PRI_RR_MIN
-# endif /* !ACE_THR_PRI_RR_MIN */
-# if !defined (ACE_THR_PRI_RR_MAX)
-# define ACE_THR_PRI_RR_MAX (long) PRI_RR_MAX
-# endif /* !ACE_THR_PRI_RR_MAX */
-# if !defined (ACE_THR_PRI_OTHER_MIN)
-# define ACE_THR_PRI_OTHER_MIN (long) PRI_OTHER_MIN
-# endif /* !ACE_THR_PRI_OTHER_MIN */
-# if !defined (ACE_THR_PRI_OTHER_MAX)
-# define ACE_THR_PRI_OTHER_MAX (long) PRI_OTHER_MAX
-# endif /* !ACE_THR_PRI_OTHER_MAX */
-# elif defined (AIX)
- // AIX's priority range is 1 (low) to 127 (high). There aren't
- // any preprocessor macros I can find. PRIORITY_MIN is for
- // process priorities, as far as I can see, and does not apply
- // to thread priority. The 1 to 127 range is from the
- // pthread_attr_setschedparam man page (Steve Huston, 18-May-2001).
-# if !defined (ACE_THR_PRI_FIFO_MIN)
-# define ACE_THR_PRI_FIFO_MIN (long) 1
-# endif /* !ACE_THR_PRI_FIFO_MIN */
-# if !defined (ACE_THR_PRI_FIFO_MAX)
-# define ACE_THR_PRI_FIFO_MAX (long) 127
-# endif /* !ACE_THR_PRI_FIFO_MAX */
-# if !defined (ACE_THR_PRI_RR_MIN)
-# define ACE_THR_PRI_RR_MIN (long) 1
-# endif /* !ACE_THR_PRI_RR_MIN */
-# if !defined (ACE_THR_PRI_RR_MAX)
-# define ACE_THR_PRI_RR_MAX (long) 127
-# endif /* !ACE_THR_PRI_RR_MAX */
-# if !defined (ACE_THR_PRI_OTHER_MIN)
-# define ACE_THR_PRI_OTHER_MIN (long) 1
-# endif /* !ACE_THR_PRI_OTHER_MIN */
-# if !defined (ACE_THR_PRI_OTHER_MAX)
-# define ACE_THR_PRI_OTHER_MAX (long) 127
-# endif /* !ACE_THR_PRI_OTHER_MAX */
-# elif defined (sun)
-# if !defined (ACE_THR_PRI_FIFO_MIN)
-# define ACE_THR_PRI_FIFO_MIN (long) 0
-# endif /* !ACE_THR_PRI_FIFO_MIN */
-# if !defined (ACE_THR_PRI_FIFO_MAX)
-# define ACE_THR_PRI_FIFO_MAX (long) 59
-# endif /* !ACE_THR_PRI_FIFO_MAX */
-# if !defined (ACE_THR_PRI_RR_MIN)
-# define ACE_THR_PRI_RR_MIN (long) 0
-# endif /* !ACE_THR_PRI_RR_MIN */
-# if !defined (ACE_THR_PRI_RR_MAX)
-# define ACE_THR_PRI_RR_MAX (long) 59
-# endif /* !ACE_THR_PRI_RR_MAX */
-# if !defined (ACE_THR_PRI_OTHER_MIN)
-# define ACE_THR_PRI_OTHER_MIN (long) 0
-# endif /* !ACE_THR_PRI_OTHER_MIN */
-# if !defined (ACE_THR_PRI_OTHER_MAX)
-# define ACE_THR_PRI_OTHER_MAX (long) 127
-# endif /* !ACE_THR_PRI_OTHER_MAX */
-# else
-# if !defined (ACE_THR_PRI_FIFO_MIN)
-# define ACE_THR_PRI_FIFO_MIN (long) ACE_PROC_PRI_FIFO_MIN
-# endif /* !ACE_THR_PRI_FIFO_MIN */
-# if !defined (ACE_THR_PRI_FIFO_MAX)
-# define ACE_THR_PRI_FIFO_MAX (long) ACE_PROC_PRI_FIFO_MAX
-# endif /* !ACE_THR_PRI_FIFO_MAX */
-# if !defined (ACE_THR_PRI_RR_MIN)
-# define ACE_THR_PRI_RR_MIN (long) ACE_PROC_PRI_RR_MIN
-# endif /* !ACE_THR_PRI_RR_MIN */
-# if !defined (ACE_THR_PRI_RR_MAX)
-# define ACE_THR_PRI_RR_MAX (long) ACE_PROC_PRI_RR_MAX
-# endif /* !ACE_THR_PRI_RR_MAX */
-# if !defined (ACE_THR_PRI_OTHER_MIN)
-# define ACE_THR_PRI_OTHER_MIN (long) ACE_PROC_PRI_OTHER_MIN
-# endif /* !ACE_THR_PRI_OTHER_MIN */
-# if !defined (ACE_THR_PRI_OTHER_MAX)
-# define ACE_THR_PRI_OTHER_MAX (long) ACE_PROC_PRI_OTHER_MAX
-# endif /* !ACE_THR_PRI_OTHER_MAX */
-# endif
-# if !defined(ACE_THR_PRI_FIFO_DEF)
-# define ACE_THR_PRI_FIFO_DEF ((ACE_THR_PRI_FIFO_MIN + ACE_THR_PRI_FIFO_MAX)/2)
-# endif
-# if !defined(ACE_THR_PRI_RR_DEF)
-# define ACE_THR_PRI_RR_DEF ((ACE_THR_PRI_RR_MIN + ACE_THR_PRI_RR_MAX)/2)
-# endif
-# if !defined(ACE_THR_PRI_OTHER_DEF)
-# define ACE_THR_PRI_OTHER_DEF ((ACE_THR_PRI_OTHER_MIN + ACE_THR_PRI_OTHER_MAX)/2)
-# endif
-
-// Typedefs to help compatibility with Windows NT and Pthreads.
-typedef pthread_t ACE_hthread_t;
-typedef pthread_t ACE_thread_t;
-
-# if defined (ACE_HAS_TSS_EMULATION)
- typedef pthread_key_t ACE_OS_thread_key_t;
- typedef u_long ACE_thread_key_t;
-# else /* ! ACE_HAS_TSS_EMULATION */
- typedef pthread_key_t ACE_thread_key_t;
-# endif /* ! ACE_HAS_TSS_EMULATION */
-
-# if !defined (ACE_LACKS_COND_T)
-typedef pthread_mutex_t ACE_mutex_t;
-typedef pthread_cond_t ACE_cond_t;
-typedef pthread_condattr_t ACE_condattr_t;
-typedef pthread_mutexattr_t ACE_mutexattr_t;
-# endif /* ! ACE_LACKS_COND_T */
-typedef pthread_mutex_t ACE_thread_mutex_t;
-
-# if !defined (PTHREAD_CANCEL_DISABLE)
-# define PTHREAD_CANCEL_DISABLE 0
-# endif /* PTHREAD_CANCEL_DISABLE */
-
-# if !defined (PTHREAD_CANCEL_ENABLE)
-# define PTHREAD_CANCEL_ENABLE 0
-# endif /* PTHREAD_CANCEL_ENABLE */
-
-# if !defined (PTHREAD_CANCEL_DEFERRED)
-# define PTHREAD_CANCEL_DEFERRED 0
-# endif /* PTHREAD_CANCEL_DEFERRED */
-
-# if !defined (PTHREAD_CANCEL_ASYNCHRONOUS)
-# define PTHREAD_CANCEL_ASYNCHRONOUS 0
-# endif /* PTHREAD_CANCEL_ASYNCHRONOUS */
-
-# define THR_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
-# define THR_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
-# define THR_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
-# define THR_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
-
-# if !defined (PTHREAD_CREATE_JOINABLE)
-# if defined (PTHREAD_CREATE_UNDETACHED)
-# define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED
-# else
-# define PTHREAD_CREATE_JOINABLE 0
-# endif /* PTHREAD_CREATE_UNDETACHED */
-# endif /* PTHREAD_CREATE_JOINABLE */
-
-# if !defined (PTHREAD_CREATE_DETACHED)
-# define PTHREAD_CREATE_DETACHED 1
-# endif /* PTHREAD_CREATE_DETACHED */
-
-# if !defined (PTHREAD_PROCESS_PRIVATE) && !defined (ACE_HAS_PTHREAD_PROCESS_ENUM)
-# if defined (PTHREAD_MUTEXTYPE_FAST)
-# define PTHREAD_PROCESS_PRIVATE PTHREAD_MUTEXTYPE_FAST
-# else
-# define PTHREAD_PROCESS_PRIVATE 0
-# endif /* PTHREAD_MUTEXTYPE_FAST */
-# endif /* PTHREAD_PROCESS_PRIVATE */
-
-# if !defined (PTHREAD_PROCESS_SHARED) && !defined (ACE_HAS_PTHREAD_PROCESS_ENUM)
-# if defined (PTHREAD_MUTEXTYPE_FAST)
-# define PTHREAD_PROCESS_SHARED PTHREAD_MUTEXTYPE_FAST
-# else
-# define PTHREAD_PROCESS_SHARED 1
-# endif /* PTHREAD_MUTEXTYPE_FAST */
-# endif /* PTHREAD_PROCESS_SHARED */
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
-# if defined (PTHREAD_PROCESS_PRIVATE)
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE
-# endif /* ! USYNC_THREAD */
-# else
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD MUTEX_NONRECURSIVE_NP
-# endif /* ! USYNC_THREAD */
-# endif /* PTHREAD_PROCESS_PRIVATE */
-
-# if defined (PTHREAD_PROCESS_SHARED)
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS PTHREAD_PROCESS_SHARED
-# endif /* ! USYNC_PROCESS */
-# else
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS MUTEX_NONRECURSIVE_NP
-# endif /* ! USYNC_PROCESS */
-# endif /* PTHREAD_PROCESS_SHARED */
-# elif !defined (ACE_HAS_STHREADS)
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE
-# endif /* ! USYNC_THREAD */
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS PTHREAD_PROCESS_SHARED
-# endif /* ! USYNC_PROCESS */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
-/* MM-Graz: prevent warnings */
-#undef THR_BOUND
-#undef THR_NEW_LWP
-#undef THR_DETACHED
-#undef THR_SUSPENDED
-#undef THR_DAEMON
-
-# define THR_BOUND 0x00000001
-# if defined (CHORUS)
-# define THR_NEW_LWP 0x00000000
-# else
-# define THR_NEW_LWP 0x00000002
-# endif /* CHORUS */
-# define THR_DETACHED 0x00000040
-# define THR_SUSPENDED 0x00000080
-# define THR_DAEMON 0x00000100
-# define THR_JOINABLE 0x00010000
-# define THR_SCHED_FIFO 0x00020000
-# define THR_SCHED_RR 0x00040000
-# define THR_SCHED_DEFAULT 0x00080000
-
-# if defined (ACE_HAS_IRIX62_THREADS)
-# define THR_SCOPE_SYSTEM 0x00100000
-# else
-# define THR_SCOPE_SYSTEM THR_BOUND
-#endif /*ACE_HAS_IRIX62_THREADS*/
-
-# define THR_SCOPE_PROCESS 0x00200000
-# define THR_INHERIT_SCHED 0x00400000
-# define THR_EXPLICIT_SCHED 0x00800000
-# define THR_SCHED_IO 0x01000000
-
-# if !defined (ACE_HAS_STHREADS)
-# if !defined (ACE_HAS_POSIX_SEM)
-/**
- * @class ACE_sema_t
- *
- * @brief This is used to implement semaphores for platforms that support
- * POSIX pthreads, but do *not* support POSIX semaphores, i.e.,
- * it's a different type than the POSIX <sem_t>.
- */
-class ACE_OS_Export ACE_sema_t
-{
-friend class ACE_OS;
-protected:
- /// Serialize access to internal state.
- ACE_mutex_t lock_;
-
- /// Block until there are no waiters.
- ACE_cond_t count_nonzero_;
-
- /// Count of the semaphore.
- u_long count_;
-
- /// Number of threads that have called <ACE_OS::sema_wait>.
- u_long waiters_;
-};
-# endif /* !ACE_HAS_POSIX_SEM */
-
-# if defined (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD)
- // If we are on Solaris we can just reuse the existing
- // implementations of these synchronization types.
-# if !defined (ACE_LACKS_RWLOCK_T)
-# include /**/ <synch.h>
-typedef rwlock_t ACE_rwlock_t;
-# endif /* !ACE_LACKS_RWLOCK_T */
-# include /**/ <thread.h>
-# endif /* (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD) */
-
-# else
-# if !defined (ACE_HAS_POSIX_SEM)
-typedef sema_t ACE_sema_t;
-# endif /* !ACE_HAS_POSIX_SEM */
-# endif /* !ACE_HAS_STHREADS */
+// moved to pthread.h
# elif defined (ACE_HAS_STHREADS)
// Solaris threads, without PTHREADS.
// Typedefs to help compatibility with Windows NT and Pthreads.
@@ -1828,26 +698,25 @@ typedef u_int ACE_thread_key_t;
# elif defined (VXWORKS)
// For mutex implementation using mutual-exclusion semaphores (which
// can be taken recursively).
-# include /**/ <semLib.h>
-
-# include /**/ <envLib.h>
-# include /**/ <hostLib.h>
-# include /**/ <ioLib.h>
-# include /**/ <remLib.h>
-# include /**/ <selectLib.h>
-# include /**/ <sigLib.h>
-# include /**/ <sockLib.h>
-# include /**/ <sysLib.h>
-# include /**/ <taskLib.h>
-# include /**/ <taskHookLib.h>
-# include /**/ <inetLib.h>
+# include /**/x <semLib.h>
+
+# include /**/x <envLib.h>
+# include /**/x <hostLib.h>
+# include /**/x <ioLib.h>
+# include /**/x <remLib.h>
+# include /**/x <selectLib.h>
+# include /**/x <sigLib.h>
+# include /**/x <sockLib.h>
+# include /**/x <sysLib.h>
+# include /**/x <taskLib.h>
+# include /**/x <taskHookLib.h>
+# include /**/x <inetLib.h>
extern "C"
struct sockaddr_un {
short sun_family; // AF_UNIX.
char sun_path[108]; // path name.
};
-# define MAXNAMLEN 255
# define NSIG (_NSIGS + 1)
// task options: the other options are either obsolete, internal, or for
@@ -1979,7 +848,7 @@ public:
# define THR_SCHED_DEFAULT 0
# define THR_SCOPE_PROCESS 0
# define THR_SCOPE_SYSTEM 0
-# endif /* ACE_HAS_PTHREADS / STHREADS / PSOS / VXWORKS / WTHREADS */
+# endif /* ACE_HAS_PTHREADS / STHREADS / PSOS / VXWORKS / WTHREADS **********/
// If we're using PACE then we don't want this class (since PACE
// takes care of it) unless we're on Windows. Win32 mutexes, semaphores,
@@ -2087,8 +956,8 @@ protected:
ACE_cond_t waiting_important_writer_;
// condition for the upgrading reader
};
-# elif defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-typedef pthread_rwlock_t ACE_rwlock_t;
+//# elif defined (ACE_HAS_PTHREADS_UNIX98_EXT)
+//typedef pthread_rwlock_t ACE_rwlock_t;
# elif defined (ACE_HAS_STHREADS)
# include /**/ <synch.h>
typedef rwlock_t ACE_rwlock_t;
@@ -2288,7 +1157,7 @@ typedef u_int ACE_thread_key_t;
# define ACE_THR_PRI_OTHER_DEF 0
# endif /* ! ACE_THR_PRI_OTHER_DEF */
-# endif /* ACE_HAS_THREADS */
+# endif /* ACE_HAS_THREADS ***********************************************/
# if defined (ACE_PSOS)
@@ -2319,24 +1188,10 @@ protected:
// Standard C Library includes
// NOTE: stdarg.h must be #included before stdio.h on LynxOS.
-# include /**/ <stdarg.h>
+# include "ace/os_include/stdarg.h"
# if !defined (ACE_HAS_WINCE)
-# include /**/ <assert.h>
-# include /**/ <stdio.h>
-// 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_DIAB_MIPS)
-#undef size_t
-typedef unsigned int size_t;
-#endif
+# include "ace/os_include/assert.h"
+# include "ace/os_include/stdio.h"
# if !defined (ACE_LACKS_NEW_H)
# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
@@ -2348,81 +1203,27 @@ typedef unsigned int size_t;
# if !defined (ACE_PSOS_DIAB_MIPS) && !defined (VXWORKS)
# define ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# include /**/ <signal.h>
+# include "ace/os_include/signal.h"
# undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
# endif /* ! ACE_PSOS_DIAB_MIPS && ! VXWORKS */
# if ! defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <fcntl.h>
+# include "ace/os_include/fcntl.h"
# endif /* ! ACE_PSOS_DIAB_MIPS */
# endif /* ACE_HAS_WINCE */
-# include /**/ <limits.h>
-# include /**/ <ctype.h>
+# include "ace/os_include/limits.h"
+# include "ace/os_include/ctype.h"
# if ! defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <string.h>
-# include /**/ <stdlib.h>
+# include "ace/os_include/string.h"
+# include "ace/os_include/stdlib.h"
# endif /* ! ACE_PSOS_DIAB_MIPS */
-# include /**/ <float.h>
-
-// 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)
-# define IOV_MAX 16
-# endif /* IOV_MAX */
-
-# if !defined (ACE_IOV_MAX)
-#define ACE_IOV_MAX IOV_MAX
-# endif /* ACE_IOV_MAX */
-
-# if defined (ACE_PSOS_SNARFS_HEADER_INFO)
- // Header information snarfed from compiler provided header files
- // that are not included because there is already an identically
- // named file provided with pSOS, which does not have this info
- // from compiler supplied stdio.h
- extern FILE *fdopen(int, const char *);
- extern int getopt(int, char *const *, const char *);
- extern char *tempnam(const char *, const char *);
- extern "C" int fileno(FILE *);
-
-// #define fileno(stream) ((stream)->_file)
-
- // from compiler supplied string.h
- extern char *strdup (const char *);
-
- // from compiler supplied stat.h
- extern mode_t umask (mode_t);
- extern int mkfifo (const char *, mode_t);
- extern int mkdir (const char *, mode_t);
-
- // from compiler supplied stdlib.h
- extern int putenv (char *);
-
- int isatty (int h);
-
-# endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+# include "ace/os_include/float.h"
# if defined (ACE_NEEDS_SCHED_H)
-# include /**/ <sched.h>
+# 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)
@@ -2435,284 +1236,26 @@ typedef unsigned int size_t;
# if !defined (ACE_HAS_WINCE)
# if ! defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <fcntl.h>
+# include "ace/os_include/fcntl.h"
# endif /* ! ACE_PSOS_DIAB_MIPS */
# endif /* ACE_HAS_WINCE */
-// This must come after signal.h is #included.
-# if defined (SCO)
-# define SIGIO SIGPOLL
-# include /**/ <sys/regset.h>
-# endif /* SCO */
-
# if defined ACE_HAS_BYTESEX_H
-# include /**/ <bytesex.h>
+# include /**/x <bytesex.h>
# endif /* ACE_HAS_BYTESEX_H */
# include "ace/Basic_Types.h"
-/* This should work for linux, solaris 5.6 and above, IRIX, OSF */
-# if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
-# if ACE_SIZEOF_LONG == 8
- typedef off_t ACE_LOFF_T;
-# elif defined (__sgi) || defined (AIX) || defined (HPUX) \
- || defined (__QNX__)
- typedef off64_t ACE_LOFF_T;
-# elif defined (__sun)
- typedef offset_t ACE_LOFF_T;
-# elif defined (WIN32) //Add by Nick Lin -- for win32 llseek
- typedef __int64 ACE_LOFF_T; //Add by Nick Lin -- for win32 llseek
-# else
- typedef loff_t ACE_LOFF_T;
-# endif
-# endif /* ACE_HAS_LLSEEK || ACE_HAS_LSEEK64 */
-
-// 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_SIG_MACROS)
-# undef sigemptyset
-# undef sigfillset
-# undef sigaddset
-# undef sigdelset
-# undef sigismember
-# endif /* ACE_HAS_SIG_MACROS */
-
-// This must come after signal.h is #included. It's to counteract
-// the sigemptyset and sigfillset #defines, which only happen
-// when __OPTIMIZE__ is #defined (really!) on Linux.
-# if defined (linux) && defined (__OPTIMIZE__)
-# undef sigemptyset
-# undef sigfillset
-# endif /* linux && __OPTIMIZE__ */
-
-// Prototypes should come after ace/Basic_Types.h since some types may
-// be used in the prototypes.
-
-#if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \
- !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)
-extern "C" pid_t getpgid (pid_t pid);
-#endif /* ACE_LACKS_GETPGID_PROTOTYPE &&
- !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */
-
-#if defined (ACE_LACKS_STRPTIME_PROTOTYPE) && !defined (_XOPEN_SOURCE)
-extern "C" char *strptime (const char *s, const char *fmt, struct tm *tp);
-#endif /* ACE_LACKS_STRPTIME_PROTOTYPE */
-
-#if defined (ACE_LACKS_STRTOK_R_PROTOTYPE) && !defined (_POSIX_SOURCE)
-extern "C" char *strtok_r (char *s, const char *delim, char **save_ptr);
-#endif /* ACE_LACKS_STRTOK_R_PROTOTYPE */
-
-#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
-#endif /* _LARGEFILE64_SOURCE */
-
-#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);
-#endif /* ACE_LACKS_PREAD_PROTOTYPE && (_XOPEN_SOURCE - 0) < 500 */
-
-# 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_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_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_UTIME)
-# include /**/ <utime.h>
+# include "ace/os_include/utime.h"
# endif /* ACE_HAS_UTIME */
-# if !defined (ACE_HAS_MSG) && !defined (SCO)
-struct msghdr {};
-# endif /* ACE_HAS_MSG */
-
-# 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 (ACE_HAS_SIG_ATOMIC_T)
-typedef int sig_atomic_t;
-# endif /* !ACE_HAS_SIG_ATOMIC_T */
-
-# 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 (BUFSIZ)
-# define ACE_STREAMBUF_SIZE BUFSIZ
-# else
-# define ACE_STREAMBUF_SIZE 1024
-# endif /* BUFSIZ */
# 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 /**/ <sys/timeb.h>
+# 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 */
-
-// The following are #defines and #includes that are specific to
-// WIN32.
-# if defined (ACE_HAS_WINCE)
-# define ACE_STDIN _fileno (stdin)
-# define ACE_STDOUT _fileno (stdout)
-# define ACE_STDERR _fileno (stderr)
-# else
-# define ACE_STDIN GetStdHandle (STD_INPUT_HANDLE)
-# define ACE_STDOUT GetStdHandle (STD_OUTPUT_HANDLE)
-# define ACE_STDERR GetStdHandle (STD_ERROR_HANDLE)
-# endif // ACE_HAS_WINCE
-
-// 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 */
-
-# 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)
@@ -2740,146 +1283,25 @@ 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__ */
-
-// This will help until we figure out everything:
-# define NFDBITS 32 /* only used in unused functions... */
-// These two may be used for internal flags soon:
-# define MAP_PRIVATE 1
-# define MAP_SHARED 2
-# define MAP_FIXED 4
-
-# define RUSAGE_SELF 1
-
-struct shmaddr { };
-struct msqid_ds {};
-
-/// Fake the UNIX rusage structure. Perhaps we can add more to this
-/// later on?
-struct rusage
-{
- FILETIME ru_utime;
- FILETIME ru_stime;
-};
-
-// MMAP flags
-# define PROT_READ PAGE_READONLY
-# define PROT_WRITE PAGE_READWRITE
-# define PROT_RDWR PAGE_READWRITE
-/* If we can find suitable use for these flags, here they are:
-PAGE_WRITECOPY
-PAGE_EXECUTE
-PAGE_EXECUTE_READ
-PAGE_EXECUTE_READWRITE
-PAGE_EXECUTE_WRITECOPY
-PAGE_GUARD
-PAGE_NOACCESS
-PAGE_NOCACHE */
+#include "ace/os_include/sys/mman.h" //// MMAP flags
# if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-# include /**/ <ws2tcpip.h>
+# 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)
-# include /**/ <time.h>
-# include /**/ <direct.h>
-# include /**/ <process.h>
-# include /**/ <io.h>
+# include "ace/os_include/time.h"
+# include "ace/os_include/sys/stat.h" // <direct.h>
+# include "ace/os_include/unistd.h" // <process.h>
# endif /* ACE_HAS_WINCE */
-# if defined (__BORLANDC__)
-# include /**/ <fcntl.h>
-# define _chdir chdir
-# define _ftime ftime
-# undef _access
-# define _access access
-# if (__BORLANDC__ <= 0x540)
-# define _getcwd getcwd
-# define _stat stat
-# endif
-# define _isatty isatty
-# define _umask umask
-# define _fstat fstat
-# define _stricmp stricmp
-# define _strnicmp strnicmp
-
-# define _timeb timeb
-
-# 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__ */
+# include "ace/os_include/fcntl.h"
typedef OVERLAPPED ACE_OVERLAPPED;
typedef DWORD ACE_thread_t;
-# if !defined(__MINGW32__)
-typedef long pid_t;
-# endif /* __MINGW32__ */
typedef HANDLE ACE_hthread_t;
#define ACE_INVALID_PID ((pid_t) -1)
@@ -2917,16 +1339,6 @@ typedef ACE_UINT64 ACE_hrtime_t;
# endif
# endif /* ACE_HAS_WINCE */
-# if !defined (__BORLANDC__)
-typedef DWORD nlink_t;
-# if !defined(__MINGW32__)
-typedef u_short mode_t;
-# endif /* !__MINGW32__ */
-typedef long uid_t;
-typedef long gid_t;
-# endif /* __BORLANDC__ */
-typedef char *caddr_t;
-
typedef DWORD ACE_exitcode;
# define ACE_SYSCALL_FAILED 0xFFFFFFFF
@@ -2936,119 +1348,22 @@ typedef DWORD ACE_exitcode;
// Reliance on CRT - I don't really like this.
-# define O_NDELAY 1
-# if !defined (MAXPATHLEN)
-# define MAXPATHLEN _MAX_PATH
-# endif /* !MAXPATHLEN */
-# 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) */
-};
-
-struct msghdr
-{
- /// Optional address
- sockaddr * msg_name;
-
- /// Size of address
- int msg_namelen;
-
- /// Scatter/gather array
- iovec *msg_iov;
-
- /// # elements in msg_iov
- int msg_iovlen;
-
- /// Access rights sent/received
- caddr_t msg_accrights;
-
- int msg_accrightslen;
-};
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
-
-// Default semaphore key
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY 1234
-# endif /* ACE_DEFAULT_SEM_KEY */
-
-# 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 */
-
-// The following are #defines and #includes that are specific to UNIX.
-
-# define ACE_STDIN 0
-# define ACE_STDOUT 1
-# define ACE_STDERR 2
-
// Be consistent with Winsock naming
typedef int ACE_exitcode;
# define ACE_INVALID_HANDLE -1
@@ -3147,58 +1462,6 @@ 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 /**/ <sys/socket.h>
-# define __cplusplus
-# else
-# 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 */
- };
-# else
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# 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 /**/ <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 /**/ <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.
unsigned long inet_addr (const char *);
@@ -3206,9 +1469,9 @@ extern "C"
struct in_addr inet_makeaddr (const int, const int);
unsigned long inet_network (const char *);
# else /* ! (ACE_VXWORKS) && ACE_VXWORKS <= 0x540 */
-# include /**/ <arpa/inet.h>
+# 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)
@@ -3218,80 +1481,63 @@ extern "C"
# undef TCP_MAXSEG
# endif
# endif
-# include /**/ <netinet/tcp.h>
+# include "ace/os_include/netinet/tcp.h"
# endif /* ACE_LACKS_TCP_H */
-# if defined (__Lynx__) || defined (UNIXWARE_7_1)
-# ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
-# endif /* __Lynx__ || UNIXWARE_7_1 */
-
# if defined (CHORUS)
-# include /**/ <chorus.h>
+# include /**/x <chorus.h>
# if !defined(CHORUS_4)
-# include /**/ <cx/select.h>
+# include /**/x <cx/select.h>
# else
-# include /**/ <stdio.h>
+# include "ace/os_include/stdio.h"
# endif
-# include /**/ <sys/uio.h>
-# include /**/ <time.h>
-# include /**/ <stdfileio.h>
-# include /**/ <am/afexec.h>
-# include /**/ <sys/types.h>
-# include /**/ <sys/signal.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
-# include /**/ <timer/chBench.h>
+# include "ace/os_include/sys/uio.h"
+# include "ace/os_include/time.h"
+# include /**/x <stdfileio.h>
+# include /**/x <am/afexec.h>
+# include "ace/os_include/sys/types.h"
+# include "ace/os_include/signal.h" // <sys/signal.h>
+# include "ace/os_include/sys/wait.h"
+# include "ace/os_include/pwd.h"
+# include /**/x <timer/chBench.h>
extern_C int getgid __((void));
extern_C int getuid __((void));
extern_C char* getcwd __((char* buf, size_t size));
extern_C int pipe __((int* fildes));
extern_C int gethostname __((char*, size_t));
-// This must come after limits.h is included
-# define MAXPATHLEN _POSIX_PATH_MAX
-
# if !defined(CHORUS_4)
-typedef cx_fd_mask fd_mask;
typedef void (*__sighandler_t)(int); // keep Signal compilation happy
# endif
-# ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
# elif defined (CYGWIN32)
-# include /**/ <sys/uio.h>
-# include /**/ <sys/file.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/resource.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
+# include "ace/os_include/sys/uio.h"
+# include "ace/os_include/fcntl.h" // <sys/file.h>
+# include "ace/os_include/sys/time.h"
+# include "ace/os_include/sys/resource.h"
+# include "ace/os_include/sys/wait.h"
+# include "ace/os_include/pwd.h"
# elif defined (__QNX__)
-# include /**/ <sys/uio.h>
-# include /**/ <sys/ipc.h>
-# include /**/ <sys/sem.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/wait.h>
-# include /**/ <sys/resource.h>
-# include /**/ <pwd.h>
+# include "ace/os_include/sys/uio.h"
+# include "ace/os_include/sys/ipc.h"
+# include "ace/os_include/sys/sem.h"
+# include "ace/os_include:sys/time.h"
+# include "ace/os_include/sys/wait.h"
+# include "ace/os_include/sys/resource.h"
+# include "ace/os_include/pwd.h"
// sets O_NDELAY
-# include /**/ <unix.h>
-# include /**/ <sys/param.h> /* for NBBY */
- typedef long fd_mask;
+# include /**/x <unix.h>
+# include "ace/os_include/limits.h" // <sys/param.h> /* for NBBY */
# if !defined (NFDBITS)
# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
# endif /* ! NFDBITS */
-# if !defined (howmany)
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* ! howmany */
# elif defined(__rtems__)
-# include /**/ <sys/file.h>
-# include /**/ <sys/resource.h>
-# include /**/ <sys/fcntl.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/utsname.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
+# include "ace/os_include/fcntl.h" // <sys/file.h>
+# include "ace/os_include/sys/resource.h"
+# include "ace/os_include/sys/fcntl.h"
+# include "ace/os_include/sys/time.h"
+# include "ace/os_include/sys/utsname.h"
+# include "ace/os_include/sys/wait.h"
+# include "ace/os_include/pwd.h"
extern "C"
{
@@ -3299,39 +1545,39 @@ extern "C"
fd_set *exceptfds, const struct timeval *timeout);
};
# elif ! defined (VXWORKS) && ! defined (INTEGRITY)
-# include /**/ <sys/uio.h>
-# include /**/ <sys/ipc.h>
+# include "ace/os_include/sys/uio.h"
+# include "ace/os_include/sys/ipc.h"
# if !defined(ACE_LACKS_SYSV_SHMEM)
// No reason to #include this if the platform lacks support for SHMEM
-# include /**/ <sys/shm.h>
+# include "ace/os_include/sys/shm.h"
# endif /* ACE_LACKS_SYSV_SHMEM */
-# include /**/ <sys/sem.h>
-# include /**/ <sys/file.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/resource.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
+# include "ace/os_include/sys/sem.h"
+# include "ace/os_include/fcntl.h" // <sys/file.h>
+# include "ace/os_include/sys/time.h"
+# include "ace/os_include/sys/resource.h"
+# include "ace/os_include/sys/wait.h"
+# include "ace/os_include/pwd.h"
# endif /* ! VXWORKS */
-# include /**/ <sys/ioctl.h>
+# include "ace/os_include/stropts.h" // <sys/ioctl.h>
// IRIX5 defines bzero() in this odd file...
# if defined (ACE_HAS_BSTRING)
-# include /**/ <bstring.h>
+# include /**/x <bstring.h>
# endif /* ACE_HAS_BSTRING */
// AIX defines bzero() in this odd file...
# if defined (ACE_HAS_STRINGS)
-# include /**/ <strings.h>
+# include "ace/os_include/strings.h"
# endif /* ACE_HAS_STRINGS */
# if defined (ACE_HAS_TERM_IOCTLS)
# if defined (__QNX__)
-# include /**/ <termios.h>
+# include "ace/os_include/termios.h"
# else /* ! __QNX__ */
-# include /**/ <sys/termios.h>
+# include "ace/os_include/termios.h" // <sys/termios.h>
# endif /* ! __QNX__ */
# if defined (HPUX)
-# include /**/ <sys/modem.h>
+# include /**/x <sys/modem.h>
# endif /* HPUX */
# endif /* ACE_HAS_TERM_IOCTLS */
@@ -3348,42 +1594,25 @@ extern "C"
#endif /* VTIME */
# if defined (ACE_HAS_AIO_CALLS)
-# include /**/ <aio.h>
+# include "ace/os_include/aio.h"
# endif /* ACE_HAS_AIO_CALLS */
-# if !defined (ACE_LACKS_PARAM_H)
-# include /**/ <sys/param.h>
-# endif /* ACE_LACKS_PARAM_H */
+# include "ace/os_include/limits.h" // <sys/param.h>
// This is here for ACE_OS::num_processors_online(). On HP-UX, it
// needs sys/param.h (above) and sys/pstat.h. The implementation of the
// num_processors_online() method also uses 'defined (__hpux)' to decide
// whether or not to try the syscall.
# if defined (__hpux)
-# include /**/ <sys/pstat.h>
+# include /**/x <sys/pstat.h>
# endif /* __hpux **/
# if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) && !defined (VXWORKS)
-# include /**/ <sys/un.h>
+# include "ace/os_include/sys/un.h"
# endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-# if defined (ACE_HAS_SIGINFO_T)
-# if !defined (ACE_LACKS_SIGINFO_H)
-# if defined (__QNX__) || defined (__OpenBSD__)
-# include /**/ <sys/siginfo.h>
-# elif defined(__rtems__)
-# include /**/ <signal.h>
-# else /* __QNX__ || __OpenBSD__ */
-# include /**/ <siginfo.h>
-# endif /* __QNX__ || __OpenBSD__ */
-# endif /* ACE_LACKS_SIGINFO_H */
-# if !defined (ACE_LACKS_UCONTEXT_H)
-# include /**/ <ucontext.h>
-# endif /* ACE_LACKS_UCONTEXT_H */
-# endif /* ACE_HAS_SIGINFO_T */
-
# if defined (ACE_HAS_POLL)
-# include /**/ <poll.h>
+# include "ace/os_include/poll.h"
# endif /* ACE_HAS_POLL */
# if defined (ACE_HAS_STREAMS)
@@ -3391,10 +1620,10 @@ extern "C"
# if !defined (_XOPEN_EXTENDED_SOURCE)
# define _XOPEN_EXTENDED_SOURCE
# endif /* !_XOPEN_EXTENDED_SOURCE */
-# include /**/ <stropts.h>
+# include "ace/os_include/stropts.h"
# undef _XOPEN_EXTENDED_SOURCE
# else
-# include /**/ <stropts.h>
+# include "ace/os_include/stropts.h"
# endif /* AIX */
# endif /* ACE_HAS_STREAMS */
@@ -3423,64 +1652,9 @@ extern "C"
# endif /* ! DIGITAL_UNIX && ! ACE_HAS_SIGWAIT */
# if defined (ACE_HAS_SELECT_H)
-# include /**/ <sys/select.h>
+# 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 /**/ <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 /**/ <dl.h>
-# else
-# include /**/ <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 */
-
-# if defined (ACE_HAS_SOCKIO_H)
-# include /**/ <sys/sockio.h>
-# endif /* ACE_HAS_SOCKIO_ */
-
// There must be a better way to do this...
# if !defined (RLIMIT_NOFILE)
# if defined (linux) || defined (AIX) || defined (SCO)
@@ -3492,47 +1666,7 @@ 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 /**/ <sys/mman.h>
-}
-# elif !defined (ACE_LACKS_MMAP)
-# include /**/ <sys/mman.h>
-# endif /* ACE_HAS_BROKEN_MMAP_H */
-
-// OSF1 has problems with sys/msg.h and C++...
-# if defined (ACE_HAS_BROKEN_MSG_H)
-# define _KERNEL
-# endif /* ACE_HAS_BROKEN_MSG_H */
-# if !defined (ACE_LACKS_SYSV_MSG_H)
-# include /**/ <sys/msg.h>
-# endif /* ACE_LACKS_SYSV_MSG_H */
-# if defined (ACE_HAS_BROKEN_MSG_H)
-# undef _KERNEL
-# endif /* ACE_HAS_BROKEN_MSG_H */
-
-# 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 *);
-}
-# endif /* ACE_LACKS_SYSV_MSQ_PROTOS */
+# include "ace/os_include/sys/msg.h"
# if defined (ACE_HAS_PRIOCNTL)
# include /**/ <sys/priocntl.h>
@@ -3566,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 */
@@ -3662,162 +1732,10 @@ struct ACE_utsname
ACE_TCHAR machine[_SYS_NMLN];
};
# else
-# include /**/ <sys/utsname.h>
+# include "ace/os_include/sys/utsname.h"
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 (SIGHUP)
-# define SIGHUP 0
-# endif /* SIGHUP */
-
-# if !defined (SIGINT)
-# define SIGINT 0
-# endif /* SIGINT */
-
-# if !defined (SIGSEGV)
-# define SIGSEGV 0
-# endif /* SIGSEGV */
-
-# if !defined (SIGIO)
-# define SIGIO 0
-# endif /* SIGSEGV */
-
-# if !defined (SIGUSR1)
-# define SIGUSR1 0
-# endif /* SIGUSR1 */
-
-# if !defined (SIGUSR2)
-# define SIGUSR2 0
-# endif /* SIGUSR2 */
-
-# if !defined (SIGCHLD)
-# define SIGCHLD 0
-# endif /* SIGCHLD */
-
-# if !defined (SIGCLD)
-# define SIGCLD SIGCHLD
-# endif /* SIGCLD */
-
-# if !defined (SIGQUIT)
-# define SIGQUIT 0
-# endif /* SIGQUIT */
-
-# if !defined (SIGPIPE)
-# define SIGPIPE 0
-# endif /* SIGPIPE */
-
-# if !defined (SIGALRM)
-# define SIGALRM 0
-# endif /* SIGALRM */
-
-# if !defined (SIG_DFL)
-# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
-# define SIG_DFL ((void *) 0)
-# else
-# define SIG_DFL ((__sighandler_t) 0)
-# endif
-# endif /* SIG_DFL */
-
-# if !defined (SIG_IGN)
-# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
-# define SIG_IGN ((void *) 1) /* ignore signal */
-# else
-# define SIG_IGN ((__sighandler_t) 1) /* ignore signal */
-# endif
-# endif /* SIG_IGN */
-
-# if !defined (SIG_ERR)
-# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
-# define SIG_ERR ((void *) -1) /* error return from signal */
-# else
-# define SIG_ERR ((__sighandler_t) -1) /* error return from signal */
-# endif
-# endif /* SIG_ERR */
# if !defined (O_NONBLOCK)
# define O_NONBLOCK 1
@@ -3835,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 */
@@ -3888,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 */
@@ -3984,25 +1878,6 @@ struct sigaction
# define PIPE_BUF 5120
# endif /* PIPE_BUF */
-# if !defined (PROT_RDWR)
-# define PROT_RDWR (PROT_READ|PROT_WRITE)
-# endif /* PROT_RDWR */
-
-# if defined (ACE_HAS_POSIX_NONBLOCK)
-# define ACE_NONBLOCK O_NONBLOCK
-# else
-# define ACE_NONBLOCK O_NDELAY
-# endif /* ACE_HAS_POSIX_NONBLOCK */
-
-// These are used by the <ACE_IPC_SAP::enable> and
-// <ACE_IPC_SAP::disable> methods. They must be unique and cannot
-// conflict with the value of <ACE_NONBLOCK>. We make the numbers
-// negative here so they won't conflict with other values like SIGIO,
-// etc.
-# define ACE_SIGIO -1
-# define ACE_SIGURG -2
-# define ACE_CLOEXEC -3
-
# define LOCALNAME 0
# define REMOTENAME 1
@@ -4028,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.
@@ -4110,18 +1956,6 @@ typedef int ucontext_t;
# define SA_RESTART 0
# endif /* SA_RESTART */
-# if defined (ACE_HAS_TIMOD_H)
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# include /**/ <sys/timod.h>
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# undef queue
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# elif defined (ACE_HAS_OSF_TIMOD_H)
-# include /**/ <tli/timod.h>
-# endif /* ACE_HAS_TIMOD_H */
-
/**
* @class ACE_Thread_ID
*
@@ -4366,13 +2200,9 @@ typedef double ACE_timer_t;
# endif /* ACE_HAS_PRUSAGE_T */
# if !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG)
-# include /**/ <syslog.h>
+# include "ace/os_include/syslog.h"
# endif /* !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG) */
-# if defined (ACE_HAS_SYS_FILIO_H)
-# include /**/ <sys/filio.h>
-# endif /* ACE_HAS_SYS_FILIO_H */
-
# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (__BORLANDC__)
typedef struct _stat ACE_stat;
# else
diff --git a/ace/OS.i b/ace/OS.i
index 94a380367ef..5a4cb68fec2 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -241,7 +241,7 @@ ACE_OS::mkfifo (const ACE_TCHAR *file, mode_t mode)
# else
# if defined (ACE_LACKS_MEMORY_H)
# if !defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <string.h>
+# include "ace/os_include/string.h"
# endif /* ACE_PSOS_DIAB_MIPS */
# else
# include /**/ <memory.h>
@@ -851,7 +851,7 @@ ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx)
}
#if defined (ACE_HAS_SHM_OPEN) && defined(INTEGRITY)
-#include /**/ <sys/mman.h>
+#include "ace/os_include/sys/mman.h"
#endif
ACE_INLINE ACE_HANDLE
diff --git a/ace/SPIPE_Stream.h b/ace/SPIPE_Stream.h
index 340a0dccc4c..9ea82052226 100644
--- a/ace/SPIPE_Stream.h
+++ b/ace/SPIPE_Stream.h
@@ -22,6 +22,7 @@
#include "ace/SPIPE_Addr.h"
#include "ace/ACE.h"
+#include "ace/os_include/stropts.h"
/**
* @class ACE_SPIPE_Stream
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp
index 4c751da24cb..b523d2e0007 100644
--- a/ace/SV_Semaphore_Complex.cpp
+++ b/ace/SV_Semaphore_Complex.cpp
@@ -3,6 +3,7 @@
#include "ace/SV_Semaphore_Complex.h"
#include "ace/Log_Msg.h"
+#include "ace/os_include/sys/sem.h"
#if defined (ACE_LACKS_INLINE_FUNCTIONS)
#include "ace/SV_Semaphore_Complex.i"
@@ -73,7 +74,7 @@ ACE_SV_Semaphore_Complex::open (key_t k,
// Must include a count for the 2 additional semaphores we use
// internally.
- this->sem_number_ = nsems + 2;
+ this->sem_number_ = nsems + 2;
if (create == ACE_SV_Semaphore_Complex::ACE_CREATE)
{
@@ -82,8 +83,8 @@ ACE_SV_Semaphore_Complex::open (key_t k,
do
{
this->internal_id_ = ACE_OS::semget
- (this->key_,
- (u_short) 2 + nsems,
+ (this->key_,
+ (u_short) 2 + nsems,
perms | ACE_SV_Semaphore_Complex::ACE_CREATE);
if (this->internal_id_ == -1)
diff --git a/ace/SV_Semaphore_Simple.cpp b/ace/SV_Semaphore_Simple.cpp
index b6bd6ca7386..24a5b33b896 100644
--- a/ace/SV_Semaphore_Simple.cpp
+++ b/ace/SV_Semaphore_Simple.cpp
@@ -1,6 +1,7 @@
#include "ace/SV_Semaphore_Simple.h"
#include "ace/Log_Msg.h"
#include "ace/ACE.h"
+#include "ace/os_include/sys/sem.h"
#if defined (ACE_LACKS_INLINE_FUNCTIONS)
#include "ace/SV_Semaphore_Simple.i"
diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h
index 34cfdd179a0..a9479833a2b 100644
--- a/ace/SV_Semaphore_Simple.h
+++ b/ace/SV_Semaphore_Simple.h
@@ -23,6 +23,18 @@
#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 */
+#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 */
+#endif /* ACE_WIN32 */
+
/**
* @class ACE_SV_Semaphore_Simple
*
diff --git a/ace/Thread.h b/ace/Thread.h
index 48f960da386..9292068c54c 100644
--- a/ace/Thread.h
+++ b/ace/Thread.h
@@ -24,6 +24,16 @@
#include "ace/OS.h"
#include "ace/Thread_Adapter.h"
+struct cancel_state
+{
+ /// e.g., PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE,
+ /// PTHREAD_CANCELED.
+ int cancelstate;
+
+ /// e.g., PTHREAD_CANCEL_DEFERRED and PTHREAD_CANCEL_ASYNCHRONOUS.
+ int canceltype;
+};
+
/**
* @class ACE_Thread
*
diff --git a/ace/Timer_Queue_T.cpp b/ace/Timer_Queue_T.cpp
index 9d77576261c..c25af115715 100644
--- a/ace/Timer_Queue_T.cpp
+++ b/ace/Timer_Queue_T.cpp
@@ -19,6 +19,13 @@
ACE_RCSID(ace, Timer_Queue_T, "$Id$")
+// This fudge factor can be overriden for timers that need it, such as on
+// Solaris, by defining the ACE_TIMER_SKEW symbol in the appropriate config
+// header.
+#if !defined (ACE_TIMER_SKEW)
+# define ACE_TIMER_SKEW 0
+#endif /* ACE_TIMER_SKEW */
+
template <class TYPE> void
ACE_Timer_Node_T<TYPE>::dump (void) const
{
diff --git a/ace/config-all.h b/ace/config-all.h
index 3026090db47..42d1ccd7546 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 */
+
+# 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-cygwin32.h b/ace/config-cygwin32.h
index 91eefab4a53..ed1f7d49a13 100644
--- a/ace/config-cygwin32.h
+++ b/ace/config-cygwin32.h
@@ -12,5 +12,13 @@
#define ACE_HAS_AUTOMATIC_INIT_FINI
+#define ACE_LACKS_INTTYPES_H
+#define ACE_LACKS_STDINT_H
+#define ACE_LACKS_STROPTS_H
+#define ACE_LACKS_SYS_IPC_H
+#define ACE_LACKS_SYS_MSG_H
+#define ACE_LACKS_SYS_SEM_H
+#define ACE_LACKS_UCONTEXT_H
+
#include "ace/post.h"
#endif /* ACE_CONFIG_CYGWIN32_H */
diff --git a/ace/config-freebsd.h b/ace/config-freebsd.h
index 7d6a58889a9..ad7875ece2f 100644
--- a/ace/config-freebsd.h
+++ b/ace/config-freebsd.h
@@ -17,7 +17,7 @@
#endif /* ! __ACE_INLINE__ */
#if (__FreeBSD_version < 220000)
-#if defined (ACE_HAS_THREADS)
+#if defined (ACE_HAS_THREADS)
#error Threads are not supported.
#endif /* ACE_HAS_THREADS */
#endif /* __FreeBSD_version < 220000 */
@@ -231,7 +231,7 @@ extern "C" { char * cuserid (char *s); }
// Note, on FreeBSD 5, POSIX aio is now an optional kernel module which
// must be loaded.
-// Read the aio(4) man page for what to do, otherwise any aio_* call
+// Read the aio(4) man page for what to do, otherwise any aio_* call
// will coredump.
// By default use Proactor which does not use POSIX Real-time Signals
@@ -245,6 +245,8 @@ extern "C" { char * cuserid (char *s); }
#include <sys/signal.h>
typedef union sigval sigval_t;
+#define ACE_LACKS_STROPTS_H
+
#include "ace/post.h"
#endif /* ACE_CONFIG_H */
diff --git a/ace/config-linux-common.h b/ace/config-linux-common.h
index 46890380077..94a2483a1af 100644
--- a/ace/config-linux-common.h
+++ b/ace/config-linux-common.h
@@ -274,7 +274,8 @@
// Platform defines struct timespec but not timespec_t
#define ACE_LACKS_TIMESPEC_T
-#define ACE_LACKS_STRRECVFD
+//#define ACE_LACKS_STRRECVFD
+#define ACE_HAS_STRBUF_T
//#define ACE_LACKS_MSYNC
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-sunos5.5.h b/ace/config-sunos5.5.h
index 55a7e368018..7d422f5c6c3 100644
--- a/ace/config-sunos5.5.h
+++ b/ace/config-sunos5.5.h
@@ -11,6 +11,8 @@
#define ACE_CONFIG_H
#include "ace/pre.h"
+#define ACE_LACKS_STDINT_H
+
// Before we do anything, we should include <sys/feature_tests.h> to
// ensure that things are set up properly.
#include <sys/feature_tests.h>
diff --git a/ace/config-win32-msvc.h b/ace/config-win32-msvc.h
index d19566f2a4a..5fe1f59384b 100644
--- a/ace/config-win32-msvc.h
+++ b/ace/config-win32-msvc.h
@@ -62,5 +62,59 @@
// if you ACE to use it.
//#define ACE_HAS_ALLOCA 1
+#define ACE_LACKS_DIRENT_H
+#define ACE_LACKS_DLFCN_H
+#define ACE_LACKS_INTTYPES_H
+#define ACE_LACKS_NETDB_H
+#define ACE_LACKS_NET_IF_H
+#define ACE_LACKS_NETINET_IN_H
+#define ACE_LACKS_STDINT_H
+#define ACE_LACKS_STROPTS_H
+#define ACE_LACKS_SYS_IOCTL_H
+#define ACE_LACKS_SYS_IPC_H
+#define ACE_LACKS_SYS_MMAN_H
+#define ACE_LACKS_SYS_RESOURCE_H
+#define ACE_LACKS_SYS_SELECT_H
+#define ACE_LACKS_SYS_SEM_H
+#define ACE_LACKS_SYS_SOCKET_H
+#define ACE_LACKS_SYS_TIME_H
+#define ACE_LACKS_SYS_UIO_H
+#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..3ac08ff048b 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"
@@ -24,7 +24,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-// Inclusion of the <aio.h> header may make visible symbols defined in
+// Inclusion of the <aio.h> header may make visible symbols defined in
// the headers <fcntl.h>, <signal.h>, <sys/types.h>, and <time.h>.
#include "ace/os_include/signal.h" // for sigevent
@@ -33,5 +33,15 @@
# include /**/ <aio.h>
#endif /* !ACE_LACKS_AIO_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..6266a760585 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,22 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
// @todo move the ACE_HTONL, etc macros here
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..e3545016410 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,19 @@
# include /**/ <assert.h>
#endif /* !ACE_LACKS_ASSERT_H */
-// @todo define assert macro if needed..
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_LACKS_ASSERT_MACRO)
+# define assert(expr)
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
#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..0f45137d55d 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"
@@ -28,5 +28,15 @@
# include /**/ <complex.h>
#endif /* !ACE_LACKS_COMPLEX_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..2a5bfe053b3 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"
@@ -28,5 +28,15 @@
# include /**/ <cpio.h>
#endif /* !ACE_LACKS_CPIO_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..e52cfac4e04 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"
@@ -28,8 +28,18 @@
# include /**/ <ctype.h>
#endif /* !ACE_LACKS_CTYPE_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
// @todo move the is* and is* emulation methods in ACE_OS here
// and let ACE_OS just call them.
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..fb1480b088e 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"
@@ -25,10 +25,25 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/sys/types.h"
+#include "ace/os_include/limits.h"
#if !defined (ACE_LACKS_DIRENT_H)
# include /**/ <dirent.h>
#endif /* !ACE_LACKS_DIRENT_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if !defined (MAXNAMLEN)
+# define MAXNAMLEN NAME_MAX
+#endif /* !MAXNAMLEN */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..9f36f0f31d6 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,75 @@
#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 (__hpux)
+# if defined(__GNUC__) || __cplusplus >= 199707L
+# include /**/ <dl.h>
+# else
+# include /**/ <cxxdl.h>
+# endif /* (g++ || HP aC++) vs. HP C++ */
+#endif /* __hpux */
+
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/* 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_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
+#elif 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)
+ typedef shl_t ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE 0
+# define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED
+#else /* !ACE_PSOS && !ACE_WIN32 && !ACE_HAS_SVR4_DYNAMIC_LINKING && !__hpux */
+ typedef void *ACE_SHLIB_HANDLE;
+# define ACE_SHLIB_INVALID_HANDLE 0
+# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
+#endif /* ACE_PSOS */
+
+#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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..6358052e816 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,134 @@
# include /**/ <errno.h>
#endif /* !ACE_LACKS_ERRNO_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 77d356f1c47..b0aeb782555 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,7 +31,59 @@
# include /**/ <fcntl.h>
#endif /* !ACE_LACKS_FCNTL_H */
-// @todo move the O_xxx definitions here...
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
#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..f4641f57de1 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"
@@ -28,5 +28,15 @@
# include /**/ <fenv.h>
#endif /* !ACE_LACKS_FENV_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..18c185298a8 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"
@@ -28,5 +28,15 @@
# include /**/ <float.h>
#endif /* !ACE_LACKS_FLOAT_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..2dec1e22c1c 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"
@@ -28,5 +28,15 @@
# include /**/ <fmtmsg.h>
#endif /* !ACE_LACKS_FMTMSG_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..4809580f6e8 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"
@@ -28,5 +28,15 @@
# include /**/ <fnmatch.h>
#endif /* !ACE_LACKS_FNMATCH_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..744781ea8be 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"
@@ -30,5 +30,15 @@
# include /**/ <ftw.h>
#endif /* !ACE_LACKS_FTW_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..6962d7de901 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"
@@ -30,5 +30,15 @@
# include /**/ <glob.h>
#endif /* !ACE_LACKS_GLOB_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..04ef45e3d19 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"
@@ -30,5 +30,15 @@
# include /**/ <grp.h>
#endif /* !ACE_LACKS_GRP_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..afabba20cf6 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"
@@ -24,11 +24,21 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/os_include/sys/types.h"
+#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_ICONV_H)
# include /**/ <iconv.h>
#endif /* !ACE_LACKS_ICONV_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..40481926845 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"
@@ -30,7 +30,17 @@
# include /**/ <inttypes.h>
#endif /* !ACE_LACKS_INTTYPES_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
// @todo if needbe, we can define the macros if they aren't available.
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..b6913ff5ef0 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"
@@ -28,5 +28,15 @@
# include /**/ <iso646.h>
#endif /* !ACE_LACKS_ISO646_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..c82bc9b7512 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"
@@ -30,5 +30,15 @@
# include /**/ <langinfo.h>
#endif /* !ACE_LACKS_LANGINFO_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..e374982d132 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"
@@ -28,5 +28,15 @@
# include /**/ <libgen.h>
#endif /* !ACE_LACKS_LIBGEN_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 b0637b318a3..6abbae3263b 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"
@@ -30,5 +30,64 @@
# include /**/ <limits.h>
#endif /* !ACE_LACKS_LIMITS_H */
+#if !defined (ACE_LACKS_PARAM_H)
+# include /**/ <sys/param.h>
+#endif /* ACE_LACKS_PARAM_H */
+
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if ! defined (howmany)
+# define howmany(x, y) (((x)+((y)-1))/(y))
+#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 (MAXNAMELEN)
+# define MAXNAMELEN NAME_MAX
+#endif /* MAXNAMELEN */
+
+#if !defined (HOST_NAME_MAX)
+# define HOST_NAME_MAX 256
+#endif /* !HOST_NAME_MAX */
+
+// 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 256.
+#if !defined (PATH_MAX)
+# if defined (_MAX_PATH)
+# define PATH_MAX _MAX_PATH
+# elif defined (MAX_PATH)
+# define PATH_MAX MAX_PATH
+# else /* !_MAX_PATH */
+# define PATH_MAX 1024
+# endif /* _MAX_PATH */
+#endif /* !PATH_MAX */
+
+// Leaving this for backward compatibility, but PATH_MAX should always be
+// used directly.
+#if !defined (MAXPATHLEN)
+# define MAXPATHLEN PATH_MAX
+#endif /* !MAXPATHLEN */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..5c70b7d9f9f 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"
@@ -30,5 +30,15 @@
# include /**/ <local.h>
#endif /* !ACE_LACKS_LOCAL_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 1e78fb79cfe..613488c11e0 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"
@@ -30,5 +30,15 @@
# include /**/ <math.h>
#endif /* !ACE_LACKS_MATH_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..e5170796375 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"
@@ -30,5 +30,15 @@
# include /**/ <monetary.h>
#endif /* !ACE_LACKS_MONETARY_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..03897875374 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"
@@ -30,5 +30,15 @@
# include /**/ <mqueue.h>
#endif /* !ACE_LACKS_MQUEUE_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..61cf684e2f1 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"
@@ -30,5 +30,15 @@
# include /**/ <ndbm.h>
#endif /* !ACE_LACKS_NDBM_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..8f622767148 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,38 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..3e982e75fe4 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"
@@ -25,10 +25,70 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/os_include/netinet/in.h"
+#include "ace/os_include/limits.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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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 */
+
+# if !defined(MAXHOSTNAMELEN)
+# define MAXHOSTNAMELEN HOST_NAME_MAX
+# endif /* MAXHOSTNAMELEN */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 3c63e7b1bcb..d177b04d92d 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"
@@ -27,9 +27,62 @@
#include "ace/os_include/inttypes.h"
#include "ace/os_include/sys/socket.h"
+#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
+# include /**/ <ws2tcpip.h>
+#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..08f4828c4d8 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,21 @@
# include /**/ <netinet/tcp.h>
#endif /* !ACE_LACKS_NETIINET_TCP_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_PSOS)
+# if ! defined (TCP_NODELAY)
+# define TCP_NODELAY 1
+# endif /* TCP_NODELAY */
+#endif /* ACE_PSOS */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..e22c76b6de0 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"
@@ -28,5 +28,15 @@
# include /**/ <nl_types.h>
#endif /* !ACE_LACKS_nl_types_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..7e2cce4c23b 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"
@@ -28,5 +28,15 @@
# include /**/ <poll.h>
#endif /* !ACE_LACKS_POLL_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 3a1c0be9d82..fe672b0d4ee 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"
@@ -26,9 +26,373 @@
#include "ace/os_include/sys/types.h"
+// This needs to go here *first* to avoid problems with AIX.
+# if defined (ACE_HAS_PTHREADS)
+# define ACE_DONT_INCLUDE_ACE_SIGNAL_H
+# include "ace/os_include/signal.h"
+# undef ACE_DONT_INCLUDE_ACE_SIGNAL_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.
+# include /**/x <dce/cma_sigwait.h>
+# endif /* HPUX_10 */
+# endif /* ACE_HAS_PTHREADS */
+
+
#if !defined (ACE_LACKS_PTHREAD_H)
-# include /**/ <pthread.h>
+ extern "C" {
+# include /**/ <pthread.h>
+ }
#endif /* !ACE_LACKS_PTHREAD_H */
+// @todo: need to reoganize to put includes at the top and the rest of the
+// code at the bottom. Also, move the classes out of this file.
+#if defined (ACE_HAS_PTHREADS)
+# define ACE_SCHED_OTHER SCHED_OTHER
+# define ACE_SCHED_FIFO SCHED_FIFO
+# define ACE_SCHED_RR SCHED_RR
+
+// Definitions for mapping POSIX pthreads draft 6 into 1003.1c names
+
+# if defined (ACE_HAS_PTHREADS_DRAFT6)
+# define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
+# define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
+# define PTHREAD_CREATE_UNDETACHED 0
+# define PTHREAD_CREATE_DETACHED 1
+# define PTHREAD_CREATE_JOINABLE 0
+# define PTHREAD_EXPLICIT_SCHED 0
+# define PTHREAD_MIN_PRIORITY 0
+# define PTHREAD_MAX_PRIORITY 126
+# endif /* ACE_HAS_PTHREADS_DRAFT6 */
+
+// Definitions for THREAD- and PROCESS-LEVEL priorities...some
+// implementations define these while others don't. In order to
+// further complicate matters, we don't redefine the default (*_DEF)
+// values if they've already been defined, which allows individual
+// programs to have their own ACE-wide "default".
+
+// PROCESS-level values
+# if defined (_POSIX_PRIORITY_SCHEDULING) && \
+ !defined(_UNICOS) && !defined(UNIXWARE_7_1)
+# define ACE_PROC_PRI_FIFO_MIN (sched_get_priority_min(SCHED_FIFO))
+# define ACE_PROC_PRI_RR_MIN (sched_get_priority_min(SCHED_RR))
+# if defined (HPUX)
+ // HP-UX's other is the SCHED_HPUX class, which uses historical
+ // values that have reverse semantics from POSIX (low value is
+ // more important priority). To use these in pthreads calls,
+ // the values need to be converted. The other scheduling classes
+ // don't need this special treatment.
+# define ACE_PROC_PRI_OTHER_MIN \
+ (sched_get_priority_min(SCHED_OTHER))
+# else
+# define ACE_PROC_PRI_OTHER_MIN (sched_get_priority_min(SCHED_OTHER))
+# endif /* HPUX */
+# else /* UNICOS is missing a sched_get_priority_min() implementation,
+ SCO too */
+# define ACE_PROC_PRI_FIFO_MIN 0
+# define ACE_PROC_PRI_RR_MIN 0
+# define ACE_PROC_PRI_OTHER_MIN 0
+# endif
+
+# if defined (_POSIX_PRIORITY_SCHEDULING) && !defined(UNIXWARE_7_1)
+# define ACE_PROC_PRI_FIFO_MAX (sched_get_priority_max(SCHED_FIFO))
+# define ACE_PROC_PRI_RR_MAX (sched_get_priority_max(SCHED_RR))
+# if defined (HPUX)
+# define ACE_PROC_PRI_OTHER_MAX \
+ (sched_get_priority_max(SCHED_OTHER))
+# else
+# define ACE_PROC_PRI_OTHER_MAX (sched_get_priority_max(SCHED_OTHER))
+# endif /* HPUX */
+# else /* SCO missing sched_get_priority_max() implementation */
+# define ACE_PROC_PRI_FIFO_MAX 59
+# define ACE_PROC_PRI_RR_MAX 59
+# define ACE_PROC_PRI_OTHER_MAX 59
+# endif
+
+# if !defined(ACE_PROC_PRI_FIFO_DEF)
+# define ACE_PROC_PRI_FIFO_DEF (ACE_PROC_PRI_FIFO_MIN + (ACE_PROC_PRI_FIFO_MAX - ACE_PROC_PRI_FIFO_MIN)/2)
+# endif
+# if !defined(ACE_PROC_PRI_RR_DEF)
+# define ACE_PROC_PRI_RR_DEF (ACE_PROC_PRI_RR_MIN + (ACE_PROC_PRI_RR_MAX - ACE_PROC_PRI_RR_MIN)/2)
+# endif
+# if !defined(ACE_PROC_PRI_OTHER_DEF)
+# define ACE_PROC_PRI_OTHER_DEF (ACE_PROC_PRI_OTHER_MIN + (ACE_PROC_PRI_OTHER_MAX - ACE_PROC_PRI_OTHER_MIN)/2)
+# endif
+
+// THREAD-level values
+# if defined(PRI_FIFO_MIN) && defined(PRI_FIFO_MAX) && defined(PRI_RR_MIN) && defined(PRI_RR_MAX) && defined(PRI_OTHER_MIN) && defined(PRI_OTHER_MAX)
+# if !defined (ACE_THR_PRI_FIFO_MIN)
+# define ACE_THR_PRI_FIFO_MIN (long) PRI_FIFO_MIN
+# endif /* !ACE_THR_PRI_FIFO_MIN */
+# if !defined (ACE_THR_PRI_FIFO_MAX)
+# define ACE_THR_PRI_FIFO_MAX (long) PRI_FIFO_MAX
+# endif /* !ACE_THR_PRI_FIFO_MAX */
+# if !defined (ACE_THR_PRI_RR_MIN)
+# define ACE_THR_PRI_RR_MIN (long) PRI_RR_MIN
+# endif /* !ACE_THR_PRI_RR_MIN */
+# if !defined (ACE_THR_PRI_RR_MAX)
+# define ACE_THR_PRI_RR_MAX (long) PRI_RR_MAX
+# endif /* !ACE_THR_PRI_RR_MAX */
+# if !defined (ACE_THR_PRI_OTHER_MIN)
+# define ACE_THR_PRI_OTHER_MIN (long) PRI_OTHER_MIN
+# endif /* !ACE_THR_PRI_OTHER_MIN */
+# if !defined (ACE_THR_PRI_OTHER_MAX)
+# define ACE_THR_PRI_OTHER_MAX (long) PRI_OTHER_MAX
+# endif /* !ACE_THR_PRI_OTHER_MAX */
+# elif defined (AIX)
+ // AIX's priority range is 1 (low) to 127 (high). There aren't
+ // any preprocessor macros I can find. PRIORITY_MIN is for
+ // process priorities, as far as I can see, and does not apply
+ // to thread priority. The 1 to 127 range is from the
+ // pthread_attr_setschedparam man page (Steve Huston, 18-May-2001).
+# if !defined (ACE_THR_PRI_FIFO_MIN)
+# define ACE_THR_PRI_FIFO_MIN (long) 1
+# endif /* !ACE_THR_PRI_FIFO_MIN */
+# if !defined (ACE_THR_PRI_FIFO_MAX)
+# define ACE_THR_PRI_FIFO_MAX (long) 127
+# endif /* !ACE_THR_PRI_FIFO_MAX */
+# if !defined (ACE_THR_PRI_RR_MIN)
+# define ACE_THR_PRI_RR_MIN (long) 1
+# endif /* !ACE_THR_PRI_RR_MIN */
+# if !defined (ACE_THR_PRI_RR_MAX)
+# define ACE_THR_PRI_RR_MAX (long) 127
+# endif /* !ACE_THR_PRI_RR_MAX */
+# if !defined (ACE_THR_PRI_OTHER_MIN)
+# define ACE_THR_PRI_OTHER_MIN (long) 1
+# endif /* !ACE_THR_PRI_OTHER_MIN */
+# if !defined (ACE_THR_PRI_OTHER_MAX)
+# define ACE_THR_PRI_OTHER_MAX (long) 127
+# endif /* !ACE_THR_PRI_OTHER_MAX */
+# elif defined (sun)
+# if !defined (ACE_THR_PRI_FIFO_MIN)
+# define ACE_THR_PRI_FIFO_MIN (long) 0
+# endif /* !ACE_THR_PRI_FIFO_MIN */
+# if !defined (ACE_THR_PRI_FIFO_MAX)
+# define ACE_THR_PRI_FIFO_MAX (long) 59
+# endif /* !ACE_THR_PRI_FIFO_MAX */
+# if !defined (ACE_THR_PRI_RR_MIN)
+# define ACE_THR_PRI_RR_MIN (long) 0
+# endif /* !ACE_THR_PRI_RR_MIN */
+# if !defined (ACE_THR_PRI_RR_MAX)
+# define ACE_THR_PRI_RR_MAX (long) 59
+# endif /* !ACE_THR_PRI_RR_MAX */
+# if !defined (ACE_THR_PRI_OTHER_MIN)
+# define ACE_THR_PRI_OTHER_MIN (long) 0
+# endif /* !ACE_THR_PRI_OTHER_MIN */
+# if !defined (ACE_THR_PRI_OTHER_MAX)
+# define ACE_THR_PRI_OTHER_MAX (long) 127
+# endif /* !ACE_THR_PRI_OTHER_MAX */
+# else
+# if !defined (ACE_THR_PRI_FIFO_MIN)
+# define ACE_THR_PRI_FIFO_MIN (long) ACE_PROC_PRI_FIFO_MIN
+# endif /* !ACE_THR_PRI_FIFO_MIN */
+# if !defined (ACE_THR_PRI_FIFO_MAX)
+# define ACE_THR_PRI_FIFO_MAX (long) ACE_PROC_PRI_FIFO_MAX
+# endif /* !ACE_THR_PRI_FIFO_MAX */
+# if !defined (ACE_THR_PRI_RR_MIN)
+# define ACE_THR_PRI_RR_MIN (long) ACE_PROC_PRI_RR_MIN
+# endif /* !ACE_THR_PRI_RR_MIN */
+# if !defined (ACE_THR_PRI_RR_MAX)
+# define ACE_THR_PRI_RR_MAX (long) ACE_PROC_PRI_RR_MAX
+# endif /* !ACE_THR_PRI_RR_MAX */
+# if !defined (ACE_THR_PRI_OTHER_MIN)
+# define ACE_THR_PRI_OTHER_MIN (long) ACE_PROC_PRI_OTHER_MIN
+# endif /* !ACE_THR_PRI_OTHER_MIN */
+# if !defined (ACE_THR_PRI_OTHER_MAX)
+# define ACE_THR_PRI_OTHER_MAX (long) ACE_PROC_PRI_OTHER_MAX
+# endif /* !ACE_THR_PRI_OTHER_MAX */
+# endif
+# if !defined(ACE_THR_PRI_FIFO_DEF)
+# define ACE_THR_PRI_FIFO_DEF ((ACE_THR_PRI_FIFO_MIN + ACE_THR_PRI_FIFO_MAX)/2)
+# endif
+# if !defined(ACE_THR_PRI_RR_DEF)
+# define ACE_THR_PRI_RR_DEF ((ACE_THR_PRI_RR_MIN + ACE_THR_PRI_RR_MAX)/2)
+# endif
+# if !defined(ACE_THR_PRI_OTHER_DEF)
+# define ACE_THR_PRI_OTHER_DEF ((ACE_THR_PRI_OTHER_MIN + ACE_THR_PRI_OTHER_MAX)/2)
+# endif
+ // Typedefs to help compatibility with Windows NT and Pthreads.
+ typedef pthread_t ACE_hthread_t;
+ typedef pthread_t ACE_thread_t;
+
+# if defined (ACE_HAS_TSS_EMULATION)
+ typedef pthread_key_t ACE_OS_thread_key_t;
+ typedef u_long ACE_thread_key_t;
+# else /* ! ACE_HAS_TSS_EMULATION */
+ typedef pthread_key_t ACE_thread_key_t;
+# endif /* ! ACE_HAS_TSS_EMULATION */
+
+# if !defined (ACE_LACKS_COND_T)
+ typedef pthread_mutex_t ACE_mutex_t;
+ typedef pthread_cond_t ACE_cond_t;
+ typedef pthread_condattr_t ACE_condattr_t;
+ typedef pthread_mutexattr_t ACE_mutexattr_t;
+# endif /* ! ACE_LACKS_COND_T */
+ typedef pthread_mutex_t ACE_thread_mutex_t;
+
+# if !defined (PTHREAD_CANCEL_DISABLE)
+# define PTHREAD_CANCEL_DISABLE 0
+# endif /* PTHREAD_CANCEL_DISABLE */
+
+# if !defined (PTHREAD_CANCEL_ENABLE)
+# define PTHREAD_CANCEL_ENABLE 0
+# endif /* PTHREAD_CANCEL_ENABLE */
+
+# if !defined (PTHREAD_CANCEL_DEFERRED)
+# define PTHREAD_CANCEL_DEFERRED 0
+# endif /* PTHREAD_CANCEL_DEFERRED */
+
+# if !defined (PTHREAD_CANCEL_ASYNCHRONOUS)
+# define PTHREAD_CANCEL_ASYNCHRONOUS 0
+# endif /* PTHREAD_CANCEL_ASYNCHRONOUS */
+
+# define THR_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
+# define THR_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
+# define THR_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
+# define THR_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
+
+# if !defined (PTHREAD_CREATE_JOINABLE)
+# if defined (PTHREAD_CREATE_UNDETACHED)
+# define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED
+# else
+# define PTHREAD_CREATE_JOINABLE 0
+# endif /* PTHREAD_CREATE_UNDETACHED */
+# endif /* PTHREAD_CREATE_JOINABLE */
+
+# if !defined (PTHREAD_CREATE_DETACHED)
+# define PTHREAD_CREATE_DETACHED 1
+# endif /* PTHREAD_CREATE_DETACHED */
+
+# if !defined (PTHREAD_PROCESS_PRIVATE) && !defined (ACE_HAS_PTHREAD_PROCESS_ENUM)
+# if defined (PTHREAD_MUTEXTYPE_FAST)
+# define PTHREAD_PROCESS_PRIVATE PTHREAD_MUTEXTYPE_FAST
+# else
+# define PTHREAD_PROCESS_PRIVATE 0
+# endif /* PTHREAD_MUTEXTYPE_FAST */
+# endif /* PTHREAD_PROCESS_PRIVATE */
+
+# if !defined (PTHREAD_PROCESS_SHARED) && !defined (ACE_HAS_PTHREAD_PROCESS_ENUM)
+# if defined (PTHREAD_MUTEXTYPE_FAST)
+# define PTHREAD_PROCESS_SHARED PTHREAD_MUTEXTYPE_FAST
+# else
+# define PTHREAD_PROCESS_SHARED 1
+# endif /* PTHREAD_MUTEXTYPE_FAST */
+# endif /* PTHREAD_PROCESS_SHARED */
+
+# if defined (ACE_HAS_PTHREADS_DRAFT4)
+# if defined (PTHREAD_PROCESS_PRIVATE)
+# if !defined (USYNC_THREAD)
+# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE
+# endif /* ! USYNC_THREAD */
+# else
+# if !defined (USYNC_THREAD)
+# define USYNC_THREAD MUTEX_NONRECURSIVE_NP
+# endif /* ! USYNC_THREAD */
+# endif /* PTHREAD_PROCESS_PRIVATE */
+
+# if defined (PTHREAD_PROCESS_SHARED)
+# if !defined (USYNC_PROCESS)
+# define USYNC_PROCESS PTHREAD_PROCESS_SHARED
+# endif /* ! USYNC_PROCESS */
+# else
+# if !defined (USYNC_PROCESS)
+# define USYNC_PROCESS MUTEX_NONRECURSIVE_NP
+# endif /* ! USYNC_PROCESS */
+# endif /* PTHREAD_PROCESS_SHARED */
+# elif !defined (ACE_HAS_STHREADS)
+# if !defined (USYNC_THREAD)
+# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE
+# endif /* ! USYNC_THREAD */
+# if !defined (USYNC_PROCESS)
+# define USYNC_PROCESS PTHREAD_PROCESS_SHARED
+# endif /* ! USYNC_PROCESS */
+# endif /* ACE_HAS_PTHREADS_DRAFT4 */
+
+ /* MM-Graz: prevent warnings */
+# undef THR_BOUND
+# undef THR_NEW_LWP
+# undef THR_DETACHED
+# undef THR_SUSPENDED
+# undef THR_DAEMON
+
+# define THR_BOUND 0x00000001
+# if defined (CHORUS)
+# define THR_NEW_LWP 0x00000000
+# else
+# define THR_NEW_LWP 0x00000002
+# endif /* CHORUS */
+# define THR_DETACHED 0x00000040
+# define THR_SUSPENDED 0x00000080
+# define THR_DAEMON 0x00000100
+# define THR_JOINABLE 0x00010000
+# define THR_SCHED_FIFO 0x00020000
+# define THR_SCHED_RR 0x00040000
+# define THR_SCHED_DEFAULT 0x00080000
+
+# if defined (ACE_HAS_IRIX62_THREADS)
+# define THR_SCOPE_SYSTEM 0x00100000
+# else
+# define THR_SCOPE_SYSTEM THR_BOUND
+# endif /*ACE_HAS_IRIX62_THREADS*/
+
+# define THR_SCOPE_PROCESS 0x00200000
+# define THR_INHERIT_SCHED 0x00400000
+# define THR_EXPLICIT_SCHED 0x00800000
+# define THR_SCHED_IO 0x01000000
+
+# if !defined (ACE_HAS_STHREADS)
+# if !defined (ACE_HAS_POSIX_SEM)
+/**
+ * @class ACE_sema_t
+ *
+ * @brief This is used to implement semaphores for platforms that support
+ * POSIX pthreads, but do *not* support POSIX semaphores, i.e.,
+ * it's a different type than the POSIX <sem_t>.
+ */
+class ACE_OS_Export ACE_sema_t
+{
+friend class ACE_OS;
+protected:
+ /// Serialize access to internal state.
+ ACE_mutex_t lock_;
+
+ /// Block until there are no waiters.
+ ACE_cond_t count_nonzero_;
+
+ /// Count of the semaphore.
+ u_long count_;
+
+ /// Number of threads that have called <ACE_OS::sema_wait>.
+ u_long waiters_;
+};
+# endif /* !ACE_HAS_POSIX_SEM */
+
+# if defined (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD)
+ // If we are on Solaris we can just reuse the existing
+ // implementations of these synchronization types.
+# if !defined (ACE_LACKS_RWLOCK_T)
+# include /**/ <synch.h>
+ typedef rwlock_t ACE_rwlock_t;
+# endif /* !ACE_LACKS_RWLOCK_T */
+# include /**/ <thread.h>
+# endif /* (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD) */
+
+# else
+# if !defined (ACE_HAS_POSIX_SEM)
+ typedef sema_t ACE_sema_t;
+# endif /* !ACE_HAS_POSIX_SEM */
+# endif /* !ACE_HAS_STHREADS */
+
+# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
+ typedef pthread_rwlock_t ACE_rwlock_t;
+# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
+
+#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..f81e1b4e206 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"
@@ -30,5 +30,15 @@
# include /**/ <pwd.h>
#endif /* !ACE_LACKS_PWD_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..43c3b3534fb 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"
@@ -30,5 +30,15 @@
# include /**/ <regex.h>
#endif /* !ACE_LACKS_REGEX_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..c772d248a0e 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"
@@ -30,5 +30,15 @@
# include /**/ <sched.h>
#endif /* !ACE_LACKS_SCHED_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..2f99c80d56d 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"
@@ -30,5 +30,15 @@
# include /**/ <search.h>
#endif /* !ACE_LACKS_SEARCH_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 b339693d660..d7a3d8751ee 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"
@@ -30,5 +30,40 @@
# include /**/ <semaphore.h>
#endif /* !ACE_LACKS_SEMAPHORE_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_HAS_POSIX_SEM)
+# if !defined (SEM_FAILED) && !defined (ACE_LACKS_NAMED_POSIX_SEM)
+# define SEM_FAILED ((sem_t *) -1)
+# endif /* !SEM_FAILED */
+
+ typedef struct
+ {
+ /// Pointer to semaphore handle. This is allocated by ACE if we are
+ /// working with an unnamed POSIX semaphore or by the OS if we are
+ /// working with a named POSIX semaphore.
+ sem_t *sema_;
+
+ /// Name of the semaphore (if this is non-NULL then this is a named
+ /// POSIX semaphore, else its an unnamed POSIX semaphore).
+ char *name_;
+
+# if defined (ACE_LACKS_NAMED_POSIX_SEM)
+ /// this->sema_ doesn't always get created dynamically if a platform
+ /// doesn't support named posix semaphores. We use this flag to
+ /// remember if we need to delete <sema_> or not.
+ int new_sema_;
+# endif /* ACE_LACKS_NAMED_POSIX_SEM */
+ } ACE_sema_t;
+#endif /* ACE_HAS_POSIX_SEM */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..2a94fa8c3ce 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"
@@ -28,5 +28,15 @@
# include /**/ <setjmp.h>
#endif /* !ACE_LACKS_SETJMP_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 b112b7985e3..7bf849d0dcc 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"
@@ -29,8 +29,218 @@
#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 */
+// This must come after signal.h is #included.
+#if defined (SCO)
+# define SIGIO SIGPOLL
+# include /**/ <sys/regset.h>
+#endif /* SCO */
+
+#if defined (ACE_HAS_SIGINFO_T)
+# if !defined (ACE_LACKS_SIGINFO_H)
+# if defined (__QNX__) || defined (__OpenBSD__)
+# include /**/ <sys/siginfo.h>
+# else /* __QNX__ || __OpenBSD__ */
+# include /**/ <siginfo.h>
+# endif /* __QNX__ || __OpenBSD__ */
+# endif /* ACE_LACKS_SIGINFO_H */
+#endif /* ACE_HAS_SIGINFO_T */
+
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_SIGINFO_IS_SIGINFO_T)
+ typedef struct siginfo siginfo_t;
+#endif /* ACE_LACKS_SIGINFO_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
+# undef sigaddset
+# undef sigdelset
+# undef sigismember
+#endif /* ACE_HAS_SIG_MACROS */
+
+// This must come after signal.h is #included. It's to counteract
+// the sigemptyset and sigfillset #defines, which only happen
+// when __OPTIMIZE__ is #defined (really!) on Linux.
+#if defined (linux) && defined (__OPTIMIZE__)
+# undef sigemptyset
+# undef sigfillset
+#endif /* linux && __OPTIMIZE__ */
+
+#if !defined (ACE_HAS_SIG_ATOMIC_T)
+ typedef int sig_atomic_t;
+#endif /* !ACE_HAS_SIG_ATOMIC_T */
+
+#if !defined (SIGHUP)
+# define SIGHUP 0
+#endif /* SIGHUP */
+
+#if !defined (SIGINT)
+# define SIGINT 0
+#endif /* SIGINT */
+
+#if !defined (SIGSEGV)
+# define SIGSEGV 0
+#endif /* SIGSEGV */
+
+#if !defined (SIGIO)
+# define SIGIO 0
+#endif /* SIGSEGV */
+
+#if !defined (SIGUSR1)
+# define SIGUSR1 0
+#endif /* SIGUSR1 */
+
+#if !defined (SIGUSR2)
+# define SIGUSR2 0
+#endif /* SIGUSR2 */
+
+#if !defined (SIGCHLD)
+# define SIGCHLD 0
+#endif /* SIGCHLD */
+
+#if !defined (SIGCLD)
+# define SIGCLD SIGCHLD
+#endif /* SIGCLD */
+
+#if !defined (SIGQUIT)
+# define SIGQUIT 0
+#endif /* SIGQUIT */
+
+#if !defined (SIGPIPE)
+# define SIGPIPE 0
+#endif /* SIGPIPE */
+
+#if !defined (SIGALRM)
+# define SIGALRM 0
+#endif /* SIGALRM */
+
+#if !defined (SIG_DFL)
+# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
+# define SIG_DFL ((void *) 0)
+# else
+# define SIG_DFL ((__sighandler_t) 0)
+# endif
+#endif /* SIG_DFL */
+
+#if !defined (SIG_IGN)
+# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
+# define SIG_IGN ((void *) 1) /* ignore signal */
+# else
+# define SIG_IGN ((__sighandler_t) 1) /* ignore signal */
+# endif
+#endif /* SIG_IGN */
+
+#if !defined (SIG_ERR)
+# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
+# define SIG_ERR ((void *) -1) /* error return from signal */
+# else
+# define SIG_ERR ((__sighandler_t) -1) /* error return from signal */
+# endif
+#endif /* SIG_ERR */
+
+// These are used by the <ACE_IPC_SAP::enable> and
+// <ACE_IPC_SAP::disable> methods. They must be unique and cannot
+// conflict with the value of <ACE_NONBLOCK>. We make the numbers
+// negative here so they won't conflict with other values like SIGIO,
+// etc.
+# define ACE_SIGIO -1
+# define ACE_SIGURG -2
+# define ACE_CLOEXEC -3
+
+#if defined (ACE_PSOS)
+# if !defined (ACE_PSOSIM)
+ 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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..5de1490d57b 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"
@@ -32,5 +32,15 @@
# include /**/ <spawn.h>
#endif /* !ACE_LACKS_SPAWN_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..9d4eb0b212f 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"
@@ -28,5 +28,15 @@
# include /**/ <stdarg.h>
#endif /* !ACE_LACKS_STDARG_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..f81d384cb4a 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"
@@ -28,5 +28,15 @@
# include /**/ <stdbool.h>
#endif /* !ACE_LACKS_STDBOOL_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 4f736e35d1e..1c83a7f5886 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"
@@ -28,67 +28,82 @@
// @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 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 */
#endif /* ACE_HAS_WINCE && _WIN32_WCE < 400 */
#if !defined (ACE_LACKS_STDDEF_H)
-# include /**/ <stddef.h>
+# include /**/ <stddef.h>
#endif /* !ACE_LACKS_STDDEF_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
// 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 */
/*
- Integer constant expression of type size_t, the value of which is the offset
- in bytes to the structure member (member-designator), from the beginning of
+ Integer constant expression of type size_t, the value of which is the offset
+ in bytes to the structure member (member-designator), from the beginning of
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 */
/*
- Integer type whose range of values can represent distinct wide-character
- codes for all members of the largest character set specified among the
- locales supported by the compilation environment: the null character has
- the code value 0 and each member of the portable character set has a code
- value equal to its value when used as the lone character in an integer
+ Integer type whose range of values can represent distinct wide-character
+ codes for all members of the largest character set specified among the
+ locales supported by the compilation environment: the null character has
+ the code value 0 and each member of the portable character set has a code
+ value equal to its value when used as the lone character in an integer
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;
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 a3f95240e93..85e073ac024 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,87 +25,140 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_STDINT_H)
-# include /**/ <stdint.h>
+# include /**/ <stdint.h>
#endif /* !ACE_LACKS_STDINT_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+// BSD style types
+#if defined (ACE_LACKS_SYS_TYPES_H) \
+ || (defined (__GLIBC__) && !defined (_BSD_SOURCE))
+# if ! defined (ACE_PSOS)
+ typedef unsigned char u_char;
+ typedef unsigned short u_short;
+ typedef unsigned int u_int;
+ typedef unsigned long u_long;
+
+ typedef unsigned char uchar_t;
+ typedef unsigned short ushort_t;
+ typedef unsigned int uint_t;
+ typedef unsigned long ulong_t;
+# 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
// 64 bit will be a problem, but stub it out for now
/*
-If an implementation provides integer types with width 64 that meet
+If an implementation provides integer types with width 64 that meet
these requirements, then the following types are required: int64_t uint64_t
In particular, this will be the case if any of the following are true:
-The implementation supports the _POSIX_V6_ILP32_OFFBIG programming
-environment and the application is being built in the
-_POSIX_V6_ILP32_OFFBIG programming environment (see the Shell and
+The implementation supports the _POSIX_V6_ILP32_OFFBIG programming
+environment and the application is being built in the
+_POSIX_V6_ILP32_OFFBIG programming environment (see the Shell and
Utilities volume of IEEE Std 1003.1-2001, c99, Programming Environments).
-The implementation supports the _POSIX_V6_LP64_OFF64 programming
-environment and the application is being built in the
+The implementation supports the _POSIX_V6_LP64_OFF64 programming
+environment and the application is being built in the
_POSIX_V6_LP64_OFF64 programming environment.
-The implementation supports the _POSIX_V6_LPBIG_OFFBIG programming
-environment and the application is being built in the
+The implementation supports the _POSIX_V6_LPBIG_OFFBIG programming
+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
@@ -114,5 +167,9 @@ typedef ACE_UINT64_T_TYPE int64_t;
// @todo perhaps add macros
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 0920d985eec..25034a99eb8 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"
@@ -24,12 +24,72 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+// NOTE: stdarg.h must be #included before stdio.h on LynxOS.
#include "ace/os_include/stdarg.h"
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_STDIO_H)
-# include /**/ <stdio.h>
+# include /**/ <stdio.h>
#endif /* !ACE_LACKS_STDIO_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if !defined (ACE_WIN32) && !defined (INTEGRITY)
+# 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 (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
+// WIN32.
+# if defined (ACE_HAS_WINCE)
+# define ACE_STDIN _fileno (stdin)
+# define ACE_STDOUT _fileno (stdout)
+# define ACE_STDERR _fileno (stderr)
+# else
+# define ACE_STDIN GetStdHandle (STD_INPUT_HANDLE)
+# define ACE_STDOUT GetStdHandle (STD_OUTPUT_HANDLE)
+# define ACE_STDERR GetStdHandle (STD_ERROR_HANDLE)
+# endif // ACE_HAS_WINCE
+// The following are #defines and #includes that are specific to UNIX.
+#else /* !ACE_WIN32 */
+# define ACE_STDIN 0
+# define ACE_STDOUT 1
+# define ACE_STDERR 2
+#endif /* ACE_WIN32 */
+
+#if defined (ACE_PSOS_SNARFS_HEADER_INFO)
+ // Header information snarfed from compiler provided header files
+ // that are not included because there is already an identically
+ // named file provided with pSOS, which does not have this info
+ // from compiler supplied stdio.h
+ FILE *fdopen(int, const char *);
+ char *tempnam(const char *, const char *);
+ int fileno(FILE *);
+#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 220f3ac8c91..270222a4d61 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,9 +27,45 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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;
+ 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
+ // 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
+ int putenv (char *); // stdlib.h
+#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 baed3f80654..3f64068897b 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,8 +27,41 @@
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_STRING_H)
-# include /**/ <string.h>
+# include /**/ <string.h>
#endif /* !ACE_LACKS_STRING_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_LACKS_STRTOK_R_PROTOTYPE) && !defined (_POSIX_SOURCE)
+ char *strtok_r (char *s, const char *delim, char **save_ptr);
+#endif /* ACE_LACKS_STRTOK_R_PROTOTYPE */
+
+#if defined (__BORLANDC__)
+# define _stricmp stricmp
+# define _strnicmp strnicmp
+#endif /* __BORLANDC__ */
+
+#if defined (ACE_HAS_CHARPTR_SPRINTF)
+# define ACE_SPRINTF_ADAPTER(X) ::strlen (X)
+#else
+# define ACE_SPRINTF_ADAPTER(X) X
+#endif /* ACE_HAS_CHARPTR_SPRINTF */
+
+#if defined (ACE_PSOS_SNARFS_HEADER_INFO)
+ // Header information snarfed from compiler provided header files
+ // 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
+ char *strdup (const char *); // string.h
+#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..55e841ed3db 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,18 @@
#include "ace/os_include/stddef.h"
#if !defined (ACE_LACKS_STRINGS_H)
-# include /**/ <strings.h>
+# include /**/ <strings.h>
#endif /* !ACE_LACKS_STRINGS_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 55f47a6d264..5bbc0111eb9 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"
@@ -26,9 +26,47 @@
#include "ace/os_include/unistd.h"
+#if defined (ACE_HAS_TIMOD_H)
+# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
+# define queue _Queue_
+# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
+# include /**/ <sys/timod.h>
+# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
+# undef queue
+# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
+#elif defined (ACE_HAS_OSF_TIMOD_H)
+# include /**/ <tli/timod.h>
+#endif /* ACE_HAS_TIMOD_H */
+
+#if !defined (ACE_LACKS_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_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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_LACKS_STRRECVFD)
+ struct strrecvfd {};
+#endif /* ACE_LACKS_STRRECVFD */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..14ed615c010 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,48 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 8bed6554ec9..886de74b0ab 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,9 +26,63 @@
#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 */
+#endif /* ACE_LACKS_SYS_MMAN_H */
+
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_LACKS_SYS_MMAN_H)
+# 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
+#elif defined (ACE_WIN32)
+ // These two may be used for internal flags soon:
+# define MAP_PRIVATE 1
+# define MAP_SHARED 2
+# define MAP_FIXED 4
+ // MMAP flags
+# define PROT_READ PAGE_READONLY
+# define PROT_WRITE PAGE_READWRITE
+# define PROT_RDWR PAGE_READWRITE
+/* If we can find suitable use for these flags, here they are:
+PAGE_WRITECOPY
+PAGE_EXECUTE
+PAGE_EXECUTE_READ
+PAGE_EXECUTE_READWRITE
+PAGE_EXECUTE_WRITECOPY
+PAGE_GUARD
+PAGE_NOACCESS
+PAGE_NOCACHE */
#endif /* !ACE_LACKS_SYS_MMAN_H */
+#if !defined (PROT_RDWR)
+# define PROT_RDWR (PROT_READ|PROT_WRITE)
+#endif /* PROT_RDWR */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 d22da2a939b..28ca9fe93c6 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"
@@ -27,8 +27,40 @@
#include "ace/os_include/sys/ipc.h"
#if !defined (ACE_LACKS_SYS_MSG_H)
-# include /**/ <sys/msg.h>
+// OSF1 has problems with sys/msg.h and C++...
+# if defined (ACE_HAS_BROKEN_MSG_H)
+# define _KERNEL
+# endif /* ACE_HAS_BROKEN_MSG_H */
+# include /**/ <sys/msg.h>
+# if defined (ACE_HAS_BROKEN_MSG_H)
+# undef _KERNEL
+# endif /* ACE_HAS_BROKEN_MSG_H */
#endif /* !ACE_LACKS_SYS_MSG_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_LACKS_MSGBUF_T)
+ struct msgbuf {};
+#endif /* ACE_LACKS_MSGBUF_T */
+
+#if defined (ACE_LACKS_SYSV_MSQ_PROTOS)
+ 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 {};
+#endif /* ACE_WIN32 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 b9d29f5f6f2..d6060869588 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,8 +28,35 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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;
+ };
+#endif /* ACE_WIN32 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 dfae076e26b..59175799311 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,8 +28,29 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_WIN32)
+ // 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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 90525d91e2f..4e9a0290bdc 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,8 +27,44 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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)) */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 4363eb27dee..335db70b7a9 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,8 +27,22 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_WIN32)
+ struct shmaddr {};
+#endif /* ACE_WIN32 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 add8658dd79..09ac706062a 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,9 +26,126 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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_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 (ACE_WIN32)
+ struct msghdr
+ {
+ /// Optional address
+ sockaddr * msg_name;
+
+ /// Size of address
+ int msg_namelen;
+
+ /// Scatter/gather array
+ iovec *msg_iov;
+
+ /// # elements in msg_iov
+ int msg_iovlen;
+
+ /// Access rights sent/received
+ caddr_t msg_accrights;
+
+ int msg_accrightslen;
+ };
+#endif /* ACE_WIN32 */
+
+#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
+ // Control message size to pass a file descriptor.
+# define ACE_BSD_CONTROL_MSG_LEN sizeof (struct cmsghdr) + sizeof (ACE_HANDLE)
+# if defined (ACE_LACKS_CMSG_DATA_MACRO)
+# if defined (ACE_LACKS_CMSG_DATA_MEMBER)
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+# else
+# define CMSG_DATA(cmsg) ((cmsg)->cmsg_data)
+# endif /* ACE_LACKS_CMSG_DATA_MEMBER */
+# 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 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 f25b15802e2..6fef6479509 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
+ * 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"
@@ -26,9 +26,109 @@
#include "ace/os_include/sys/types.h"
+#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+# 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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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. */
+
+// 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)
+ struct stat
+ {
+ /// always 0 on Windows platforms
+ dev_t st_dev;
+
+ /// always 0 on Windows platforms
+ dev_t st_rdev;
+
+ /// file attribute
+ unsigned short st_mode;
+
+ /// number of hard links
+ short st_nlink;
+
+ /// time of last access
+ ACE_Time_Value st_atime;
+
+ /// time of last data modification
+ ACE_Time_Value st_mtime;
+
+ /// time of creation
+ ACE_Time_Value st_ctime;
+
+ /// 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
+ };
+#endif /* ACE_HAS_WINCE */
+
+#if defined (__BORLANDC__)
+# if (__BORLANDC__ <= 0x540)
+# define _stat stat
+# endif
+# define _umask umask
+# define _fstat fstat
+#endif /* __BORLANDC__ */
+
+#if defined (ACE_PSOS_SNARFS_HEADER_INFO)
+ // Header information snarfed from compiler provided header files
+ // 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
+ mode_t umask (mode_t);
+ int mkfifo (const char *, mode_t);
+ int mkdir (const char *, mode_t);
+#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..6e69b78e0aa 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,18 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..0cb5b71c98d 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,18 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 363bd418f2a..82047418b74 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,8 +27,23 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (__BORLANDC__)
+# define _ftime ftime
+# define _timeb timeb
+#endif /* __BORLANDC__ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..7ee71ae06da 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,18 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 5045005ef88..959d5638f7b 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,8 +27,94 @@
#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 */
+#if defined (ACE_HAS_WINCE)
+# include /**/ <types.h>
+#endif /* ACE_HAS_WINCE */
+
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+// 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_WINCE)
+
+// CE's add-on for c-style fstat/stat functionalities. This struct is
+// by no mean complete compared to what you usually find in UNIX
+// platforms. Only members that have direct conversion using Win32's
+// BY_HANDLE_FILE_INFORMATION are defined so that users can discover
+// non-supported members at compile time. Time values are of type
+// ACE_Time_Value for easy comparison.
+
+// Since CE does not have _stat by default as NT/2000 does, the 'stat'
+// struct defined here will be used. Also note that CE file system
+// struct is only for the CE 3.0 or later.
+// Refer to the WCHAR.H from Visual C++ and WIBASE.H from eVC 3.0.
+
+ typedef unsigned int dev_t;
+#endif /* ACE_HAS_WINCE */
+
+/* This should work for linux, solaris 5.6 and above, IRIX, OSF */
+#if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
+# if ACE_SIZEOF_LONG == 8
+ typedef off_t ACE_LOFF_T;
+# elif defined (__sgi) || defined (AIX) || defined (HPUX) \
+ || defined (__QNX__)
+ typedef off64_t ACE_LOFF_T;
+# elif defined (__sun)
+ typedef offset_t ACE_LOFF_T;
+# elif defined (WIN32) //Add by Nick Lin -- for win32 llseek
+ typedef __int64 ACE_LOFF_T; //Add by Nick Lin -- for win32 llseek
+# else
+ typedef loff_t ACE_LOFF_T;
+# endif
+#endif /* ACE_HAS_LLSEEK || ACE_HAS_LSEEK64 */
+
+#if defined (ACE_WIN32)
+# if !defined (__BORLANDC__)
+ typedef DWORD nlink_t;
+# if !defined(__MINGW32__)
+ typedef u_short mode_t;
+# endif /* !__MINGW32__ */
+ typedef long uid_t;
+ typedef long gid_t;
+# endif /* __BORLANDC__ */
+ typedef char *caddr_t;
+#endif /* ACE_WIN32 */
+
+#if defined (ACE_PSOS_TM)
+ typedef long long longlong_t;
+ typedef long id_t;
+#endif /* ACE_PSOS_TM */
+
+#if defined (ACE_LACKS_KEY_T)
+# if defined (ACE_WIN32)
+ // Win32 doesn't use numeric values to name its semaphores, it uses
+ // strings!
+ typedef char *key_t;
+# else
+ typedef int key_t;
+# endif /* ACE_WIN32 */
+#endif /* ACE_LACKS_KEY_T */
+
+#if defined (ACE_WIN32) && !defined(__MINGW32__)
+ typedef long pid_t;
+#endif /* ACE_WIN32 && !__MINGW32__ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 d3fbd8ec31e..3da3a83a6a7 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,8 +27,67 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+// todo: make this a regular ACE_LACKS macro test...
+#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;
+
+ // 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_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)
+# define IOV_MAX 16
+#endif /* IOV_MAX */
+
+#if !defined (ACE_IOV_MAX)
+# define ACE_IOV_MAX IOV_MAX
+#endif /* ACE_IOV_MAX */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..19752663721 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,18 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..90a38a03ee5 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,18 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..f0347f0c7f5 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,18 @@
#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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..72647a9ee63 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,18 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_SYSLOG_H)
-# include /**/ <syslog.h>
+# include /**/ <syslog.h>
#endif /* !ACE_LACKS_SYSLOG_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..48e283c756e 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,18 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_TAR_H)
-# include /**/ <tar.h>
+# include /**/ <tar.h>
#endif /* !ACE_LACKS_TAR_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..d67f2dbacef 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,18 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_TERMIOS_H)
-# include /**/ <termios.h>
+# include /**/ <termios.h>
#endif /* !ACE_LACKS_TERMIOS_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..41b820cad3a 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,18 @@
#include "ace/os_include/complex.h"
#if !defined (ACE_LACKS_TGMATH_H)
-# include /**/ <tgmath.h>
+# include /**/ <tgmath.h>
#endif /* !ACE_LACKS_TGMATH_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 7d3643a74c5..ce97df53a97 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,8 +28,51 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_TIME_H)
-# include /**/ <time.h>
+# include /**/ <time.h>
#endif /* !ACE_LACKS_TIME_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#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_LACKS_STRPTIME_PROTOTYPE) && !defined (_XOPEN_SOURCE)
+ extern 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)
+# if defined (ACE_PSOS_DIAB_PPC)
+ typedef struct timespec timespec_t;
+# else /* ! defined (ACE_PSOS_DIAB_PPC) */
+ typedef struct timespec
+ {
+ time_t tv_sec; // Seconds
+ long tv_nsec; // Nanoseconds
+ } timespec_t;
+# endif /* defined (ACE_PSOS_DIAB_PPC) */
+#endif /* defined (ACE_PSOS) && !defined (USER_INCLUDE_SYS_TIME_TM) */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..c040e074d1c 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,18 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_TRACE_H)
-# include /**/ <trace.h>
+# include /**/ <trace.h>
#endif /* !ACE_LACKS_TRACE_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..3576def7c27 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"
@@ -24,13 +24,23 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-// @todo need to define sigset_t both here and in signal.h, but
+// @todo need to define sigset_t both here and in signal.h, but
// there is a circular dependancy since signal.h needs to include ucontext.h
//#include "ace/os_include/signal.h"
#if !defined (ACE_LACKS_UCONTEXT_H)
-# include /**/ <ucontext.h>
+# include /**/ <ucontext.h>
#endif /* !ACE_LACKS_ucontext_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..545c7742a93 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,18 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_ULIMIT_H)
-# include /**/ <ulimit.h>
+# include /**/ <ulimit.h>
#endif /* !ACE_LACKS_ULIMIT_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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 e64c72ba9fe..76d4ac8cee9 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"
@@ -27,9 +27,87 @@
#include "ace/os_include/sys/types.h"
#include "ace/os_include/inttypes.h"
+#if defined (__BORLANDC__)
+# include "ace/os_include/fcntl.h"
+#endif /* __BORLANDC */
+
+#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+# include <process.h>
+# include <io.h>
+#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
+
#if !defined (ACE_LACKS_UNISTD_H)
-# include /**/ <unistd.h>
+# include /**/ <unistd.h>
#endif /* !ACE_LACKS_UNISTD_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_LACKS_UALARM_PROTOTYPE)
+ 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.
+ ssize_t pread (int fd,
+ void *buf,
+ size_t nbytes,
+ off_t offset);
+
+ 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)
+ 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)
+ ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence);
+# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE)
+ 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
+#endif /* _SC_AIO_MAX */
+
+#if defined (__BORLANDC__)
+# define _chdir chdir
+# undef _access
+# define _access access
+# if (__BORLANDC__ <= 0x540)
+# define _getcwd getcwd
+# endif
+# define _isatty isatty
+#endif /* __BORLANDC__ */
+
+#if defined (ACE_PSOS_SNARFS_HEADER_INFO)
+ // Header information snarfed from compiler provided header files
+ // 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
+ int getopt(int, char *const *, const char *);
+ int isatty (int h);
+#endif /* ACE_PSOS_SNARFS_HEADER_INFO */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..0df9b8cc658 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,18 @@
#include "ace/os_include/sys/types.h"
#if !defined (ACE_LACKS_UTIME_H)
-# include /**/ <utime.h>
+# include /**/ <utime.h>
#endif /* !ACE_LACKS_UTIME_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..ee26bf42aa2 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,18 @@
#include "ace/os_include/sys/time.h"
#if !defined (ACE_LACKS_UTMPX_H)
-# include /**/ <utmpx.h>
+# include /**/ <utmpx.h>
#endif /* !ACE_LACKS_UTMPX_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..647a795c305 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,18 @@
#include "ace/os_include/ctype.h"
#if !defined (ACE_LACKS_WCHAR_H)
-# include /**/ <wchar.h>
+# include /**/ <wchar.h>
#endif /* !ACE_LACKS_WCHAR_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..b236f12bf68 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,18 @@
#include "ace/os_include/wchar.h"
#if !defined (ACE_LACKS_WCTYPE_H)
-# include /**/ <wctype.h>
+# include /**/ <wctype.h>
#endif /* !ACE_LACKS_WCTYPE_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#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..b46d5c7933c 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,21 @@
# 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 */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_WORDEXP_H */
+#endif /* ACE_OS_INCLUDE_OS_WORDEXP_H */
diff --git a/apps/gperf/src/Vectors.h b/apps/gperf/src/Vectors.h
index e6eec45d355..236ff0986eb 100644
--- a/apps/gperf/src/Vectors.h
+++ b/apps/gperf/src/Vectors.h
@@ -32,6 +32,18 @@
#if defined (ACE_HAS_GPERF)
+// Do not change these values wantonly since GPERF depends on them..
+#define ACE_ASCII_SIZE 128
+#define ACE_EBCDIC_SIZE 256
+
+#if 'a' < 'A'
+#define ACE_HAS_EBCDIC
+#define ACE_STANDARD_CHARACTER_SET_SIZE 256
+#else
+#define ACE_HAS_ASCII
+#define ACE_STANDARD_CHARACTER_SET_SIZE 128
+#endif /* 'a' < 'A' */
+
class Vectors
{
// = TITLE