summaryrefslogtreecommitdiff
path: root/ACE/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace')
-rw-r--r--ACE/ace/ACE.cpp77
-rw-r--r--ACE/ace/ACE_FlReactor.pc.in (renamed from ACE/ace/FlReactor/ACE_FlReactor.pc.in)0
-rw-r--r--ACE/ace/ACE_FlReactor_export.h (renamed from ACE/ace/FlReactor/ACE_FlReactor_export.h)0
-rw-r--r--ACE/ace/ACE_QtReactor.pc.in (renamed from ACE/ace/QtReactor/ACE_QtReactor.pc.in)0
-rw-r--r--ACE/ace/ACE_QtReactor_export.h (renamed from ACE/ace/QtReactor/ACE_QtReactor_export.h)0
-rw-r--r--ACE/ace/ACE_TkReactor.pc.in (renamed from ACE/ace/TkReactor/ACE_TkReactor.pc.in)0
-rw-r--r--ACE/ace/ACE_TkReactor_export.h (renamed from ACE/ace/TkReactor/ACE_TkReactor_export.h)0
-rw-r--r--ACE/ace/ACE_XtReactor.pc.in (renamed from ACE/ace/XtReactor/ACE_XtReactor.pc.in)0
-rw-r--r--ACE/ace/ACE_XtReactor_export.h (renamed from ACE/ace/XtReactor/ACE_XtReactor_export.h)0
-rw-r--r--ACE/ace/ARGV.cpp138
-rw-r--r--ACE/ace/ARGV.h78
-rw-r--r--ACE/ace/ARGV.inl35
-rw-r--r--ACE/ace/Asynch_Acceptor.cpp19
-rw-r--r--ACE/ace/Asynch_Acceptor.h4
-rw-r--r--ACE/ace/Asynch_IO.cpp12
-rw-r--r--ACE/ace/Asynch_IO.h17
-rw-r--r--ACE/ace/Asynch_IO_Impl.cpp4
-rw-r--r--ACE/ace/Asynch_IO_Impl.h4
-rw-r--r--ACE/ace/Atomic_Op_T.h72
-rw-r--r--ACE/ace/Basic_Stats.cpp3
-rw-r--r--ACE/ace/Basic_Types.h4
-rw-r--r--ACE/ace/CDR_Stream.cpp45
-rw-r--r--ACE/ace/CDR_Stream.h17
-rw-r--r--ACE/ace/CORBA_macros.h15
-rw-r--r--ACE/ace/Configuration.cpp35
-rw-r--r--ACE/ace/DLL_Manager.cpp6
-rw-r--r--ACE/ace/Default_Constants.h11
-rw-r--r--ACE/ace/Dev_Poll_Reactor.cpp6
-rw-r--r--ACE/ace/Dev_Poll_Reactor.h2
-rw-r--r--ACE/ace/Dynamic_Service_Base.cpp3
-rw-r--r--ACE/ace/FlReactor.cpp (renamed from ACE/ace/FlReactor/FlReactor.cpp)2
-rw-r--r--ACE/ace/FlReactor.h (renamed from ACE/ace/FlReactor/FlReactor.h)2
-rw-r--r--ACE/ace/INET_Addr.cpp75
-rw-r--r--ACE/ace/INET_Addr.h3
-rw-r--r--ACE/ace/INET_Addr.inl13
-rw-r--r--ACE/ace/Log_Msg.cpp44
-rw-r--r--ACE/ace/Log_Msg_NT_Event_Log.cpp10
-rw-r--r--ACE/ace/Log_Record.h6
-rw-r--r--ACE/ace/Makefile.am73
-rw-r--r--ACE/ace/Malloc_T.cpp8
-rw-r--r--ACE/ace/Malloc_T.h4
-rw-r--r--ACE/ace/Map_Manager.cpp6
-rw-r--r--ACE/ace/Map_Manager.h5
-rw-r--r--ACE/ace/Map_Manager.inl10
-rw-r--r--ACE/ace/Mem_Map.cpp62
-rw-r--r--ACE/ace/Message_Queue.cpp4
-rw-r--r--ACE/ace/Message_Queue.h6
-rw-r--r--ACE/ace/Message_Queue.inl4
-rw-r--r--ACE/ace/Message_Queue_T.cpp4
-rw-r--r--ACE/ace/Message_Queue_T.h8
-rw-r--r--ACE/ace/Msg_WFMO_Reactor.cpp11
-rw-r--r--ACE/ace/Name_Proxy.cpp2
-rw-r--r--ACE/ace/Name_Request_Reply.cpp48
-rw-r--r--ACE/ace/Null_Mutex.h18
-rw-r--r--ACE/ace/OS_Errno.cpp5
-rw-r--r--ACE/ace/OS_Errno.h5
-rw-r--r--ACE/ace/OS_Memory.h33
-rw-r--r--ACE/ace/OS_NS_Thread.cpp106
-rw-r--r--ACE/ace/OS_NS_Thread.h1
-rw-r--r--ACE/ace/OS_NS_arpa_inet.cpp2
-rw-r--r--ACE/ace/OS_NS_arpa_inet.inl1
-rw-r--r--ACE/ace/OS_NS_dirent.cpp15
-rw-r--r--ACE/ace/OS_NS_dirent.inl54
-rw-r--r--ACE/ace/OS_NS_netdb.cpp2
-rw-r--r--ACE/ace/OS_NS_signal.h2
-rw-r--r--ACE/ace/OS_NS_signal.inl2
-rw-r--r--ACE/ace/OS_NS_stdio.cpp48
-rw-r--r--ACE/ace/OS_NS_stdio.h2
-rw-r--r--ACE/ace/OS_NS_stdio.inl51
-rw-r--r--ACE/ace/OS_NS_stdlib.cpp72
-rw-r--r--ACE/ace/OS_NS_stdlib.h2
-rw-r--r--ACE/ace/OS_NS_stdlib.inl64
-rw-r--r--ACE/ace/OS_NS_string.inl2
-rw-r--r--ACE/ace/OS_NS_sys_mman.inl46
-rw-r--r--ACE/ace/OS_NS_sys_time.inl2
-rw-r--r--ACE/ace/OS_NS_sys_wait.inl4
-rw-r--r--ACE/ace/OS_NS_unistd.cpp226
-rw-r--r--ACE/ace/OS_NS_unistd.h3
-rw-r--r--ACE/ace/OS_NS_unistd.inl2
-rw-r--r--ACE/ace/OS_TLI.h2
-rw-r--r--ACE/ace/Object_Manager_Base.cpp2
-rw-r--r--ACE/ace/POSIX_Asynch_IO.h5
-rw-r--r--ACE/ace/POSIX_CB_Proactor.h6
-rw-r--r--ACE/ace/POSIX_Proactor.cpp14
-rw-r--r--ACE/ace/POSIX_Proactor.h2
-rw-r--r--ACE/ace/Pagefile_Memory_Pool.cpp8
-rw-r--r--ACE/ace/Parse_Node.cpp2
-rw-r--r--ACE/ace/Proactor.cpp4
-rw-r--r--ACE/ace/Proactor.h4
-rw-r--r--ACE/ace/Proactor_Impl.cpp4
-rw-r--r--ACE/ace/Proactor_Impl.h6
-rw-r--r--ACE/ace/Process.cpp62
-rw-r--r--ACE/ace/QoS/Makefile.am2
-rw-r--r--ACE/ace/QoS/qos.mpc2
-rw-r--r--ACE/ace/QtReactor.cpp (renamed from ACE/ace/QtReactor/QtReactor.cpp)14
-rw-r--r--ACE/ace/QtReactor.h (renamed from ACE/ace/QtReactor/QtReactor.h)2
-rw-r--r--ACE/ace/README29
-rw-r--r--ACE/ace/Reactor.cpp3
-rw-r--r--ACE/ace/Reactor_Impl.h2
-rw-r--r--ACE/ace/Read_Buffer.cpp8
-rw-r--r--ACE/ace/Read_Buffer.h23
-rw-r--r--ACE/ace/Rtems_init.c75
-rw-r--r--ACE/ace/SOCK_Dgram.cpp18
-rw-r--r--ACE/ace/SOCK_Dgram.inl12
-rw-r--r--ACE/ace/SOCK_Dgram_Bcast.cpp8
-rw-r--r--ACE/ace/SOCK_IO.h30
-rw-r--r--ACE/ace/SOCK_IO.inl40
-rw-r--r--ACE/ace/SPIPE_Acceptor.cpp18
-rw-r--r--ACE/ace/SPIPE_Acceptor.h8
-rw-r--r--ACE/ace/SSL/Makefile.am6
-rw-r--r--ACE/ace/SSL/ssl.mpc2
-rw-r--r--ACE/ace/SSL/ssl_for_tao.mpc2
-rw-r--r--ACE/ace/SStringfwd.h6
-rw-r--r--ACE/ace/Sample_History.cpp3
-rw-r--r--ACE/ace/Select_Reactor_Base.h18
-rw-r--r--ACE/ace/Select_Reactor_T.cpp35
-rw-r--r--ACE/ace/Select_Reactor_T.h24
-rw-r--r--ACE/ace/Select_Reactor_T.inl1
-rw-r--r--ACE/ace/Service_Config.cpp18
-rw-r--r--ACE/ace/Service_Config.h12
-rw-r--r--ACE/ace/Service_Config.inl12
-rw-r--r--ACE/ace/Service_Gestalt.cpp100
-rw-r--r--ACE/ace/Service_Gestalt.h38
-rw-r--r--ACE/ace/Service_Gestalt.inl22
-rw-r--r--ACE/ace/Service_Manager.h6
-rw-r--r--ACE/ace/Service_Repository.cpp46
-rw-r--r--ACE/ace/Service_Repository.h50
-rw-r--r--ACE/ace/Sock_Connect.cpp567
-rw-r--r--ACE/ace/String_Base.cpp18
-rw-r--r--ACE/ace/String_Base.h15
-rw-r--r--ACE/ace/String_Base.inl7
-rw-r--r--ACE/ace/System_Time.h1
-rw-r--r--ACE/ace/TP_Reactor.cpp4
-rw-r--r--ACE/ace/Time_Request_Reply.cpp20
-rw-r--r--ACE/ace/Timer_Queue_Adapters.cpp2
-rw-r--r--ACE/ace/Timer_Queue_T.cpp9
-rw-r--r--ACE/ace/TkReactor.cpp (renamed from ACE/ace/TkReactor/TkReactor.cpp)2
-rw-r--r--ACE/ace/TkReactor.h (renamed from ACE/ace/TkReactor/TkReactor.h)2
-rw-r--r--ACE/ace/Truncate.h8
-rw-r--r--ACE/ace/UUID.cpp18
-rw-r--r--ACE/ace/Version.h4
-rw-r--r--ACE/ace/WFMO_Reactor.cpp4
-rw-r--r--ACE/ace/WFMO_Reactor.h2
-rw-r--r--ACE/ace/WFMO_Reactor.inl2
-rw-r--r--ACE/ace/WIN32_Asynch_IO.cpp46
-rw-r--r--ACE/ace/WIN32_Asynch_IO.h5
-rw-r--r--ACE/ace/WIN32_Proactor.cpp2
-rw-r--r--ACE/ace/WIN32_Proactor.h2
-rw-r--r--ACE/ace/XtReactor.cpp (renamed from ACE/ace/XtReactor/XtReactor.cpp)2
-rw-r--r--ACE/ace/XtReactor.h (renamed from ACE/ace/XtReactor/XtReactor.h)4
-rw-r--r--ACE/ace/ace.mpc3
-rw-r--r--ACE/ace/ace_flreactor.mpc12
-rw-r--r--ACE/ace/ace_for_tao.mpc2
-rw-r--r--ACE/ace/ace_qtreactor.mpc16
-rw-r--r--ACE/ace/ace_tkreactor.mpc12
-rw-r--r--ACE/ace/ace_xtreactor.mpc12
-rw-r--r--ACE/ace/config-WinCE.h6
-rw-r--r--ACE/ace/config-aix-4.1.x.h8
-rw-r--r--ACE/ace/config-aix-4.2.x.h8
-rw-r--r--ACE/ace/config-aix-4.3.x.h8
-rw-r--r--ACE/ace/config-aix-4.x.h347
-rw-r--r--ACE/ace/config-aix-5.x.h286
-rw-r--r--ACE/ace/config-cygwin32.h2
-rw-r--r--ACE/ace/config-dgux-4.11-epc.h189
-rw-r--r--ACE/ace/config-dgux-4.x-ghs.h208
-rw-r--r--ACE/ace/config-freebsd.h16
-rw-r--r--ACE/ace/config-g++-common.h20
-rw-r--r--ACE/ace/config-hpux-11.00.h23
-rw-r--r--ACE/ace/config-irix5.2.h67
-rw-r--r--ACE/ace/config-irix5.3-g++.h117
-rw-r--r--ACE/ace/config-irix5.3-sgic++.h120
-rw-r--r--ACE/ace/config-irix6.x-common.h12
-rw-r--r--ACE/ace/config-irix6.x-sgic++-nothreads.h5
-rw-r--r--ACE/ace/config-linux-common.h30
-rw-r--r--ACE/ace/config-linux.h4
-rw-r--r--ACE/ace/config-lite.h10
-rw-r--r--ACE/ace/config-lynxos.h36
-rw-r--r--ACE/ace/config-m88k.h225
-rw-r--r--ACE/ace/config-macosx-panther.h4
-rw-r--r--ACE/ace/config-macosx-tiger.h4
-rw-r--r--ACE/ace/config-macosx.h4
-rw-r--r--ACE/ace/config-mit-pthread.h49
-rw-r--r--ACE/ace/config-mklinux.h20
-rw-r--r--ACE/ace/config-netbsd.h24
-rw-r--r--ACE/ace/config-openbsd.h2
-rw-r--r--ACE/ace/config-openvms.h1
-rw-r--r--ACE/ace/config-pharlap.h8
-rw-r--r--ACE/ace/config-posix-nonetworking.h86
-rw-r--r--ACE/ace/config-posix.h23
-rw-r--r--ACE/ace/config-qnx-neutrino.h15
-rw-r--r--ACE/ace/config-qnx-rtp-62x.h2
-rw-r--r--ACE/ace/config-qnx-rtp-pre62x.h1
-rw-r--r--ACE/ace/config-rtems.h97
-rw-r--r--ACE/ace/config-sco-4.2-nothread.h110
-rw-r--r--ACE/ace/config-sco-5.0.0-fsu-pthread.h15
-rw-r--r--ACE/ace/config-sco-5.0.0-mit-pthread.h164
-rw-r--r--ACE/ace/config-sunos5.4-centerline-2.x.h157
-rw-r--r--ACE/ace/config-sunos5.4-g++.h3
-rw-r--r--ACE/ace/config-sunos5.4-sunc++-4.x.h1
-rw-r--r--ACE/ace/config-sunos5.5.h11
-rw-r--r--ACE/ace/config-sunos5.7.h5
-rw-r--r--ACE/ace/config-sunos5.8.h1
-rw-r--r--ACE/ace/config-sunos5.9.h1
-rw-r--r--ACE/ace/config-tandem-nsk-mips-v2.h4
-rw-r--r--ACE/ace/config-tandem-nsk-mips-v3.h4
-rw-r--r--ACE/ace/config-tru64.h6
-rw-r--r--ACE/ace/config-unixware-7.1.0.udk.h18
-rw-r--r--ACE/ace/config-vxworks5.x.h2
-rw-r--r--ACE/ace/config-vxworks6.2.h3
-rw-r--r--ACE/ace/config-vxworks6.3.h21
-rw-r--r--ACE/ace/config-vxworks6.4.h312
-rw-r--r--ACE/ace/config-win32-borland.h19
-rw-r--r--ACE/ace/config-win32-common.h54
-rw-r--r--ACE/ace/config-win32-interix.h1
-rw-r--r--ACE/ace/config-win32-mingw.h9
-rw-r--r--ACE/ace/config-win32-msvc.h14
-rw-r--r--ACE/ace/os_include/net/os_if.h57
-rw-r--r--ACE/ace/os_include/netinet/os_in.h12
-rw-r--r--ACE/ace/os_include/netinet/os_tcp.h4
-rw-r--r--ACE/ace/os_include/os_errno.h4
-rw-r--r--ACE/ace/os_include/os_limits.h4
-rw-r--r--ACE/ace/os_include/os_signal.h52
-rw-r--r--ACE/ace/os_include/os_stdio.h2
-rw-r--r--ACE/ace/os_include/sys/os_resource.h4
-rw-r--r--ACE/ace/os_include/sys/os_socket.h40
-rw-r--r--ACE/ace/os_include/sys/os_time.h4
-rw-r--r--ACE/ace/os_include/sys/os_types.h4
227 files changed, 3997 insertions, 2618 deletions
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp
index 6fec4b5d3a1..bfc8a867d6c 100644
--- a/ACE/ace/ACE.cpp
+++ b/ACE/ace/ACE.cpp
@@ -455,6 +455,12 @@ ACE::recv (ACE_HANDLE handle,
return ACE_OS::recv (handle, (char *) buf, len, flags);
else
{
+#if defined (ACE_HAS_RECV_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::recv_timedwait (handle, buf, len, flags, &ts);
+#else
int val = 0;
if (ACE::enter_recv_timedwait (handle, timeout, val) ==-1)
return -1;
@@ -465,6 +471,7 @@ ACE::recv (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_RECV_TIMEDWAIT */
}
}
@@ -506,6 +513,12 @@ ACE::recv (ACE_HANDLE handle,
return ACE::recv_i (handle, buf, n);
else
{
+#if defined (ACE_HAS_READ_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::read_timedwait (handle, buf, n, &ts);
+#else
int val = 0;
if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
return -1;
@@ -515,6 +528,7 @@ ACE::recv (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_READ_TIMEDWAIT */
}
}
@@ -528,6 +542,12 @@ ACE::recvmsg (ACE_HANDLE handle,
return ACE_OS::recvmsg (handle, msg, flags);
else
{
+#if defined (ACE_HAS_RECVMSG_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::recvmsg_timedwait (handle, msg, flags, &ts);
+#else
int val = 0;
if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
return -1;
@@ -537,6 +557,7 @@ ACE::recvmsg (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_RECVMSG_TIMEDWAIT */
}
}
@@ -553,6 +574,12 @@ ACE::recvfrom (ACE_HANDLE handle,
return ACE_OS::recvfrom (handle, buf, len, flags, addr, addrlen);
else
{
+#if defined (ACE_HAS_RECVFROM_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::recvfrom_timedwait (handle, buf, len, flags, addr, addrlen, &ts);
+#else
int val = 0;
if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
return -1;
@@ -563,6 +590,7 @@ ACE::recvfrom (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_RECVFROM_TIMEDWAIT */
}
}
@@ -967,6 +995,12 @@ ACE::recvv (ACE_HANDLE handle,
return ACE_OS::recvv (handle, iov, iovcnt);
else
{
+#if defined (ACE_HAS_READV_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::readv_timedwait (handle, iov, iovcnt, &ts);
+#else
int val = 0;
if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
return -1;
@@ -976,6 +1010,7 @@ ACE::recvv (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_READV_TIMEDWAIT */
}
}
@@ -1230,6 +1265,12 @@ ACE::send (ACE_HANDLE handle,
return ACE_OS::send (handle, (const char *) buf, n, flags);
else
{
+#if defined (ACE_HAS_SEND_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday();
+ timespec_t ts = copy;
+ return ::send_timedwait (handle, buf, n, flags, &ts);
+#else
int val = 0;
if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
return -1;
@@ -1239,6 +1280,7 @@ ACE::send (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_SEND_TIMEDWAIT */
}
}
@@ -1279,6 +1321,12 @@ ACE::send (ACE_HANDLE handle,
return ACE::send_i (handle, buf, n);
else
{
+#if defined (ACE_HAS_WRITE_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::write_timedwait (handle, buf, n, &ts);
+#else
int val = 0;
if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
return -1;
@@ -1288,6 +1336,7 @@ ACE::send (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_WRITE_TIMEDWAIT */
}
}
@@ -1301,6 +1350,12 @@ ACE::sendmsg (ACE_HANDLE handle,
return ACE_OS::sendmsg (handle, msg, flags);
else
{
+#if defined (ACE_HAS_SENDMSG_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::sendmsg_timedwait (handle, msg, flags, &ts);
+#else
int val = 0;
if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
return -1;
@@ -1310,6 +1365,7 @@ ACE::sendmsg (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_SENDMSG_TIMEDWAIT */
}
}
@@ -1326,6 +1382,12 @@ ACE::sendto (ACE_HANDLE handle,
return ACE_OS::sendto (handle, buf, len, flags, addr, addrlen);
else
{
+#if defined (ACE_HAS_SENDTO_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::sendto_timedwait (handle, buf, len, flags, addr, addrlen, ts);
+#else
int val = 0;
if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
return -1;
@@ -1336,6 +1398,7 @@ ACE::sendto (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_SENDTO_TIMEDWAIT */
}
}
@@ -1742,6 +1805,12 @@ ACE::sendv (ACE_HANDLE handle,
return ACE_OS::sendv (handle, iov, iovcnt);
else
{
+#if defined (ACE_HAS_WRITEV_TIMEDWAIT)
+ ACE_Time_Value copy = *timeout;
+ copy += ACE_OS::gettimeofday ();
+ timespec_t ts = copy;
+ return ::sendv_timedwait (handle, iov, iovcnt, &ts);
+#else
int val = 0;
if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
return -1;
@@ -1751,6 +1820,7 @@ ACE::sendv (ACE_HANDLE handle,
ACE::restore_non_blocking_mode (handle, val);
return bytes_transferred;
}
+#endif /* ACE_HAS_WRITEV_TIMEDWAIT */
}
}
@@ -2818,8 +2888,13 @@ ACE::fork (const ACE_TCHAR *program_name,
}
// Parent process waits for child to terminate.
- ACE_exitcode status;
+#if defined (ACE_HAS_UNION_WAIT)
+ union wait status;
+ if (pid < 0 || ACE_OS::waitpid (pid, &(status.w_status), 0) < 0)
+#else
+ ACE_exitcode status;
if (pid < 0 || ACE_OS::waitpid (pid, &status, 0) < 0)
+#endif /* ACE_HAS_UNION_WAIT */
return -1;
// child terminated by calling exit()?
diff --git a/ACE/ace/FlReactor/ACE_FlReactor.pc.in b/ACE/ace/ACE_FlReactor.pc.in
index c284481585d..c284481585d 100644
--- a/ACE/ace/FlReactor/ACE_FlReactor.pc.in
+++ b/ACE/ace/ACE_FlReactor.pc.in
diff --git a/ACE/ace/FlReactor/ACE_FlReactor_export.h b/ACE/ace/ACE_FlReactor_export.h
index f46b66cb3f7..f46b66cb3f7 100644
--- a/ACE/ace/FlReactor/ACE_FlReactor_export.h
+++ b/ACE/ace/ACE_FlReactor_export.h
diff --git a/ACE/ace/QtReactor/ACE_QtReactor.pc.in b/ACE/ace/ACE_QtReactor.pc.in
index 4e7aa83e6be..4e7aa83e6be 100644
--- a/ACE/ace/QtReactor/ACE_QtReactor.pc.in
+++ b/ACE/ace/ACE_QtReactor.pc.in
diff --git a/ACE/ace/QtReactor/ACE_QtReactor_export.h b/ACE/ace/ACE_QtReactor_export.h
index f7192051a29..f7192051a29 100644
--- a/ACE/ace/QtReactor/ACE_QtReactor_export.h
+++ b/ACE/ace/ACE_QtReactor_export.h
diff --git a/ACE/ace/TkReactor/ACE_TkReactor.pc.in b/ACE/ace/ACE_TkReactor.pc.in
index e53797e600c..e53797e600c 100644
--- a/ACE/ace/TkReactor/ACE_TkReactor.pc.in
+++ b/ACE/ace/ACE_TkReactor.pc.in
diff --git a/ACE/ace/TkReactor/ACE_TkReactor_export.h b/ACE/ace/ACE_TkReactor_export.h
index bd74f861e60..bd74f861e60 100644
--- a/ACE/ace/TkReactor/ACE_TkReactor_export.h
+++ b/ACE/ace/ACE_TkReactor_export.h
diff --git a/ACE/ace/XtReactor/ACE_XtReactor.pc.in b/ACE/ace/ACE_XtReactor.pc.in
index 118c61c5632..118c61c5632 100644
--- a/ACE/ace/XtReactor/ACE_XtReactor.pc.in
+++ b/ACE/ace/ACE_XtReactor.pc.in
diff --git a/ACE/ace/XtReactor/ACE_XtReactor_export.h b/ACE/ace/ACE_XtReactor_export.h
index 3d9049cb7af..3d9049cb7af 100644
--- a/ACE/ace/XtReactor/ACE_XtReactor_export.h
+++ b/ACE/ace/ACE_XtReactor_export.h
diff --git a/ACE/ace/ARGV.cpp b/ACE/ace/ARGV.cpp
index 6117ded088a..8ef7d441afb 100644
--- a/ACE/ace/ARGV.cpp
+++ b/ACE/ace/ARGV.cpp
@@ -17,25 +17,10 @@ ACE_RCSID(ace, ARGV, "$Id$")
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_ALLOC_HOOK_DEFINE (ACE_ARGV_Queue_Entry)
ACE_ALLOC_HOOK_DEFINE (ACE_ARGV)
template <typename CHAR_TYPE>
void
-ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::dump (void) const
-{
-#if defined (ACE_HAS_DUMP)
- ACE_TRACE ("ACE_ARGV_Queue_Entry_T::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("arg_ = %s"), this->arg_));
- ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("quote_arg_ = %d"), (int)this->quote_arg_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_HAS_DUMP */
-}
-
-template <typename CHAR_TYPE>
-void
ACE_ARGV_T<CHAR_TYPE>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
@@ -76,6 +61,13 @@ ACE_ARGV_T<CHAR_TYPE>::string_to_argv (void)
}
template <typename CHAR_TYPE>
+int
+ACE_ARGV_T<CHAR_TYPE>::argv_to_string (CHAR_TYPE **argv, CHAR_TYPE *&buf)
+{
+ return ACE_OS::argv_to_string (argv, buf);
+}
+
+template <typename CHAR_TYPE>
ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (const CHAR_TYPE buf[],
bool substitute_env_args)
: substitute_env_args_ (substitute_env_args),
@@ -105,8 +97,7 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (const CHAR_TYPE buf[],
template <typename CHAR_TYPE>
ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (CHAR_TYPE *argv[],
- bool substitute_env_args,
- bool quote_arg)
+ bool substitute_env_args)
: substitute_env_args_ (substitute_env_args),
iterative_ (false),
argc_ (0),
@@ -120,17 +111,13 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (CHAR_TYPE *argv[],
if (argv == 0 || argv[0] == 0)
return;
- this->argc_ = ACE_OS::argv_to_string (argv,
- this->buf_,
- substitute_env_args,
- quote_arg);
+ this->argc_ = ACE_OS::argv_to_string (argv, this->buf_, substitute_env_args);
}
template <typename CHAR_TYPE>
ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (CHAR_TYPE *first_argv[],
CHAR_TYPE *second_argv[],
- bool substitute_env_args,
- bool quote_args)
+ bool substitute_env_args)
: substitute_env_args_ (substitute_env_args),
iterative_ (false),
argc_ (0),
@@ -141,29 +128,17 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (CHAR_TYPE *first_argv[],
{
ACE_TRACE ("ACE_ARGV_T::ACE_ARGV_T CHAR_TYPE*[] + CHAR_TYPE *[] to CHAR_TYPE[]");
- int first_argc = 0;
- int second_argc = 0;
+ int first_argc;
+ int second_argc;
- CHAR_TYPE *first_buf = 0;
- CHAR_TYPE *second_buf = 0;
+ CHAR_TYPE *first_buf;
+ CHAR_TYPE *second_buf;
// convert the first argv to a string
- if (first_argv != 0 && first_argv[0] != 0)
- {
- first_argc = ACE_OS::argv_to_string (first_argv,
- first_buf,
- substitute_env_args,
- quote_args);
- }
+ first_argc = this->argv_to_string (first_argv, first_buf);
// convert the second argv to a string
- if (second_argv != 0 && second_argv[0] != 0)
- {
- second_argc = ACE_OS::argv_to_string (second_argv,
- second_buf,
- substitute_env_args,
- quote_args);
- }
+ second_argc = this->argv_to_string (second_argv, second_buf);
// Add the number of arguments in both the argvs.
this->argc_ = first_argc + second_argc;
@@ -182,7 +157,9 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (CHAR_TYPE *first_argv[],
ACE_OS::strcat (this->buf_, second_buf);
// Delete the first and second buffers
+
delete [] first_buf;
+
delete [] second_buf;
}
@@ -203,7 +180,7 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (bool substitute_env_args)
template <typename CHAR_TYPE>
int
-ACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg, bool quote_arg)
+ACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg)
{
// Only allow this to work in the "iterative" verion -- the
// ACE_ARGVs created with the one argument constructor.
@@ -213,25 +190,14 @@ ACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg, bool quote_arg)
return -1;
}
- this->length_ += ACE_OS::strlen (next_arg);
- if (quote_arg && ACE_OS::strchr (next_arg, ' ') != 0)
- {
- this->length_ += 2;
- if (ACE_OS::strchr (next_arg, '"') != 0)
- for (const CHAR_TYPE * p = next_arg; *p != '\0'; ++p)
- if (*p == '"') ++this->length_;
- }
- else
- {
- quote_arg = false;
- }
-
// Put the new argument at the end of the queue.
- if (this->queue_.enqueue_tail (ACE_ARGV_Queue_Entry_T<CHAR_TYPE> (next_arg, quote_arg)) == -1)
+ if (this->queue_.enqueue_tail (const_cast <CHAR_TYPE *> (next_arg)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("Can't add more to ARGV queue")),
-1);
+ this->length_ += ACE_OS::strlen (next_arg);
+
this->argc_++;
// Wipe argv_ and buf_ away so that they will be recreated if the
@@ -253,10 +219,10 @@ ACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg, bool quote_arg)
template <typename CHAR_TYPE>
int
-ACE_ARGV_T<CHAR_TYPE>::add (CHAR_TYPE *argv[], bool quote_args)
+ACE_ARGV_T<CHAR_TYPE>::add (CHAR_TYPE *argv[])
{
for (int i = 0; argv[i] != 0; i++)
- if (this->add (argv[i], quote_args) == -1)
+ if (this->add (argv[i]) == -1)
return -1;
return 0;
@@ -297,58 +263,36 @@ ACE_ARGV_T<CHAR_TYPE>::create_buf_from_queue (void)
-1);
// Get an iterator over the queue
- ACE_Unbounded_Queue_Iterator<ACE_ARGV_Queue_Entry_T<CHAR_TYPE> > iter (this->queue_);
+ ACE_Unbounded_Queue_Iterator<CHAR_TYPE *> iter (this->queue_);
- ACE_ARGV_Queue_Entry_T<CHAR_TYPE> *arg = 0;
+ CHAR_TYPE **arg = 0;
CHAR_TYPE *ptr = this->buf_;
size_t len;
+ int more = 0;
while (!iter.done ())
{
// Get next argument from the queue.
iter.next (arg);
- iter.advance ();
-
- if (arg->quote_arg_)
- {
- *ptr++ = '"';
- if (ACE_OS::strchr (arg->arg_, '"') != 0)
- {
- for (const CHAR_TYPE * p = arg->arg_; *p != '\0'; ++p)
- {
- if (*p == '"') *ptr++ = '\\';
- *ptr++ = *p;
- }
- }
- else
- {
- len = ACE_OS::strlen (arg->arg_);
- // Copy the argument into buf_
- ACE_OS::memcpy ((void *) ptr,
- (const void *) (arg->arg_),
- len * sizeof (CHAR_TYPE));
- // Move the pointer down.
- ptr += len;
- }
- *ptr++ = '"';
- }
- else
- {
- len = ACE_OS::strlen (arg->arg_);
- // Copy the argument into buf_
- ACE_OS::memcpy ((void *) ptr,
- (const void *) (arg->arg_),
- len * sizeof (CHAR_TYPE));
- // Move the pointer down.
- ptr += len;
- }
+
+ more = iter.advance ();
+
+ len = ACE_OS::strlen (*arg);
+
+ // Copy the argument into buf_
+ ACE_OS::memcpy ((void *) ptr,
+ (const void *) (*arg),
+ len * sizeof (CHAR_TYPE));
+ // Move the pointer down.
+ ptr += len;
// Put in an argument separating space.
- *ptr++ = ' ';
+ if (more != 0)
+ *ptr++ = ' ';
}
// Put in the NUL terminator
- ptr[-1] = '\0';
+ *ptr = '\0';
return 0;
}
diff --git a/ACE/ace/ARGV.h b/ACE/ace/ARGV.h
index 15b583dbbf4..f9540fc4824 100644
--- a/ACE/ace/ARGV.h
+++ b/ACE/ace/ARGV.h
@@ -27,54 +27,6 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
- * @class ACE_ARGV_Queue_Entry_T
- *
- * @brief An entry in the queue which keeps user supplied arguments.
- */
-template <typename CHAR_TYPE>
-class ACE_ARGV_Queue_Entry_T
-{
-public:
- // = Initialization and termination.
- /// Initialize a ACE_ARGV_Queue_Entry_T.
- ACE_ARGV_Queue_Entry_T (void);
-
- /**
- * Initialize a ACE_ARGV_Queue_Entry_T.
- *
- * @param arg Pointer to an argument
- *
- * @param quote_arg The argument @a arg need to be quoted
- * while adding to the vector.
- */
- ACE_ARGV_Queue_Entry_T (const CHAR_TYPE *arg,
- bool quote_arg);
-
- /**
- * Initialize a ACE_ARGV_Queue_Entry_T.
- *
- * @param entry Pointer to a queue entry
- */
- ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T<CHAR_TYPE> &entry);
-
- /// We need this destructor to keep some compilers from complaining.
- /// It's just a no-op, however.
- ~ACE_ARGV_Queue_Entry_T (void);
-
- /// Dump the state of this object.
- void dump (void) const;
-
- // Declare the dynamic allocation hooks.
- ACE_ALLOC_HOOK_DECLARE;
-
- /// Pointer to the argument.
- const CHAR_TYPE * arg_;
-
- /// The argument need to be quoted while adding to the vector.
- bool quote_arg_;
-};
-
-/**
* @class ACE_ARGV_T
*
* @brief Builds a counted argument vector (ala argc/argv) from either
@@ -127,13 +79,9 @@ public:
* an environment variable reference (e.g., @c $VAR) will have
* its environment variable value in the resultant vector
* in place of the environment variable name.
- *
- * @param quote_args If non-zero each argument @a argv[i] needs to
- * be enclosed in double quotes ('"').
*/
ACE_ARGV_T (CHAR_TYPE *argv[],
- bool substitute_env_args = true,
- bool quote_args = false);
+ bool substitute_env_args = true);
/**
* Initializes the argument vector from two combined argument vectors.
@@ -148,15 +96,10 @@ public:
* reference (e.g., @c $VAR) will have its environment
* variable value in the resultant vector in place
* of the environment variable name.
- *
- * @param quote_args If non-zero each arguments @a first_argv[i] and
- * @a second_argv[i] needs to be enclosed
- * in double quotes ('"').
*/
ACE_ARGV_T (CHAR_TYPE *first_argv[],
CHAR_TYPE *second_argv[],
- bool substitute_env_args = true,
- bool quote_args = false);
+ bool substitute_env_args = true);
/**
* Initialize this object so arguments can be added later using one
@@ -218,14 +161,11 @@ public:
*
* @param next_arg Pointer to the next argument to add to the vector.
*
- * @param quote_arg The argument @a next_arg need to be quoted while
- * adding to the vector.
- *
* @retval 0 on success; -1 on failure. Most likely @c errno values are:
* - EINVAL: This object is not in iterative mode.
* - ENOMEM: Not enough memory available to save @a next_arg.
*/
- int add (const CHAR_TYPE *next_arg, bool quote_arg = false);
+ int add (const CHAR_TYPE *next_arg);
/**
* Add an array of arguments. This only works in the iterative mode.
@@ -238,14 +178,11 @@ public:
* @param argv Pointers to the arguments to add to the vector.
* @a argv must be terminated by a 0 pointer.
*
- * @param quote_args If non-zero each argument @a argv[i] needs to
- * be enclosed in double quotes ('"').
- *
* @retval 0 on success; -1 on failure. Most likely @c errno values are:
* - EINVAL: This object is not in iterative mode.
* - ENOMEM: Not enough memory available to save @a next_arg.
*/
- int add (CHAR_TYPE *argv[], bool quote_args = false);
+ int add (CHAR_TYPE *argv[]);
private:
/// Copy constructor not implemented.
@@ -260,6 +197,10 @@ private:
/// Converts buf_ into the CHAR_TYPE *argv[] format.
int string_to_argv (void);
+ /// Returns the string created from argv in buf and
+ /// returns the number of arguments.
+ int argv_to_string (CHAR_TYPE **argv, CHAR_TYPE *&buf);
+
/// Replace args with environment variable values?
bool substitute_env_args_;
@@ -280,10 +221,9 @@ private:
/// Queue which keeps user supplied arguments. This is only
/// active in the "iterative" mode.
- ACE_Unbounded_Queue<ACE_ARGV_Queue_Entry_T<CHAR_TYPE> > queue_;
+ ACE_Unbounded_Queue<CHAR_TYPE *> queue_;
};
-typedef ACE_ARGV_Queue_Entry_T<ACE_TCHAR> ACE_ARGV_Queue_Entry;
typedef ACE_ARGV_T<ACE_TCHAR> ACE_ARGV;
// Close versioned namespace, if enabled by the user.
diff --git a/ACE/ace/ARGV.inl b/ACE/ace/ARGV.inl
index e84166f49ba..6924a95cca4 100644
--- a/ACE/ace/ARGV.inl
+++ b/ACE/ace/ARGV.inl
@@ -6,47 +6,12 @@
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-template <typename CHAR_TYPE> ACE_INLINE
-ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::ACE_ARGV_Queue_Entry_T (void)
- : arg_(0),
- quote_arg_(false)
-{
- // No-op
-}
-
-template <typename CHAR_TYPE> ACE_INLINE
-ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::ACE_ARGV_Queue_Entry_T (const CHAR_TYPE *arg,
- bool quote_arg)
- : arg_(arg),
- quote_arg_(quote_arg)
-{
- // No-op
-}
-
-template <typename CHAR_TYPE> ACE_INLINE
-ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T<CHAR_TYPE> &entry)
- : arg_(entry.arg_),
- quote_arg_(entry.quote_arg_)
-{
- // No-op
-}
-
-template <typename CHAR_TYPE> ACE_INLINE
-ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::~ACE_ARGV_Queue_Entry_T (void)
-{
- // No-op just to keep some compilers happy...
-}
-
// Return the number of args
template <typename CHAR_TYPE>
ACE_INLINE int
ACE_ARGV_T<CHAR_TYPE>::argc (void) const
{
ACE_TRACE ("ACE_ARGV_T::argc");
- // Try to create the argv_ if it isn't there
- ACE_ARGV_T<CHAR_TYPE> *nonconst_this =
- const_cast <ACE_ARGV_T<CHAR_TYPE> *> (this);
- (void) nonconst_this->argv ();
return this->argc_;
}
diff --git a/ACE/ace/Asynch_Acceptor.cpp b/ACE/ace/Asynch_Acceptor.cpp
index fd7525a30c8..374658afefe 100644
--- a/ACE/ace/Asynch_Acceptor.cpp
+++ b/ACE/ace/Asynch_Acceptor.cpp
@@ -12,7 +12,7 @@
ACE_RCSID(ace, Asynch_Acceptor, "$Id$")
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE)
// This only works on platforms that support async i/o.
#include "ace/OS_Errno.h"
@@ -239,6 +239,8 @@ ACE_Asynch_Acceptor<HANDLER>::accept (size_t bytes_to_read, const void *act)
template <class HANDLER> void
ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &result)
{
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || defined (ACE_HAS_AIO_CALLS)
+
ACE_TRACE ("ACE_Asynch_Acceptor<>::handle_accept");
// Variable for error tracking
@@ -250,7 +252,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
error = 1;
}
-#if defined (ACE_WIN32)
+#if !defined (ACE_HAS_AIO_CALLS)
// In order to use accept handle with other Window Sockets 1.1
// functions, we call the setsockopt function with the
// SO_UPDATE_ACCEPT_CONTEXT option. This option initializes the
@@ -265,7 +267,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
{
error = 1;
}
-#endif /* ACE_WIN32 */
+#endif /* ACE_HAS_AIO_CALLS */
// Parse address.
ACE_INET_Addr local_address;
@@ -340,6 +342,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
#endif
)
this->accept (this->bytes_to_read_);
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || defined (ACE_HAS_AIO_CALLS */
}
template <class HANDLER> int
@@ -367,14 +370,14 @@ ACE_Asynch_Acceptor<HANDLER>::cancel (void)
// All I/O operations that are canceled will complete with the error
// ERROR_OPERATION_ABORTED. All completion notifications for the I/O
// operations will occur normally.
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) && \
- (defined (_MSC_VER) || defined (__BORLANDC__))
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
+ && ( defined (_MSC_VER) || (defined (__BORLANDC__)))
return (int) ::CancelIo (this->listen_handle_);
#else
// Supported now
return this->asynch_accept_.cancel();
-#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) && (defined (_MSC_VER)) || defined (__BORLANDC__)) */
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && ((defined (_MSC_VER)) || (defined (__BORLANDC__))) */
}
template <class HANDLER> void
@@ -393,7 +396,7 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (const
str.get_local_addr (local_address);
str.get_remote_addr (remote_address);
-#elif defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
+#elif (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
ACE_Message_Block &message_block = result.message_block ();
@@ -424,7 +427,7 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (const
#else
// just in case
errno = ENOTSUP;
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
return;
}
diff --git a/ACE/ace/Asynch_Acceptor.h b/ACE/ace/Asynch_Acceptor.h
index f615557feb8..80ae20a3667 100644
--- a/ACE/ace/Asynch_Acceptor.h
+++ b/ACE/ace/Asynch_Acceptor.h
@@ -20,7 +20,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE)
// This only works on platforms that support async i/o.
#include "ace/Default_Constants.h"
@@ -291,6 +291,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#pragma implementation ("Asynch_Acceptor.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */
#include /**/ "ace/post.h"
#endif /* ACE_ASYNCH_ACCEPTOR_H */
diff --git a/ACE/ace/Asynch_IO.cpp b/ACE/ace/Asynch_IO.cpp
index 07027962100..cfcaf28aa2c 100644
--- a/ACE/ace/Asynch_IO.cpp
+++ b/ACE/ace/Asynch_IO.cpp
@@ -4,7 +4,7 @@
ACE_RCSID(ace, Asynch_IO, "$Id$")
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
// This only works on platforms with Asynchronous IO
#include "ace/Proactor.h"
@@ -187,7 +187,7 @@ ACE_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
signal_number);
}
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
int
ACE_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
size_t bytes_to_read,
@@ -201,7 +201,7 @@ ACE_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
priority,
signal_number);
}
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Read_Stream::implementation (void) const
@@ -295,7 +295,7 @@ ACE_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
signal_number);
}
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
int
ACE_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
size_t bytes_to_write,
@@ -309,7 +309,7 @@ ACE_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
priority,
signal_number);
}
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Write_Stream::implementation (void) const
@@ -1330,6 +1330,6 @@ ACE_Asynch_Write_Dgram::Result::~Result (void)
{
}
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Asynch_IO.h b/ACE/ace/Asynch_IO.h
index 873ef6f40e9..c4ae5c8ca3b 100644
--- a/ACE/ace/Asynch_IO.h
+++ b/ACE/ace/Asynch_IO.h
@@ -33,7 +33,7 @@
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
#include "ace/Synch_Traits.h"
#if defined (ACE_HAS_THREADS)
@@ -49,7 +49,8 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+# if defined (ACE_WIN32) && ! defined (ACE_HAS_WINCE) \
+ && ! defined (ACE_HAS_PHARLAP)
typedef TRANSMIT_FILE_BUFFERS ACE_TRANSMIT_FILE_BUFFERS;
typedef LPTRANSMIT_FILE_BUFFERS ACE_LPTRANSMIT_FILE_BUFFERS;
typedef PTRANSMIT_FILE_BUFFERS ACE_PTRANSMIT_FILE_BUFFERS;
@@ -58,7 +59,7 @@ typedef PTRANSMIT_FILE_BUFFERS ACE_PTRANSMIT_FILE_BUFFERS;
# define ACE_STATUS_TIMEOUT STATUS_TIMEOUT
# define ACE_WAIT_FAILED WAIT_FAILED
# define ACE_WAIT_TIMEOUT WAIT_TIMEOUT
-# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
+# else /* ACE_WIN32 */
struct ACE_TRANSMIT_FILE_BUFFERS
{
void *Head;
@@ -75,7 +76,7 @@ typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_LPTRANSMIT_FILE_BUFFERS;
# define ACE_STATUS_TIMEOUT LONG_MAX
# define ACE_WAIT_FAILED LONG_MAX
# define ACE_WAIT_TIMEOUT LONG_MAX
-# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+# endif /* ACE_WIN32 */
// Forward declarations
class ACE_Proactor;
@@ -337,7 +338,7 @@ public:
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
/**
* Same as above but with scatter support, through chaining of composite
* message blocks using the continuation field.
@@ -347,7 +348,7 @@ public:
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */
+#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
/// Return the underlying implementation class.
// (this should be protected...)
@@ -461,7 +462,7 @@ public:
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
/**
* Same as above but with gather support, through chaining of composite
* message blocks using the continuation field.
@@ -471,7 +472,7 @@ public:
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */
+#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
/// Return the underlying implementation class.
/// @todo (this should be protected...)
diff --git a/ACE/ace/Asynch_IO_Impl.cpp b/ACE/ace/Asynch_IO_Impl.cpp
index 5349f5e7ca1..8dba289d6ec 100644
--- a/ACE/ace/Asynch_IO_Impl.cpp
+++ b/ACE/ace/Asynch_IO_Impl.cpp
@@ -2,7 +2,7 @@
#include "ace/Asynch_IO_Impl.h"
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
// This only works on Win32 platforms and on Unix platforms supporting
// aio calls.
@@ -114,4 +114,4 @@ ACE_Asynch_Write_Dgram_Result_Impl::ACE_Asynch_Write_Dgram_Result_Impl (void)
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* ACE_WIN32 || ACE_HAS_WINCE */
diff --git a/ACE/ace/Asynch_IO_Impl.h b/ACE/ace/Asynch_IO_Impl.h
index b1af7a57d25..3e0af19f2e7 100644
--- a/ACE/ace/Asynch_IO_Impl.h
+++ b/ACE/ace/Asynch_IO_Impl.h
@@ -30,7 +30,7 @@
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
// This only works on Win32 platforms and on Unix platforms supporting
// aio calls.
@@ -811,6 +811,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#include "ace/Asynch_IO_Impl.inl"
#endif /* __ACE_INLINE__ */
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_AIO_CALLS || !ACE_HAS_WINCE && ACE_WIN32 */
#include /**/ "ace/post.h"
#endif /* ACE_ASYNCH_IO_IMPL_H */
diff --git a/ACE/ace/Atomic_Op_T.h b/ACE/ace/Atomic_Op_T.h
index ea5c5d201c4..35d1ceec8a5 100644
--- a/ACE/ace/Atomic_Op_T.h
+++ b/ACE/ace/Atomic_Op_T.h
@@ -46,57 +46,57 @@ class ACE_Atomic_Op_Ex
public:
// = Initialization methods.
- /// Initialize @c value_ to 0.
+ /// Initialize <value_> to 0.
ACE_Atomic_Op_Ex (ACE_LOCK &mtx);
- /// Initialize @c value_ to c.
+ /// Initialize <value_> to c.
ACE_Atomic_Op_Ex (ACE_LOCK &mtx, const TYPE &c);
// = Accessors.
- /// Atomically pre-increment @c value_.
+ /// Atomically pre-increment <value_>.
TYPE operator++ (void);
- /// Atomically post-increment @c value_.
+ /// Atomically post-increment <value_>.
TYPE operator++ (int);
- /// Atomically increment @c value_ by rhs.
+ /// Atomically increment <value_> by rhs.
TYPE operator+= (const TYPE &rhs);
- /// Atomically pre-decrement @c value_.
+ /// Atomically pre-decrement <value_>.
TYPE operator-- (void);
- /// Atomically post-decrement @c value_.
+ /// Atomically post-decrement <value_>.
TYPE operator-- (int);
- /// Atomically decrement @c value_ by rhs.
+ /// Atomically decrement <value_> by rhs.
TYPE operator-= (const TYPE &rhs);
- /// Atomically compare @c value_ with rhs.
+ /// Atomically compare <value_> with rhs.
bool operator== (const TYPE &rhs) const;
- /// Atomically compare @c value_ with rhs.
+ /// Atomically compare <value_> with rhs.
bool operator!= (const TYPE &rhs) const;
- /// Atomically check if @c value_ greater than or equal to rhs.
+ /// Atomically check if <value_> greater than or equal to rhs.
bool operator>= (const TYPE &rhs) const;
- /// Atomically check if @c value_ greater than rhs.
+ /// Atomically check if <value_> greater than rhs.
bool operator> (const TYPE &rhs) const;
- /// Atomically check if @c value_ less than or equal to rhs.
+ /// Atomically check if <value_> less than or equal to rhs.
bool operator<= (const TYPE &rhs) const;
- /// Atomically check if @c value_ less than rhs.
+ /// Atomically check if <value_> less than rhs.
bool operator< (const TYPE &rhs) const;
- /// Atomically assign rhs to @c value_.
+ /// Atomically assign rhs to <value_>.
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &operator= (const TYPE &rhs);
- /// Atomically assign <rhs> to @c value_.
+ /// Atomically assign <rhs> to <value_>.
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &operator= (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &rhs);
- /// Explicitly return @c value_.
+ /// Explicitly return <value_>.
TYPE value (void) const;
/// Dump the state of an object.
@@ -118,7 +118,7 @@ public:
ACE_LOCK &mutex (void);
/**
- * Explicitly return @c value_ (by reference). This gives the user
+ * Explicitly return <value_> (by reference). This gives the user
* full, unrestricted access to the underlying value. This method
* will usually be used in conjunction with explicit access to the
* lock. Use with care ;-)
@@ -151,58 +151,58 @@ template <class ACE_LOCK, class TYPE>
class ACE_Atomic_Op
{
public:
- /// Initialize @c value_ to 0.
+ /// Initialize <value_> to 0.
ACE_Atomic_Op (void);
- /// Initialize @c value_ to c.
+ /// Initialize <value_> to c.
ACE_Atomic_Op (const TYPE &c);
/// Manage copying...
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_LOCK, TYPE> &c);
- /// Atomically assign rhs to @c value_.
+ /// Atomically assign rhs to <value_>.
ACE_Atomic_Op<ACE_LOCK, TYPE> &operator= (const TYPE &rhs);
- /// Atomically assign <rhs> to @c value_.
+ /// Atomically assign <rhs> to <value_>.
ACE_Atomic_Op<ACE_LOCK, TYPE> &operator= (const ACE_Atomic_Op<ACE_LOCK, TYPE> &rhs);
- /// Atomically pre-increment @c value_.
+ /// Atomically pre-increment <value_>.
TYPE operator++ (void);
- /// Atomically post-increment @c value_.
+ /// Atomically post-increment <value_>.
TYPE operator++ (int);
- /// Atomically increment @c value_ by rhs.
+ /// Atomically increment <value_> by rhs.
TYPE operator+= (const TYPE &rhs);
- /// Atomically pre-decrement @c value_.
+ /// Atomically pre-decrement <value_>.
TYPE operator-- (void);
- /// Atomically post-decrement @c value_.
+ /// Atomically post-decrement <value_>.
TYPE operator-- (int);
- /// Atomically decrement @c value_ by rhs.
+ /// Atomically decrement <value_> by rhs.
TYPE operator-= (const TYPE &rhs);
- /// Atomically compare @c value_ with rhs.
+ /// Atomically compare <value_> with rhs.
bool operator== (const TYPE &rhs) const;
- /// Atomically compare @c value_ with rhs.
+ /// Atomically compare <value_> with rhs.
bool operator!= (const TYPE &rhs) const;
- /// Atomically check if @c value_ greater than or equal to rhs.
+ /// Atomically check if <value_> greater than or equal to rhs.
bool operator>= (const TYPE &rhs) const;
- /// Atomically check if @c value_ greater than rhs.
+ /// Atomically check if <value_> greater than rhs.
bool operator> (const TYPE &rhs) const;
- /// Atomically check if @c value_ less than or equal to rhs.
+ /// Atomically check if <value_> less than or equal to rhs.
bool operator<= (const TYPE &rhs) const;
- /// Atomically check if @c value_ less than rhs.
+ /// Atomically check if <value_> less than rhs.
bool operator< (const TYPE &rhs) const;
- /// Explicitly return @c value_.
+ /// Explicitly return <value_>.
TYPE value (void) const;
/// Dump the state of an object.
@@ -221,7 +221,7 @@ public:
ACE_LOCK &mutex (void);
/**
- * Explicitly return @c value_ (by reference). This gives the user
+ * Explicitly return <value_> (by reference). This gives the user
* full, unrestricted access to the underlying value. This method
* will usually be used in conjunction with explicit access to the
* lock. Use with care ;-)
diff --git a/ACE/ace/Basic_Stats.cpp b/ACE/ace/Basic_Stats.cpp
index 0f00f5b7332..f81b29bfcaa 100644
--- a/ACE/ace/Basic_Stats.cpp
+++ b/ACE/ace/Basic_Stats.cpp
@@ -70,9 +70,6 @@ ACE_Basic_Stats::dump_results (const ACE_TCHAR *msg,
l_avg,
l_max, this->max_at_));
-#else
- ACE_UNUSED_ARG (msg);
- ACE_UNUSED_ARG (sf);
#endif /* ACE_NLOGGING */
}
diff --git a/ACE/ace/Basic_Types.h b/ACE/ace/Basic_Types.h
index 48a0becdb12..367f3ace86d 100644
--- a/ACE/ace/Basic_Types.h
+++ b/ACE/ace/Basic_Types.h
@@ -392,8 +392,8 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# else /* ! BYTE_ORDER && ! __BYTE_ORDER */
// We weren't explicitly told, so we have to figure it out . . .
# if defined (i386) || defined (__i386__) || defined (_M_IX86) || \
- defined (vax) || defined (__alpha) || defined (__LITTLE_ENDIAN__) || \
- defined (ARM) || defined (_M_IA64) || defined (__ia64__) || \
+ defined (vax) || defined (__alpha) || defined (__LITTLE_ENDIAN__) ||\
+ defined (ARM) || defined (_M_IA64) || \
defined (_M_AMD64) || defined (__amd64)
// We know these are little endian.
# define ACE_LITTLE_ENDIAN 0x0123
diff --git a/ACE/ace/CDR_Stream.cpp b/ACE/ace/CDR_Stream.cpp
index b033d8a1587..516e4fd2c63 100644
--- a/ACE/ace/CDR_Stream.cpp
+++ b/ACE/ace/CDR_Stream.cpp
@@ -677,51 +677,6 @@ ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x,
return this->good_bit ();
}
-
-int
-ACE_OutputCDR::consolidate (void)
-{
- // Optimize by only doing something if we need to
- if (this->current_ != &this->start_)
- {
- // Set the number of bytes in the top-level block, reallocating
- // if necessary. The rd_ptr and wr_ptr remain at the original offsets
- // into the buffer, even if it is reallocated.
- // Return an error if the allocation failed.
- size_t newsize =
- ACE_CDR::first_size (this->total_length ()
- + ACE_CDR::MAX_ALIGNMENT);
- if (this->start_.size (newsize) < 0)
- {
- return -1;
- }
-
- // Consolidate the chain into the first block. NOTE that
- // ACE_CDR::consolidate can not be used since we don't want to
- // overwrite what is already in the first block. We just append it since
- // the read and write pointers weren't affected by the resizing above.
- // We also don't have to worry about alignment since the start block is
- // already aligned.
- // NOTE also we know there is a continuation since we checked for it
- // above. There is therefore no reason to check for a 0 continuation
- // field here.
- ACE_Message_Block *cont = this->start_.cont ();
- for (const ACE_Message_Block* i = cont; i != 0; i = i->cont ())
- {
- this->start_.copy (i->rd_ptr (), i->length ());
- }
-
- // Release the old blocks that were consolidated and reset the
- // current_ and current_is_writable_ to reflect the single used block.
- ACE_Message_Block::release (cont);
- this->start_.cont (0);
- this->current_ = &this->start_;
- this->current_is_writable_ = true;
- }
-
- return 0;
-}
-
ACE_Message_Block*
ACE_OutputCDR::find (char* loc)
diff --git a/ACE/ace/CDR_Stream.h b/ACE/ace/CDR_Stream.h
index 40504e1a2cf..3e4d23a92dc 100644
--- a/ACE/ace/CDR_Stream.h
+++ b/ACE/ace/CDR_Stream.h
@@ -138,8 +138,8 @@ public:
/**
* Create an output stream from an arbitrary data block, care must be
* exercised with alignment, because this contructor will align if
- * needed. In this case @a data_block will not point to the
- * start of the output stream. begin()->rd_ptr() points to the start
+ * needed. In this case the <data_block> buffer will not point to the
+ * start off the output stream. begin()->rd_prt() points to the start
* off the output stream. See ACE_ptr_align_binary() to properly align a
* pointer and use ACE_CDR::MAX_ALIGNMENT for the correct alignment.
*/
@@ -338,15 +338,6 @@ public:
/// Return the <current_> message block in chain.
const ACE_Message_Block *current (void) const;
- /// Replace the message block chain with a single message block.
- /**
- * Upon successful completion, there will be a single message block
- * containing the data from the complete message block chain.
- *
- * @note The only expected error is to run out of memory.
- */
- int consolidate (void);
-
/**
* Access the underlying buffer (read only). @note This
* method only returns a pointer to the first block in the
@@ -355,7 +346,7 @@ public:
const char *buffer (void) const;
/**
- * Return the size of first message block in the block chain. @note This
+ * Return the start and size of the internal buffer.@note This
* method only returns information about the first block in the
* chain.
*/
@@ -481,7 +472,7 @@ private:
/// The start of the chain of message blocks.
ACE_Message_Block start_;
- /// The current block in the chain where we are writing.
+ /// The current block in the chain were we are writing.
ACE_Message_Block *current_;
#if !defined (ACE_LACKS_CDR_IALIGNMENT)
diff --git a/ACE/ace/CORBA_macros.h b/ACE/ace/CORBA_macros.h
index 4a7a3c44bf0..8b36ec2f0a0 100644
--- a/ACE/ace/CORBA_macros.h
+++ b/ACE/ace/CORBA_macros.h
@@ -34,19 +34,6 @@
#include "ace/Exception_Macros.h"
-// The Windows MFC exception mechanism requires that a caught CException
-// (including the CMemoryException in use here) be freed using its Delete()
-// method. Thus, when MFC is in use and we're catching exceptions as a result
-// of new(), the exception's Delete() method has to be called. No other
-// platform imposes this sort of restriction/requirement. The Windows
-// config stuff (at least for MSVC/MFC) defines a ACE_del_bad_alloc macro
-// that works with its ACE_bad_alloc macro to implement this cleanup
-// requirement. Since no other platform requires this, define it as
-// empty here.
-#if !defined (ACE_del_bad_alloc)
-# define ACE_del_bad_alloc
-#endif
-
// If you wish to you use these macros for emulating exceptions on
// platforms which lack native exception support, you need to do the
// following:
@@ -420,7 +407,7 @@
# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \
do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
+ catch (ACE_bad_alloc) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
} while (0)
#else /* ! ACE_NEW_THROWS_EXCEPTIONS */
diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp
index 039c2a1c192..3201b66bd4a 100644
--- a/ACE/ace/Configuration.cpp
+++ b/ACE/ace/Configuration.cpp
@@ -576,12 +576,47 @@ ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section
}
int errnum;
+#if (ACE_HAS_WINNT4 != 0)
errnum = ACE_TEXT_RegDeleteKey (base_key, sub_section);
if (errnum != ERROR_SUCCESS)
{
errno = errnum;
return -1;
}
+#else
+ if (!recursive)
+ {
+ ACE_Configuration_Section_Key section;
+ if (open_section (key, sub_section, 0, section))
+ return -1;
+
+ HKEY sub_key;
+ if (load_key (section, sub_key))
+ return -1;
+
+ ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
+ DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
+ // Check for a an entry under the sub_key
+ if (ACE_TEXT_RegEnumKeyEx (sub_key,
+ 0,
+ name_buffer,
+ &buffer_size,
+ 0,
+ 0,
+ 0,
+ 0) == ERROR_SUCCESS)
+ {
+ errno = ERROR_DIR_NOT_EMPTY;
+ return -1;
+ }
+ }
+ errnum = ACE_TEXT_RegDeleteKey (base_key, sub_section);
+ if (errnum != ERROR_SUCCESS)
+ {
+ errno = errnum;
+ return -1;
+ }
+#endif
return 0;
}
diff --git a/ACE/ace/DLL_Manager.cpp b/ACE/ace/DLL_Manager.cpp
index 4290700b55e..378ccd7e9bb 100644
--- a/ACE/ace/DLL_Manager.cpp
+++ b/ACE/ace/DLL_Manager.cpp
@@ -281,7 +281,7 @@ ACE_DLL_Handle::close (int unload)
this->handle_ = ACE_SHLIB_INVALID_HANDLE;
}
- if (retval != 0 && ACE::debug ())
+ if (retval != 0)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("ACE (%P|%t) DLL_Handle::close - ")
ACE_LIB_TEXT ("Failed with: \"%s\".\n"),
@@ -339,6 +339,8 @@ ACE_DLL_Handle::get_handle (int become_owner)
ACE_TRACE ("ACE_DLL_Handle::get_handle");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
+ ACE_SHLIB_HANDLE handle = ACE_SHLIB_INVALID_HANDLE;
+
if (this->refcount_ == 0 && become_owner != 0)
{
if (ACE::debug ())
@@ -349,7 +351,7 @@ ACE_DLL_Handle::get_handle (int become_owner)
return ACE_SHLIB_INVALID_HANDLE;
}
- ACE_SHLIB_HANDLE handle = this->handle_;
+ handle = this->handle_;
if (become_owner != 0)
{
diff --git a/ACE/ace/Default_Constants.h b/ACE/ace/Default_Constants.h
index 754904ea84f..15aeb799399 100644
--- a/ACE/ace/Default_Constants.h
+++ b/ACE/ace/Default_Constants.h
@@ -278,11 +278,18 @@
// Default file permissions.
# if !defined (ACE_DEFAULT_FILE_PERMS)
-# if defined (ACE_VXWORKS)
+# if defined (ACE_WIN32)
+# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
+# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE | \
+ FILE_SHARE_DELETE)
+# else
+# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE)
+# endif /* ACE_HAS_WINNT4 */
+# elif defined (ACE_VXWORKS)
# define ACE_DEFAULT_FILE_PERMS (S_IRUSR | S_IWUSR| S_IRGRP| S_IROTH)
# else
# define ACE_DEFAULT_FILE_PERMS 0644
-# endif /* ACE_VXWORKS */
+# endif /* ACE_WIN32 */
# endif /* ACE_DEFAULT_FILE_PERMS */
// Default directory permissions.
diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp
index 8bf63534735..3f181426598 100644
--- a/ACE/ace/Dev_Poll_Reactor.cpp
+++ b/ACE/ace/Dev_Poll_Reactor.cpp
@@ -104,7 +104,7 @@ ACE_Dev_Poll_Reactor_Notify::open (ACE_Reactor_Impl *r,
#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
// Set the read handle into non-blocking mode since we need to
- // perform a "speculative" read when determining if there are
+ // perform a "speculative" read when determining if their are
// notifications to dispatch.
if (ACE::set_flags (this->notification_pipe_.read_handle (),
ACE_NONBLOCK) == -1)
@@ -2228,12 +2228,12 @@ ACE_Dev_Poll_Reactor::handler (int signum,
return 0;
}
-bool
+int
ACE_Dev_Poll_Reactor::initialized (void)
{
ACE_TRACE ("ACE_Dev_Poll_Reactor::initialized");
- ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, false));
+ ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1));
return this->initialized_;
}
diff --git a/ACE/ace/Dev_Poll_Reactor.h b/ACE/ace/Dev_Poll_Reactor.h
index 41132201f01..a3b0d83635f 100644
--- a/ACE/ace/Dev_Poll_Reactor.h
+++ b/ACE/ace/Dev_Poll_Reactor.h
@@ -873,7 +873,7 @@ public:
/// Returns true if Reactor has been successfully initialized, else
/// false.
- virtual bool initialized (void);
+ virtual int initialized (void);
/// Returns the current size of the Reactor's internal descriptor
/// table.
diff --git a/ACE/ace/Dynamic_Service_Base.cpp b/ACE/ace/Dynamic_Service_Base.cpp
index 301361a0b2d..7c2bd20fcec 100644
--- a/ACE/ace/Dynamic_Service_Base.cpp
+++ b/ACE/ace/Dynamic_Service_Base.cpp
@@ -60,7 +60,7 @@ ACE_Dynamic_Service_Base::find_i (const ACE_Service_Gestalt* &repo,
{
// Check the static repo, too if different
if (repo == global)
- break;
+ break;
}
return svc_rec;
@@ -80,6 +80,7 @@ ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt* repo,
const ACE_Service_Type_Impl *type = 0;
const ACE_Service_Gestalt* repo_found = repo;
+
const ACE_Service_Type *svc_rec = find_i (repo_found, name, no_global);
if (svc_rec != 0)
{
diff --git a/ACE/ace/FlReactor/FlReactor.cpp b/ACE/ace/FlReactor.cpp
index 611b9a14a19..f45ce67a994 100644
--- a/ACE/ace/FlReactor/FlReactor.cpp
+++ b/ACE/ace/FlReactor.cpp
@@ -1,6 +1,6 @@
// $Id$
-#include "ace/FlReactor/FlReactor.h"
+#include "ace/FlReactor.h"
ACE_RCSID(ace, FlReactor, "$Id$")
diff --git a/ACE/ace/FlReactor/FlReactor.h b/ACE/ace/FlReactor.h
index e35572b99e1..5126c52e0aa 100644
--- a/ACE/ace/FlReactor/FlReactor.h
+++ b/ACE/ace/FlReactor.h
@@ -25,7 +25,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/FlReactor/ACE_FlReactor_export.h"
+#include "ace/ACE_FlReactor_export.h"
#include "ace/Select_Reactor.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/INET_Addr.cpp b/ACE/ace/INET_Addr.cpp
index b32fe9ddfb5..3c978d006bc 100644
--- a/ACE/ace/INET_Addr.cpp
+++ b/ACE/ace/INET_Addr.cpp
@@ -36,37 +36,27 @@ ACE_INET_Addr::addr_to_string (ACE_TCHAR s[],
ACE_TRACE ("ACE_INET_Addr::addr_to_string");
// XXX Can we (should we) include the scope id for IPv6 addresses?
- char hoststr[MAXHOSTNAMELEN+1];
- bool result = false;
- if (ipaddr_format == 0)
- result = (this->get_host_name (hoststr,MAXHOSTNAMELEN+1) == 0);
- else
- result = (this->get_host_addr (hoststr,MAXHOSTNAMELEN+1) != 0);
-
- if (!result)
- return -1;
-
- size_t total_len =
- ACE_OS::strlen (hoststr)
- + 5 // ACE_OS::strlen ("65535"), Assuming the max port number.
- + 1 // sizeof (':'), addr/port sep
- + 1; // sizeof ('\0'), terminating NUL
- ACE_TCHAR const *format = ACE_LIB_TEXT("%s:%d");
-#if defined (ACE_HAS_IPV6)
- if (ACE_OS::strchr(hoststr,':') != 0)
- {
- total_len += 2; // ACE_OS::strlen ("[]") IPv6 addr frames
- format = ACE_LIB_TEXT("[%s]:%d");
- }
-#endif // ACE_HAS_IPV6
+ size_t const total_len =
+ (ipaddr_format == 0
+ ? ACE_OS::strlen (this->get_host_name ())
+ : ACE_OS::strlen (this->get_host_addr ()))
+ + ACE_OS::strlen ("65536") // Assume the max port number.
+ + sizeof (':')
+ + sizeof ('\0'); // For trailing '\0'.
if (size < total_len)
return -1;
else
- ACE_OS::sprintf (s, format,
- ACE_TEXT_CHAR_TO_TCHAR (hoststr), this->get_port_number ());
- return 0;
+ {
+ ACE_OS::sprintf (s,
+ ACE_LIB_TEXT ("%s:%d"),
+ ACE_TEXT_CHAR_TO_TCHAR (ipaddr_format == 0
+ ? this->get_host_name ()
+ : this->get_host_addr ()),
+ this->get_port_number ());
+ return 0;
+ }
}
void
@@ -327,9 +317,13 @@ ACE_INET_Addr::set (u_short port_number,
struct in_addr addrv4;
if (ACE_OS::inet_aton (host_name,
&addrv4) == 1)
+# if !defined (ACE_LACKS_NTOHL)
return this->set (port_number,
- encode ? ACE_NTOHL (addrv4.s_addr) : addrv4.s_addr,
+ encode ? ntohl (addrv4.s_addr) : addrv4.s_addr,
encode);
+# else
+ return -1;
+# endif /* ACE_LACKS_NTOHL */
else
{
# if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYNAME)
@@ -352,9 +346,13 @@ ACE_INET_Addr::set (u_short port_number,
(void) ACE_OS::memcpy ((void *) &addrv4.s_addr,
hp->h_addr,
hp->h_length);
+# if !defined (ACE_LACKS_NTOHL)
return this->set (port_number,
- encode ? ACE_NTOHL (addrv4.s_addr) : addrv4.s_addr,
+ encode ? ntohl (addrv4.s_addr) : addrv4.s_addr,
encode);
+# else
+ return -1;
+# endif /* ACE_LACKS_NTOHL */
}
}
#endif /* ACE_HAS_IPV6 */
@@ -367,6 +365,7 @@ static int get_port_number_from_name (const char port_name[],
{
int port_number = 0;
+#if !defined (ACE_LACKS_HTONS)
// Maybe port_name is directly a port number?
char *endp = 0;
port_number = static_cast<int> (ACE_OS::strtol (port_name, &endp, 10));
@@ -377,9 +376,10 @@ static int get_port_number_from_name (const char port_name[],
// store that value as the port number. NOTE: this number must
// be returned in network byte order!
u_short n = static_cast<u_short> (port_number);
- n = ACE_HTONS (n);
+ n = htons (n);
return n;
}
+#endif
// We try to resolve port number from its name.
@@ -656,18 +656,12 @@ ACE_INET_Addr::ACE_INET_Addr (const wchar_t port_name[],
: ACE_Addr (this->determine_type(), sizeof (inet_addr_))
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
-#if !defined (ACE_LACKS_HTONL)
this->reset ();
if (this->set (port_name,
htonl (inet_address),
protocol) == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
-#else
- ACE_UNUSED_ARG (port_name);
- ACE_UNUSED_ARG (inet_address);
- ACE_UNUSED_ARG (protocol);
-#endif
}
#endif /* ACE_HAS_WCHAR */
@@ -752,8 +746,12 @@ ACE_INET_Addr::set_port_number (u_short port_number,
{
ACE_TRACE ("ACE_INET_Addr::set_port_number");
+#if !defined (ACE_LACKS_HTONS)
if (encode)
- port_number = ACE_HTONS (port_number);
+ port_number = htons (port_number);
+#else
+ ACE_UNUSED_ARG (encode);
+#endif /* ACE_LACKS_HTONS */
#if defined (ACE_HAS_IPV6)
if (this->get_type () == AF_INET6)
@@ -1105,8 +1103,11 @@ ACE_INET_Addr::get_ip_address (void) const
return 0;
}
#endif /* ACE_HAS_IPV6 */
- return ACE_NTOHL (ACE_UINT32 (this->inet_addr_.in4_.sin_addr.s_addr));
+#if !defined (ACE_LACKS_NTOHL)
+ return ntohl (ACE_UINT32 (this->inet_addr_.in4_.sin_addr.s_addr));
+#else
return 0;
+#endif /* ACE_LACKS_NTOHL */
}
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/INET_Addr.h b/ACE/ace/INET_Addr.h
index 9d66e4b5418..f05b90667b0 100644
--- a/ACE/ace/INET_Addr.h
+++ b/ACE/ace/INET_Addr.h
@@ -315,9 +315,6 @@ public:
/// Return @c true if the IP address is IPv4/IPv6 loopback address.
bool is_loopback (void) const;
- /// Return @c true if the IP address is IPv4/IPv6 multicast address.
- bool is_multicast (void) const;
-
#if defined (ACE_HAS_IPV6)
/// Return @c true if the IP address is IPv6 linklocal address.
bool is_linklocal (void) const;
diff --git a/ACE/ace/INET_Addr.inl b/ACE/ace/INET_Addr.inl
index 50b5e5dcdb1..15af6fe0a42 100644
--- a/ACE/ace/INET_Addr.inl
+++ b/ACE/ace/INET_Addr.inl
@@ -208,19 +208,6 @@ ACE_INET_Addr::is_loopback (void) const
return (this->get_ip_address () == INADDR_LOOPBACK);
}
-// Return @c true if the IP address is IPv4/IPv6 multicast address.
-ACE_INLINE bool
-ACE_INET_Addr::is_multicast (void) const
-{
-#if defined (ACE_HAS_IPV6)
- if (this->get_type() == AF_INET6)
- return this->inet_addr_.in6_.sin6_addr.s6_addr[0] == 0xFF;
-#endif /* ACE_HAS_IPV6 */
- return
- this->inet_addr_.in4_.sin_addr.s_addr >= 0xE0000000 && // 224.0.0.0
- this->inet_addr_.in4_.sin_addr.s_addr <= 0xEFFFFFFF; // 239.255.255.255
-}
-
#if defined (ACE_HAS_IPV6)
// Return @c true if the IP address is IPv6 linklocal address.
ACE_INLINE bool
diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp
index 41b6e0bb4fb..52866c75050 100644
--- a/ACE/ace/Log_Msg.cpp
+++ b/ACE/ace/Log_Msg.cpp
@@ -1599,6 +1599,23 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
ACE_OS::sprintf (bp,
format,
static_cast <unsigned> (ACE_Thread::self ()));
+#elif defined (ACE_AIX_VERS) && (ACE_AIX_VERS <= 402)
+ // AIX's pthread_t (ACE_hthread_t) is a pointer, and it's
+ // a little ugly to send that through a %u format. So,
+ // get the kernel thread ID (tid_t) via thread_self() and
+ // display that instead.
+ // This isn't conditionalized on ACE_HAS_THREAD_SELF because
+ // 1. AIX 4.2 doesn't have that def anymore (it messes up
+ // other things)
+ // 2. OSF/1 V3.2 has that def, and I'm not sure what affect
+ // this would have on that.
+ // -Steve Huston, 19-Aug-97
+ ACE_OS::strcpy (fp, ACE_LIB_TEXT ("u"));
+ if (can_check)
+ this_len = ACE_OS::snprintf
+ (bp, bspace, format, thread_self());
+ else
+ this_len = ACE_OS::sprintf (bp, format, thread_self());
#elif defined (DIGITAL_UNIX)
ACE_OS::strcpy (fp, ACE_LIB_TEXT ("u"));
{
@@ -1684,26 +1701,33 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
case 'W':
{
-#if defined (ACE_HAS_WCHAR)
+#if defined (ACE_WIN32)
+ ACE_TCHAR *wstr = va_arg (argp, ACE_TCHAR *);
+# if defined (ACE_USES_WCHAR)
+ ACE_OS::strcpy (fp, ACE_LIB_TEXT ("s"));
+# else /* ACE_USES_WCHAR */
+ ACE_OS::strcpy (fp, ACE_LIB_TEXT ("S"));
+# endif /* ACE_USES_WCHAR */
+ if (can_check)
+ this_len = ACE_OS::snprintf
+ (bp, bspace, format, wstr ? wstr : ACE_LIB_TEXT ("(null)"));
+ else
+ this_len = ACE_OS::sprintf
+ (bp, format, wstr ? wstr : ACE_LIB_TEXT ("(null)"));
+#elif defined (ACE_HAS_WCHAR)
wchar_t *wchar_str = va_arg (argp, wchar_t *);
# if defined (HPUX)
ACE_OS::strcpy (fp, ACE_LIB_TEXT ("S"));
-# elif defined (ACE_WIN32)
-# if defined (ACE_USES_WCHAR)
- ACE_OS::strcpy (fp, ACE_LIB_TEXT ("s"));
-# else /* ACE_USES_WCHAR */
- ACE_OS::strcpy (fp, ACE_LIB_TEXT ("S"));
-# endif /* ACE_USES_WCHAR */
# else
ACE_OS::strcpy (fp, ACE_LIB_TEXT ("ls"));
# endif /* HPUX */
if (can_check)
this_len = ACE_OS::snprintf
- (bp, bspace, format, wchar_str ? wchar_str : ACE_TEXT_WIDE("(null)"));
+ (bp, bspace, format, wchar_str);
else
this_len = ACE_OS::sprintf
- (bp, format, wchar_str ? wchar_str : ACE_TEXT_WIDE("(null)"));
-#endif /* ACE_HAS_WCHAR */
+ (bp, format, wchar_str);
+#endif /* ACE_WIN32 / ACE_HAS_WCHAR */
ACE_UPDATE_COUNT (bspace, this_len);
}
break;
diff --git a/ACE/ace/Log_Msg_NT_Event_Log.cpp b/ACE/ace/Log_Msg_NT_Event_Log.cpp
index fc1844a81ce..8053624283c 100644
--- a/ACE/ace/Log_Msg_NT_Event_Log.cpp
+++ b/ACE/ace/Log_Msg_NT_Event_Log.cpp
@@ -103,15 +103,13 @@ int
ACE_Log_Msg_NT_Event_Log::log (ACE_Log_Record &log_record)
{
// Make a copy of the log text and replace any newlines with
- // CR-LF. Newline characters on their own do not appear correctly in
- // the event viewer. We allow for a doubling in the size of the msg
- // data for the worst case of all newlines.
+ // CR-LF. Newline characters on their own do not appear correctly
+ // in the event viewer. We allow for a doubling in the size of
+ // the msg data for the worst case of all newlines.
const ACE_TCHAR* src_msg_data = log_record.msg_data ();
ACE_TCHAR msg_data [ACE_Log_Record::MAXLOGMSGLEN * 2];
- for (size_t i = 0, j = 0;
- i < log_record.msg_data_len ();
- ++i)
+ for (long i = 0, j = 0; i < log_record.length (); ++i)
{
if (src_msg_data[i] == '\n')
{
diff --git a/ACE/ace/Log_Record.h b/ACE/ace/Log_Record.h
index 978f2ade5ae..36bda6f89ac 100644
--- a/ACE/ace/Log_Record.h
+++ b/ACE/ace/Log_Record.h
@@ -130,12 +130,10 @@ public:
/// power of 2, as defined by the enums in <ACE_Log_Priority>).
void priority (u_long num);
- /// Get the total length of the <Log_Record>, which includes the
- /// size of the various data member fields.
+ /// Get the length of the <Log_Record>.
long length (void) const;
- /// Set the total length of the <Log_Record>, which needs to account for
- /// the size of the various data member fields.
+ /// Set the length of the <Log_Record>.
void length (long);
/// Get the time stamp of the <Log_Record>.
diff --git a/ACE/ace/Makefile.am b/ACE/ace/Makefile.am
index 955b88be851..3f61d779a43 100644
--- a/ACE/ace/Makefile.am
+++ b/ACE/ace/Makefile.am
@@ -6,7 +6,7 @@
## this file will be lost the next time it is generated.
##
## MPC Command:
-## ./bin/mwc.pl -type automake -noreldefs ACE.mwc
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -exclude build,Kokyu
includedir = @includedir@/ace
pkgconfigdir = @libdir@/pkgconfig
@@ -16,7 +16,7 @@ ACE_ROOT = $(top_srcdir)
SUBDIRS = \
. \
- QoS \
+ QoS \
SSL
CLEANFILES =
@@ -33,6 +33,8 @@ lib_LTLIBRARIES += libACE.la
libACE_la_CPPFLAGS = \
-I$(ACE_ROOT) \
-I$(ACE_BUILDDIR) \
+ -DACE_HAS_ACE_TOKEN \
+ -DACE_HAS_ACE_SVCCONF \
-DACE_BUILD_DLL
libACE_la_SOURCES = \
@@ -239,7 +241,6 @@ libACE_la_SOURCES = \
Registry_Name_Space.cpp \
Remote_Name_Space.cpp \
Remote_Tokens.cpp \
- Rtems_init.c \
SOCK.cpp \
SOCK_Acceptor.cpp \
SOCK_CODgram.cpp \
@@ -391,7 +392,6 @@ nobase_include_HEADERS += \
Asynch_Pseudo_Task.h \
Atomic_Op.h \
Atomic_Op.inl \
- Atomic_Op_Sparc.h \
Atomic_Op_T.cpp \
Atomic_Op_T.h \
Atomic_Op_T.inl \
@@ -568,9 +568,6 @@ nobase_include_HEADERS += \
Hash_Map_With_Allocator_T.cpp \
Hash_Map_With_Allocator_T.h \
Hash_Map_With_Allocator_T.inl \
- Hash_Multi_Map_Manager_T.cpp \
- Hash_Multi_Map_Manager_T.h \
- Hash_Multi_Map_Manager_T.inl \
Hashable.h \
Hashable.inl \
High_Res_Timer.h \
@@ -704,9 +701,7 @@ nobase_include_HEADERS += \
Null_Condition.h \
Null_Mutex.h \
Null_Semaphore.h \
- Numeric_Limits.h \
OS.h \
- OS.inl \
OS_Dirent.h \
OS_Errno.h \
OS_Errno.inl \
@@ -1211,7 +1206,7 @@ CLEANFILES += \
ACE.pc
ACE.pc: ${top_builddir}/config.status ${srcdir}/ACE.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/ACE.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE.pc.in
endif !BUILD_ACE_FOR_TAO
@@ -1235,7 +1230,7 @@ libACE_FlReactor_la_CPPFLAGS = \
-DACE_FLREACTOR_BUILD_DLL
libACE_FlReactor_la_SOURCES = \
- FlReactor/FlReactor.cpp
+ FlReactor.cpp
libACE_FlReactor_la_LDFLAGS = \
-release @ACE_VERSION_NAME@ $(ACE_FLTK_LDFLAGS)
@@ -1245,8 +1240,8 @@ libACE_FlReactor_la_LIBADD = \
$(ACE_FLTK_LIBS)
nobase_include_HEADERS += \
- FlReactor/ACE_FlReactor_export.h \
- FlReactor/FlReactor.h
+ ACE_FlReactor_export.h \
+ FlReactor.h
pkgconfig_DATA += \
ACE_FlReactor.pc
@@ -1254,15 +1249,15 @@ pkgconfig_DATA += \
CLEANFILES += \
ACE_FlReactor.pc
-ACE_FlReactor.pc: ${top_builddir}/config.status ${srcdir}/FlReactor/ACE_FlReactor.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/FlReactor/ACE_FlReactor.pc.in
+ACE_FlReactor.pc: ${top_builddir}/config.status ${srcdir}/ACE_FlReactor.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE_FlReactor.pc.in
endif BUILD_X11
endif BUILD_GL
endif BUILD_FL
EXTRA_DIST += \
- FlReactor/ACE_FlReactor.pc.in
+ ACE_FlReactor.pc.in
## Makefile.ACE_QtReactor.am
@@ -1270,13 +1265,13 @@ EXTRA_DIST += \
if BUILD_QT
BUILT_SOURCES = \
- QtReactor/QtReactor_moc.cpp
+ QtReactor_moc.cpp
CLEANFILES += \
- QtReactor/QtReactor_moc.cpp
+ QtReactor_moc.cpp
-QtReactor/QtReactor_moc.cpp: $(srcdir)/QtReactor/QtReactor.h
- $(QTDIR)/bin/moc $(srcdir)/QtReactor/QtReactor.h -o QtReactor/QtReactor_moc.cpp
+QtReactor_moc.cpp: $(srcdir)/QtReactor.h
+ $(QTDIR)/bin/moc -o QtReactor_moc.cpp $(srcdir)/QtReactor.h
lib_LTLIBRARIES += libACE_QtReactor.la
@@ -1287,8 +1282,8 @@ libACE_QtReactor_la_CPPFLAGS = \
-DACE_QTREACTOR_BUILD_DLL
libACE_QtReactor_la_SOURCES = \
- QtReactor/QtReactor.cpp \
- QtReactor/QtReactor_moc.cpp
+ QtReactor.cpp \
+ QtReactor_moc.cpp
libACE_QtReactor_la_LDFLAGS = \
-release @ACE_VERSION_NAME@ $(ACE_QT_LDFLAGS)
@@ -1298,8 +1293,8 @@ libACE_QtReactor_la_LIBADD = \
$(ACE_QT_LIBS)
nobase_include_HEADERS += \
- QtReactor/ACE_QtReactor_export.h \
- QtReactor/QtReactor.h
+ ACE_QtReactor_export.h \
+ QtReactor.h
pkgconfig_DATA += \
ACE_QtReactor.pc
@@ -1307,13 +1302,13 @@ pkgconfig_DATA += \
CLEANFILES += \
ACE_QtReactor.pc
-ACE_QtReactor.pc: ${top_builddir}/config.status ${srcdir}/QtReactor/ACE_QtReactor.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/QtReactor/ACE_QtReactor.pc.in
+ACE_QtReactor.pc: ${top_builddir}/config.status ${srcdir}/ACE_QtReactor.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE_QtReactor.pc.in
endif BUILD_QT
EXTRA_DIST += \
- QtReactor/ACE_QtReactor.pc.in
+ ACE_QtReactor.pc.in
## Makefile.ACE_TkReactor.am
@@ -1330,7 +1325,7 @@ libACE_TkReactor_la_CPPFLAGS = \
-DACE_TKREACTOR_BUILD_DLL
libACE_TkReactor_la_SOURCES = \
- TkReactor/TkReactor.cpp
+ TkReactor.cpp
libACE_TkReactor_la_LDFLAGS = \
-release @ACE_VERSION_NAME@ $(ACE_TK_LDFLAGS) $(ACE_TCL_LDFLAGS)
@@ -1341,8 +1336,8 @@ libACE_TkReactor_la_LIBADD = \
$(ACE_TCL_LIBS)
nobase_include_HEADERS += \
- TkReactor/ACE_TkReactor_export.h \
- TkReactor/TkReactor.h
+ ACE_TkReactor_export.h \
+ TkReactor.h
pkgconfig_DATA += \
ACE_TkReactor.pc
@@ -1350,13 +1345,13 @@ pkgconfig_DATA += \
CLEANFILES += \
ACE_TkReactor.pc
-ACE_TkReactor.pc: ${top_builddir}/config.status ${srcdir}/TkReactor/ACE_TkReactor.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/TkReactor/ACE_TkReactor.pc.in
+ACE_TkReactor.pc: ${top_builddir}/config.status ${srcdir}/ACE_TkReactor.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE_TkReactor.pc.in
endif BUILD_TK
EXTRA_DIST += \
- TkReactor/ACE_TkReactor.pc.in
+ ACE_TkReactor.pc.in
## Makefile.ACE_XtReactor.am
@@ -1374,7 +1369,7 @@ libACE_XtReactor_la_CPPFLAGS = \
-DACE_XTREACTOR_BUILD_DLL
libACE_XtReactor_la_SOURCES = \
- XtReactor/XtReactor.cpp
+ XtReactor.cpp
libACE_XtReactor_la_LDFLAGS = \
-release @ACE_VERSION_NAME@ $(ACE_X11_LDFLAGS) $(ACE_XT_LDFLAGS)
@@ -1385,8 +1380,8 @@ libACE_XtReactor_la_LIBADD = \
$(ACE_X11_LIBS)
nobase_include_HEADERS += \
- XtReactor/ACE_XtReactor_export.h \
- XtReactor/XtReactor.h
+ ACE_XtReactor_export.h \
+ XtReactor.h
pkgconfig_DATA += \
ACE_XtReactor.pc
@@ -1394,14 +1389,14 @@ pkgconfig_DATA += \
CLEANFILES += \
ACE_XtReactor.pc
-ACE_XtReactor.pc: ${top_builddir}/config.status ${srcdir}/XtReactor/ACE_XtReactor.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/XtReactor/ACE_XtReactor.pc.in
+ACE_XtReactor.pc: ${top_builddir}/config.status ${srcdir}/ACE_XtReactor.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE_XtReactor.pc.in
endif BUILD_XT
endif BUILD_X11
EXTRA_DIST += \
- XtReactor/ACE_XtReactor.pc.in
+ ACE_XtReactor.pc.in
## Clean up template repositories, etc.
diff --git a/ACE/ace/Malloc_T.cpp b/ACE/ace/Malloc_T.cpp
index 674b1916f33..d59436ac2b6 100644
--- a/ACE/ace/Malloc_T.cpp
+++ b/ACE/ace/Malloc_T.cpp
@@ -483,7 +483,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
if (this->lock_ == 0)
return;
- this->delete_lock_ = true;
+ this->delete_lock_ = 1;
this->bad_flag_ = this->open ();
@@ -508,7 +508,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
if (this->lock_ == 0)
return;
- this->delete_lock_ = true;
+ this->delete_lock_ = 1;
this->bad_flag_ = this->open ();
if (this->bad_flag_ == -1)
@@ -525,7 +525,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
: cb_ptr_ (0),
memory_pool_ (pool_name, options),
lock_ (lock),
- delete_lock_ (false),
+ delete_lock_ (0),
bad_flag_ (0)
{
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
@@ -560,7 +560,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p
if (this->lock_ == 0)
return;
- this->delete_lock_ = true;
+ this->delete_lock_ = 1;
this->bad_flag_ = this->open ();
if (this->bad_flag_ == -1)
ACE_ERROR ((LM_ERROR,
diff --git a/ACE/ace/Malloc_T.h b/ACE/ace/Malloc_T.h
index a8c11e4d0fa..021a13c2e58 100644
--- a/ACE/ace/Malloc_T.h
+++ b/ACE/ace/Malloc_T.h
@@ -661,9 +661,7 @@ private:
/// Lock that ensures mutual exclusion for the memory pool.
ACE_LOCK *lock_;
-
- /// True if destructor should delete the lock
- bool delete_lock_;
+ int delete_lock_; // True if destructor should delete the lock
/// Keep track of failure in constructor.
int bad_flag_;
diff --git a/ACE/ace/Map_Manager.cpp b/ACE/ace/Map_Manager.cpp
index 7ee226e8821..f39124ce9d9 100644
--- a/ACE/ace/Map_Manager.cpp
+++ b/ACE/ace/Map_Manager.cpp
@@ -170,7 +170,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::move_all_free_slots_from_occupied_lis
if (current_slot.free_)
{
// Reset free flag to zero before moving to free list.
- current_slot.free_ = false;
+ current_slot.free_ = 0;
// Move from occupied list to free list.
this->move_from_occupied_list_to_free_list (position_of_current_slot);
@@ -461,7 +461,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_slot (ACE_UINT32 slot)
// run out of free slots in the free list.
//
- this->search_structure_[slot].free_ = true;
+ this->search_structure_[slot].free_ = 1;
#else
@@ -530,7 +530,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::resize_i (ACE_UINT32 new_size)
// flag to be zero so that we don't have to set it when the slot
// is moved to the occupied list. In addition, this flag has no
// meaning while this slot is in the free list.
- temp[i].free_ = false;
+ temp[i].free_ = 0;
#endif /* ACE_HAS_LAZY_MAP_MANAGER */
diff --git a/ACE/ace/Map_Manager.h b/ACE/ace/Map_Manager.h
index 2c3f800c6bc..d57da083b03 100644
--- a/ACE/ace/Map_Manager.h
+++ b/ACE/ace/Map_Manager.h
@@ -39,9 +39,6 @@ template <class EXT_ID, class INT_ID>
class ACE_Map_Entry
{
public:
- /// Initialize member variables.
- ACE_Map_Entry (void);
-
/// We need this destructor to keep some compilers from complaining.
/// It's just a no-op, however.
~ACE_Map_Entry (void);
@@ -82,7 +79,7 @@ public:
#if defined (ACE_HAS_LAZY_MAP_MANAGER)
/// Is this entry free?
- bool free_;
+ int free_;
#endif /* ACE_HAS_LAZY_MAP_MANAGER */
diff --git a/ACE/ace/Map_Manager.inl b/ACE/ace/Map_Manager.inl
index a3718734763..493d6c6a5c1 100644
--- a/ACE/ace/Map_Manager.inl
+++ b/ACE/ace/Map_Manager.inl
@@ -8,16 +8,6 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <class EXT_ID, class INT_ID> ACE_INLINE
-ACE_Map_Entry<EXT_ID, INT_ID>::ACE_Map_Entry (void)
- : next_ (0),
- prev_ (0)
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
- , free_ (1)
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-{
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE
ACE_Map_Entry<EXT_ID, INT_ID>::~ACE_Map_Entry (void)
{
// No-op just to keep some compilers happy...
diff --git a/ACE/ace/Mem_Map.cpp b/ACE/ace/Mem_Map.cpp
index 0f8775018c4..d2bc4102ce6 100644
--- a/ACE/ace/Mem_Map.cpp
+++ b/ACE/ace/Mem_Map.cpp
@@ -13,12 +13,49 @@
#include "ace/Log_Msg.h"
#include "ace/Truncate.h"
+#if defined (ACE_WIN32) \
+ && (!defined(ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0))
+# define ACE_USE_MAPPING_NAME 1
+#endif /* ACE_WIN32 */
+
+#if defined (ACE_USE_MAPPING_NAME)
+#include "ace/SString.h"
+#endif /* ACE_USE_MAPPING_NAME */
+
ACE_RCSID(ace, Mem_Map, "Mem_Map.cpp,v 4.39 2003/11/01 11:15:13 dhinton Exp")
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Mem_Map)
+#if defined (ACE_USE_MAPPING_NAME)
+// Gets a mapping object name from a file name. TODO: The file name
+// is used as the key to the mapping. We should try to avoid mapping
+// the same object name to different files (there is a mapping object
+// name length limitation).
+
+static void
+to_mapping_name (ACE_TCHAR *mapobjname,
+ const ACE_TCHAR *filename,
+ size_t len)
+{
+ --len;
+ size_t i = 0;
+
+ while (*filename && i < len)
+ {
+ if (*filename == ACE_LIB_TEXT ('\\'))
+ // Can't use backslash in mapping object name.
+ mapobjname[i] = ACE_LIB_TEXT ('.');
+ else
+ mapobjname[i] = *filename;
+ ++filename;
+ ++i;
+ }
+
+ mapobjname[i] = 0;
+}
+#endif /* ACE_USE_MAPPING_NAME */
void
ACE_Mem_Map::dump (void) const
@@ -141,6 +178,31 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
return -1;
}
+#if defined (ACE_USE_MAPPING_NAME)
+ if (ACE_BIT_ENABLED (share, MAP_SHARED))
+ {
+# if defined(__MINGW32__)
+ const int max_mapping_name_length = 32;
+# else
+ const int max_mapping_name_length = 31;
+# endif /* __MINGW32__ */
+ ACE_TCHAR file_mapping_name[max_mapping_name_length + 1];
+ to_mapping_name (file_mapping_name,
+ filename_,
+ max_mapping_name_length + 1);
+
+ this->base_addr_ = ACE_OS::mmap (this->base_addr_,
+ this->length_,
+ prot,
+ share,
+ this->handle_,
+ offset,
+ &this->file_mapping_,
+ sa,
+ file_mapping_name);
+ }
+ else
+#endif /* ACE_USE_MAPPING_NAME */
this->base_addr_ = ACE_OS::mmap (this->base_addr_,
this->length_,
prot,
diff --git a/ACE/ace/Message_Queue.cpp b/ACE/ace/Message_Queue.cpp
index 7295c2b9c8f..504af19b0fb 100644
--- a/ACE/ace/Message_Queue.cpp
+++ b/ACE/ace/Message_Queue.cpp
@@ -379,7 +379,7 @@ ACE_Message_Queue_Vx::peek_dequeue_head (ACE_Message_Block *&,
#endif /* ACE_VXWORKS */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
ACE_Message_Queue_NT::ACE_Message_Queue_NT (DWORD max_threads)
: max_cthrs_ (max_threads),
@@ -597,6 +597,6 @@ ACE_Message_Queue_NT::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue.h b/ACE/ace/Message_Queue.h
index 5a4b26fbfd6..4f9fc0f107f 100644
--- a/ACE/ace/Message_Queue.h
+++ b/ACE/ace/Message_Queue.h
@@ -21,7 +21,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/IO_Cntl_Msg.h"
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
# include "ace/Thread_Mutex.h" /* Needed in ACE_Message_Queue_NT */
#endif
@@ -425,7 +425,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
/**
* @class ACE_Message_Queue_NT
*
@@ -617,7 +617,7 @@ private:
ACE_HANDLE completion_port_;
};
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue.inl b/ACE/ace/Message_Queue.inl
index 452b33f8e6f..388198a0bf5 100644
--- a/ACE/ace/Message_Queue.inl
+++ b/ACE/ace/Message_Queue.inl
@@ -25,7 +25,7 @@ ACE_Message_Queue_Vx::msgq (void)
#endif /* ACE_VXWORKS */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
ACE_INLINE int
ACE_Message_Queue_NT::enqueue_tail (ACE_Message_Block *new_item,
@@ -143,6 +143,6 @@ ACE_Message_Queue_NT::notification_strategy (ACE_Notification_Strategy *)
{
}
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue_T.cpp b/ACE/ace/Message_Queue_T.cpp
index 4eabd618369..9052769d52f 100644
--- a/ACE/ace/Message_Queue_T.cpp
+++ b/ACE/ace/Message_Queue_T.cpp
@@ -2791,7 +2791,7 @@ ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_Vx_message_queue (size_t max_me
}
// factory method for a wrapped VxWorks message queue
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
template <ACE_SYNCH_DECL>
ACE_Message_Queue_NT *
@@ -2805,7 +2805,7 @@ ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_NT_message_queue (size_t max_th
return tmp;
}
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
#endif /* defined (ACE_VXWORKS) */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue_T.h b/ACE/ace/Message_Queue_T.h
index b1695c84248..329258fabd0 100644
--- a/ACE/ace/Message_Queue_T.h
+++ b/ACE/ace/Message_Queue_T.h
@@ -28,9 +28,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Message_Queue_Vx;
#endif /* defined (ACE_VXWORKS) */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
class ACE_Message_Queue_NT;
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO*/
+#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
/**
* @class ACE_Message_Queue
@@ -933,13 +933,13 @@ public:
#endif /* defined (ACE_VXWORKS) */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
/// Factory method for a NT message queue.
static ACE_Message_Queue_NT *
create_NT_message_queue (size_t max_threads);
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
};
/**
diff --git a/ACE/ace/Msg_WFMO_Reactor.cpp b/ACE/ace/Msg_WFMO_Reactor.cpp
index bbc95b948fa..aaedb391b51 100644
--- a/ACE/ace/Msg_WFMO_Reactor.cpp
+++ b/ACE/ace/Msg_WFMO_Reactor.cpp
@@ -39,11 +39,20 @@ ACE_Msg_WFMO_Reactor::wait_for_multiple_events (int timeout,
// ReadFile and WriteFile operations. QS_ALLINPUT allows
// <MsgWaitForMultipleObjectsEx> to wait for any message is in the
// queue.
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
return ::MsgWaitForMultipleObjectsEx (this->handler_rep_.max_handlep1 (),
this->handler_rep_.handles (),
timeout,
QS_ALLINPUT,
alertable);
+#else
+ ACE_UNUSED_ARG (alertable);
+ return ::MsgWaitForMultipleObjects (this->handler_rep_.max_handlep1 (),
+ this->handler_rep_.handles (),
+ FALSE,
+ timeout,
+ QS_ALLINPUT);
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
}
int
@@ -59,7 +68,7 @@ ACE_Msg_WFMO_Reactor::dispatch_window_messages (void)
if (msg.message == WM_QUIT)
{
// Should inform the main thread
- ::PostQuitMessage (LOWORD (msg.wParam));
+ ::PostQuitMessage (msg.wParam);
return -1;
}
diff --git a/ACE/ace/Name_Proxy.cpp b/ACE/ace/Name_Proxy.cpp
index e33237069fd..82d0bd27eca 100644
--- a/ACE/ace/Name_Proxy.cpp
+++ b/ACE/ace/Name_Proxy.cpp
@@ -166,7 +166,7 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
case sizeof (ACE_UINT32):
{
// Transform the length into host byte order.
- ssize_t length = ACE_NTOHL (reply.length ());
+ ssize_t length = ntohl (reply.length ());
// Receive the rest of the request message.
// @@ beware of blocking read!!!.
diff --git a/ACE/ace/Name_Request_Reply.cpp b/ACE/ace/Name_Request_Reply.cpp
index e066b2ef4ac..f92bbf3c15d 100644
--- a/ACE/ace/Name_Request_Reply.cpp
+++ b/ACE/ace/Name_Request_Reply.cpp
@@ -269,17 +269,17 @@ ACE_Name_Request::encode (void *&buf)
for (size_t i = 0; i < nv_data_len; i++)
this->transfer_.data_[i] =
- ACE_HTONS (this->transfer_.data_[i]);
+ htons (this->transfer_.data_[i]);
buf = (void *) &this->transfer_;
- this->transfer_.block_forever_ = ACE_HTONL (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = ACE_HTONL (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = ACE_HTONL (this->transfer_.sec_timeout_);
- this->transfer_.length_ = ACE_HTONL (this->transfer_.length_);
- this->transfer_.msg_type_ = ACE_HTONL (this->transfer_.msg_type_);
- this->transfer_.name_len_ = ACE_HTONL (this->transfer_.name_len_);
- this->transfer_.value_len_ = ACE_HTONL (this->transfer_.value_len_);
- this->transfer_.type_len_ = ACE_HTONL (this->transfer_.type_len_);
+ this->transfer_.block_forever_ = htonl (this->transfer_.block_forever_);
+ this->transfer_.usec_timeout_ = htonl (this->transfer_.usec_timeout_);
+ this->transfer_.sec_timeout_ = htonl (this->transfer_.sec_timeout_);
+ this->transfer_.length_ = htonl (this->transfer_.length_);
+ this->transfer_.msg_type_ = htonl (this->transfer_.msg_type_);
+ this->transfer_.name_len_ = htonl (this->transfer_.name_len_);
+ this->transfer_.value_len_ = htonl (this->transfer_.value_len_);
+ this->transfer_.type_len_ = htonl (this->transfer_.type_len_);
return len;
}
@@ -292,14 +292,14 @@ ACE_Name_Request::decode (void)
{
ACE_TRACE ("ACE_Name_Request::decode");
// Decode the fixed-sized portion first.
- this->transfer_.block_forever_ = ACE_NTOHL (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = ACE_NTOHL (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = ACE_NTOHL (this->transfer_.sec_timeout_);
- this->transfer_.length_ = ACE_NTOHL (this->transfer_.length_);
- this->transfer_.msg_type_ = ACE_NTOHL (this->transfer_.msg_type_);
- this->transfer_.name_len_ = ACE_NTOHL (this->transfer_.name_len_);
- this->transfer_.value_len_ = ACE_NTOHL (this->transfer_.value_len_);
- this->transfer_.type_len_ = ACE_NTOHL (this->transfer_.type_len_);
+ this->transfer_.block_forever_ = ntohl (this->transfer_.block_forever_);
+ this->transfer_.usec_timeout_ = ntohl (this->transfer_.usec_timeout_);
+ this->transfer_.sec_timeout_ = ntohl (this->transfer_.sec_timeout_);
+ this->transfer_.length_ = ntohl (this->transfer_.length_);
+ this->transfer_.msg_type_ = ntohl (this->transfer_.msg_type_);
+ this->transfer_.name_len_ = ntohl (this->transfer_.name_len_);
+ this->transfer_.value_len_ = ntohl (this->transfer_.value_len_);
+ this->transfer_.type_len_ = ntohl (this->transfer_.type_len_);
size_t nv_data_len =
(this->transfer_.name_len_ + this->transfer_.value_len_)
@@ -307,7 +307,7 @@ ACE_Name_Request::decode (void)
for (size_t i = 0; i < nv_data_len; i++)
this->transfer_.data_[i] =
- ACE_NTOHS (this->transfer_.data_[i]);
+ ntohs (this->transfer_.data_[i]);
this->name_ = this->transfer_.data_;
this->value_ = &this->name_[this->transfer_.name_len_ / sizeof (ACE_WCHAR_T)];
@@ -513,9 +513,9 @@ ACE_Name_Reply::encode (void *&buf)
ACE_TRACE ("ACE_Name_Reply::encode");
int len = this->length (); // Get length *before* marshaling.
- this->transfer_.length_ = ACE_HTONL (this->transfer_.length_);
- this->transfer_.type_ = ACE_HTONL (this->transfer_.type_);
- this->transfer_.errno_ = ACE_HTONL (this->transfer_.errno_);
+ this->transfer_.length_ = htonl (this->transfer_.length_);
+ this->transfer_.type_ = htonl (this->transfer_.type_);
+ this->transfer_.errno_ = htonl (this->transfer_.errno_);
buf = (void *) &this->transfer_;
return len;
}
@@ -527,9 +527,9 @@ int
ACE_Name_Reply::decode (void)
{
ACE_TRACE ("ACE_Name_Reply::decode");
- this->transfer_.length_ = ACE_NTOHL (this->transfer_.length_);
- this->transfer_.type_ = ACE_NTOHL (this->transfer_.type_);
- this->transfer_.errno_ = ACE_NTOHL (this->transfer_.errno_);
+ this->transfer_.length_ = ntohl (this->transfer_.length_);
+ this->transfer_.type_ = ntohl (this->transfer_.type_);
+ this->transfer_.errno_ = ntohl (this->transfer_.errno_);
return 0;
}
diff --git a/ACE/ace/Null_Mutex.h b/ACE/ace/Null_Mutex.h
index 2072bf2db52..4d83ae67802 100644
--- a/ACE/ace/Null_Mutex.h
+++ b/ACE/ace/Null_Mutex.h
@@ -18,10 +18,6 @@
// All methods in this class are inline, so there is no
// need to import or export on Windows. -- CAE 12/18/2003
-// Update... leaving off the ACE_Export causes compile warnings in some
-// cases with Microsoft Visual Studio .NET 2005, so I added the ACE_Export
-// to these class declarations. Steve Huston, 12/8/2006.
-
#include "ace/os_include/os_errno.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -42,7 +38,7 @@ class ACE_Time_Value;
* @brief Implement a do nothing ACE_Mutex, i.e., all the methods are
* no ops.
*/
-class ACE_Export ACE_Null_Mutex
+class ACE_Null_Mutex
{
public:
ACE_Null_Mutex (const ACE_TCHAR * = 0)
@@ -101,7 +97,7 @@ public:
* This class is obsolete and should be replaced by
* ACE_Guard<ACE_Null_Mutex>.
*/
-class ACE_Export ACE_Null_Mutex_Guard
+class ACE_Null_Mutex_Guard
{
public:
ACE_Null_Mutex_Guard (ACE_Null_Mutex &) {}
@@ -133,7 +129,7 @@ class ACE_Guard;
* performance of the "Null_Mutex" considerably.
*/
template<>
-class ACE_Export ACE_Guard<ACE_Null_Mutex>
+class ACE_Guard<ACE_Null_Mutex>
{
public:
// = Initialization and termination methods.
@@ -168,8 +164,7 @@ class ACE_Write_Guard;
*
*/
template<>
-class ACE_Export ACE_Write_Guard<ACE_Null_Mutex>
- : public ACE_Guard<ACE_Null_Mutex>
+class ACE_Write_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex>
{
public:
ACE_Write_Guard (ACE_Null_Mutex &m)
@@ -192,8 +187,7 @@ class ACE_Read_Guard;
*
*/
template<>
-class ACE_Export ACE_Read_Guard<ACE_Null_Mutex>
- : public ACE_Guard<ACE_Null_Mutex>
+class ACE_Read_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex>
{
public:
ACE_Read_Guard (ACE_Null_Mutex &m)
@@ -215,7 +209,7 @@ template <class T> class ACE_Malloc_Lock_Adapter_T;
*
*/
template<>
-class ACE_Export ACE_Malloc_Lock_Adapter_T<ACE_Null_Mutex>
+class ACE_Malloc_Lock_Adapter_T<ACE_Null_Mutex>
{
public:
ACE_Null_Mutex * operator () (const ACE_TCHAR *name)
diff --git a/ACE/ace/OS_Errno.cpp b/ACE/ace/OS_Errno.cpp
index 6f9905cad1f..25266ae5c55 100644
--- a/ACE/ace/OS_Errno.cpp
+++ b/ACE/ace/OS_Errno.cpp
@@ -6,10 +6,9 @@
ACE_RCSID(ace, OS_Errno, "$Id$")
// Inlining this class on debug builds with gcc on Solaris can cause
-// deadlocks during static initialization. On non debug builds it
-// causes compilation errors.
+// deadlocks during static initialization.
#if !defined (ACE_HAS_INLINED_OSCALLS) || \
- (defined (__GNUG__) && defined (__sun__))
+ (defined (__GNUG__) && defined (__sun__) && !defined (ACE_NDEBUG))
# if defined (ACE_INLINE)
# undef ACE_INLINE
# endif /* ACE_INLINE */
diff --git a/ACE/ace/OS_Errno.h b/ACE/ace/OS_Errno.h
index 077aff14ff8..d67868631c1 100644
--- a/ACE/ace/OS_Errno.h
+++ b/ACE/ace/OS_Errno.h
@@ -86,10 +86,9 @@ private:
ACE_END_VERSIONED_NAMESPACE_DECL
// Inlining this class on debug builds with gcc on Solaris can cause
-// deadlocks during static initialization. On non debug builds it
-// causes compilation errors.
+// deadlocks during static initialization.
#if defined (ACE_HAS_INLINED_OSCALLS) && \
- (!defined (__GNUG__) || !defined (__sun__))
+ (!defined (__GNUG__) || !defined (__sun__) || defined (ACE_NDEBUG))
# if defined (ACE_INLINE)
# undef ACE_INLINE
# endif /* ACE_INLINE */
diff --git a/ACE/ace/OS_Memory.h b/ACE/ace/OS_Memory.h
index 70716bedfc2..2ca472e762e 100644
--- a/ACE/ace/OS_Memory.h
+++ b/ACE/ace/OS_Memory.h
@@ -81,19 +81,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# endif
#endif
-// The Windows MFC exception mechanism requires that a caught CException
-// (including the CMemoryException in use here) be freed using its Delete()
-// method. Thus, when MFC is in use and we're catching exceptions as a result
-// of new(), the exception's Delete() method has to be called. No other
-// platform imposes this sort of restriction/requirement. The Windows
-// config stuff (at least for MSVC/MFC) defines a ACE_del_bad_alloc macro
-// that works with its ACE_bad_alloc macro to implement this cleanup
-// requirement. Since no other platform requires this, define it as
-// empty here.
-#if !defined (ACE_del_bad_alloc)
-# define ACE_del_bad_alloc
-#endif
-
#if defined (ACE_NEW_THROWS_EXCEPTIONS)
// Since new() throws exceptions, we need a way to avoid passing
@@ -158,7 +145,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# elif defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
# include /**/ <new>
# if !defined (ACE_bad_alloc)
-# define ACE_bad_alloc std::bad_alloc
+ // MFC changes the behavior of operator new at all MSVC versions from 6 up.
+# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC == 1)
+# define ACE_bad_alloc CMemoryException*
+# else
+# define ACE_bad_alloc std::bad_alloc
+# endif
# endif
# define ACE_nothrow std::nothrow
# define ACE_nothrow_t std::nothrow_t
@@ -171,7 +163,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# else
# include /**/ <new>
# if !defined (ACE_bad_alloc)
-# define ACE_bad_alloc bad_alloc
+ // MFC changes the behavior of operator new at all MSVC versions from 6 up.
+# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC == 1)
+# define ACE_bad_alloc CMemoryException*
+# else
+# define ACE_bad_alloc bad_alloc
+# endif
# endif
# define ACE_nothrow nothrow
# define ACE_nothrow_t nothrow_t
@@ -201,17 +198,17 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_NEW_RETURN(POINTER,CONSTRUCTOR,RET_VAL) \
do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; POINTER = 0; return RET_VAL; } \
+ catch (ACE_bad_alloc) { errno = ENOMEM; POINTER = 0; return RET_VAL; } \
} while (0)
# define ACE_NEW(POINTER,CONSTRUCTOR) \
do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; POINTER = 0; return; } \
+ catch (ACE_bad_alloc) { errno = ENOMEM; POINTER = 0; return; } \
} while (0)
# define ACE_NEW_NORETURN(POINTER,CONSTRUCTOR) \
do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; POINTER = 0; } \
+ catch (ACE_bad_alloc) { errno = ENOMEM; POINTER = 0; } \
} while (0)
# endif /* ACE_HAS_NEW_NOTHROW */
diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp
index 014226cbbe2..fa59249af77 100644
--- a/ACE/ace/OS_NS_Thread.cpp
+++ b/ACE/ace/OS_NS_Thread.cpp
@@ -102,6 +102,19 @@ ACE_Thread_ID::to_string (char *thr_string) const
ACE_OS::sprintf (thr_string,
format,
static_cast <unsigned> (thread_id_));
+#elif defined (ACE_AIX_VERS) && (ACE_AIX_VERS <= 402)
+ // AIX's pthread_t (ACE_hthread_t) is a pointer, and it's
+ // a little ugly to send that through a %u format. So,
+ // get the kernel thread ID (tid_t) via thread_self() and
+ // display that instead.
+ // This isn't conditionalized on ACE_HAS_THREAD_SELF because
+ // 1. AIX 4.2 doesn't have that def anymore (it messes up
+ // other things)
+ // 2. OSF/1 V3.2 has that def, and I'm not sure what affect
+ // this would have on that.
+ // -Steve Huston, 19-Aug-97
+ ACE_OS::strcpy (fp, "u");
+ ACE_OS::sprintf (thr_string, format, thread_id_);
#elif defined (DIGITAL_UNIX)
ACE_OS::strcpy (fp, "u");
ACE_OS::sprintf (thr_string, format,
@@ -2599,31 +2612,15 @@ ACE_OS::event_init (ACE_event_t *event,
if (type == USYNC_PROCESS)
{
- const char *name_p = 0;
-# if defined (ACE_SHM_OPEN_REQUIRES_ONE_SLASH)
- char adj_name[MAXPATHLEN];
- if (name[0] != '/')
- {
- adj_name[0] = '/';
- ACE_OS::strsncpy (&adj_name[1], name, MAXPATHLEN-1);
- name_p = adj_name;
- }
- else
- {
- name_p = name;
- }
-# else
- name_p = name;
-# endif /* ACE_SHM_OPEN_REQUIRES_ONE_SLASH */
int owner = 0;
// Let's see if the shared memory entity already exists.
- ACE_HANDLE fd = ACE_OS::shm_open (ACE_TEXT_CHAR_TO_TCHAR (name_p),
+ ACE_HANDLE fd = ACE_OS::shm_open (ACE_TEXT_CHAR_TO_TCHAR (name),
O_RDWR | O_CREAT | O_EXCL,
ACE_DEFAULT_FILE_PERMS);
if (fd == ACE_INVALID_HANDLE)
{
if (errno == EEXIST)
- fd = ACE_OS::shm_open (ACE_TEXT_CHAR_TO_TCHAR (name_p),
+ fd = ACE_OS::shm_open (ACE_TEXT_CHAR_TO_TCHAR (name),
O_RDWR | O_CREAT,
ACE_DEFAULT_FILE_PERMS);
if (fd == ACE_INVALID_HANDLE) // Still can't get it.
@@ -2651,16 +2648,16 @@ ACE_OS::event_init (ACE_event_t *event,
if (evtdata == MAP_FAILED)
{
if (owner)
- ACE_OS::shm_unlink (ACE_TEXT_CHAR_TO_TCHAR (name_p));
+ ACE_OS::shm_unlink (ACE_TEXT_CHAR_TO_TCHAR (name));
return -1;
}
if (owner)
{
- event->name_ = ACE_OS::strdup (name_p);
+ event->name_ = ACE_OS::strdup (name);
if (event->name_ == 0)
{
- ACE_OS::shm_unlink (ACE_TEXT_CHAR_TO_TCHAR (name_p));
+ ACE_OS::shm_unlink (ACE_TEXT_CHAR_TO_TCHAR (name));
return -1;
}
event->eventdata_ = evtdata;
@@ -3629,8 +3626,6 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params,
return -1;
}
-# endif /* ACE_HAS_PHARLAP_RT */
-
if (sched_params.scope () == ACE_SCOPE_THREAD)
{
@@ -3651,16 +3646,13 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params,
}
#endif /* ACE_DISABLE_WIN32_INCREASE_PRIORITY */
+# endif /* ACE_HAS_PHARLAP_RT */
// Now that we have set the priority class of the process, set the
// priority of the current thread to the desired value.
return ACE_OS::thr_setprio (sched_params.priority ());
}
else if (sched_params.scope () == ACE_SCOPE_PROCESS)
{
-
-# if defined (ACE_HAS_PHARLAP_RT)
- ACE_NOTSUP_RETURN (-1);
-# else
HANDLE hProcess = ::OpenProcess (PROCESS_SET_INFORMATION,
FALSE,
id);
@@ -3687,8 +3679,6 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params,
}
::CloseHandle (hProcess);
return 0;
-#endif /* ACE_HAS_PHARLAP_RT */
-
}
else
{
@@ -4080,6 +4070,25 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
else
spolicy = SCHED_RR;
+# if defined (ACE_HAS_FSU_PTHREADS)
+ int ret;
+ switch (spolicy)
+ {
+ case SCHED_FIFO:
+ case SCHED_RR:
+ ret = 0;
+ break;
+ default:
+ ret = 22;
+ break;
+ }
+ if (ret != 0)
+ {
+ ::pthread_attr_destroy (&attr);
+ return -1;
+ }
+# endif /* ACE_HAS_FSU_PTHREADS */
+
# endif /* ACE_HAS_ONLY_SCHED_OTHER */
# if defined (ACE_HAS_PTHREADS_DRAFT4)
@@ -4152,6 +4161,17 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
sparam.sched_priority = priority;
# endif /* ACE_HAS_IRIX62_THREADS */
+# if defined (ACE_HAS_FSU_PTHREADS)
+ if (sparam.sched_priority >= PTHREAD_MIN_PRIORITY
+ && sparam.sched_priority <= PTHREAD_MAX_PRIORITY)
+ attr.prio = sparam.sched_priority;
+ else
+ {
+ pthread_attr_destroy (&attr);
+ errno = EINVAL;
+ return -1;
+ }
+# else
{
# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER)
// SunOS, through 5.6, POSIX only allows priorities > 0 to
@@ -4178,6 +4198,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
}
}
}
+# endif /* ACE_HAS_FSU_PTHREADS */
}
// *** Set scheduling explicit or inherited
@@ -4248,7 +4269,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
}
# endif /* !ACE_HAS_PTHREAD_ATTR_SETCREATESUSPEND_NP */
-# if ! defined(ACE_LACKS_THR_CONCURRENCY_FUNCS)
if (ACE_BIT_ENABLED (flags, THR_NEW_LWP))
{
// Increment the number of LWPs by one to emulate the
@@ -4275,7 +4295,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
return -1;
}
}
-# endif /* ! ACE_LACKS_THR_CONCURRENCY_FUNCS */
}
# if defined (ACE_HAS_PTHREADS_DRAFT4)
@@ -5109,6 +5128,16 @@ ACE_OS::thr_setspecific_native (ACE_OS_thread_key_t key, void *data)
// ACE_OS_TRACE ("ACE_OS::thr_setspecific_native");
# if defined (ACE_HAS_THREADS)
# if defined (ACE_HAS_PTHREADS)
+# if defined (ACE_HAS_FSU_PTHREADS)
+ // Call pthread_init() here to initialize threads package. FSU
+ // threads need an initialization before the first thread constructor.
+ // This seems to be the one; however, a segmentation fault may
+ // indicate that another pthread_init() is necessary, perhaps in
+ // Synch.cpp or Synch_T.cpp. FSU threads will not reinit if called
+ // more than once, so another call to pthread_init will not adversely
+ // affect existing threads.
+ pthread_init ();
+# endif /* ACE_HAS_FSU_PTHREADS */
# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
ACE_OSCALL_RETURN (::pthread_setspecific (key, data), int, -1);
# else
@@ -5532,3 +5561,18 @@ vx_execae (FUNCPTR entry, char* arg, int prio, int opt, int stacksz, ...)
}
#endif /* ACE_VXWORKS && !__RTP__ */
+#if defined (__DGUX) && defined (ACE_HAS_THREADS) && defined (_POSIX4A_DRAFT10_SOURCE)
+extern "C" int __d6_sigwait (sigset_t *set);
+
+extern "C" int __d10_sigwait (const sigset_t *set, int *sig)
+{
+ sigset_t unconst_set = *set;
+ int caught_sig = __d6_sigwait (&unconst_set);
+
+ if (caught == -1)
+ return -1;
+
+ *sig = caught_sig;
+ return 0;
+}
+#endif /* __DGUX && PTHREADS && _POSIX4A_DRAFT10_SOURCE */
diff --git a/ACE/ace/OS_NS_Thread.h b/ACE/ace/OS_NS_Thread.h
index c9f6c261a87..e6628d14f9b 100644
--- a/ACE/ace/OS_NS_Thread.h
+++ b/ACE/ace/OS_NS_Thread.h
@@ -313,7 +313,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define THR_SCHED_RR 0
# define THR_SCHED_DEFAULT 0
# define THR_INHERIT_SCHED 0
-# define THR_EXPLICIT_SCHED 0
# define THR_SCOPE_PROCESS 0
# define THR_SCOPE_SYSTEM 0
# endif /* ACE_HAS_PTHREADS / STHREADS / VXWORKS / WTHREADS **********/
diff --git a/ACE/ace/OS_NS_arpa_inet.cpp b/ACE/ace/OS_NS_arpa_inet.cpp
index d1d3b2d23d5..8c026593b2c 100644
--- a/ACE/ace/OS_NS_arpa_inet.cpp
+++ b/ACE/ace/OS_NS_arpa_inet.cpp
@@ -36,7 +36,7 @@ ACE_OS::inet_aton (const char *host_name, struct in_addr *addr)
addr->s_addr = ip_addr; // Network byte ordered
return 1;
}
-#elif defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x640)
+#elif defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x630)
// inet_aton() returns OK (0) on success and ERROR (-1) on failure.
// Must reset errno first. Refer to WindRiver SPR# 34949, SPR# 36026
::errnoSet(0);
diff --git a/ACE/ace/OS_NS_arpa_inet.inl b/ACE/ace/OS_NS_arpa_inet.inl
index 3f0b768adff..547d30cdaf1 100644
--- a/ACE/ace/OS_NS_arpa_inet.inl
+++ b/ACE/ace/OS_NS_arpa_inet.inl
@@ -69,7 +69,6 @@ ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
ACE_NOTSUP_RETURN(0);
#endif /* ACE_HAS_IPV6 */
}
-
ACE_INLINE int
ACE_OS::inet_pton (int family, const char *strptr, void *addrptr)
{
diff --git a/ACE/ace/OS_NS_dirent.cpp b/ACE/ace/OS_NS_dirent.cpp
index b18ddc6928a..0fa32cc497e 100644
--- a/ACE/ace/OS_NS_dirent.cpp
+++ b/ACE/ace/OS_NS_dirent.cpp
@@ -13,6 +13,21 @@ ACE_RCSID(ace, OS_NS_dirent, "$Id$")
#include "ace/Log_Msg.h"
#include "ace/OS_NS_stdlib.h"
+
+/*
+ These definitions are missing on the original VC6 distribution. The new
+ headers that define these are available in the Platform SDK and are defined
+ for those that don't have it.
+ */
+#if defined (ACE_WIN32)
+# if !defined (INVALID_FILE_ATTRIBUTES)
+# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+# endif /* INVALID_FILE_ATTRIBUTES */
+# if !defined (INVALID_SET_FILE_POINTER)
+# define INVALID_SET_FILE_POINTER ((DWORD)-1)
+# endif /* INVALID_SET_FILE_POINTER */
+#endif /* ACE_WIN32 */
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if defined (ACE_LACKS_CLOSEDIR)
diff --git a/ACE/ace/OS_NS_dirent.inl b/ACE/ace/OS_NS_dirent.inl
index a768a914887..862dd7d07c3 100644
--- a/ACE/ace/OS_NS_dirent.inl
+++ b/ACE/ace/OS_NS_dirent.inl
@@ -47,17 +47,18 @@ opendir (const ACE_TCHAR *filename)
#endif /* ACE_HAS_DIRENT */
}
-ACE_INLINE struct ACE_DIRENT *
+ACE_INLINE
+struct ACE_DIRENT *
readdir (ACE_DIR *d)
{
#if defined (ACE_HAS_DIRENT)
-# if defined (ACE_WIN32) && defined (ACE_LACKS_READDIR)
- return ACE_OS::readdir_emulation (d);
+# if defined (ACE_WIN32) && defined (ACE_LACKS_READDIR)
+ return ACE_OS::readdir_emulation (d);
# elif defined (ACE_HAS_WREADDIR) && defined (ACE_USES_WCHAR)
- return ::wreaddir (d);
-# else /* ACE_WIN32 && ACE_LACKS_READDIR */
- return ::readdir (d);
-# endif /* ACE_WIN32 && ACE_LACKS_READDIR */
+ return ::wreaddir (d);
+# else /* ACE_WIN32 && ACE_LACKS_READDIR */
+ return ::readdir (d);
+# endif /* ACE_WIN32 && ACE_LACKS_READDIR */
#else
ACE_UNUSED_ARG (d);
ACE_NOTSUP_RETURN (0);
@@ -66,8 +67,8 @@ readdir (ACE_DIR *d)
ACE_INLINE int
readdir_r (ACE_DIR *dirp,
- struct ACE_DIRENT *entry,
- struct ACE_DIRENT **result)
+ struct ACE_DIRENT *entry,
+ struct ACE_DIRENT **result)
{
#if !defined (ACE_HAS_REENTRANT_FUNCTIONS)
ACE_UNUSED_ARG (entry);
@@ -77,14 +78,29 @@ readdir_r (ACE_DIR *dirp,
return 0; // Keep iterating
else
return 1; // Oops, some type of error!
-#elif defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_READDIR_R)
-# if defined (ACE_HAS_3_PARAM_READDIR_R)
- return ::readdir_r (dirp, entry, result);
-# else
- // <result> had better not be 0!
- *result = ::readdir_r (dirp, entry);
- return 0;
-# endif /* sun */
+#elif defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_READDIR_R)
+# if (defined (sun) && (defined (_POSIX_PTHREAD_SEMANTICS) || \
+ (_FILE_OFFSET_BITS == 64) || \
+ (_POSIX_C_SOURCE - 0 >= 199506L))) || \
+ (!defined (sun) && (defined (ACE_HAS_PTHREADS_STD) || \
+ defined (ACE_HAS_PTHREADS_DRAFT7) || \
+ defined (_POSIX_SOURCE) || \
+ defined (__FreeBSD__) || \
+ defined (HPUX_11)))
+# if defined (__GNUG__) && defined (DIGITAL_UNIX)
+ return readdir_r (dirp, entry, result);
+# else
+ return ::readdir_r (dirp, entry, result);
+# endif /* defined (__GNUG__) && defined (DIGITAL_UNIX) */
+# else /* ! POSIX.1c - this is draft 4 or draft 6 */
+# if defined(__GNUC__) && defined (_AIX)
+ return ::readdir_r (dirp, entry, result);
+# else
+ // <result> had better not be 0!
+ *result = ::readdir_r (dirp, entry);
+ return 0;
+# endif /* AIX */
+# endif /* ! POSIX.1c */
#else /* ! ACE_HAS_DIRENT || ACE_LACKS_READDIR_R */
ACE_UNUSED_ARG (dirp);
ACE_UNUSED_ARG (entry);
@@ -145,7 +161,7 @@ scandir (const ACE_TCHAR *dirname,
ACE_INLINE void
seekdir (ACE_DIR *d, long loc)
{
-#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_SEEKDIR)
+#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_SEEKDIR)
::seekdir (d, loc);
#else /* ! ACE_HAS_DIRENT || ACE_LACKS_SEEKDIR */
ACE_UNUSED_ARG (d);
@@ -156,7 +172,7 @@ seekdir (ACE_DIR *d, long loc)
ACE_INLINE long
telldir (ACE_DIR *d)
{
-#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_TELLDIR)
+#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_TELLDIR)
return ::telldir (d);
#else /* ! ACE_HAS_DIRENT || ACE_LACKS_TELLDIR */
ACE_UNUSED_ARG (d);
diff --git a/ACE/ace/OS_NS_netdb.cpp b/ACE/ace/OS_NS_netdb.cpp
index a788714eefd..92a853b2895 100644
--- a/ACE/ace/OS_NS_netdb.cpp
+++ b/ACE/ace/OS_NS_netdb.cpp
@@ -356,7 +356,7 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node)
return 0;
-#elif defined (linux) && !defined (ACE_LACKS_NETWORKING)
+#elif defined (linux)
struct ifreq ifr;
diff --git a/ACE/ace/OS_NS_signal.h b/ACE/ace/OS_NS_signal.h
index bb5b03b1c0d..ec59a0e91a1 100644
--- a/ACE/ace/OS_NS_signal.h
+++ b/ACE/ace/OS_NS_signal.h
@@ -81,7 +81,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Also see ChangeLog entries:
// Mon Jan 23 16:35:40 UTC 2006 Steve Huston <shuston@riverace.com>
// Mon Jan 23 22:08:56 UTC 2006 Steve Huston <shuston@riverace.com>
-#if defined (__HP_aCC) && (__HP_aCC <= 37300)
+#if defined (__HP_aCC) && (__HP_aCC <= 36500)
typedef extern "C" struct sigaction ACE_SIGACTION;
#else
typedef struct sigaction ACE_SIGACTION;
diff --git a/ACE/ace/OS_NS_signal.inl b/ACE/ace/OS_NS_signal.inl
index df71ce0eb23..172bf82c7eb 100644
--- a/ACE/ace/OS_NS_signal.inl
+++ b/ACE/ace/OS_NS_signal.inl
@@ -127,7 +127,7 @@ sigemptyset (sigset_t *s)
return -1;
}
*s = 0 ;
- return 0;
+ return 0 ;
#else
ACE_OSCALL_RETURN (::sigemptyset (s), int, -1);
#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
diff --git a/ACE/ace/OS_NS_stdio.cpp b/ACE/ace/OS_NS_stdio.cpp
index c4b23cb1904..c428ab2f762 100644
--- a/ACE/ace/OS_NS_stdio.cpp
+++ b/ACE/ace/OS_NS_stdio.cpp
@@ -299,7 +299,7 @@ ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...)
int
ACE_OS::printf (const char *format, ...)
{
- // ACE_OS_TRACE ("ACE_OS::printf");
+ ACE_OS_TRACE ("ACE_OS::printf");
int result;
va_list ap;
va_start (ap, format);
@@ -312,12 +312,41 @@ int
ACE_OS::snprintf (char *buf, size_t maxlen, const char *format, ...)
{
// ACE_OS_TRACE ("ACE_OS::snprintf");
+#if defined (ACE_HAS_SNPRINTF)
int result;
va_list ap;
va_start (ap, format);
- result = ACE_OS::vsnprintf (buf, maxlen, format, ap);
+# if !defined (ACE_WIN32) || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x600))
+ ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vsnprintf (buf, maxlen, format, ap)),
+ int, -1, result);
+# else
+ ACE_OSCALL (ACE_SPRINTF_ADAPTER (::_vsnprintf (buf, maxlen, format, ap)),
+ int, -1, result);
+ // Win32 doesn't regard a full buffer with no 0-terminate as an
+ // overrun.
+ if (result == static_cast <int> (maxlen))
+ result = -1;
+
+ // Win32 doesn't 0-terminate the string if it overruns maxlen.
+ if (result == -1)
+ buf[maxlen-1] = '\0';
+# endif /* !ACE_WIN32 || __BORLANDC__ >= 0x600 */
va_end (ap);
+ // In out-of-range conditions, C99 defines vsnprintf to return the number
+ // of characters that would have been written if enough space was available.
+ // Earlier variants of the vsnprintf() (e.g. UNIX98) defined it to return
+ // -1. This method follows the C99 standard, but needs to guess at the
+ // value; uses maxlen + 1.
+ if (result == -1)
+ result = static_cast <int> (maxlen + 1);
return result;
+
+#else
+ ACE_UNUSED_ARG (buf);
+ ACE_UNUSED_ARG (maxlen);
+ ACE_UNUSED_ARG (format);
+ ACE_NOTSUP_RETURN (-1);
+#endif /* ACE_HAS_SNPRINTF */
}
#if defined (ACE_HAS_WCHAR)
@@ -336,8 +365,10 @@ ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...)
// Microsoft's vswprintf() doesn't have the maxlen argument that
// XPG4/UNIX98 define. They do, however, recommend use of _vsnwprintf()
// as a substitute, which does have the same signature as the UNIX98 one.
- ACE_OSCALL (::_vsnwprintf (buf, maxlen, format, ap), int, -1, result);
- // Win32 doesn't regard a full buffer with no 0-terminate as an overrun.
+ ACE_OSCALL (ACE_SPRINTF_ADAPTER (::_vsnwprintf (buf, maxlen, format, ap)),
+ int, -1, result);
+ // Win32 doesn't regard a full buffer with no 0-terminate as an
+ // overrun.
if (result == static_cast <int> (maxlen))
result = -1;
@@ -345,7 +376,8 @@ ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...)
if (result == -1)
buf[maxlen-1] = '\0';
# else
- ACE_OSCALL (::vswprintf (buf, maxlen, format, ap), int, -1, result);
+ ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vswprintf (buf, maxlen, format, ap)),
+ int, -1, result);
# endif /* ACE_WIN32 */
va_end (ap);
// In out-of-range conditions, C99 defines vsnprintf to return the number
@@ -357,12 +389,12 @@ ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...)
result = static_cast <int> (maxlen + 1);
return result;
-# else
+#else
ACE_UNUSED_ARG (buf);
ACE_UNUSED_ARG (maxlen);
ACE_UNUSED_ARG (format);
ACE_NOTSUP_RETURN (-1);
-# endif /* _XOPEN_SOURCE ... */
+#endif /* ACE_HAS_SNPRINTF */
}
#endif /* ACE_HAS_WCHAR */
@@ -374,7 +406,7 @@ ACE_OS::sprintf (char *buf, const char *format, ...)
int result;
va_list ap;
va_start (ap, format);
- ACE_OSCALL (::vsprintf (buf, format, ap), int, -1, result);
+ ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vsprintf (buf, format, ap)), int, -1, result);
va_end (ap);
return result;
}
diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h
index 18ca767ddab..bc3e5569fcf 100644
--- a/ACE/ace/OS_NS_stdio.h
+++ b/ACE/ace/OS_NS_stdio.h
@@ -367,7 +367,7 @@ namespace ACE_OS {
# if defined (ACE_HAS_WCHAR)
extern ACE_Export
- int snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...);
+ int snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format,...);
# endif /* ACE_HAS_WCHAR */
extern ACE_Export
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index 72a13d34b1f..ce74c3a21cb 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -12,9 +12,11 @@
#include "ace/OS_NS_sys_stat.h"
#include "ace/OS_Memory.h"
-#if defined (ACE_HAS_TRIO)
-# include <trio.h>
-#endif /* ACE_HAS_TRIO */
+#if defined (ACE_HAS_CHARPTR_SPRINTF)
+# define ACE_SPRINTF_ADAPTER(X) ACE_OS::strlen (X)
+#else
+# define ACE_SPRINTF_ADAPTER(X) X
+#endif /* ACE_HAS_CHARPTR_SPRINTF */
/*****************************************************************************/
@@ -794,7 +796,7 @@ ACE_OS::rename (const char *old_name,
ACE_TEXT_CHAR_TO_TCHAR (new_name)))
ACE_FAIL_RETURN (-1);
return 0;
-# elif defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_MOVEFILEEX)
+# elif defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
// NT4 (and up) provides a way to rename/move a file with similar semantics
// to what's usually done on UNIX - if there's an existing file with
// <new_name> it is removed before the file is renamed/moved. The
@@ -826,7 +828,7 @@ ACE_OS::rename (const wchar_t *old_name,
if (MoveFileW (old_name, new_name) != 0)
ACE_FAIL_RETURN (-1);
return 0;
-# elif defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_MOVEFILEEX)
+# elif defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
// NT4 (and up) provides a way to rename/move a file with similar semantics
// to what's usually done on UNIX - if there's an existing file with
// <new_name> it is removed before the file is renamed/moved. The
@@ -915,47 +917,41 @@ ACE_OS::tempnam (const wchar_t *dir, const wchar_t *pfx)
ACE_INLINE int
ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr)
{
- return ::vsprintf (buffer, format, argptr);
+ return ACE_SPRINTF_ADAPTER (::vsprintf (buffer, format, argptr));
}
ACE_INLINE int
ACE_OS::vsnprintf (char *buffer, size_t maxlen, const char *format, va_list ap)
{
-#if !defined (ACE_LACKS_VSNPRINTF)
- int result;
-# if !defined (ACE_WIN32)
- result = ::vsnprintf (buffer, maxlen, format, ap);
+#if defined (ACE_HAS_SNPRINTF)
+
+# if !defined (ACE_WIN32) \
+ || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x600))
+ return ACE_SPRINTF_ADAPTER (::vsnprintf (buffer, maxlen, format, ap));
# else
- result = ::_vsnprintf (buffer, maxlen, format, ap);
- // Win32 doesn't regard a full buffer with no 0-terminate as an overrun.
+ int result =
+ ACE_SPRINTF_ADAPTER (::_vsnprintf (buffer, maxlen, format, ap));
+
+ // Win32 doesn't regard a full buffer with no 0-terminate as an
+ // overrun.
if (result == static_cast<int> (maxlen))
- buffer[maxlen-1] = '\0';
+ result = -1;
// Win32 doesn't 0-terminate the string if it overruns maxlen.
if (result == -1)
buffer[maxlen-1] = '\0';
-# endif
- // In out-of-range conditions, C99 defines vsnprintf() to return the number
- // of characters that would have been written if enough space was available.
- // Earlier variants of the vsnprintf() (e.g. UNIX98) defined it to return
- // -1. This method follows the C99 standard, but needs to guess at the
- // value; uses maxlen + 1.
- if (result == -1)
- {
- result = static_cast <int> (maxlen + 1);
- }
return result;
-#elif defined (ACE_HAS_TRIO)
- return trio_vsnprintf (buffer, maxlen, format, ap);
+
+# endif
#else
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (maxlen);
ACE_UNUSED_ARG (format);
ACE_UNUSED_ARG (ap);
ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_LACKS_VSNPRINTF */
+#endif /* ACE_HAS_SNPRINTF */
}
#if defined (ACE_HAS_WCHAR)
@@ -1001,7 +997,8 @@ ACE_OS::vsnprintf (wchar_t *buffer, size_t maxlen, const wchar_t *format, va_lis
# elif defined (ACE_WIN32)
- int result = ::_vsnwprintf (buffer, maxlen, format, ap);
+ int result =
+ ACE_SPRINTF_ADAPTER (::_vsnwprintf (buffer, maxlen, format, ap));
// Win32 doesn't regard a full buffer with no 0-terminate as an
// overrun.
diff --git a/ACE/ace/OS_NS_stdlib.cpp b/ACE/ace/OS_NS_stdlib.cpp
index cd2005eb041..0850b2a63df 100644
--- a/ACE/ace/OS_NS_stdlib.cpp
+++ b/ACE/ace/OS_NS_stdlib.cpp
@@ -6,8 +6,6 @@ ACE_RCSID (ace,
OS_NS_stdlib,
"$Id$")
-#include "ace/Default_Constants.h"
-
#if !defined (ACE_HAS_INLINED_OSCALLS)
# include "ace/OS_NS_stdlib.inl"
#endif /* ACE_HAS_INLINED_OSCALLS */
@@ -103,76 +101,6 @@ ACE_OS::getenvstrings (void)
#endif /* ACE_WIN32 */
}
-// Return a dynamically allocated duplicate of <str>, substituting the
-// environment variables of form $VAR_NAME. Note that the pointer is
-// allocated with <ACE_OS::malloc> and must be freed by
-// <ACE_OS::free>.
-
-ACE_TCHAR *
-ACE_OS::strenvdup (const ACE_TCHAR *str)
-{
-#if defined (ACE_HAS_WINCE)
- // WinCE doesn't have environment variables so we just skip it.
- return ACE_OS::strdup (str);
-#elif defined (ACE_LACKS_ENV)
- ACE_UNUSED_ARG (str);
- ACE_NOTSUP_RETURN (0);
-#else
- const ACE_TCHAR * start = 0;
- if ((start = ACE_OS::strchr (str, ACE_LIB_TEXT ('$'))) != 0)
- {
- ACE_TCHAR buf[ACE_DEFAULT_ARGV_BUFSIZ];
- size_t var_len = ACE_OS::strcspn (&start[1],
- ACE_LIB_TEXT ("$~!#%^&*()-+=\\|/?,.;:'\"`[]{} \t\n\r"));
- ACE_OS::strncpy (buf, &start[1], var_len);
- buf[var_len++] = ACE_LIB_TEXT ('\0');
-# if defined (ACE_WIN32)
- // Always use the ACE_TCHAR for Windows.
- ACE_TCHAR *temp = ACE_OS::getenv (buf);
-# else
- // Use char * for environment on non-Windows.
- char *temp = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (buf));
-# endif /* ACE_WIN32 */
- size_t buf_len = ACE_OS::strlen (str) + 1;
- if (temp != 0)
- buf_len += ACE_OS::strlen (temp) - var_len;
- ACE_TCHAR * buf_p = buf;
- if (buf_len > ACE_DEFAULT_ARGV_BUFSIZ)
- {
- buf_p =
- (ACE_TCHAR *) ACE_OS::malloc (buf_len * sizeof (ACE_TCHAR));
- if (buf_p == 0)
- {
- errno = ENOMEM;
- return 0;
- }
- }
- ACE_TCHAR * p = buf_p;
- size_t len = start - str;
- ACE_OS::strncpy (p, str, len);
- p += len;
- if (temp != 0)
- {
-# if defined (ACE_WIN32)
- p = ACE_OS::strecpy (p, temp) - 1;
-# else
- p = ACE_OS::strecpy (p, ACE_TEXT_CHAR_TO_TCHAR (temp)) - 1;
-# endif /* ACE_WIN32 */
- }
- else
- {
- ACE_OS::strncpy (p, start, var_len);
- p += var_len;
- *p = ACE_LIB_TEXT ('\0');
- }
- ACE_OS::strcpy (p, &start[var_len]);
- return (buf_p == buf) ? ACE_OS::strdup (buf) : buf_p;
- }
- else
- return ACE_OS::strdup (str);
-#endif /* ACE_HAS_WINCE */
-}
-
#if !defined (ACE_HAS_ITOA)
char *
ACE_OS::itoa_emulation (int value, char *string, int radix)
diff --git a/ACE/ace/OS_NS_stdlib.h b/ACE/ace/OS_NS_stdlib.h
index b90205fb328..26c555db656 100644
--- a/ACE/ace/OS_NS_stdlib.h
+++ b/ACE/ace/OS_NS_stdlib.h
@@ -225,7 +225,7 @@ namespace ACE_OS {
void srand (u_int seed);
// not in spec
- extern ACE_Export
+ ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
#if !defined (ACE_LACKS_STRTOD)
diff --git a/ACE/ace/OS_NS_stdlib.inl b/ACE/ace/OS_NS_stdlib.inl
index 8a33ed3ae7f..3099a5e2c70 100644
--- a/ACE/ace/OS_NS_stdlib.inl
+++ b/ACE/ace/OS_NS_stdlib.inl
@@ -10,7 +10,7 @@
#include "ace/os_include/os_errno.h"
#include "ace/os_include/os_search.h"
-#if defined (ACE_WCHAR_IN_STD_NAMESPACE)
+#if defined(ACE_WCHAR_IN_STD_NAMESPACE)
# define ACE_WCHAR_STD_NAMESPACE std
#else
# define ACE_WCHAR_STD_NAMESPACE ACE_STD_NAMESPACE
@@ -64,7 +64,7 @@ ACE_OS::atoi (const wchar_t *s)
#if defined (ACE_WIN32)
ACE_OSCALL_RETURN (::_wtoi (s), int, -1);
#else /* ACE_WIN32 */
- return ACE_OS::atoi (ACE_Wide_To_Ascii (s).char_rep ());
+ return ACE_OS::atoi (ACE_Wide_To_Ascii(s).char_rep());
#endif /* ACE_WIN32 */
}
#endif /* ACE_HAS_WCHAR */
@@ -221,7 +221,7 @@ ACE_OS::mktemp (wchar_t *s)
return ::_wmktemp (s);
# else
// For narrow-char filesystems, we must convert the wide-char input to
- // a narrow-char string for mktemp (), then convert the name back to
+ // a narrow-char string for mktemp(), then convert the name back to
// wide-char for the caller.
ACE_Wide_To_Ascii narrow_s (s);
if (::mktemp (narrow_s.char_rep ()) == 0)
@@ -235,9 +235,9 @@ ACE_OS::mktemp (wchar_t *s)
#endif /* !ACE_LACKS_MKTEMP */
-#if defined (INTEGRITY)
+#if defined(INTEGRITY)
extern "C" {
- int putenv (char *string);
+ int putenv(char *string);
}
#endif
@@ -251,14 +251,14 @@ ACE_OS::putenv (const char *string)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_LACKS_PUTENV) && defined (ACE_HAS_SETENV)
int result = 0;
- char *sp = ACE_OS::strchr (const_cast <char *> (string), '=');
+ char* sp = ACE_OS::strchr (const_cast <char *> (string), '=');
if (sp)
{
- char *stmp = ACE_OS::strdup (string);
+ char* stmp = ACE_OS::strdup (string);
if (stmp)
{
stmp[sp - string] = '\0';
- ACE_OSCALL (::setenv (stmp, sp+sizeof (char), 1), int, -1, result);
+ ACE_OSCALL (::setenv(stmp, sp+sizeof(char), 1), int, -1, result);
ACE_OS::free (stmp);
}
else
@@ -268,8 +268,9 @@ ACE_OS::putenv (const char *string)
}
}
else
- ACE_OSCALL (::setenv (string, "", 1), int, -1, result);
-
+ {
+ ACE_OSCALL (::setenv(string, "", 1), int, -1, result);
+ }
return result;
#elif defined (ACE_LACKS_ENV) || defined (ACE_LACKS_PUTENV)
ACE_UNUSED_ARG (string);
@@ -345,15 +346,15 @@ ACE_OS::rand_r (ACE_RANDR_TYPE& seed)
{
ACE_OS_TRACE ("ACE_OS::rand_r");
- long new_seed = (long) (seed);
+ long new_seed = (long)(seed);
if (new_seed == 0)
new_seed = 0x12345987;
long temp = new_seed / 127773;
new_seed = 16807 * (new_seed - temp * 127773) - 2836 * temp;
if (new_seed < 0)
new_seed += 2147483647;
- (seed) = (unsigned int)new_seed;
- return (int) (new_seed & RAND_MAX);
+ (seed) = (unsigned int)new_seed;
+ return (int)(new_seed & RAND_MAX);
}
#endif /* !ACE_WIN32 */
@@ -409,6 +410,41 @@ ACE_OS::srand (u_int seed)
::srand (seed);
}
+// Return a dynamically allocated duplicate of <str>, substituting the
+// environment variable if <str[0] == '$'>. Note that the pointer is
+// allocated with <ACE_OS::malloc> and must be freed by
+// <ACE_OS::free>.
+
+ACE_INLINE ACE_TCHAR *
+ACE_OS::strenvdup (const ACE_TCHAR *str)
+{
+#if defined (ACE_HAS_WINCE)
+ // WinCE doesn't have environment variables so we just skip it.
+ return ACE_OS::strdup (str);
+#elif defined (ACE_LACKS_ENV)
+ ACE_UNUSED_ARG (str);
+ ACE_NOTSUP_RETURN (0);
+#else
+ if (str[0] == ACE_LIB_TEXT ('$'))
+ {
+# if defined (ACE_WIN32)
+ // Always use the ACE_TCHAR for Windows.
+ ACE_TCHAR *temp = 0;
+ if ((temp = ACE_OS::getenv (&str[1])) != 0)
+ return ACE_OS::strdup (temp);
+# else
+ // Use char * for environment on non-Windows.
+ char *temp = 0;
+ if ((temp = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (&str[1]))) != 0)
+ return ACE_OS::strdup (ACE_TEXT_CHAR_TO_TCHAR (temp));
+# endif /* ACE_WIN32 */
+ return ACE_OS::strdup (str);
+ }
+ else
+ return ACE_OS::strdup (str);
+#endif /* ACE_HAS_WINCE */
+}
+
#if !defined (ACE_LACKS_STRTOD)
ACE_INLINE double
ACE_OS::strtod (const char *s, char **endptr)
@@ -470,7 +506,7 @@ ACE_OS::system (const ACE_TCHAR *s)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
ACE_OSCALL_RETURN (::_wsystem (s), int, -1);
-#elif defined (ACE_TANDEM_T1248_PTHREADS)
+#elif defined(ACE_TANDEM_T1248_PTHREADS)
ACE_OSCALL_RETURN (::spt_system (s), int, -1);
#else
ACE_OSCALL_RETURN (::system (ACE_TEXT_ALWAYS_CHAR (s)), int, -1);
diff --git a/ACE/ace/OS_NS_string.inl b/ACE/ace/OS_NS_string.inl
index 204ea5db435..c1b8aef93e5 100644
--- a/ACE/ace/OS_NS_string.inl
+++ b/ACE/ace/OS_NS_string.inl
@@ -525,7 +525,7 @@ ACE_INLINE wchar_t *
ACE_OS::strtok (wchar_t *s, const wchar_t *tokens)
{
#if defined (ACE_HAS_3_PARAM_WCSTOK)
- static wchar_t *lasts = 0;
+ static wchar_t *lasts;
return ::wcstok (s, tokens, &lasts);
#else
return ::wcstok (s, tokens);
diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl
index cd9a65d5a84..422d07e9c35 100644
--- a/ACE/ace/OS_NS_sys_mman.inl
+++ b/ACE/ace/OS_NS_sys_mman.inl
@@ -91,19 +91,41 @@ ACE_OS::mmap (void *addr,
// Only create a new handle if we didn't have a valid one passed in.
if (*file_mapping == ACE_INVALID_HANDLE)
{
- SECURITY_ATTRIBUTES sa_buffer;
- SECURITY_DESCRIPTOR sd_buffer;
- const LPSECURITY_ATTRIBUTES attr =
- ACE_OS::default_win32_security_attributes_r (sa,
- &sa_buffer,
- &sd_buffer);
+# if !defined(ACE_HAS_WINCE) && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0))
+ int try_create = 1;
+ if ((file_mapping_name != 0) && (*file_mapping_name != 0))
+ {
+ // On Win9x, we first try to OpenFileMapping to
+ // file_mapping_name. Only if there is no mapping object
+ // with that name, and the desired name is valid, do we try
+ // CreateFileMapping.
- *file_mapping = ACE_TEXT_CreateFileMapping (file_handle,
- attr,
- prot,
- 0,
- 0,
- file_mapping_name);
+ *file_mapping = ACE_TEXT_OpenFileMapping (nt_flags,
+ 0,
+ file_mapping_name);
+ if (*file_mapping != 0
+ || (::GetLastError () == ERROR_INVALID_NAME
+ && ::GetLastError () == ERROR_FILE_NOT_FOUND))
+ try_create = 0;
+ }
+
+ if (try_create)
+# endif /* !ACE_HAS_WINCE && (ACE_HAS_WINNT4 || ACE_HAS_WINNT4 == 0) */
+ {
+ SECURITY_ATTRIBUTES sa_buffer;
+ SECURITY_DESCRIPTOR sd_buffer;
+ const LPSECURITY_ATTRIBUTES attr =
+ ACE_OS::default_win32_security_attributes_r (sa,
+ &sa_buffer,
+ &sd_buffer);
+
+ *file_mapping = ACE_TEXT_CreateFileMapping (file_handle,
+ attr,
+ prot,
+ 0,
+ 0,
+ file_mapping_name);
+ }
}
if (*file_mapping == 0)
diff --git a/ACE/ace/OS_NS_sys_time.inl b/ACE/ace/OS_NS_sys_time.inl
index 9300e4ac011..8849e37d96b 100644
--- a/ACE/ace/OS_NS_sys_time.inl
+++ b/ACE/ace/OS_NS_sys_time.inl
@@ -66,7 +66,7 @@ ACE_OS::gettimeofday (void)
#else
# if defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) || \
defined(ACE_HAS_VOIDPTR_GETTIMEOFDAY) || \
- (defined (ACE_HAS_SVR4_GETTIMEOFDAY) && !defined (SCO))
+ (defined (ACE_HAS_SVR4_GETTIMEOFDAY) && !defined (m88k) && !defined (SCO))
ACE_OSCALL (::gettimeofday (&tv, 0), int, -1, result);
# elif defined (ACE_VXWORKS)
// Assumes that struct timespec is same size as struct timeval,
diff --git a/ACE/ace/OS_NS_sys_wait.inl b/ACE/ace/OS_NS_sys_wait.inl
index 2503d509828..e273b5602d4 100644
--- a/ACE/ace/OS_NS_sys_wait.inl
+++ b/ACE/ace/OS_NS_sys_wait.inl
@@ -15,7 +15,11 @@ ACE_OS::wait (int *status)
ACE_UNUSED_ARG (status);
ACE_NOTSUP_RETURN (0);
#else
+# if defined (ACE_HAS_UNION_WAIT)
+ ACE_OSCALL_RETURN (::wait ((union wait *) status), pid_t, -1);
+# else
ACE_OSCALL_RETURN (::wait (status), pid_t, -1);
+# endif /* ACE_HAS_UNION_WAIT */
#endif /* ACE_LACKS_WAIT */
}
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index 81b2c9e3aa9..4fd4401c3d9 100644
--- a/ACE/ace/OS_NS_unistd.cpp
+++ b/ACE/ace/OS_NS_unistd.cpp
@@ -2,7 +2,7 @@
#include "ace/OS_NS_unistd.h"
-ACE_RCSID (ace, OS_NS_unistd, "$Id$")
+ACE_RCSID(ace, OS_NS_unistd, "$Id$")
#if !defined (ACE_HAS_INLINED_OSCALLS)
# include "ace/OS_NS_unistd.inl"
@@ -39,8 +39,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
int
ACE_OS::argv_to_string (ACE_TCHAR **argv,
ACE_TCHAR *&buf,
- bool substitute_env_args,
- bool quote_args)
+ bool substitute_env_args)
{
if (argv == 0 || argv[0] == 0)
return 0;
@@ -49,90 +48,35 @@ ACE_OS::argv_to_string (ACE_TCHAR **argv,
// Determine the length of the buffer.
- int argc;
- for (argc = 0; argv[argc] != 0; ++argc)
- continue;
- ACE_TCHAR **argv_p = argv;
-
- for (int i = 0; i < argc; ++i)
+ for (int i = 0; argv[i] != 0; i++)
{
#if !defined (ACE_LACKS_ENV)
// Account for environment variables.
- if (substitute_env_args
- && ACE_OS::strchr (argv[i], ACE_LIB_TEXT ('$')) != 0)
- {
- if (argv_p == argv)
- {
- argv_p = (ACE_TCHAR **) ACE_OS::malloc (argc * sizeof (ACE_TCHAR *));
- if (argv_p == 0)
- {
- errno = ENOMEM;
- return 0;
- }
- ACE_OS::memcpy (argv_p, argv, argc * sizeof (ACE_TCHAR *));
- }
- argv_p[i] = ACE_OS::strenvdup (argv[i]);
- if (argv_p[i] == 0)
- {
- ACE_OS::free (argv_p);
- errno = ENOMEM;
- return 0;
- }
- }
-#endif /* ACE_LACKS_ENV */
- if (quote_args
- && ACE_OS::strchr (argv_p[i], ACE_LIB_TEXT (' ')) != 0)
+ if (substitute_env_args && argv[i][0] == ACE_LIB_TEXT ('$'))
{
- if (argv_p == argv)
- {
- argv_p = (ACE_TCHAR **) ACE_OS::malloc (argc * sizeof (ACE_TCHAR *));
- if (argv_p == 0)
- {
- errno = ENOMEM;
- return 0;
- }
- ACE_OS::memcpy (argv_p, argv, argc * sizeof (ACE_TCHAR *));
- }
- int quotes = 0;
- ACE_TCHAR *temp = argv_p[i];
- if (ACE_OS::strchr (temp, ACE_LIB_TEXT ('"')) != 0)
- {
- for (int j = 0; temp[j] != 0; ++j)
- if (temp[j] == ACE_LIB_TEXT ('"'))
- ++quotes;
- }
- argv_p[i] =
- (ACE_TCHAR *) ACE_OS::malloc (ACE_OS::strlen (temp) * sizeof (ACE_TCHAR) + quotes + 3);
- if (argv_p[i] == 0)
- {
- ACE_OS::free (argv_p);
- errno = ENOMEM;
- return 0;
- }
- ACE_TCHAR *end = argv_p[i];
-
- *end++ = ACE_LIB_TEXT ('"');
-
- if (quotes > 0)
- {
- for (ACE_TCHAR *p = temp;
- *p != 0;
- *end++ = *p++)
- if (*p == ACE_LIB_TEXT ('"'))
- *end++ = ACE_LIB_TEXT ('\\');
-
- *end++ = ACE_LIB_TEXT ('\0');
- }
+# if defined (ACE_WIN32) || !defined (ACE_HAS_WCHAR)
+ ACE_TCHAR *temp = 0;
+ // Win32 is the only platform with a wide-char ACE_OS::getenv().
+ if ((temp = ACE_OS::getenv (&argv[i][1])) != 0)
+ buf_len += ACE_OS::strlen (temp);
else
- end = ACE_OS::strecpy (end, temp);
-
- end[-1] = ACE_LIB_TEXT ('"');
-
- *end = ACE_LIB_TEXT ('\0');
- if (temp != argv[i])
- ACE_OS::free (temp);
+ buf_len += ACE_OS::strlen (argv[i]);
+# else
+ // This is an ACE_HAS_WCHAR platform and not ACE_WIN32.
+ // Convert the env variable name for getenv(), then add
+ // the length of the returned char *string. Later, when we
+ // actually use the returned env variable value, convert it
+ // as well.
+ char *ctemp = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (&argv[i][1]));
+ if (ctemp == 0)
+ buf_len += ACE_OS::strlen (argv[i]);
+ else
+ buf_len += ACE_OS::strlen (ctemp);
+# endif /* ACE_WIN32 || !ACE_HAS_WCHAR */
}
- buf_len += ACE_OS::strlen (argv_p[i]);
+ else
+#endif /* ACE_LACKS_ENV */
+ buf_len += ACE_OS::strlen (argv[i]);
// Add one for the extra space between each string.
buf_len++;
@@ -146,27 +90,48 @@ ACE_OS::argv_to_string (ACE_TCHAR **argv,
0);
// Initial null charater to make it a null string.
- buf[0] = ACE_LIB_TEXT ('\0');
+ buf[0] = '\0';
ACE_TCHAR *end = buf;
+ int j;
- for (int i = 0; i < argc; ++i)
+ for (j = 0; argv[j] != 0; j++)
{
- end = ACE_OS::strecpy (end, argv_p[i]);
- if (argv_p[i] != argv[i])
- ACE_OS::free (argv_p[i]);
+
+#if !defined (ACE_LACKS_ENV)
+ // Account for environment variables.
+ if (substitute_env_args && argv[j][0] == ACE_LIB_TEXT ('$'))
+ {
+# if defined (ACE_WIN32) || !defined (ACE_HAS_WCHAR)
+ // Win32 is the only platform with a wide-char ACE_OS::getenv().
+ ACE_TCHAR *temp = ACE_OS::getenv (&argv[j][1]);
+ if (temp != 0)
+ end = ACE_OS::strecpy (end, temp);
+ else
+ end = ACE_OS::strecpy (end, argv[j]);
+# else
+ // This is an ACE_HAS_WCHAR platform and not ACE_WIN32.
+ // Convert the env variable name for getenv(), then convert
+ // the returned char *string back to wchar_t.
+ char *ctemp = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (&argv[j][1]));
+ if (ctemp == 0)
+ end = ACE_OS::strecpy (end, argv[j]);
+ else
+ end = ACE_OS::strecpy (end, ACE_TEXT_CHAR_TO_TCHAR (ctemp));
+# endif /* ACE_WIN32 || !ACE_HAS_WCHAR */
+ }
+ else
+#endif /* ACE_LACKS_ENV */
+ end = ACE_OS::strecpy (end, argv[j]);
// Replace the null char that strecpy put there with white
// space.
- end[-1] = ACE_LIB_TEXT (' ');
+ end[-1] = ' ';
}
- // Null terminate the string.
- *end = ACE_LIB_TEXT ('\0');
-
- if (argv_p != argv)
- ACE_OS::free (argv_p);
+ // Null terminate the string.
+ *end = '\0';
// The number of arguments.
- return argc;
+ return j;
}
int
@@ -278,7 +243,7 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[])
# if defined (ACE_USES_WCHAR)
// Wide-char builds need to convert the command-line args to
- // narrow char strings for execv ().
+ // narrow char strings for execv().
char **cargv = 0;
int arg_count;
# endif /* ACE_HAS_WCHAR */
@@ -341,10 +306,9 @@ ACE_OS::num_processors (void)
int num_processors;
int mib[2] = { CTL_HW, HW_NCPU };
size_t len = sizeof (num_processors);
- if (::sysctl (mib, 2, &num_processors, &len, NULL, 0) != -1)
- return num_processors;
- else
- return -1;
+
+ sysctl(mib, 2, &num_processors, &len, NULL, 0);
+ return num_processors;
#else
ACE_NOTSUP_RETURN (-1);
#endif
@@ -367,10 +331,9 @@ ACE_OS::num_processors_online (void)
int num_processors;
int mib[2] = { CTL_HW, HW_NCPU };
size_t len = sizeof (num_processors);
- if (::sysctl (mib, 2, &num_processors, &len, NULL, 0) != -1)
- return num_processors;
- else
- return -1;
+
+ sysctl(mib, 2, &num_processors, &len, NULL, 0);
+ return num_processors;
#elif defined (__hpux)
struct pst_dynamic psd;
if (::pstat_getdynamic (&psd, sizeof (psd), (size_t) 1, 0) != -1)
@@ -397,7 +360,7 @@ ACE_OS::read_n (ACE_HANDLE handle,
bytes_transferred += n)
{
n = ACE_OS::read (handle,
- (char *) buf + bytes_transferred,
+ (char *) buf + bytes_transferred,
len - bytes_transferred);
if (n == -1 || n == 0)
@@ -426,7 +389,7 @@ ACE_OS::pread (ACE_HANDLE handle,
FILE_CURRENT);
if (original_low_position == INVALID_SET_FILE_POINTER
- && GetLastError () != NO_ERROR)
+ && GetLastError() != NO_ERROR)
return -1;
// Go to the correct position
@@ -437,12 +400,12 @@ ACE_OS::pread (ACE_HANDLE handle,
&high_offset,
FILE_BEGIN);
if (altered_position == INVALID_SET_FILE_POINTER
- && GetLastError () != NO_ERROR)
+ && GetLastError() != NO_ERROR)
return -1;
DWORD bytes_read;
-# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
OVERLAPPED overlapped;
overlapped.Internal = 0;
@@ -473,7 +436,7 @@ ACE_OS::pread (ACE_HANDLE handle,
}
}
-# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
+# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
BOOL result = ::ReadFile (handle,
buf,
@@ -483,14 +446,14 @@ ACE_OS::pread (ACE_HANDLE handle,
if (result == FALSE)
return -1;
-# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
// Reset the original file pointer position
if (::SetFilePointer (handle,
original_low_position,
&original_high_position,
FILE_BEGIN) == INVALID_SET_FILE_POINTER
- && GetLastError () != NO_ERROR)
+ && GetLastError() != NO_ERROR)
return -1;
return (ssize_t) bytes_read;
@@ -521,9 +484,9 @@ ACE_OS::pread (ACE_HANDLE handle,
if (altered_position == -1)
return -1;
- ssize_t const bytes_read = ACE_OS::read (handle,
- buf,
- nbytes);
+ ssize_t bytes_read = ACE_OS::read (handle,
+ buf,
+ nbytes);
if (bytes_read == -1)
return -1;
@@ -564,7 +527,7 @@ ACE_OS::pwrite (ACE_HANDLE handle,
LARGE_INTEGER loffset;
loffset.QuadPart = offset;
-# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
OVERLAPPED overlapped;
overlapped.Internal = 0;
@@ -592,7 +555,7 @@ ACE_OS::pwrite (ACE_HANDLE handle,
return -1;
}
-# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
+# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
// Go to the correct position
if (! ::SetFilePointerEx (handle, loffset, 0, FILE_BEGIN))
@@ -609,7 +572,7 @@ ACE_OS::pwrite (ACE_HANDLE handle,
if (result == FALSE)
return -1;
-# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
// Reset the original file pointer position
if (::SetFilePointer (handle,
@@ -679,11 +642,11 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
{
// Skip whitespace..
while (ACE_OS::ace_isspace (*cp))
- ++cp;
+ cp++;
// Increment count and move to next whitespace..
if (*cp != ACE_LIB_TEXT ('\0'))
- ++argc;
+ argc++;
while (*cp != ACE_LIB_TEXT ('\0') && !ACE_OS::ace_isspace (*cp))
{
@@ -693,21 +656,20 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
ACE_TCHAR quote = *cp;
// Scan past the string..
- for (++cp; *cp != ACE_LIB_TEXT ('\0')
- && (*cp != quote || cp[-1] == ACE_LIB_TEXT ('\\')); ++cp)
+ for (cp++; *cp != ACE_LIB_TEXT ('\0') && *cp != quote; cp++)
continue;
// '\0' implies unmatched quote..
if (*cp == ACE_LIB_TEXT ('\0'))
{
- --argc;
+ argc--;
break;
}
else
- ++cp;
+ cp++;
}
else
- ++cp;
+ cp++;
}
}
@@ -729,11 +691,11 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
ACE_TCHAR *ptr = buf;
- for (int i = 0; i < argc; ++i)
+ for (int i = 0; i < argc; i++)
{
// Skip whitespace..
while (ACE_OS::ace_isspace (*ptr))
- ++ptr;
+ ptr++;
// Copy next argument and move to next whitespace..
cp = argp;
@@ -742,15 +704,11 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
{
ACE_TCHAR quote = *ptr++;
- while (*ptr != ACE_LIB_TEXT ('\0')
- && (*ptr != quote || ptr[-1] == ACE_LIB_TEXT ('\\')))
- {
- if (*ptr == quote && ptr[-1] == ACE_LIB_TEXT ('\\')) --cp;
- *cp++ = *ptr++;
- }
+ while (*ptr != ACE_LIB_TEXT ('\0') && *ptr != quote)
+ *cp++ = *ptr++;
if (*ptr == quote)
- ++ptr;
+ ptr++;
}
else
*cp++ = *ptr++;
@@ -760,7 +718,7 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
#if !defined (ACE_LACKS_ENV)
// Check for environment variable substitution here.
if (substitute_env_args) {
- argv[i] = ACE_OS::strenvdup (argp);
+ argv[i] = ACE_OS::strenvdup(argp);
if (argv[i] == 0)
{
@@ -773,7 +731,7 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
else
#endif /* ACE_LACKS_ENV */
{
- argv[i] = ACE_OS::strdup (argp);
+ argv[i] = ACE_OS::strdup(argp);
if (argv[i] == 0)
{
@@ -810,7 +768,7 @@ ACE_OS::write_n (ACE_HANDLE handle,
bytes_transferred += n)
{
n = ACE_OS::write (handle,
- (char *) buf + bytes_transferred,
+ (char *) buf + bytes_transferred,
len - bytes_transferred);
if (n == -1 || n == 0)
diff --git a/ACE/ace/OS_NS_unistd.h b/ACE/ace/OS_NS_unistd.h
index f076594de80..3f51db36c3f 100644
--- a/ACE/ace/OS_NS_unistd.h
+++ b/ACE/ace/OS_NS_unistd.h
@@ -64,8 +64,7 @@ namespace ACE_OS
extern ACE_Export
int argv_to_string (ACE_TCHAR **argv,
ACE_TCHAR *&buf,
- bool substitute_env_args = true,
- bool quote_args = false);
+ bool substitute_env_args = true);
#if !defined (ACE_LACKS_CHDIR)
ACE_NAMESPACE_INLINE_FUNCTION
diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl
index 5883dc4cf6f..35aedac07ec 100644
--- a/ACE/ace/OS_NS_unistd.inl
+++ b/ACE/ace/OS_NS_unistd.inl
@@ -21,7 +21,7 @@
#if defined (ACE_VXWORKS) || defined (ACE_HAS_WINCE)
# include "ace/os_include/os_unistd.h"
-# if defined (ACE_VXWORKS) && ((ACE_VXWORKS == 0x620) || (ACE_VXWORKS == 0x630) || (ACE_VXWORKS == 0x640))
+# if defined (ACE_VXWORKS) && ((ACE_VXWORKS == 0x620) || (ACE_VXWORKS == 0x630))
# if defined (__RTP__)
# include "ace/os_include/os_strings.h"
# else
diff --git a/ACE/ace/OS_TLI.h b/ACE/ace/OS_TLI.h
index cc686df968b..4744c2b8536 100644
--- a/ACE/ace/OS_TLI.h
+++ b/ACE/ace/OS_TLI.h
@@ -160,7 +160,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Also see ChangeLog entries:
// Mon Jan 23 16:35:40 UTC 2006 Steve Huston <shuston@riverace.com>
// Mon Jan 23 22:08:56 UTC 2006 Steve Huston <shuston@riverace.com>
-#if defined (__HP_aCC) && (__HP_aCC <= 37300)
+#if defined (__HP_aCC) && (__HP_aCC <= 36500)
typedef extern "C" struct t_optmgmt ACE_TOPTMGMT;
typedef extern "C" struct t_bind ACE_TBIND;
#else
diff --git a/ACE/ace/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp
index d79791311f2..0f5b350bcef 100644
--- a/ACE/ace/Object_Manager_Base.cpp
+++ b/ACE/ace/Object_Manager_Base.cpp
@@ -407,7 +407,7 @@ ACE_OS_Object_Manager::print_error_message (unsigned int line_number,
{
// To avoid duplication of these const strings in OS.o.
#if !defined (ACE_HAS_WINCE)
- fprintf (stderr, "ace/Object_Manager_Base.cpp, line %u: %s ",
+ fprintf (stderr, "ace/OS.cpp, line %u: %s ",
line_number,
ACE_TEXT_ALWAYS_CHAR (message));
perror ("failed");
diff --git a/ACE/ace/POSIX_Asynch_IO.h b/ACE/ace/POSIX_Asynch_IO.h
index 243fddc990f..97f5120d0ae 100644
--- a/ACE/ace/POSIX_Asynch_IO.h
+++ b/ACE/ace/POSIX_Asynch_IO.h
@@ -71,11 +71,12 @@ public:
* This is the ACT associated with the handle on which the
* Asynch_Operation takes place.
*
- * @note This is not implemented for POSIX4 platforms.
+ * @@ This is not implemented for POSIX4 platforms.
+ *
*/
const void *completion_key (void) const;
- /// Error value if the operation fails.
+ /// Error value if the operation fail.
u_long error (void) const;
/// This returns ACE_INVALID_HANDLE on POSIX4 platforms.
diff --git a/ACE/ace/POSIX_CB_Proactor.h b/ACE/ace/POSIX_CB_Proactor.h
index 2b844c180a8..0daea7aea41 100644
--- a/ACE/ace/POSIX_CB_Proactor.h
+++ b/ACE/ace/POSIX_CB_Proactor.h
@@ -27,7 +27,7 @@
#include "ace/POSIX_Proactor.h"
-#if defined (ACE_LACKS_SIGVAL_T)
+#if defined(AIX) || defined(sun) || defined(__APPLE__) || defined (ACE_VXWORKS)
typedef union sigval sigval_t;
#endif
@@ -83,13 +83,13 @@ protected:
virtual int notify_completion (int sig_num);
/**
- * Dispatch a single set of events. If @a milli_seconds elapses
+ * Dispatch a single set of events. If <milli_seconds> elapses
* before any events occur, return 0. Return 1 if a completion is
* dispatched. Return -1 on errors.
*/
int handle_events_i (u_long milli_seconds);
- /// Semaphore variable to notify
+ /// semaphore variable to notify
/// used to wait the first AIO start
ACE_SYNCH_SEMAPHORE sema_;
};
diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp
index 395f5a08a32..1664200ecf6 100644
--- a/ACE/ace/POSIX_Proactor.cpp
+++ b/ACE/ace/POSIX_Proactor.cpp
@@ -1720,7 +1720,7 @@ int
ACE_POSIX_SIG_Proactor::notify_completion (int sig_num)
{
// Get this process id.
- pid_t const pid = ACE_OS::getpid ();
+ pid_t pid = ACE_OS::getpid ();
if (pid == (pid_t) -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Error:%N:%l(%P | %t):%p",
@@ -1729,11 +1729,11 @@ ACE_POSIX_SIG_Proactor::notify_completion (int sig_num)
// Set the signal information.
sigval value;
-#if defined (ACE_HAS_SIGVAL_SIGVAL_INT)
+#if defined (__FreeBSD__)
value.sigval_int = -1;
#else
value.sival_int = -1;
-#endif /* ACE_HAS_SIGVAL_SIGVAL_INT */
+#endif /* __FreeBSD__ */
// Queue the signal.
if (sigqueue (pid, sig_num, value) == 0)
@@ -1870,11 +1870,11 @@ ACE_POSIX_SIG_Proactor::allocate_aio_slot (ACE_POSIX_Asynch_Result *result)
// store index!!, not pointer in signal info
result->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
result->aio_sigevent.sigev_signo = result->signal_number ();
-#if defined (ACE_HAS_SIGVAL_SIGVAL_INT)
+#if defined (__FreeBSD__)
result->aio_sigevent.sigev_value.sigval_int = static_cast<int> (i);
#else
result->aio_sigevent.sigev_value.sival_int = static_cast<int> (i);
-#endif /* ACE_HAS_SIGVAL_SIGVAL_INT */
+#endif /* __FreeBSD__ */
return static_cast<ssize_t> (i);
}
@@ -1922,11 +1922,11 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout)
flg_aio = 1; // AIO signal received
// define index to start
// nothing will happen if it contains garbage
-#if defined (ACE_HAS_SIGVAL_SIGVAL_INT)
+#if defined (__FreeBSD__)
index = static_cast<size_t> (sig_info.si_value.sigval_int);
#else
index = static_cast<size_t> (sig_info.si_value.sival_int);
-#endif /* ACE_HAS_SIGVAL_SIGVAL_INT */
+#endif
// Assume we have a correctly-functioning implementation, and that
// there is one I/O to process, and it's correctly specified in the
// siginfo received. There are, however, some special situations
diff --git a/ACE/ace/POSIX_Proactor.h b/ACE/ace/POSIX_Proactor.h
index 82489dd66ff..2accb9fe4b1 100644
--- a/ACE/ace/POSIX_Proactor.h
+++ b/ACE/ace/POSIX_Proactor.h
@@ -523,7 +523,7 @@ public:
*/
ACE_POSIX_SIG_Proactor (size_t nmaxop = ACE_AIO_DEFAULT_SIZE);
- virtual Proactor_Type get_impl_type (void);
+ virtual Proactor_Type get_impl_type (void);
/**
* This constructor should be used to tell the Proactor to mask and
diff --git a/ACE/ace/Pagefile_Memory_Pool.cpp b/ACE/ace/Pagefile_Memory_Pool.cpp
index fcad91bfe93..125dd041f9e 100644
--- a/ACE/ace/Pagefile_Memory_Pool.cpp
+++ b/ACE/ace/Pagefile_Memory_Pool.cpp
@@ -229,7 +229,7 @@ ACE_Pagefile_Memory_Pool::map (int &first_time,
// Create file mapping, if not yet done
if (object_handle_ == 0)
{
-#if !defined (ACE_LACKS_WIN32_SECURITY_DESCRIPTORS)
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
// Allow access by all users.
SECURITY_ATTRIBUTES sa;
SECURITY_DESCRIPTOR sd;
@@ -242,7 +242,7 @@ ACE_Pagefile_Memory_Pool::map (int &first_time,
sa.nLength = sizeof (SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = &sd;
sa.bInheritHandle = FALSE;
-#endif /* ACE_LACKS_WIN32_SECURITY_DESCRIPTORS */
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
// Get an object handle to the named reserved memory object.
DWORD size_high;
@@ -257,11 +257,11 @@ ACE_Pagefile_Memory_Pool::map (int &first_time,
object_handle_ =
ACE_TEXT_CreateFileMapping (INVALID_HANDLE_VALUE,
-#if !defined (ACE_LACKS_WIN32_SECURITY_DESCRIPTORS)
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
&sa,
#else
0,
-#endif /* !ACE_LACKS_WIN32_SECURITY_DESCRIPTORS */
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
PAGE_READWRITE | SEC_RESERVE,
size_high,
size_low,
diff --git a/ACE/ace/Parse_Node.cpp b/ACE/ace/Parse_Node.cpp
index 110e52f4673..42a7123dc76 100644
--- a/ACE/ace/Parse_Node.cpp
+++ b/ACE/ace/Parse_Node.cpp
@@ -669,8 +669,6 @@ ACE_Dummy_Node::apply (ACE_Service_Gestalt *, int &yyerrno)
ACE_LIB_TEXT ("did operations on stream %s, error = %d\n"),
this->name (),
yyerrno));
-#else
- ACE_UNUSED_ARG (yyerrno);
#endif /* ACE_NLOGGING */
}
diff --git a/ACE/ace/Proactor.cpp b/ACE/ace/Proactor.cpp
index 481c7eef5b5..1a7106ad0af 100644
--- a/ACE/ace/Proactor.cpp
+++ b/ACE/ace/Proactor.cpp
@@ -2,7 +2,7 @@
#include "ace/config-lite.h"
#include "ace/Proactor.h"
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
// This only works on Win32 platforms and on Unix platforms with aio
// calls.
@@ -1174,4 +1174,4 @@ ACE_Proactor::event_loop_done (void)
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/
diff --git a/ACE/ace/Proactor.h b/ACE/ace/Proactor.h
index bcea10ec0fa..cff212a4f39 100644
--- a/ACE/ace/Proactor.h
+++ b/ACE/ace/Proactor.h
@@ -25,7 +25,7 @@
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
// This only works on Win32 platforms and on Unix platforms supporting
// POSIX aio calls.
@@ -684,7 +684,7 @@ public:
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* ACE_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS*/
#include /**/ "ace/post.h"
diff --git a/ACE/ace/Proactor_Impl.cpp b/ACE/ace/Proactor_Impl.cpp
index fe08453778e..0ab848c5920 100644
--- a/ACE/ace/Proactor_Impl.cpp
+++ b/ACE/ace/Proactor_Impl.cpp
@@ -6,8 +6,8 @@ ACE_RCSID (ace,
Proactor_Impl,
"$Id$")
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
-// This only works on standard Win32 platforms and on Unix platforms supporting
+#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+// This only works on Win32 platforms and on Unix platforms supporting
// aio calls.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Proactor_Impl.h b/ACE/ace/Proactor_Impl.h
index 607fbd0af09..0081010d8e6 100644
--- a/ACE/ace/Proactor_Impl.h
+++ b/ACE/ace/Proactor_Impl.h
@@ -18,8 +18,8 @@
#include /**/ "ace/config-all.h"
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
-// This only works on standard Win32 platforms and on Unix platforms supporting
+#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+// This only works on Win32 platforms and on Unix platforms supporting
// aio calls.
#include "ace/Asynch_IO.h"
@@ -260,6 +260,6 @@ public:
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
+#endif /* (ACE_WIN32 && ACE_HAS_WINCE) || ACE_HAS_AIO_CALLS */
#include /**/ "ace/post.h"
#endif /* ACE_PROACTOR_IMPL_H */
diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp
index b79fbcbd0f9..70b95d500e3 100644
--- a/ACE/ace/Process.cpp
+++ b/ACE/ace/Process.cpp
@@ -18,7 +18,6 @@
#include "ace/OS_NS_unistd.h"
#include "ace/OS_Memory.h"
#include "ace/Countdown_Time.h"
-#include "ace/Truncate.h"
#if defined (ACE_VXWORKS) && (ACE_VXWORKS > 0x600) && defined (__RTP__)
# include <rtpLib.h>
@@ -842,72 +841,29 @@ int
ACE_Process_Options::setenv (const ACE_TCHAR *variable_name,
const ACE_TCHAR *format, ...)
{
- // To address the potential buffer overflow,
- // we now allocate the buffer on heap with a variable size.
- size_t const buflen = ACE_OS::strlen (variable_name) + ACE_OS::strlen (format) + 2;
- ACE_TCHAR *newformat = 0;
- ACE_NEW_RETURN (newformat, ACE_TCHAR[buflen], -1);
- ACE_Auto_Basic_Array_Ptr<ACE_TCHAR> safe_newformat (newformat);
+ ACE_TCHAR newformat[DEFAULT_COMMAND_LINE_BUF_LEN];
// Add in the variable name.
- ACE_OS::sprintf (safe_newformat.get (),
+ ACE_OS::sprintf (newformat,
ACE_LIB_TEXT ("%s=%s"),
variable_name,
format);
+ ACE_TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
+
// Start varargs.
va_list argp;
va_start (argp, format);
// Add the rest of the varargs.
- size_t tmp_buflen = DEFAULT_COMMAND_LINE_BUF_LEN > buflen
- ? static_cast<size_t> (DEFAULT_COMMAND_LINE_BUF_LEN) : buflen;
- int retval = 0;
-
- ACE_TCHAR *stack_buf = 0;
- ACE_NEW_RETURN (stack_buf, ACE_TCHAR[tmp_buflen], -1);
- ACE_Auto_Basic_Array_Ptr<ACE_TCHAR> safe_stack_buf (stack_buf);
-
- do
- {
- retval = ACE_OS::vsnprintf (safe_stack_buf.get (), tmp_buflen, safe_newformat.get (), argp);
- if (retval > ACE_Utils::Truncate<int> (tmp_buflen))
- {
- tmp_buflen *= 2;
- ACE_NEW_RETURN (stack_buf, ACE_TCHAR[tmp_buflen], -1);
- safe_stack_buf.reset (stack_buf);
- }
- else
- break;
- }
- while (1);
-
- if (retval == -1)
- {
- // In case that vsnprintf is not supported,
- // e.g., LynxOS and VxWorks 5, we have to
- // fall back to vsprintf.
- if (errno == ENOTSUP)
- {
- // ALERT: Since we have to use vsprintf here, there is still a chance that
- // the stack_buf overflows, i.e., the length of the resulting string
- // can still possibly go beyond the allocated stack_buf.
- retval = ACE_OS::vsprintf (safe_stack_buf.get (), safe_newformat.get (), argp);
- if (retval == -1)
- // vsprintf is failed.
- return -1;
- }
- else
- // vsnprintf is failed.
- return -1;
- }
+ ACE_OS::vsprintf (stack_buf, newformat, argp);
// End varargs.
va_end (argp);
// Append the string to our environment buffer.
- if (this->setenv_i (safe_stack_buf.get (),
- ACE_OS::strlen (safe_stack_buf.get ())) == -1)
+ if (this->setenv_i (stack_buf,
+ ACE_OS::strlen (stack_buf)) == -1)
return -1;
#if defined (ACE_WIN32)
@@ -923,7 +879,7 @@ ACE_Process_Options::setenv_i (ACE_TCHAR *assignment,
size_t len)
{
// Add one for the null char.
- ++len;
+ len++;
// If environment larger than allocated buffer return. Also check to
// make sure we have enough room.
@@ -1066,7 +1022,7 @@ ACE_Process_Options::command_line (const ACE_TCHAR *format, ...)
if (command_line_buf_len_ < 1)
return -1;
-#if !defined (ACE_LACKS_VSNPRINTF)
+#if defined (ACE_HAS_SNPRINTF)
// sprintf the format and args into command_line_buf__.
ACE_OS::vsnprintf (command_line_buf_,
command_line_buf_len_ - 1,
diff --git a/ACE/ace/QoS/Makefile.am b/ACE/ace/QoS/Makefile.am
index c48750d77a7..22ff2031cba 100644
--- a/ACE/ace/QoS/Makefile.am
+++ b/ACE/ace/QoS/Makefile.am
@@ -57,7 +57,7 @@ CLEANFILES = \
ACE_QoS.pc
ACE_QoS.pc: ${top_builddir}/config.status ${srcdir}/ACE_QoS.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/ACE_QoS.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE_QoS.pc.in
endif BUILD_QOS
diff --git a/ACE/ace/QoS/qos.mpc b/ACE/ace/QoS/qos.mpc
index bb916932991..cf50f96b557 100644
--- a/ACE/ace/QoS/qos.mpc
+++ b/ACE/ace/QoS/qos.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(QoS) : acelib, install {
+project(QoS) : acelib, core {
requires += qos
sharedname = ACE_QoS
dynamicflags = ACE_QoS_BUILD_DLL
diff --git a/ACE/ace/QtReactor/QtReactor.cpp b/ACE/ace/QtReactor.cpp
index 28682e17109..a6983ab9463 100644
--- a/ACE/ace/QtReactor/QtReactor.cpp
+++ b/ACE/ace/QtReactor.cpp
@@ -1,6 +1,6 @@
//$Id$
-#include "ace/QtReactor/QtReactor.h"
+#include "ace/QtReactor.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -565,12 +565,6 @@ ACE_QtReactor::QtWaitForMultipleEvents (int width,
ACE_Select_Reactor_Handle_Set &wait_set,
ACE_Time_Value * /*max_wait_time*/)
{
- // Keep a copy of the wait set in case the wait_set be changed
- // between the two select calls in this function. It could happen
- // while waiting for an event, another event is handled and dispatched
- // which changes the dispatch_set_/wait_set.
- ACE_Select_Reactor_Handle_Set orig_wait_set = wait_set;
-
// Check to make sure our handle's are all usable.
ACE_Select_Reactor_Handle_Set temp_set = wait_set;
@@ -590,9 +584,9 @@ ACE_QtReactor::QtWaitForMultipleEvents (int width,
// Now actually read the result needed by the <Select_Reactor> using
// <select>.
return ACE_OS::select(width,
- orig_wait_set.rd_mask_,
- orig_wait_set.wr_mask_,
- orig_wait_set.ex_mask_,
+ wait_set.rd_mask_,
+ wait_set.wr_mask_,
+ wait_set.ex_mask_,
(ACE_Time_Value *) &ACE_Time_Value::zero);
}
diff --git a/ACE/ace/QtReactor/QtReactor.h b/ACE/ace/QtReactor.h
index 33e50058c15..c3ccb82f7f3 100644
--- a/ACE/ace/QtReactor/QtReactor.h
+++ b/ACE/ace/QtReactor.h
@@ -16,7 +16,7 @@
#include /**/ "ace/pre.h"
-#include "ace/QtReactor/ACE_QtReactor_export.h"
+#include "ace/ACE_QtReactor_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/ACE/ace/README b/ACE/ace/README
index 13743b8c708..e9c6d84f739 100644
--- a/ACE/ace/README
+++ b/ACE/ace/README
@@ -201,6 +201,7 @@ ACE_HAS_STDARG_THR_DEST Platform has void (*)(...)
prototype for
pthread_key_create()
destructor (e.g., LynxOS).
+ACE_HAS_SNPRINTF Platform offers snprintf().
ACE_HAS_STL_MAP_CONFLICT Used when users want to
compile ACE with STL and STL
map class conflicts with
@@ -286,6 +287,9 @@ ACE_HAS_CHARPTR_DL OS/platform uses char * for
ACE_HAS_CHARPTR_SOCKOPT OS/platform uses char * for
sockopt, rather than const
char *
+ACE_HAS_CHARPTR_SPRINTF sprintf() returns char *
+ rather than int (e.g., SunOS
+ 4.x)
ACE_HAS_CLOCK_GETTIME Platform supports POSIX.1b
clock_gettime () at least for clock-id CLOCK_REALTIME
ACE_HAS_CLOCK_GETTIME_MONOTONIC Platform supports POSIX.1b
@@ -829,8 +833,6 @@ ACE_HAS_VOIDPTR_SOCKOPT OS/compiler uses void * arg 4
setsockopt() rather than const
char *
ACE_HAS_WCSNLEN Platform supports wcsnlen(3).
-ACE_HAS_WIN32_OVERLAPPED_IO Platform has Windows overlapped I/O;
- requires I/O completion ports.
ACE_HAS_WIN32_TRYLOCK The Win32 platform support
TryEnterCriticalSection()
(WinNT 4.0 and beyond)
@@ -949,11 +951,10 @@ ACE_LACKS_MEMORY_H Platform lacks memory.h (e.g.,
VxWorks and Chorus)
ACE_LACKS_MKFIFO Platform lacks mkfifo() e.g.,
VxWorks, Chorus, pSoS, and WinNT.
-ACE_LACKS_MKTEMP Platform lacks the mktemp() function.
+ACE_LACKS_MKTEMP ACE has no mktemp()
ACE_LACKS_MKTEMP_PROTOTYPE Platform/compiler lacks the
mktemp() prototype (e.g.,
LynxOS)
-ACE_LACKS_MKSTEMP Platform lacks the mkstemp() function.
ACE_LACKS_MKSTEMP_PROTOTYPE Platform/compiler lacks the
mkstemp() prototype (e.g.,
LynxOS)
@@ -1113,17 +1114,6 @@ ACE_LACKS_TELLDIR Platform uses ACE_HAS_DIRENT
ACE_LACKS_THREAD_STACK_SIZE Platform lacks
pthread_attr_setstacksize()
(e.g., Linux pthreads)
-ACE_LACKS_THR_CONCURRENCY_FUNCS (ONLY APPLIES TO SOLARIS)
- Platform does not support
- thr_getconcurrency/thr_setconcurrency
- functions, or their implementation
- is effectively a "no-op". This
- notably applies for Solaris >= 5.9.
- Note that if you build on Solaris 8
- and run on Solaris 9+, you can
- encounter thread creation errors
- unless you rebuild on the target
- platform.
ACE_LACKS_TIMEDWAIT_PROTOTYPES MIT pthreads platform lacks
the timedwait prototypes
ACE_LACKS_TIMESPEC_T Platform does not define
@@ -1164,10 +1154,7 @@ ACE_LACKS_UNAME Platform lacks uname calls
ACE_LACKS_WAIT The platform lacks wait
ACE_LACKS_WILDCARD_BIND The bind() call will not
select the port if it's 0.
-ACE_LACKS_WIN32_MOVEFILEEX The Windows platforms doesn't have
- MoveFileEx().
-ACE_LACKS_WIN32_SECURITY_DESCRIPTORS The Windows platform doesn't have
- security descriptor support.
+
ACE_LACKS_WRITEV Platform doesn't define
writev, so use our own
@@ -1212,10 +1199,6 @@ ACE_ONLY_LATEST_AND_GREATEST A macro that indicates that
which has the opposite meaning
but serves the same purpose.
-ACE_SHM_OPEN_REQUIRES_ONE_SLASH The path specified on shm_open() must
- have a leading, single slash and not
- have any other slashes.
-
ACE_WSTRING_HAS_USHORT_SUPPORT If a platform has wchar_t as a
separate type, then
ACE_WString doesn't have a
diff --git a/ACE/ace/Reactor.cpp b/ACE/ace/Reactor.cpp
index c71089fb62f..4921135bd3a 100644
--- a/ACE/ace/Reactor.cpp
+++ b/ACE/ace/Reactor.cpp
@@ -399,7 +399,8 @@ ACE_Reactor::timer_queue (ACE_Timer_Queue *tq)
ACE_Timer_Queue *
ACE_Reactor::timer_queue (void) const
{
- return this->implementation ()->timer_queue ();
+ ACE_Reactor_Impl *impl = this->implementation_;
+ return impl->timer_queue ();
}
int
diff --git a/ACE/ace/Reactor_Impl.h b/ACE/ace/Reactor_Impl.h
index 47800975214..51cca18517e 100644
--- a/ACE/ace/Reactor_Impl.h
+++ b/ACE/ace/Reactor_Impl.h
@@ -500,7 +500,7 @@ public:
/// Returns true if Reactor has been successfully initialized, else
/// false.
- virtual bool initialized (void) = 0;
+ virtual int initialized (void) = 0;
/// Returns the current size of the Reactor's internal descriptor
/// table.
diff --git a/ACE/ace/Read_Buffer.cpp b/ACE/ace/Read_Buffer.cpp
index f57feff1e4a..9401048f148 100644
--- a/ACE/ace/Read_Buffer.cpp
+++ b/ACE/ace/Read_Buffer.cpp
@@ -33,7 +33,7 @@ ACE_Read_Buffer::dump (void) const
}
ACE_Read_Buffer::ACE_Read_Buffer (FILE *fp,
- bool close_on_delete,
+ int close_on_delete,
ACE_Allocator *alloc)
: stream_ (fp),
close_on_delete_ (close_on_delete),
@@ -46,7 +46,7 @@ ACE_Read_Buffer::ACE_Read_Buffer (FILE *fp,
#if !defined (ACE_HAS_WINCE)
ACE_Read_Buffer::ACE_Read_Buffer (ACE_HANDLE handle,
- bool close_on_delete,
+ int close_on_delete,
ACE_Allocator *alloc)
: stream_ (ACE_OS::fdopen (handle, ACE_LIB_TEXT ("r"))),
close_on_delete_ (close_on_delete),
@@ -121,7 +121,7 @@ ACE_Read_Buffer::rec_read (int term, int search, int replace)
// Check for possible substitutions.
if (c == search)
{
- ++this->occurrences_;
+ this->occurrences_++;
if (replace >= 0)
c = replace;
@@ -141,7 +141,7 @@ ACE_Read_Buffer::rec_read (int term, int search, int replace)
if (this->size_ == 0)
return 0;
- char *result = 0;
+ char *result;
// Recurse, when the recursion bottoms out, allocate the result
// buffer.
diff --git a/ACE/ace/Read_Buffer.h b/ACE/ace/Read_Buffer.h
index cfa0dd0f791..937152a7498 100644
--- a/ACE/ace/Read_Buffer.h
+++ b/ACE/ace/Read_Buffer.h
@@ -39,7 +39,7 @@ class ACE_Allocator;
* Processing.
*
* This implementation is optimized to do a single dynamic
- * allocation and make only one copy of the data. It uses
+ * allocation and make only one copy of the data. It uses
* recursion and the run-time stack to accomplish this
* efficiently.
*/
@@ -49,7 +49,7 @@ public:
// = Initialization and termination methods.
/// Read from a FILE *.
ACE_Read_Buffer (FILE *fp,
- bool close_on_delete = false,
+ int close_on_delete = 0,
ACE_Allocator * = 0);
#if !defined (ACE_HAS_WINCE)
@@ -57,7 +57,7 @@ public:
/// Read from an open HANDLE.
ACE_Read_Buffer (ACE_HANDLE handle,
- bool close_on_delete = false,
+ int close_on_delete = 0,
ACE_Allocator * = 0);
#endif // ACE_HAS_WINCE
@@ -66,19 +66,19 @@ public:
/**
* Returns a pointer dynamically allocated with
- * ACE_Allocator::malloc to data from the input stream up to (and
- * including) the @a terminator. If @a search is >= 0 then all
- * occurrences of the @a search value are substituted with the
- * @a replace value. The last of the byte of data is a 0, so that
- * @c strlen can be used on it. The caller is responsible for
+ * <ACE_Allocator::malloc> to data from the input stream up to (and
+ * including) the <terminator>. If <search> is >= 0 then all
+ * occurrences of the <search> value are substituted with the
+ * <replace> value. The last of the byte of data is a 0, so that
+ * <strlen> can be used on it. The caller is responsible for
* freeing the pointer returned from this method using the
- * ACE_Allocator::free.
+ * <ACE_Allocator::free>.
*/
char *read (int terminator = EOF,
int search = '\n',
int replace = '\0');
- /// Returns the number of characters replaced during a @c read.
+ /// Returns the number of characters replaced during a <read>.
size_t replaced (void) const;
/// Returns the size of the allocated buffer obtained during a
@@ -112,10 +112,11 @@ private:
/// Keeps track of whether we should close the FILE in the
/// destructor.
- bool const close_on_delete_;
+ int close_on_delete_;
/// Pointer to the allocator.
ACE_Allocator *allocator_;
+
};
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Rtems_init.c b/ACE/ace/Rtems_init.c
index b0c548c4fd3..4ed83fd7696 100644
--- a/ACE/ace/Rtems_init.c
+++ b/ACE/ace/Rtems_init.c
@@ -1,46 +1,49 @@
/*
+ * RTEMS Network configuration/initialization
+ *
+ * This file is a merger of the netdemo/init.c and networkconfig.h
+ * with some modifications to support loopback only. This file
+ * is OK for a starting point for a real networked application.
+ * --joel sherrill 16 Mar 2001
+ *
+ * This program may be distributed and used for any purpose.
+ * I ask only that you:
+ * 1. Leave this author information intact.
+ * 2. Document any changes you make.
+ *
+ * W. Eric Norum
+ * Saskatchewan Accelerator Laboratory
+ * University of Saskatchewan
+ * Saskatoon, Saskatchewan, CANADA
+ * eric@skatter.usask.ca
+ *
* $Id$
*/
#if defined (ACE_HAS_RTEMS)
-#define RTEMS_BSP_NETWORK_DRIVER_NAME "ne1"
-#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_ne_driver_attach
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 256
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 100
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 300
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 300
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 100
-#define CONFIGURE_MAXIMUM_POSIX_TIMERS 100
-#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 10
-#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 300
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT Init
-#define CONFIGURE_MEMORY_FOR_POSIX (10*1024)
-#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (10*1024)
+#include <bsp.h>
+
+char *rtems_progname;
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024)
+#define CONFIGURE_MAXIMUM_SEMAPHORES 20
+#define CONFIGURE_MAXIMUM_TASKS 20
#define CONFIGURE_MICROSECONDS_PER_TICK 10000
-#define CONFIGURE_MAXIMUM_SEMAPHORES 100
-#define CONFIGURE_MAXIMUM_TASKS 100
-#define CONFIGURE_INIT_TASK_PRIORITY 120
+#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024)
+#define CONFIGURE_INIT_TASK_PRIORITY 120
#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
RTEMS_NO_TIMESLICE | \
RTEMS_NO_ASR | \
RTEMS_INTERRUPT_LEVEL(0))
-#include <bsp.h>
-
-char *rtems_progname;
-
#define CONFIGURE_INIT
-
rtems_task Init (rtems_task_argument argument);
#include <confdefs.h>
@@ -50,6 +53,7 @@ rtems_task Init (rtems_task_argument argument);
#if !defined (ACE_LACKS_NETWORKING)
#include <rtems/rtems_bsdnet.h>
+/* start of #include "../networkconfig.h" */
/*
* Network configuration
@@ -58,6 +62,8 @@ rtems_task Init (rtems_task_argument argument);
* EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
* BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
************************************************************
+ *
+ * $Id$
*/
#ifndef _RTEMS_NETWORKCONFIG_H_
@@ -84,12 +90,13 @@ rtems_task Init (rtems_task_argument argument);
*/
#define RTEMS_SET_ETHERNET_ADDRESS
#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
+/* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */
static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
#endif
#define RTEMS_USE_LOOPBACK
-
+#define RTEMS_USE_LOOPBACK_ONLY
#ifdef RTEMS_USE_LOOPBACK
/*
* Loopback interface
@@ -129,7 +136,7 @@ static struct rtems_bsdnet_ifconfig netdriver_config = {
NULL, /* BOOTP supplies IP address */
NULL, /* BOOTP supplies IP net mask */
#else
- "XXX.YYY.ZZZ.XYZ", /* IP address */
+ "XXX.YYY.ZZZ.XYZ", /* IP address */
"255.255.255.0", /* IP net mask */
#endif /* !RTEMS_USE_BOOTP */
@@ -161,9 +168,9 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
#if (!defined (RTEMS_USE_BOOTP))
"rtems_host", /* Host name */
"nodomain.com", /* Domain name */
- "XXX.YYY.ZZZ.1", /* Gateway */
+ "XXX.YYY.ZZZ.1", /* Gateway */
"XXX.YYY.ZZZ.1", /* Log host */
- {"XXX.YYY.ZZZ.1" }, /* Name server(s) */
+ {"XXX.YYY.ZZZ.1" }, /* Name server(s) */
{"XXX.YYY.ZZZ.1" }, /* NTP server(s) */
/*
@@ -194,25 +201,23 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
#endif
#endif /* _RTEMS_NETWORKCONFIG_H_ */
+/* end of #include "../networkconfig.h" */
#endif /* ACE_LACKS_NETWORKING */
-extern int main (int, char *[]);
-
/*
* RTEMS Startup Task
*/
rtems_task
Init (rtems_task_argument not_used)
{
- int retval = 0;
+ int doSocket(void);
+
#if !defined (ACE_LACKS_NETWORKING)
- retval = rtems_bsdnet_initialize_network ();
+ rtems_bsdnet_initialize_network ();
+ rtems_bsdnet_show_inet_routes ();
#endif /* ACE_LACKS_NETWORKING */
- if (retval == 0)
- {
- retval = main (0, 0);
- }
+ exit (0);
}
#elif !defined (__GNUC__)
diff --git a/ACE/ace/SOCK_Dgram.cpp b/ACE/ace/SOCK_Dgram.cpp
index d2a5e4cf8f3..51b200fdc83 100644
--- a/ACE/ace/SOCK_Dgram.cpp
+++ b/ACE/ace/SOCK_Dgram.cpp
@@ -9,7 +9,6 @@
#include "ace/OS_NS_sys_select.h"
#include "ace/OS_NS_ctype.h"
#include "ace/os_include/net/os_if.h"
-#include "ace/Truncate.h"
#if !defined (__ACE_INLINE__)
# include "ace/SOCK_Dgram.inl"
@@ -98,23 +97,14 @@ ACE_SOCK_Dgram::recv (iovec *io_vec,
ACE_NEW_RETURN (io_vec->iov_base,
char[inlen],
-1);
- ssize_t rcv_len = ACE_OS::recvfrom (this->get_handle (),
+ io_vec->iov_len = ACE_OS::recvfrom (this->get_handle (),
(char *) io_vec->iov_base,
inlen,
flags,
(sockaddr *) saddr,
&addr_len);
- if (rcv_len < 0)
- {
- delete [] (char *)io_vec->iov_base;
- io_vec->iov_base = 0;
- }
- else
- {
- io_vec->iov_len = ACE_Utils::Truncate<size_t> (rcv_len);
- addr.set_size (addr_len);
- }
- return rcv_len;
+ addr.set_size (addr_len);
+ return io_vec->iov_len;
}
else
return 0;
@@ -625,6 +615,8 @@ ACE_SOCK_Dgram::make_multicast_ifaddr (ip_mreq *ret_mreq,
return -1;
lmreq.imr_interface.s_addr =
ACE_HTONL (interface_addr.get_ip_address ());
+#elif defined (ACE_LACKS_IFREQ)
+ // Do nothing
#else
ifreq if_address;
diff --git a/ACE/ace/SOCK_Dgram.inl b/ACE/ace/SOCK_Dgram.inl
index c365a6bb7b7..55343b13668 100644
--- a/ACE/ace/SOCK_Dgram.inl
+++ b/ACE/ace/SOCK_Dgram.inl
@@ -53,12 +53,12 @@ ACE_SOCK_Dgram::recv (void *buf,
sockaddr *saddr = (sockaddr *) addr.get_addr ();
int addr_len = addr.get_size ();
- ssize_t const status = ACE_OS::recvfrom (this->get_handle (),
- (char *) buf,
- n,
- flags,
- (sockaddr *) saddr,
- &addr_len);
+ ssize_t status = ACE_OS::recvfrom (this->get_handle (),
+ (char *) buf,
+ n,
+ flags,
+ (sockaddr *) saddr,
+ &addr_len);
addr.set_size (addr_len);
addr.set_type (reinterpret_cast<sockaddr_in *> (saddr)->sin_family);
return status;
diff --git a/ACE/ace/SOCK_Dgram_Bcast.cpp b/ACE/ace/SOCK_Dgram_Bcast.cpp
index 639a86d1612..2bca65d6538 100644
--- a/ACE/ace/SOCK_Dgram_Bcast.cpp
+++ b/ACE/ace/SOCK_Dgram_Bcast.cpp
@@ -236,8 +236,8 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name)
IFF_UP) == 0)
{
ACE_ERROR ((LM_ERROR, "%p [%s]\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: Network interface is not up",
- flags.ifr_name));
+ "ACE_SOCK_Dgram_Bcast::mk_broadcast: Network interface is not up",
+ flags.ifr_name));
continue;
}
@@ -252,8 +252,8 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name)
SIOCGIFBRDADDR,
(char *) &if_req) == -1)
ACE_ERROR ((LM_ERROR, "%p [%s]\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get broadaddr)",
- flags.ifr_name));
+ "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get broadaddr)",
+ flags.ifr_name));
else
{
ACE_INET_Addr addr (reinterpret_cast <sockaddr_in *>
diff --git a/ACE/ace/SOCK_IO.h b/ACE/ace/SOCK_IO.h
index 252ec68d0cd..b59421602ac 100644
--- a/ACE/ace/SOCK_IO.h
+++ b/ACE/ace/SOCK_IO.h
@@ -70,10 +70,21 @@ public:
const ACE_Time_Value *timeout = 0) const;
/// Recv an <iovec> of size <n> from the connected socket.
+ /**
+ * @note The value of @a n will be silently reduced to the maximum
+ * value an @c int can hold if needed. This is due to the underlying
+ * system calls on many OSes limiting the number of @c iovec structures
+ * that can be passed in one call.
+ */
ssize_t recvv (iovec iov[],
- int n,
+ size_t n,
const ACE_Time_Value *timeout = 0) const;
+ /// @deprecated Same as above. Deprecated.
+ ssize_t recv (iovec iov[],
+ size_t n,
+ const ACE_Time_Value *timeout = 0) const;
+
/**
* Allows a client to read from a socket without having to provide a
* buffer to read. This method determines how much data is in the
@@ -85,6 +96,10 @@ public:
ssize_t recvv (iovec *io_vec,
const ACE_Time_Value *timeout = 0) const;
+ /// Same as above. Deprecated.
+ ssize_t recv (iovec *io_vec,
+ const ACE_Time_Value *timeout = 0) const;
+
/// Recv <n> varargs messages to the connected socket.
ssize_t recv (size_t n,
...) const;
@@ -106,10 +121,21 @@ public:
const ACE_Time_Value *timeout = 0) const;
/// Send an <iovec> of size <n> to the connected socket.
+ /**
+ * @note The value of @a n will be silently reduced to the maximum
+ * value an @c int can hold if needed. This is due to the underlying
+ * system calls on many OSes limiting the number of @c iovec structures
+ * that can be passed in one call.
+ */
ssize_t sendv (const iovec iov[],
- int n,
+ size_t n,
const ACE_Time_Value *timeout = 0) const;
+ /// Same as above. Deprecated.
+ ssize_t send (const iovec iov[],
+ size_t n,
+ const ACE_Time_Value *timeout = 0) const;
+
/// Send <n> varargs messages to the connected socket.
ssize_t send (size_t n,
...) const;
diff --git a/ACE/ace/SOCK_IO.inl b/ACE/ace/SOCK_IO.inl
index 0721c33fd0d..f1aec4af3b8 100644
--- a/ACE/ace/SOCK_IO.inl
+++ b/ACE/ace/SOCK_IO.inl
@@ -3,6 +3,7 @@
// $Id$
#include "ace/OS_NS_unistd.h"
+#include "ace/Truncate.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -48,17 +49,37 @@ ACE_SOCK_IO::recv (void *buf,
ACE_INLINE ssize_t
ACE_SOCK_IO::recvv (iovec iov[],
- int n,
+ size_t n,
const ACE_Time_Value *timeout) const
{
ACE_TRACE ("ACE_SOCK_IO::recvv");
return ACE::recvv (this->get_handle (),
iov,
- n,
+ ACE_Utils::Truncate<size_t> (n),
timeout);
}
ACE_INLINE ssize_t
+ACE_SOCK_IO::recv (iovec iov[],
+ size_t n,
+ const ACE_Time_Value *timeout) const
+{
+ ACE_TRACE ("ACE_SOCK_IO::recv");
+ return this->recvv (iov,
+ n,
+ timeout);
+}
+
+ACE_INLINE ssize_t
+ACE_SOCK_IO::recv (iovec *io_vec,
+ const ACE_Time_Value *timeout) const
+{
+ ACE_TRACE ("ACE_SOCK_IO::recv");
+ return this->recvv (io_vec,
+ timeout);
+}
+
+ACE_INLINE ssize_t
ACE_SOCK_IO::recv (void *buf,
size_t n,
ACE_OVERLAPPED *overlapped) const
@@ -98,17 +119,28 @@ ACE_SOCK_IO::send (const void *buf,
ACE_INLINE ssize_t
ACE_SOCK_IO::sendv (const iovec iov[],
- int n,
+ size_t n,
const ACE_Time_Value *timeout) const
{
ACE_TRACE ("ACE_SOCK_IO::sendv");
return ACE::sendv (this->get_handle (),
iov,
- n,
+ ACE_Utils::Truncate<size_t> (n),
timeout);
}
ACE_INLINE ssize_t
+ACE_SOCK_IO::send (const iovec iov[],
+ size_t n,
+ const ACE_Time_Value *timeout) const
+{
+ ACE_TRACE ("ACE_SOCK_IO::send");
+ return this->sendv (iov,
+ n,
+ timeout);
+}
+
+ACE_INLINE ssize_t
ACE_SOCK_IO::send (const void *buf,
size_t n,
ACE_OVERLAPPED *overlapped) const
diff --git a/ACE/ace/SPIPE_Acceptor.cpp b/ACE/ace/SPIPE_Acceptor.cpp
index ba5806bae29..960adfc786c 100644
--- a/ACE/ace/SPIPE_Acceptor.cpp
+++ b/ACE/ace/SPIPE_Acceptor.cpp
@@ -14,9 +14,9 @@ ACE_RCSID(ace, SPIPE_Acceptor, "$Id$")
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor (void)
-#if defined (ACE_HAS_WIN32_NAMED_PIPES)
+#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
: sa_ (0), pipe_handle_ (ACE_INVALID_HANDLE)
-#endif /* ACE_HAS_WIN32_NAMED_PIPES */
+#endif /* ACE_WIN32 */
{
ACE_TRACE ("ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor");
}
@@ -61,13 +61,13 @@ ACE_SPIPE_Acceptor::open (const ACE_SPIPE_Addr &local_sap,
this->local_addr_ = local_sap;
this->set_handle (ACE_INVALID_HANDLE);
-#if defined (ACE_HAS_WIN32_NAMED_PIPES)
+#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
this->sa_ = sa;
this->pipe_mode_ = pipe_mode;
#else
ACE_UNUSED_ARG (sa);
ACE_UNUSED_ARG (pipe_mode);
-#endif /* ACE_HAS_WIN32_NAMED_PIPES */
+#endif /* ACE_WIN32 */
return this->create_new_instance (perms);
}
@@ -100,7 +100,7 @@ ACE_SPIPE_Acceptor::create_new_instance (int perms)
this->set_handle (spipe[1]);
return 0;
-#elif defined (ACE_HAS_WIN32_NAMED_PIPES)
+#elif (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
// Create a new instance of the Named Pipe (WIN32). A new instance
// of the named pipe must be created for every client process. If
// an instance of the named pipe that is already connected to a
@@ -183,7 +183,7 @@ ACE_SPIPE_Acceptor::close (void)
{
ACE_TRACE ("ACE_SPIPE_Acceptor::close");
-#if defined (ACE_HAS_WIN32_NAMED_PIPES)
+#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
// Check to see if we have a valid pipe; if not, nothing to do.
if (this->pipe_handle_ == ACE_INVALID_HANDLE)
@@ -194,7 +194,7 @@ ACE_SPIPE_Acceptor::close (void)
// hanging overlapped operation afterwards.
this->set_handle (this->pipe_handle_);
-#endif /* ACE_HAS_WIN32_NAMED_PIPES */
+#endif /* ACE_WIN32 */
// This behavior is shared by UNIX and Win32...
int result = this->ACE_SPIPE::close ();
@@ -202,7 +202,7 @@ ACE_SPIPE_Acceptor::close (void)
#if defined (ACE_HAS_STREAM_PIPES)
ACE_OS::fdetach (ACE_TEXT_ALWAYS_CHAR (this->local_addr_.get_path_name ()));
-#elif defined (ACE_HAS_WIN32_NAMED_PIPES)
+#elif (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
// open () started the Connect in asynchronous mode, and accept() restarts
// the ConnectNamedPipe in overlapped mode. To avoid leaving a hanging
@@ -283,7 +283,7 @@ ACE_SPIPE_Acceptor::accept (ACE_SPIPE_Stream &new_io,
*remote_addr = new_io.remote_addr_;
return 0;
-#elif defined (ACE_HAS_WIN32_NAMED_PIPES)
+#elif (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
ACE_UNUSED_ARG (restart);
ACE_UNUSED_ARG (remote_addr);
diff --git a/ACE/ace/SPIPE_Acceptor.h b/ACE/ace/SPIPE_Acceptor.h
index 2c7d9958756..6e0bb7ed8aa 100644
--- a/ACE/ace/SPIPE_Acceptor.h
+++ b/ACE/ace/SPIPE_Acceptor.h
@@ -22,9 +22,9 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_HAS_WIN32_NAMED_PIPES)
+#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
#include "ace/Manual_Event.h"
-#endif /* ACE_HAS_WIN32_NAMED_PIPES */
+#endif /* ACE_WIN32 */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -138,7 +138,7 @@ private:
/// Create a new instance of an SPIPE.
int create_new_instance (int perms = 0);
-#if defined (ACE_HAS_WIN32_NAMED_PIPES)
+#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
// On Windows, the SECURITY_ATTRIBUTES specified for the initial accept
// operation is reused on all subsequent pipe instances as well.
LPSECURITY_ATTRIBUTES sa_;
@@ -158,7 +158,7 @@ private:
ACE_Manual_Event event_;
ACE_HANDLE pipe_handle_;
int already_connected_;
-#endif /* ACE_HAS_WIN32_NAMED_PIPES */
+#endif /* ACE_WIN32 */
};
diff --git a/ACE/ace/SSL/Makefile.am b/ACE/ace/SSL/Makefile.am
index 135fa9b937b..b5ca23f600e 100644
--- a/ACE/ace/SSL/Makefile.am
+++ b/ACE/ace/SSL/Makefile.am
@@ -6,7 +6,7 @@
## this file will be lost the next time it is generated.
##
## MPC Command:
-## ./bin/mwc.pl -type automake -noreldefs ACE.mwc
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -exclude build,Kokyu
includedir = @includedir@/ace/SSL
pkgconfigdir = @libdir@/pkgconfig
@@ -18,7 +18,6 @@ ACE_ROOT = $(top_srcdir)
## Makefile.SSL.am
if BUILD_SSL
-if !BUILD_ACE_FOR_TAO
lib_LTLIBRARIES = libACE_SSL.la
@@ -67,9 +66,8 @@ CLEANFILES = \
ACE_SSL.pc
ACE_SSL.pc: ${top_builddir}/config.status ${srcdir}/ACE_SSL.pc.in
- ${top_builddir}/config.status --file $@:${srcdir}/ACE_SSL.pc.in
+ ${top_builddir}/config.status --file "$@":${srcdir}/ACE_SSL.pc.in
-endif !BUILD_ACE_FOR_TAO
endif BUILD_SSL
EXTRA_DIST = \
diff --git a/ACE/ace/SSL/ssl.mpc b/ACE/ace/SSL/ssl.mpc
index 723f22c311d..1095488afe8 100644
--- a/ACE/ace/SSL/ssl.mpc
+++ b/ACE/ace/SSL/ssl.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(SSL) : acelib, install, ace_openssl {
+project(SSL) : acelib, core, ace_openssl {
avoids += ace_for_tao
requires += ssl
sharedname = ACE_SSL
diff --git a/ACE/ace/SSL/ssl_for_tao.mpc b/ACE/ace/SSL/ssl_for_tao.mpc
index 50117aed740..11a06071d9d 100644
--- a/ACE/ace/SSL/ssl_for_tao.mpc
+++ b/ACE/ace/SSL/ssl_for_tao.mpc
@@ -2,7 +2,7 @@
//
// $Id$
-project(SSL_FOR_TAO) : acelib, install, ace_openssl {
+project(SSL_FOR_TAO) : acelib, core, ace_openssl {
requires += ssl ace_for_tao
sharedname = ACE_SSL_FOR_TAO
dynamicflags = ACE_SSL_BUILD_DLL
diff --git a/ACE/ace/SStringfwd.h b/ACE/ace/SStringfwd.h
index 26f4810674c..315553751ce 100644
--- a/ACE/ace/SStringfwd.h
+++ b/ACE/ace/SStringfwd.h
@@ -25,12 +25,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if ((36300 <= __HP_aCC) && (__HP_aCC <= 37300))
-// Due to a bug in the aCC 3.xx compiler need to define the ACE_String_Base
-// template before we can typedef ACE_CString
-# include "ace/String_Base.h"
-#endif /* __HP_aCC */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <class CHAR> class ACE_String_Base; // Forward declaration.
diff --git a/ACE/ace/Sample_History.cpp b/ACE/ace/Sample_History.cpp
index 832029e4dde..ffa138571d0 100644
--- a/ACE/ace/Sample_History.cpp
+++ b/ACE/ace/Sample_History.cpp
@@ -50,9 +50,6 @@ ACE_Sample_History::dump_samples (const ACE_TCHAR *msg,
const ACE_UINT32 val = ACE_CU64_TO_CU32 (x);
ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT("%s: %d %u\n"), msg, i, val));
}
-#else
- ACE_UNUSED_ARG (msg);
- ACE_UNUSED_ARG (scale_factor);
#endif /* ACE_NLOGGING */
}
diff --git a/ACE/ace/Select_Reactor_Base.h b/ACE/ace/Select_Reactor_Base.h
index 9ec4e642210..118a03de8ae 100644
--- a/ACE/ace/Select_Reactor_Base.h
+++ b/ACE/ace/Select_Reactor_Base.h
@@ -39,10 +39,6 @@
# include "ace/Array_Base.h"
#endif /* ACE_WIN32 */
-#if !defined (ACE_DISABLE_NOTIFY_PIPE_DEFAULT)
-# define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 0
-#endif /* ACE_DISABLE_NOTIFY_PIPE_DEFAULT */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Add useful typedefs to simplify the following code.
@@ -144,7 +140,7 @@ public:
/// Initialize.
virtual int open (ACE_Reactor_Impl *,
ACE_Timer_Queue * = 0,
- int disable_notify_pipe = ACE_DISABLE_NOTIFY_PIPE_DEFAULT);
+ int disable_notify_pipe = 0);
/// Destroy.
virtual int close (void);
@@ -260,7 +256,7 @@ protected:
// more notifications to be stored than would otherwise be the case.
/// Keeps track of allocated arrays of type
- /// ACE_Notification_Buffer.
+ /// <ACE_Notification_Buffer>.
ACE_Unbounded_Queue <ACE_Notification_Buffer *> alloc_queue_;
/// Keeps track of all pending notifications.
@@ -325,7 +321,7 @@ public:
/// Default "do-nothing" constructor.
ACE_Select_Reactor_Handler_Repository (ACE_Select_Reactor_Impl &);
- /// Initialize a repository of the appropriate @a size.
+ /// Initialize a repository of the appropriate <size>.
/**
* On Unix platforms, the size parameter should be as large as the
* maximum number of file descriptors allowed for a given process.
@@ -390,7 +386,7 @@ private:
int unbind (ACE_HANDLE handle,
map_type::iterator pos,
ACE_Reactor_Mask mask);
-
+
/**
* @return @c iterator corresponding @c ACE_Event_Handler*
* associated with @c ACE_HANDLE.
@@ -398,7 +394,7 @@ private:
map_type::iterator find_eh (ACE_HANDLE handle);
private:
- /// Reference to our @c Select_Reactor.
+ /// Reference to our <Select_Reactor>.
ACE_Select_Reactor_Impl &select_reactor_;
#ifndef ACE_WIN32
@@ -429,7 +425,7 @@ public:
// = Iteration methods.
- /// Pass back the @a next_item that hasn't been seen in the Set.
+ /// Pass back the <next_item> that hasn't been seen in the Set.
/// Returns @c false when all items have been seen, else @c true.
bool next (ACE_Event_Handler* & next_item);
@@ -460,7 +456,7 @@ private:
*
* @brief This class simply defines how Select_Reactor's basic interface
* functions should look like and provides a common base class for
- * @c Select_Reactor using various locking mechanism.
+ * <Select_Reactor> using various locking mechanism.
*/
class ACE_Export ACE_Select_Reactor_Impl : public ACE_Reactor_Impl
{
diff --git a/ACE/ace/Select_Reactor_T.cpp b/ACE/ace/Select_Reactor_T.cpp
index c7cde626b0a..f6fc77b5cb5 100644
--- a/ACE/ace/Select_Reactor_T.cpp
+++ b/ACE/ace/Select_Reactor_T.cpp
@@ -40,7 +40,15 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Select_Reactor_T)
-template <class ACE_SELECT_REACTOR_TOKEN> int
+#if defined (ACE_WIN32)
+#define ACE_SELECT_REACTOR_HANDLE(H) (this->event_handlers_[(H)].handle_)
+#define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)].event_handler_)
+#else
+#define ACE_SELECT_REACTOR_HANDLE(H) (H)
+#define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)])
+#endif /* ACE_WIN32 */
+
+ template <class ACE_SELECT_REACTOR_TOKEN> int
ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::any_ready
(ACE_Select_Reactor_Handle_Set &wait_set)
{
@@ -58,7 +66,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::any_ready
return this->any_ready_i (wait_set);
}
-template <class ACE_SELECT_REACTOR_TOKEN> int
+ template <class ACE_SELECT_REACTOR_TOKEN> int
ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::any_ready_i
(ACE_Select_Reactor_Handle_Set &wait_set)
{
@@ -100,15 +108,14 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handler_i (int signum,
return 0;
}
-template <class ACE_SELECT_REACTOR_TOKEN> bool
+template <class ACE_SELECT_REACTOR_TOKEN> int
ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::initialized (void)
{
ACE_TRACE ("ACE_Select_Reactor_T::initialized");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, false));
+ ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, 0));
return this->initialized_;
}
-
template <class ACE_SELECT_REACTOR_TOKEN> int
ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::owner (ACE_thread_t tid,
ACE_thread_t *o_id)
@@ -210,7 +217,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::notify (ACE_Event_Handler *eh,
// caller to dictate which Event_Handler method the receiver
// invokes. Note that this call can timeout.
- ssize_t const n = this->notify_handler_->notify (eh, mask, timeout);
+ ssize_t n = this->notify_handler_->notify (eh, mask, timeout);
return n == -1 ? -1 : 0;
}
@@ -407,7 +414,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::open
if (this->timer_queue_ == 0)
result = -1;
else
- this->delete_timer_queue_ = true;
+ this->delete_timer_queue_ = 1;
}
// Allows the Notify_Handler to be overridden.
@@ -420,7 +427,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::open
if (this->notify_handler_ == 0)
result = -1;
else
- this->delete_notify_handler_ = true;
+ this->delete_notify_handler_ = 1;
}
if (result != -1 && this->handler_rep_.open (size) == -1)
@@ -437,7 +444,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::open
if (result != -1)
// We're all set to go.
- this->initialized_ = true;
+ this->initialized_ = 1;
else
// This will close down all the allocated resources properly.
this->close ();
@@ -466,10 +473,10 @@ template <class ACE_SELECT_REACTOR_TOKEN> int
ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::timer_queue
(ACE_Timer_Queue *tq)
{
- if (this->timer_queue_ != 0 && this->delete_timer_queue_)
+ if (this->timer_queue_ != 0 && this->delete_timer_queue_ != 0)
delete this->timer_queue_;
this->timer_queue_ = tq;
- this->delete_timer_queue_ = false;
+ this->delete_timer_queue_ = 0;
return 0;
}
@@ -575,7 +582,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::close (void)
{
delete this->timer_queue_;
this->timer_queue_ = 0;
- this->delete_timer_queue_ = false;
+ this->delete_timer_queue_ = 0;
}
if (this->notify_handler_ != 0)
@@ -585,10 +592,10 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::close (void)
{
delete this->notify_handler_;
this->notify_handler_ = 0;
- this->delete_notify_handler_ = false;
+ this->delete_notify_handler_ = 0;
}
- this->initialized_ = false;
+ this->initialized_ = 0;
return 0;
}
diff --git a/ACE/ace/Select_Reactor_T.h b/ACE/ace/Select_Reactor_T.h
index 638e71185c5..bb9cdceed61 100644
--- a/ACE/ace/Select_Reactor_T.h
+++ b/ACE/ace/Select_Reactor_T.h
@@ -67,7 +67,7 @@ public:
/// fine if your application doesn't use the reactor to handle signals).
ACE_Select_Reactor_T (ACE_Sig_Handler * = 0,
ACE_Timer_Queue * = 0,
- int disable_notify_pipe = ACE_DISABLE_NOTIFY_PIPE_DEFAULT,
+ int disable_notify_pipe = 0,
ACE_Reactor_Notify *notify = 0,
int mask_signals = 1,
int s_queue = ACE_SELECT_TOKEN::FIFO);
@@ -92,7 +92,7 @@ public:
int restart = 0,
ACE_Sig_Handler * = 0,
ACE_Timer_Queue * = 0,
- int disable_notify_pipe = ACE_DISABLE_NOTIFY_PIPE_DEFAULT,
+ int disable_notify_pipe = 0,
ACE_Reactor_Notify *notify = 0,
int mask_signals = 1,
int s_queue = ACE_SELECT_TOKEN::FIFO);
@@ -118,11 +118,11 @@ public:
int restart = 0,
ACE_Sig_Handler * = 0,
ACE_Timer_Queue * = 0,
- int disable_notify_pipe = ACE_DISABLE_NOTIFY_PIPE_DEFAULT,
+ int disable_notify_pipe = 0,
ACE_Reactor_Notify * = 0);
/// Returns -1 (not used in this implementation);
- virtual int current_info (ACE_HANDLE, size_t &size);
+ virtual int current_info (ACE_HANDLE, size_t & /* size */);
/// Use a user specified signal handler instead.
virtual int set_sig_handler (ACE_Sig_Handler *signal_handler);
@@ -146,7 +146,7 @@ public:
* but does not actually dispatch the event handlers. By default,
* don't block while checking this, i.e., "poll".
*/
- virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero);
+ virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero);
/**
* This event loop driver that blocks for @a max_wait_time before
@@ -200,7 +200,7 @@ public:
// = Register and remove ACE_Event_Handlers.
/**
- * Register a @a eh with a particular @a mask. Note that the
+ * Register a <eh> with a particular <mask>. Note that the
* <Select_Reactor> will call <ACE_Event_Handler::get_handle> to
* extract the underlying I/O handle.
*/
@@ -244,9 +244,9 @@ public:
ACE_Reactor_Mask mask);
/**
- * Register @a new_sh to handle the signal @a signum using the
- * @a new_disp. Returns the @a old_sh that was previously registered
- * (if any), along with the @a old_disp of the signal handler.
+ * Register <new_sh> to handle the signal <signum> using the
+ * <new_disp>. Returns the <old_sh> that was previously registered
+ * (if any), along with the <old_disp> of the signal handler.
*/
virtual int register_handler (int signum,
ACE_Event_Handler *new_sh,
@@ -254,8 +254,8 @@ public:
ACE_Event_Handler **old_sh = 0,
ACE_Sig_Action *old_disp = 0);
- /// Registers @a new_sh to handle a set of signals @a sigset using the
- /// @a new_disp.
+ /// Registers <new_sh> to handle a set of signals <sigset> using the
+ /// <new_disp>.
virtual int register_handler (const ACE_Sig_Set &sigset,
ACE_Event_Handler *new_sh,
ACE_Sig_Action *new_disp = 0);
@@ -523,7 +523,7 @@ public:
ACE_Event_Handler ** = 0);
/// Returns true if we've been successfully initialized, else false.
- virtual bool initialized (void);
+ virtual int initialized (void);
/// Returns the current size of the Reactor's internal descriptor
/// table.
diff --git a/ACE/ace/Select_Reactor_T.inl b/ACE/ace/Select_Reactor_T.inl
index ebbdfba1e5f..0ad9033f9a0 100644
--- a/ACE/ace/Select_Reactor_T.inl
+++ b/ACE/ace/Select_Reactor_T.inl
@@ -4,7 +4,6 @@
#include "ace/Reactor.h"
#include "ace/Signal.h"
-#include "ace/Sig_Handler.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Service_Config.cpp b/ACE/ace/Service_Config.cpp
index a44998d066c..81a8536cf02 100644
--- a/ACE/ace/Service_Config.cpp
+++ b/ACE/ace/Service_Config.cpp
@@ -21,6 +21,7 @@
#include "ace/OS_NS_unistd.h"
#include "ace/Get_Opt.h"
#include "ace/ARGV.h"
+#include "ace/Static_Object_Lock.h"
ACE_RCSID (ace,
Service_Config,
@@ -130,9 +131,9 @@ ACE_Service_Config::parse_args_i (int argc, ACE_TCHAR *argv[])
-1);
#endif /* ACE_LACKS_UNIX_SIGNALS */
break;
- }
default:
- superargv.add ( argv[getopt.opt_ind () - 1]);
+ superargv.add ( argv[getopt.opt_ind () - 1]);
+ }
}
// Collect any argumets that were left
@@ -325,19 +326,12 @@ ACE_Service_Config::impl_ (void)
static TSS_Service_Gestalt_Ptr * instance_ = 0;
- // We can't possibly rely on ACE_STATIC_OBJECT_LOCK or any other
- // object that may be managed by the Object Manager. It is very
- // likely we are called in a static initializer context, before the
- // ACE_Object_Manager has been instantiated. This of course only
- // matters for threaded environments.
- ACE_MT (static ACE_SYNCH_RECURSIVE_MUTEX guardian_);
-
if (instance_ == 0)
{
// TSS not initialized yet - first thread to hit this, so doing
// the double-checked locking thing
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- guardian_, 0));
+ *ACE_Static_Object_Lock::instance (), 0));
if (instance_ == 0)
ACE_NEW_RETURN (instance_,
@@ -452,6 +446,8 @@ ACE_Service_Config::ACE_Service_Config (int ignore_static_svcs,
{
ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
+ // this->no_static_svcs_ = (ignore_static_svcs);
+
ACE_Service_Config::signum_ = signum;
}
@@ -591,7 +587,7 @@ ACE_Service_Config::close_svcs (void)
ACE_TRACE ("ACE_Service_Config::close_svcs");
ACE_Service_Repository::close_singleton ();
- ACE_Service_Config::current (0);
+
return 0;
}
diff --git a/ACE/ace/Service_Config.h b/ACE/ace/Service_Config.h
index 8a9621b90b0..fbe63edc87e 100644
--- a/ACE/ace/Service_Config.h
+++ b/ACE/ace/Service_Config.h
@@ -274,9 +274,9 @@ public:
*/
static int open (const ACE_TCHAR program_name[],
const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- bool ignore_static_svcs = true,
- bool ignore_default_svc_conf_file = false,
- bool ignore_debug_flag = false);
+ int ignore_static_svcs = 1,
+ int ignore_default_svc_conf_file = 0,
+ int ignore_debug_flag = 0);
/**
* This is the primary entry point into the ACE_Service_Config (the
@@ -331,9 +331,9 @@ public:
static int open (int argc,
ACE_TCHAR *argv[],
const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- bool ignore_static_svcs = true,
- bool ignore_default_svc_conf_file = false,
- bool ignore_debug_flag = false);
+ int ignore_static_svcs = 1,
+ int ignore_default_svc_conf_file = 0,
+ int ignore_debug_flag = 0);
/// Tidy up and perform last rites when ACE_Service_Config is shut
/// down. This method calls <close_svcs>. Returns 0.
diff --git a/ACE/ace/Service_Config.inl b/ACE/ace/Service_Config.inl
index 895c2340232..6719682dfef 100644
--- a/ACE/ace/Service_Config.inl
+++ b/ACE/ace/Service_Config.inl
@@ -12,9 +12,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE int
ACE_Service_Config::open (const ACE_TCHAR program_name[],
const ACE_TCHAR *logger_key,
- bool ignore_static_svcs,
- bool ignore_default_svc_conf,
- bool ignore_debug_flag)
+ int ignore_static_svcs,
+ int ignore_default_svc_conf,
+ int ignore_debug_flag)
{
ACE_TRACE ("ACE_Service_Config::open");
return ACE_Service_Config::current()->open (program_name,
@@ -29,9 +29,9 @@ ACE_INLINE int
ACE_Service_Config::open (int argc,
ACE_TCHAR *argv[],
const ACE_TCHAR *logger_key,
- bool ignore_static_svcs,
- bool ignore_default_svc_conf,
- bool ignore_debug_flag)
+ int ignore_static_svcs,
+ int ignore_default_svc_conf,
+ int ignore_debug_flag)
{
ACE_TRACE ("ACE_Service_Config::open");
return ACE_Service_Config::current()->open (argc,
diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp
index 4d2492daac2..eeae45e785d 100644
--- a/ACE/ace/Service_Gestalt.cpp
+++ b/ACE/ace/Service_Gestalt.cpp
@@ -138,13 +138,12 @@ ACE_Service_Type_Dynamic_Guard::~ACE_Service_Type_Dynamic_Guard (void)
// Lookup without ignoring suspended services. Making sure
// not to ignore any inactive services, since those may be forward
// declarations
- size_t slot = 0;
- int const ret = this->repo_.find_i (this->name_, slot, &tmp, false);
+ int ret = this->repo_.find_i (this->name_, &tmp, 0);
// We inserted it (as inactive), so we expect to find it, right?
if (ret < 0 && ret != -2)
{
- if (ACE::debug ())
+ if(ACE::debug ())
ACE_ERROR ((LM_WARNING,
ACE_LIB_TEXT ("ACE (%P|%t) STDG::<dtor> - Failed (%d) to find %s\n"),
ret, this->name_));
@@ -242,21 +241,16 @@ ACE_Service_Gestalt::Processed_Static_Svc::
ACE_Service_Gestalt::~ACE_Service_Gestalt (void)
{
+ ACE_ASSERT (this->repo_ != 0);
+
if (this->svc_repo_is_owned_)
delete this->repo_;
-
- this->repo_ =0;
-
delete this->static_svcs_;
- this->static_svcs_ = 0;
-
// Delete the dynamically allocated static_svcs instance.
-#ifndef ACE_NLOGGING
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("ACE (%P|%t) SG::dtor - this=%@, pss = %@\n"),
this, this->processed_static_svcs_));
-#endif
if (this->processed_static_svcs_ &&
!this->processed_static_svcs_->is_empty())
@@ -270,53 +264,36 @@ ACE_Service_Gestalt::~ACE_Service_Gestalt (void)
}
}
delete this->processed_static_svcs_;
- this->processed_static_svcs_ = 0;
}
ACE_Service_Gestalt::ACE_Service_Gestalt (size_t size,
bool svc_repo_is_owned,
bool no_static_svcs)
: svc_repo_is_owned_ (svc_repo_is_owned)
- , svc_repo_size_ (size)
, is_opened_ (0)
, logger_key_ (ACE_DEFAULT_LOGGER_KEY)
, no_static_svcs_ (no_static_svcs)
, svc_queue_ (0)
, svc_conf_file_queue_ (0)
- , static_svcs_ (0)
- , processed_static_svcs_ (0)
{
- (void)this->init_i ();
+ if (svc_repo_is_owned)
+ ACE_NEW_NORETURN (this->repo_,
+ ACE_Service_Repository (size));
+ else
+ this->repo_ =
+ ACE_Service_Repository::instance (size);
+
+ ACE_NEW_NORETURN (this->static_svcs_,
+ ACE_STATIC_SVCS);
+
+ this->processed_static_svcs_ = 0;
-#ifndef ACE_NLOGGING
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("ACE (%P|%t) SG::ctor - this = %@, pss = %@\n"),
this, this->processed_static_svcs_));
-#endif
}
-/// Performs the common initialization tasks for a new or previously
-/// closed instance. Must not be virtual, as it is called from the
-/// constructor.
-int
-ACE_Service_Gestalt::init_i (void)
-{
- if (this->svc_repo_is_owned_)
- {
- ACE_NEW_NORETURN (this->repo_,
- ACE_Service_Repository (this->svc_repo_size_));
- }
- else
- {
- this->repo_ =
- ACE_Service_Repository::instance (this->svc_repo_size_);
- }
-
- return 0;
-}
-
-
// Add the default statically-linked services to the Service
// Repository.
@@ -377,9 +354,6 @@ ACE_Service_Gestalt::find_static_svc_descriptor (const ACE_TCHAR* name,
const ACE_Static_Svc_Descriptor*
ACE_Service_Gestalt::find_processed_static_svc (const ACE_TCHAR* name)
{
- if (this->processed_static_svcs_ == 0 || name == 0)
- return 0;
-
Processed_Static_Svc **pss = 0;
for (ACE_PROCESSED_STATIC_SVCS_ITERATOR iter (*this->processed_static_svcs_);
iter.next (pss) != 0;
@@ -414,7 +388,7 @@ ACE_Service_Gestalt::add_processed_static_svc
///
/// In contrast a "dynamic" directive, when processed through the
/// overloaded process_directives(string) both creates the SO
- /// locally and initializes it, where the statics directive must
+ /// locally and initializes it, where the statis directive must
/// first locate the SO and then calls the init() method. This means
/// that durig the "static" initialization there's no specific
/// information about the hosting repository and the gestalt must
@@ -475,11 +449,6 @@ ACE_Service_Gestalt::insert (ACE_Static_Svc_Descriptor *stsd)
stsd->active_);
}
- if (this->static_svcs_ == 0)
- ACE_NEW_RETURN (this->static_svcs_,
- ACE_STATIC_SVCS,
- -1);
-
// Inserting a service after the Gestalt has been opened makes it
// impossible to activate it later. Perhaps open came too soon?
//ACE_ASSERT (this->is_opened_ == 0);
@@ -523,7 +492,7 @@ ACE_Service_Gestalt::initialize (const ACE_TCHAR *svc_name,
#endif
const ACE_Service_Type *srp = 0;
- for (int i = 0; this->find (svc_name, &srp) == -1 && i < 2; i++)
+ for (int i = 0; this->repo_->find (svc_name, &srp) == -1 && i < 2; i++)
// if (this->repo_->find (svc_name, &srp) == -1)
{
const ACE_Static_Svc_Descriptor *assd =
@@ -676,8 +645,8 @@ ACE_Service_Gestalt::initialize (const ACE_Service_Type *sr,
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("ACE (%P|%t) SG::initialize - looking up dynamic ")
- ACE_LIB_TEXT (" service %s to initialize, repo=%@\n"),
- sr->name (), this->repo_));
+ ACE_LIB_TEXT (" service \'%s\' to initialize\n"),
+ sr->name ()));
ACE_Service_Type *srp = 0;
if (this->repo_->find (sr->name (),
@@ -744,9 +713,6 @@ int
ACE_Service_Gestalt::remove (const ACE_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Gestalt::remove");
- if (this->repo_ == 0)
- return -1;
-
return this->repo_->remove (svc_name);
}
@@ -760,9 +726,6 @@ int
ACE_Service_Gestalt::suspend (const ACE_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Gestalt::suspend");
- if (this->repo_ == 0)
- return -1;
-
return this->repo_->suspend (svc_name);
}
@@ -773,9 +736,6 @@ int
ACE_Service_Gestalt::resume (const ACE_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Gestalt::resume");
- if (this->repo_ == 0)
- return -1;
-
return this->repo_->resume (svc_name);
}
@@ -796,9 +756,6 @@ int
ACE_Service_Gestalt::process_directive_i (const ACE_Static_Svc_Descriptor &ssd,
int force_replace)
{
- if (this->repo_ == 0)
- return -1;
-
if (!force_replace)
{
if (this->repo_->find (ssd.name_, 0, 0) >= 0)
@@ -1018,7 +975,9 @@ ACE_Service_Gestalt::process_directive (const ACE_TCHAR directive[])
ACE_Svc_Conf_Param d (this, directive);
- return this->process_directives_i (&d);
+ int result = this->process_directives_i (&d);
+
+ return result;
#else
ACE_DLL dll;
@@ -1100,10 +1059,7 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
if (this->is_opened_++ != 0)
return 0;
- if (this->init_i () != 0)
- return -1;
-
- if (!ignore_debug_flag)
+ if (ignore_debug_flag == 0)
{
// If -d was included as a startup parameter, the user wants debug
// information printed during service initialization.
@@ -1133,7 +1089,7 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
// Make sure to save/restore errno properly.
ACE_Errno_Guard error (errno);
- if (!ignore_debug_flag)
+ if (ignore_debug_flag == 0)
{
log_msg->priority_mask (old_process_mask, ACE_Log_Msg::PROCESS);
log_msg->priority_mask (old_thread_mask, ACE_Log_Msg::THREAD);
@@ -1307,6 +1263,9 @@ ACE_Service_Gestalt::close (void)
this, this->repo_, this->processed_static_svcs_));
#endif
+ delete this->static_svcs_;
+ this->static_svcs_ = 0;
+
if (this->processed_static_svcs_ &&
!this->processed_static_svcs_->is_empty())
{
@@ -1321,9 +1280,6 @@ ACE_Service_Gestalt::close (void)
delete this->processed_static_svcs_;
this->processed_static_svcs_ = 0;
- if (this->svc_repo_is_owned_)
- delete this->repo_;
-
#ifndef ACE_NLOGGING
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
@@ -1331,8 +1287,6 @@ ACE_Service_Gestalt::close (void)
this, this->repo_));
#endif
- this->repo_ = 0;
-
return 0;
} /* close () */
diff --git a/ACE/ace/Service_Gestalt.h b/ACE/ace/Service_Gestalt.h
index a5d656a53a5..1476020fe38 100644
--- a/ACE/ace/Service_Gestalt.h
+++ b/ACE/ace/Service_Gestalt.h
@@ -110,9 +110,9 @@ public:
*/
int open (const ACE_TCHAR program_name[],
const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- bool ignore_static_svcs = true,
- bool ignore_default_svc_conf_file = false,
- bool ignore_debug_flag = false);
+ int ignore_static_svcs = 1,
+ int ignore_default_svc_conf_file = 0,
+ int ignore_debug_flag = 0);
/**
* This is the primary entry point into the ACE_Service_Config (the
@@ -150,11 +150,11 @@ public:
* @param logger_key Indicates where to write the logging output,
* which is typically either a STREAM pipe or a
* socket address.
- * @param ignore_static_svcs If true then static services are not loaded,
+ * @param ignore_static_svcs If 1 then static services are not loaded,
* otherwise, they are loaded.
- * @param ignore_default_svc_conf_file If false then the @c svc.conf
+ * @param ignore_default_svc_conf_file If non-0 then the @c svc.conf
* configuration file will be ignored.
- * @param ignore_debug_flag If false then the application is responsible
+ * @param ignore_debug_flag If non-0 then the application is responsible
* for setting the @c ACE_Log_Msg::priority_mask
* appropriately.
*
@@ -167,9 +167,9 @@ public:
int open (int argc,
ACE_TCHAR *argv[],
const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- bool ignore_static_svcs = true,
- bool ignore_default_svc_conf_file = false,
- bool ignore_debug_flag = false);
+ int ignore_static_svcs = 1,
+ int ignore_default_svc_conf_file = 0,
+ int ignore_debug_flag = 0);
/// Has it been opened? Returns the difference between the times
/// open and close have been called on this instance
@@ -367,14 +367,10 @@ protected:
// the designated shared object in this file.
int initialize_i (const ACE_Service_Type *sr, const ACE_TCHAR *parameters);
- const ACE_Static_Svc_Descriptor* find_processed_static_svc (const ACE_TCHAR*);
- void add_processed_static_svc (const ACE_Static_Svc_Descriptor *);
-
- /// Performs the common initialization tasks for a new or previously
- /// closed instance. Must not be virtual, as it is called from the
- /// constructor.
- int init_i (void);
+const ACE_Static_Svc_Descriptor*
+ find_processed_static_svc (const ACE_TCHAR* );
+void add_processed_static_svc (const ACE_Static_Svc_Descriptor *);
protected:
@@ -402,14 +398,10 @@ protected:
protected:
- /// Do we own the service repository instance, or have only been
- /// given a ptr to the singleton?
+ /// Do we own the service repository instance or have only been given a ptr
+ /// to the singleton one?
bool svc_repo_is_owned_;
- /// Repository size is necessary, so that we can close (which may
- /// destroy the repository instance), and then re-open again.
- size_t svc_repo_size_;
-
/// Keep track of the number of times the instance has been
/// initialized (opened). "If so, we can't allow <yyparse> to be called since
/// it's not reentrant" is the original motivation, but that does not seem
@@ -423,7 +415,7 @@ protected:
const ACE_TCHAR *logger_key_;
/// Should we avoid loading the static services?
- bool no_static_svcs_;
+ int no_static_svcs_;
/// Queue of services specified on the command-line.
ACE_SVC_QUEUE* svc_queue_;
diff --git a/ACE/ace/Service_Gestalt.inl b/ACE/ace/Service_Gestalt.inl
index db9e9ad6d80..9897b83c681 100644
--- a/ACE/ace/Service_Gestalt.inl
+++ b/ACE/ace/Service_Gestalt.inl
@@ -12,9 +12,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE int
ACE_Service_Gestalt::open (const ACE_TCHAR program_name[],
const ACE_TCHAR *logger_key,
- bool ignore_static_svcs,
- bool ignore_default_svc_conf,
- bool ignore_debug_flag)
+ int ignore_static_svcs,
+ int ignore_default_svc_conf,
+ int ignore_debug_flag)
{
ACE_TRACE ("ACE_Service_Gestalt::open");
this->no_static_svcs_ = ignore_static_svcs;
@@ -30,9 +30,9 @@ ACE_INLINE int
ACE_Service_Gestalt::open (int argc,
ACE_TCHAR *argv[],
const ACE_TCHAR *logger_key,
- bool ignore_static_svcs,
- bool ignore_default_svc_conf,
- bool ignore_debug_flag)
+ int ignore_static_svcs,
+ int ignore_default_svc_conf,
+ int ignore_debug_flag)
{
ACE_TRACE ("ACE_Service_Gestalt::open");
this->no_static_svcs_ = ignore_static_svcs;
@@ -55,14 +55,8 @@ ACE_Service_Gestalt::find (const ACE_TCHAR name[],
const ACE_Service_Type **srp,
int ignore_suspended) const
{
- // Closing the gestalt will have disassociated it from the
- // repository. If the repository used to be owned by the gestalt, it
- // will also have been destroyed - so just check for repo_ before
- // doing anything with it.
- if (this->repo_ != 0)
- return this->repo_->find (name, srp, ignore_suspended);
-
- return 0;
+ ACE_ASSERT (this->repo_ != 0);
+ return this->repo_->find (name, srp, ignore_suspended);
}
diff --git a/ACE/ace/Service_Manager.h b/ACE/ace/Service_Manager.h
index c0d0c7e0fa7..02d955a7a30 100644
--- a/ACE/ace/Service_Manager.h
+++ b/ACE/ace/Service_Manager.h
@@ -34,11 +34,11 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
*
* This implementation is simple and just handles each client
* request one at a time. There are currently 3 types of requests:
- * - List services: If the string "help" is sent, return a list of all
+ * + List services: If the string "help" is sent, return a list of all
* the services supported by the Service Configurator.
- * - Reconfigure: If the string "reconfigure" is sent trigger a
+ * + Reconfigure: If the string "reconfigure" is sent trigger a
* reconfiguration, which will re-read the local <svc.conf> file.
- * - Process directive: If neither "help" nor "reconfigure" is sent,
+ * + Process directive: If neither "help" nor "reconfigure" is sent,
* simply treat the incoming string as a process directive and pass
* it along to <ACE_Service_Config::process_directive>. This allows
* remote configuration via command-line instructions like
diff --git a/ACE/ace/Service_Repository.cpp b/ACE/ace/Service_Repository.cpp
index 2c9d6920d78..c3b63ac5a97 100644
--- a/ACE/ace/Service_Repository.cpp
+++ b/ACE/ace/Service_Repository.cpp
@@ -247,9 +247,8 @@ ACE_Service_Repository::~ACE_Service_Repository (void)
int
ACE_Service_Repository::find_i (const ACE_TCHAR name[],
- size_t &slot,
const ACE_Service_Type **srp,
- bool ignore_suspended) const
+ int ignore_suspended) const
{
ACE_TRACE ("ACE_Service_Repository::find_i");
size_t i;
@@ -261,7 +260,6 @@ ACE_Service_Repository::find_i (const ACE_TCHAR name[],
if (i < this->current_size_)
{
- slot = i;
if (this->service_vector_[i]->fini_called ())
{
if (srp != 0)
@@ -274,7 +272,7 @@ ACE_Service_Repository::find_i (const ACE_TCHAR name[],
if (ignore_suspended
&& this->service_vector_[i]->active () == 0)
return -2;
- return 0;
+ return i;
}
else
return -1;
@@ -312,8 +310,6 @@ ACE_Service_Repository::relocate_i (size_t begin,
this, i, this->total_size_, type->name (),
old_handle,
new_handle));
-#else
- ACE_UNUSED_ARG (new_handle);
#endif
type->dll (adll);
}
@@ -324,12 +320,12 @@ ACE_Service_Repository::relocate_i (size_t begin,
int
ACE_Service_Repository::find (const ACE_TCHAR name[],
const ACE_Service_Type **srp,
- bool ignore_suspended) const
+ int ignore_suspended) const
{
ACE_TRACE ("ACE_Service_Repository::find");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, -1));
- size_t ignore_location = 0;
- return this->find_i (name, ignore_location, srp, ignore_suspended);
+
+ return this->find_i (name, srp, ignore_suspended);
}
@@ -418,8 +414,9 @@ ACE_Service_Repository::resume (const ACE_TCHAR name[],
ACE_TRACE ("ACE_Service_Repository::resume");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, -1));
- size_t i = 0;
- if (-1 == this->find_i (name, i, srp, 0))
+ int i = this->find_i (name, srp, 0);
+
+ if (i == -1)
return -1;
return this->service_vector_[i]->resume ();
@@ -434,8 +431,9 @@ ACE_Service_Repository::suspend (const ACE_TCHAR name[],
{
ACE_TRACE ("ACE_Service_Repository::suspend");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, -1));
- size_t i = 0;
- if (-1 == this->find_i (name, i, srp, 0))
+ int i = this->find_i (name, srp, 0);
+
+ if (i == -1)
return -1;
return this->service_vector_[i]->suspend ();
@@ -493,19 +491,21 @@ ACE_Service_Repository::remove (const ACE_TCHAR name[], ACE_Service_Type **ps)
int
ACE_Service_Repository::remove_i (const ACE_TCHAR name[], ACE_Service_Type **ps)
{
- size_t i = 0;
- if (-1 == this->find_i (name, i, 0, false))
- return -1; // Not found
+ int i = this->find_i (name, 0, 0);
- // We may need the old ptr - to be delete outside the lock!
- *ps = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
+ // Not found
+ if (i == -1)
+ return -1;
- // Pack the array
- --this->current_size_;
- for (size_t j = i; j < this->current_size_; j++)
- this->service_vector_[j] = this->service_vector_[j+1];
+ // We may need the old ptr - to be delete outside the lock!
+ *ps = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
- return 0;
+ // Pack the array
+ --this->current_size_;
+ for (size_t j = i; j < this->current_size_; j++)
+ this->service_vector_[j] = this->service_vector_[j+1];
+
+ return 0;
}
ACE_ALLOC_HOOK_DEFINE(ACE_Service_Repository_Iterator)
diff --git a/ACE/ace/Service_Repository.h b/ACE/ace/Service_Repository.h
index 4041688ee9a..8cd55344d29 100644
--- a/ACE/ace/Service_Repository.h
+++ b/ACE/ace/Service_Repository.h
@@ -95,24 +95,16 @@ public:
int insert (const ACE_Service_Type *);
/**
- * Locate a named entry in the service table, optionally ignoring
- * suspended entries.
- *
- * @param service_name The name of the service to search for.
- * @param srp Optional; if not 0, it is a pointer to a location
- * to receive the ACE_Service_Type pointer for the
- * located service. Meaningless if this method
- * returns -1.
- * @param ignore_suspended If true, the search ignores suspended services.
- *
- * @retval 0 Named service was located.
- * @retval -1 Named service was not found.
- * @retval -2 Named service was found, but is suspended and
- * @a ignore_suspended is true.
+ * Locate an entry with <name> in the table. If <ignore_suspended>
+ * is set then only consider services marked as resumed. If the
+ * caller wants the located entry, pass back a pointer to the
+ * located entry via <srp>. If <name> is not found, -1 is returned.
+ * If <name> is found, but it is suspended and the caller wants to
+ * ignore suspended services a -2 is returned.
*/
int find (const ACE_TCHAR name[],
const ACE_Service_Type **srp = 0,
- bool ignore_suspended = true) const;
+ int ignore_suspended = 1) const;
/// Remove an existing service record. If @a sr == 0, the service record
/// is deleted before control is returned to the caller. If @a sr != 0,
@@ -149,30 +141,12 @@ private:
/// responsible for properly disposing of it.
int remove_i (const ACE_TCHAR[], ACE_Service_Type **sr);
- /**
- * Locate a named entry in the service table, optionally ignoring
- * suspended entries.
- *
- * @param service_name The name of the service to search for.
- * @param slot Receives the position index of the service if it
- * is found. Contents are meaningless if this method
- * returns -1.
- * @param srp Optional; if not 0, it is a pointer to a location
- * to receive the ACE_Service_Type pointer for the
- * located service. Meaningless if this method
- * returns -1.
- * @param ignore_suspended If true, the search ignores suspended services.
- *
- * @retval 0 Named service was located; index in the table is set in
- * @a slot.
- * @retval -1 Named service was not found.
- * @retval -2 Named service was found, but is suspended and
- * @a ignore_suspended is true.
- */
+ /// Locates <service_name>. Must be called without locks being
+ /// held...
+
int find_i (const ACE_TCHAR service_name[],
- size_t &slot,
- const ACE_Service_Type **srp = 0,
- bool ignore_suspended = true) const;
+ const ACE_Service_Type ** = 0,
+ int ignore_suspended = 1) const;
/// @brief Relocate (static) services to another DLL.
///
diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp
index 6dd4e67f624..5737aff7f2e 100644
--- a/ACE/ace/Sock_Connect.cpp
+++ b/ACE/ace/Sock_Connect.cpp
@@ -49,7 +49,7 @@ extern "C" {
#include "ace/OS_NS_stdio.h"
#endif /* ACE_VXWORKS < 0x600 */
-#if defined (ACE_VXWORKS) && ((ACE_VXWORKS == 0x630) || (ACE_VXWORKS == 0x640)) && defined (__RTP__) && defined (ACE_HAS_IPV6)
+#if defined (ACE_VXWORKS) && (ACE_VXWORKS == 0x630) && defined (__RTP__) && defined (ACE_HAS_IPV6)
const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
const struct in6_addr in6addr_nodelocal_allnodes = IN6ADDR_NODELOCAL_ALLNODES_INIT;
const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT;
@@ -162,6 +162,201 @@ ACE_RCSID (ace,
"$Id$")
+#if defined (ACE_WIN32) && \
+ (!defined (ACE_HAS_WINSOCK2) \
+ || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 0)))
+
+static int
+get_reg_subkeys (const ACE_TCHAR *key,
+ ACE_TCHAR *buffer,
+ DWORD &buf_len)
+{
+ HKEY hk;
+ LONG rc = ACE_TEXT_RegOpenKeyEx (HKEY_LOCAL_MACHINE,
+ key,
+ 0,
+ KEY_READ,
+ &hk);
+
+ if (rc != ERROR_SUCCESS)
+ return -1;
+
+ ACE_TCHAR subkeyname[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
+ DWORD subkeyname_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN;
+ FILETIME update_dummy;
+
+ DWORD total = 0;
+
+ for (int i = 0;
+ (rc = ACE_TEXT_RegEnumKeyEx (hk, i,
+ subkeyname,
+ &subkeyname_len,
+ 0, 0, 0,
+ &update_dummy)) != ERROR_NO_MORE_ITEMS;
+ ++i)
+ {
+ if (subkeyname_len < buf_len - total)
+ {
+ ACE_OS::strcpy(buffer + total, subkeyname);
+ total += subkeyname_len + 1;
+ // Reset: was changed by RegEnumKeyEx call.
+ subkeyname_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
+ }
+ else
+ return -1;
+ }
+
+ buf_len = total;
+
+ ::RegCloseKey (hk);
+ return 0;
+}
+
+// Return value in buffer for a key/name pair from the Windows
+// Registry up to buf_len size.
+// If all_subkeys == 1, look for name under all subkeys of key.
+
+static int
+get_reg_value (const ACE_TCHAR *key,
+ const ACE_TCHAR *name,
+ ACE_TCHAR *buffer,
+ DWORD &buf_len,
+ int all_subkeys = 0)
+{
+ HKEY hk;
+ DWORD buf_type;
+ LONG rc = ACE_TEXT_RegOpenKeyEx (HKEY_LOCAL_MACHINE,
+ key,
+ 0,
+ KEY_READ,
+ &hk);
+
+ if (rc != ERROR_SUCCESS)
+ // print_error_string(ACE_LIB_TEXT ("RegOpenKeyEx"), rc);
+ return -1;
+
+ if (all_subkeys)
+ {
+ ACE_TCHAR ifname[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
+ DWORD ifname_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
+ FILETIME update_dummy;
+
+ DWORD total = 0;
+ DWORD size = buf_len;
+
+ for (int i = 0;
+ (rc = ACE_TEXT_RegEnumKeyEx (hk, i, ifname, &ifname_len,
+ 0, 0, 0,
+ &update_dummy)) != ERROR_NO_MORE_ITEMS;
+ ++i)
+ {
+ HKEY ifkey;
+ if (rc != ERROR_SUCCESS
+ || ACE_TEXT_RegOpenKeyEx (hk, ifname, 0,
+ KEY_READ, &ifkey) != ERROR_SUCCESS)
+ continue;
+
+ if (ACE_TEXT_RegQueryValueEx (ifkey, name, 0, 0,
+ (u_char*) (buffer + total),
+ &size) != ERROR_SUCCESS)
+ {
+ RegCloseKey(ifkey);
+ continue;
+ }
+ else
+ {
+ total += size;
+ size = buf_len - total;
+ }
+ // Needs to be reset.
+ ifname_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
+ }
+
+ if (total == 0)
+ {
+ ::RegCloseKey (hk);
+ return -2;
+ }
+ else
+ {
+ buf_len = total;
+ }
+ }
+ else
+ {
+
+ rc = ACE_TEXT_RegQueryValueEx (hk,
+ name,
+ 0,
+ &buf_type,
+ (u_char *) buffer,
+ &buf_len);
+ if (rc != ERROR_SUCCESS)
+ {
+ // print_error_string(ACE_LIB_TEXT ("RegEnumKeyEx"), rc);
+ RegCloseKey (hk);
+ return -2;
+ }
+ }
+
+ ::RegCloseKey (hk);
+ return 0;
+}
+
+enum ACE_WINDOWS_VERSION {
+ ACE_WINDOWS_IS_UNKNOWN,
+ ACE_WINDOWS_IS_WIN95,
+ ACE_WINDOWS_IS_WIN98,
+ ACE_WINDOWS_IS_WINME,
+ ACE_WINDOWS_IS_WINNT,
+ ACE_WINDOWS_IS_WIN2K,
+ ACE_WINDOWS_IS_WINCE
+};
+
+static ACE_WINDOWS_VERSION
+get_windows_version()
+{
+ OSVERSIONINFO vinfo;
+ vinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if (::GetVersionEx(&vinfo) == 0)
+ {
+ return ACE_WINDOWS_IS_UNKNOWN;
+ }
+
+ switch (vinfo.dwPlatformId)
+ {
+ case VER_PLATFORM_WIN32_NT:
+ if (vinfo.dwMajorVersion <= 4)
+ return ACE_WINDOWS_IS_WINNT;
+ else
+ return ACE_WINDOWS_IS_WIN2K;
+ case VER_PLATFORM_WIN32_WINDOWS:
+ if (vinfo.dwMajorVersion == 4)
+ {
+ if (vinfo.dwMinorVersion == 0)
+ return ACE_WINDOWS_IS_WIN95;
+ else if (vinfo.dwMinorVersion == 10)
+ return ACE_WINDOWS_IS_WIN98;
+ else if (vinfo.dwMinorVersion == 90)
+ return ACE_WINDOWS_IS_WINME;
+ }
+#if defined (VER_PLATFORM_WIN32_CE)
+ case VER_PLATFORM_WIN32_CE:
+ if (vinfo.dwMajorVersion >= 3) {
+ return ACE_WINDOWS_IS_WINCE;
+ }
+ else {
+ return ACE_WINDOWS_IS_UNKNOWN;
+ }
+#endif /* VER_PLATFORM_WIN32_CE */
+ // If no match we fall throu.
+ default:
+ return ACE_WINDOWS_IS_UNKNOWN;
+ }
+}
+
+#endif //(ACE_WIN32) && !(ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 0)
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Bind socket to an unused port.
@@ -628,89 +823,9 @@ get_ip_interfaces_win32 (size_t &count,
delete [] octet_buffer;
return 0;
-# elif defined (ACE_HAS_PHARLAP)
- // PharLap ETS has its own kernel routines to rummage through the device
- // configs and extract the interface info, but only for Pharlap RT.
-# if !defined (ACE_HAS_PHARLAP_RT)
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PHARLAP_RT */
-
- // Locate all of the IP devices in the system, saving a DEVHANDLE
- // for each. Then allocate the ACE_INET_Addrs needed and fetch all
- // the IP addresses. To locate the devices, try the available
- // device name roots and increment the device number until the
- // kernel says there are no more of that type.
- const size_t ACE_MAX_ETS_DEVICES = 64; // Arbitrary, but should be enough.
- DEVHANDLE ip_dev[ACE_MAX_ETS_DEVICES];
- EK_TCPIPCFG *devp;
- size_t i, j;
- ACE_TCHAR dev_name[16];
-
- count = 0;
- for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
- {
- // Ethernet.
- ACE_OS::sprintf (dev_name,
- "ether%d",
- i);
- ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
- if (ip_dev[count] == 0)
- break;
- }
- for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
- {
- // SLIP.
- ACE_OS::sprintf (dev_name,
- "sl%d",
- i);
- ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
- if (ip_dev[count] == 0)
- break;
- }
- for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
- {
- // PPP.
- ACE_OS::sprintf (dev_name,
- "ppp%d",
- i);
- ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
- if (ip_dev[count] == 0)
- break;
- }
-
- if (count > 0)
- ACE_NEW_RETURN (addrs,
- ACE_INET_Addr[count],
- -1);
- else
- addrs = 0;
-
- for (i = 0, j = 0; i < count; i++)
- {
- devp = EtsTCPGetDeviceCfg (ip_dev[i]);
- if (devp != 0)
- {
- addrs[j].set (0,
- devp->nwIPAddress,
- 0); // Already in net order.
- ++j;
- }
- // There's no call to close the DEVHANDLE.
- }
-
- count = j;
- if (count == 0 && addrs != 0)
- {
- delete [] addrs;
- addrs = 0;
- }
-
- return 0;
-
-
-# else
- // All non-CE, non-Pharlap Windows. Must support Winsock2.
-
+# elif defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
+ // Win32 can do this by a simple API call if MSVC 5 or later is the compiler.
+ // Not sure if Borland supplies the needed header/lib, but it might.
int i, n_interfaces, status;
INTERFACE_INFO info[64];
@@ -828,7 +943,263 @@ get_ip_interfaces_win32 (size_t &count,
return 0;
-# endif /* ACE_HAS_WINCE */
+#else /* Winsock 2 && MSVC 5 or later */
+
+ // PharLap ETS has kernel routines to rummage through the device
+ // configs and extract the interface info. Sort of a pain in the
+ // butt, but better than trying to figure out where it moved to in
+ // the registry... :-|
+# if defined (ACE_HAS_PHARLAP)
+# if !defined (ACE_HAS_PHARLAP_RT)
+ ACE_NOTSUP_RETURN (-1);
+# endif /* ACE_HAS_PHARLAP_RT */
+
+ // Locate all of the IP devices in the system, saving a DEVHANDLE
+ // for each. Then allocate the ACE_INET_Addrs needed and fetch all
+ // the IP addresses. To locate the devices, try the available
+ // device name roots and increment the device number until the
+ // kernel says there are no more of that type.
+ const size_t ACE_MAX_ETS_DEVICES = 64; // Arbitrary, but should be enough.
+ DEVHANDLE ip_dev[ACE_MAX_ETS_DEVICES];
+ EK_TCPIPCFG *devp;
+ size_t i, j;
+ ACE_TCHAR dev_name[16];
+
+ count = 0;
+ for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
+ {
+ // Ethernet.
+ ACE_OS::sprintf (dev_name,
+ "ether%d",
+ i);
+ ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
+ if (ip_dev[count] == 0)
+ break;
+ }
+ for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
+ {
+ // SLIP.
+ ACE_OS::sprintf (dev_name,
+ "sl%d",
+ i);
+ ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
+ if (ip_dev[count] == 0)
+ break;
+ }
+ for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
+ {
+ // PPP.
+ ACE_OS::sprintf (dev_name,
+ "ppp%d",
+ i);
+ ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
+ if (ip_dev[count] == 0)
+ break;
+ }
+
+ if (count > 0)
+ ACE_NEW_RETURN (addrs,
+ ACE_INET_Addr[count],
+ -1);
+ else
+ addrs = 0;
+
+ for (i = 0, j = 0; i < count; i++)
+ {
+ devp = EtsTCPGetDeviceCfg (ip_dev[i]);
+ if (devp != 0)
+ {
+ addrs[j].set (0,
+ devp->nwIPAddress,
+ 0); // Already in net order.
+ j++;
+ }
+ // There's no call to close the DEVHANDLE.
+ }
+
+ count = j;
+ if (count == 0 && addrs != 0)
+ {
+ delete [] addrs;
+ addrs = 0;
+ }
+
+ return 0;
+
+# else /* ACE_HAS_PHARLAP */
+ //
+ // No Winsock2.
+ // Get interface information from the registry.
+ // As this information is in different locations of the registry
+ // on different windows versions, we need to ask at runtime.
+ //
+
+ // Normally we have to look under one key for interfaces name,
+ // and under a second key for ip address of those interfaces.
+ // Exact values and the way to search depend on windows version.
+
+ // This is the first key we have to look for.
+ const ACE_TCHAR *BASE_KEY1;
+
+ // This is the name we have to look for under the first key.
+ // If this is == 0, we need to look for subkeys, not the values from
+ // a name.
+ const ACE_TCHAR *KEY1_NAME_ID;
+
+ // The second key is normally constructed concatenating a prefix,
+ // the value found on KEY1_NAME_ID stripped from the first s_offset
+ // characters, and a suffix.
+ unsigned int s_offset;
+ const ACE_TCHAR *PREFFIX_KEY2;
+ const ACE_TCHAR *SUFFIX_KEY2;
+
+ // If != 0, look for the value of KEY1_NAME_ID not directly under
+ // BASE_KEY1, but on every subkey of BASE_KEY1.
+ int use_subkeys;
+
+ // When we search for IP Addresses below, we look for a key with a
+ // name in this array (null terminated).
+ // For some windows versions, there is an
+ // aditional key for ppp interfaces that will be stored on [1].
+ const ACE_TCHAR *IPADDR_NAME_ID[3] = {
+ ACE_LIB_TEXT ("IPAddress"), 0, 0
+ };
+
+ // Skip addresses that match this.
+ const ACE_TCHAR *INVALID_TCPIP_DEVICE_ADDR = ACE_LIB_TEXT ("0.0.0.0");
+
+ ACE_WINDOWS_VERSION winver = get_windows_version();
+
+ switch (winver)
+ {
+ case ACE_WINDOWS_IS_WINNT:
+ PREFFIX_KEY2 = ACE_LIB_TEXT ("SYSTEM\\CurrentControlSet\\Services\\");
+ BASE_KEY1 =
+ ACE_LIB_TEXT ("SYSTEM\\CurrentControlSet\\Services")
+ ACE_LIB_TEXT ("\\Tcpip\\Linkage");
+ SUFFIX_KEY2 = ACE_LIB_TEXT ("\\Parameters\\Tcpip");
+ KEY1_NAME_ID = ACE_LIB_TEXT ("Bind");
+ s_offset = 8;
+ use_subkeys = 0;
+ break;
+
+ case ACE_WINDOWS_IS_WIN2K:
+ BASE_KEY1 =
+ ACE_LIB_TEXT ("SYSTEM\\CurrentControlSet\\Services")
+ ACE_LIB_TEXT ("\\Tcpip\\Parameters\\Interfaces\\");
+ PREFFIX_KEY2 = BASE_KEY1;
+ SUFFIX_KEY2 = ACE_LIB_TEXT ("");
+ KEY1_NAME_ID = 0;
+ s_offset = 0;
+ use_subkeys = 1;
+ // PPP.
+ IPADDR_NAME_ID[1] = ACE_LIB_TEXT ("DhcpIPAddress");
+ break;
+
+ // If ACE_HAS_WINNT4 we can safely assume the ones below will
+ // not be needed.
+# if !defined(ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0)
+ case ACE_WINDOWS_IS_WIN95:
+ case ACE_WINDOWS_IS_WIN98:
+ case ACE_WINDOWS_IS_WINME:
+ PREFFIX_KEY2 =
+ ACE_LIB_TEXT ("SYSTEM\\CurrentControlSet\\Services\\Class\\");
+ BASE_KEY1 = ACE_LIB_TEXT ("Enum\\Network\\MSTCP");
+ SUFFIX_KEY2 = ACE_LIB_TEXT ("");
+ KEY1_NAME_ID = ACE_LIB_TEXT ("Driver");
+ use_subkeys = 1;
+ s_offset = 0;
+ break;
+# endif /* !ACE_HAS_WINNT4 */
+
+ default:
+ return -1;
+ }
+
+ ACE_TCHAR raw_buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
+ DWORD raw_buflen = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
+
+ if (KEY1_NAME_ID == 0)
+ {
+ if (::get_reg_subkeys (BASE_KEY1,
+ raw_buffer,
+ raw_buflen))
+ return -1;
+ }
+ else
+ {
+ if (::get_reg_value (BASE_KEY1,
+ KEY1_NAME_ID,
+ raw_buffer,
+ raw_buflen,
+ use_subkeys))
+ return -1;
+ }
+ // return buffer contains 0 delimited strings
+
+ ACE_Tokenizer dev_names (raw_buffer);
+ dev_names.delimiter (ACE_LIB_TEXT ('\0'));
+ int n_interfaces = 0;
+
+ // Count the number of interfaces
+ while (dev_names.next () != 0)
+ ++n_interfaces;
+
+ // case 1. no interfaces present, empty string? OS version change?
+ if (n_interfaces == 0)
+ return 0;
+
+ ACE_NEW_RETURN (addrs,
+ ACE_INET_Addr[n_interfaces],
+ -2);
+
+ ACE_TCHAR buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
+ DWORD buf_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
+
+ count = 0;
+ for (int i = 0; i < n_interfaces; i++)
+ {
+ for (const ACE_TCHAR **ipaddr_name_id = IPADDR_NAME_ID;
+ *ipaddr_name_id != 0;
+ ++ipaddr_name_id)
+ {
+ // a. construct name to access IP Address for this interface
+ ACE_TString ifdevkey (PREFFIX_KEY2);
+ ACE_TString the_dev = dev_names.next ();
+
+ if (the_dev.length() < s_offset)
+ {
+ return -3; // Something's wrong
+ }
+
+ // rest of string from offset.
+ the_dev = the_dev.substring (s_offset);
+
+ ifdevkey += the_dev;
+ ifdevkey += SUFFIX_KEY2;
+
+ // b. extract value
+ // Gets overwritten on each call
+ buf_len = sizeof (buffer);
+ if (get_reg_value (ifdevkey.fast_rep (),
+ *ipaddr_name_id,
+ buffer,
+ buf_len))
+ continue; // Skip unknown devices.
+
+ if (ACE_OS::strcmp (buffer,
+ INVALID_TCPIP_DEVICE_ADDR) == 0)
+ continue; // Don't count this device
+
+ // c. store in hostinfo object array and up the counter
+ addrs[count++] =
+ ACE_INET_Addr ((u_short) 0, buffer);
+ }
+ }
+
+ return 0;
+# endif /* ACE_HAS_PHARLAP */
+# endif /* Winsock 2 && MSVC 5 or later */
}
#elif defined (ACE_HAS_GETIFADDRS)
static int
@@ -1120,7 +1491,7 @@ get_ip_interfaces_aix (size_t &count,
|| req->ifr_addr.sa_family == AF_INET6
# endif
)
- ++num_ifs;
+ num_ifs++;
}
ACE_NEW_RETURN (addrs,ACE_INET_Addr[num_ifs], -1);
@@ -1228,7 +1599,7 @@ ACE::get_ip_interfaces (size_t &count,
#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600)
return get_ip_interfaces_vxworks_lt600 (count, addrs);
-#elif (defined (__unix) || defined (__unix__) || defined (__Lynx__) || defined (ACE_OPENVMS) || defined (ACE_HAS_RTEMS)) && !defined (ACE_LACKS_NETWORKING)
+#elif defined (__unix) || defined (__unix__) || defined (__Lynx__) || defined (ACE_OPENVMS)
// COMMON (SVR4 and BSD) UNIX CODE
size_t num_ifs, num_ifs_found;
@@ -1331,13 +1702,13 @@ ACE::get_ip_interfaces (size_t &count,
# endif
)
{
- int addrlen = static_cast<int> (sizeof (struct sockaddr_in));
+ int addrlen = static_cast<int> (sizeof (struct sockaddr_in));
# if defined (ACE_HAS_IPV6)
if (addr->sin_family == AF_INET6)
addrlen = static_cast<int> (sizeof (struct sockaddr_in6));
# endif
addrs[count].set (addr, addrlen);
- ++count;
+ count++;
}
# else /* ! _UNICOS */
// need to explicitly copy on the Cray, since the bitfields kinda
@@ -1358,7 +1729,7 @@ ACE::get_ip_interfaces (size_t &count,
# endif /* ! _UNICOS */
}
-#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_HAS_RTEMS)
+#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__)
++pcur;
#else
if (pcur->ifr_addr.sa_len <= sizeof (struct sockaddr))
@@ -1464,7 +1835,7 @@ ACE::count_interfaces (ACE_HANDLE handle,
# endif /* SIOCGLIFNUM */
return 0;
-#elif (defined (__unix) || defined (__unix__) || defined (__Lynx__) || defined (ACE_OPENVMS) || defined (ACE_HAS_RTEMS)) && !defined (ACE_LACKS_NETWORKING)
+#elif defined (__unix) || defined (__unix__) || defined (__Lynx__) || defined (ACE_OPENVMS)
// Note: DEC CXX doesn't define "unix". BSD compatible OS: HP UX,
// AIX, SunOS 4.x perform some ioctls to retrieve ifconf list of
// ifreq structs no SIOCGIFNUM on SunOS 4.x, so use guess and scan
@@ -1518,13 +1889,13 @@ return 0;
if (ifcfg.ifc_len < 0)
break;
- ++if_count;
-#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_HAS_RTEMS)
- ++p_ifs;
+ if_count++;
+#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__)
+ p_ifs++;
#else
if (p_ifs->ifr_addr.sa_len <= sizeof (struct sockaddr))
{
- ++p_ifs;
+ p_ifs++;
}
else
{
@@ -1537,14 +1908,14 @@ return 0;
ACE_OS::free (ifcfg.ifc_req);
# if defined (ACE_HAS_IPV6)
- FILE* fp = 0;
+ FILE* fp;
if ((fp = ACE_OS::fopen (ACE_LIB_TEXT ("/proc/net/if_inet6"), ACE_LIB_TEXT ("r"))) != NULL)
{
// Scan the lines according to the expected format but don't really read any input
while (fscanf (fp, "%*32s %*02x %*02x %*02x %*02x %*8s\n") != EOF)
{
- ++if_count;
+ if_count++;
}
ACE_OS::fclose (fp);
}
@@ -1568,7 +1939,7 @@ ACE::get_handle (void)
ACE_HANDLE handle = ACE_INVALID_HANDLE;
#if defined (sparc)
handle = ACE_OS::open ("/dev/udp", O_RDONLY);
-#elif defined (__unix) || defined (__unix__) || defined (__Lynx__) || defined (_AIX) || defined (__hpux) || (defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600)) || defined (ACE_OPENVMS) || defined (ACE_HAS_RTEMS)
+#elif defined (__unix) || defined (__unix__) || defined (__Lynx__) || defined (_AIX) || defined (__hpux) || (defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600)) || defined (ACE_OPENVMS)
// Note: DEC CXX doesn't define "unix" BSD compatible OS: HP UX,
// AIX, SunOS 4.x
diff --git a/ACE/ace/String_Base.cpp b/ACE/ace/String_Base.cpp
index 525dcbc2553..01de0963b72 100644
--- a/ACE/ace/String_Base.cpp
+++ b/ACE/ace/String_Base.cpp
@@ -267,29 +267,19 @@ ACE_String_Base<CHAR>::resize (typename ACE_String_Base<CHAR>::size_type len,
{
ACE_TRACE ("ACE_String_Base<CHAR>::resize");
- fast_resize(len);
- ACE_OS::memset (this->rep_, c, this->buf_len_ * sizeof (CHAR));
-}
-
-template <class CHAR> void
-ACE_String_Base<CHAR>::fast_resize (size_t len)
-{
- ACE_TRACE ("ACE_String_Base<CHAR>::fast_resize");
-
// Only reallocate if we don't have enough space...
if (this->buf_len_ <= len)
{
- if (this->buf_len_ != 0 && this->release_ != 0)
+ if (this->buf_len_ != 0 && this->release_ != 0)
this->allocator_->free (this->rep_);
- this->rep_ = static_cast<CHAR*>
- (this->allocator_->malloc ((len + 1) * sizeof (CHAR)));
+ this->rep_ = static_cast<CHAR*>(
+ this->allocator_->malloc ((len + 1) * sizeof (CHAR)));
this->buf_len_ = len + 1;
this->release_ = 1;
}
this->len_ = 0;
- if (len > 0)
- this->rep_[0] = 0;
+ ACE_OS::memset (this->rep_, c, this->buf_len_ * sizeof (CHAR));
}
template <class CHAR> void
diff --git a/ACE/ace/String_Base.h b/ACE/ace/String_Base.h
index 239019b0fae..a2d565a8420 100644
--- a/ACE/ace/String_Base.h
+++ b/ACE/ace/String_Base.h
@@ -337,15 +337,6 @@ public:
size_type length (void) const;
/**
- * Return the number of allocated CHARs in the string object.
- * This may be greater than the current length of the string.
- *
- * @return Maximum number of CHAR units that can be stored, including
- * any terminating nul that may be needed.
- */
- size_t capacity (void) const;
-
- /**
* Return @c true if the length of the string is zero, else @c false.
*/
bool is_empty (void) const;
@@ -474,7 +465,7 @@ public:
/**
* Inequality comparison operator.
*
- * @param s String to compare against stored string.
+ * @param s Input ACE_String_Base string to compare against stored string.
* @return @c true if not equal, @c false otherwise.
*/
bool operator != (const ACE_String_Base<CHAR> &s) const;
@@ -514,14 +505,10 @@ public:
* Rather than fix the method to work as documented, the code is
* left as is, but the second parameter should probably not be used.
*
- * fast_resize just adjusts the buffer if needed and sets the length,
- * it doesn't fill the buffer, so is much faster.
- *
* @param len The number of CHARs to reserve
* @param c The CHAR to use when filling the string.
*/
void resize (size_type len, CHAR c = 0);
- void fast_resize (size_t len);
/// Swap the contents of this @c ACE_String_Base with @a str.
/**
diff --git a/ACE/ace/String_Base.inl b/ACE/ace/String_Base.inl
index e244cf4ed6d..45abd5eb83b 100644
--- a/ACE/ace/String_Base.inl
+++ b/ACE/ace/String_Base.inl
@@ -33,13 +33,6 @@ ACE_String_Base<CHAR>::length (void) const
return this->len_;
}
-template <class CHAR> ACE_INLINE size_t
-ACE_String_Base<CHAR>::capacity (void) const
-{
- ACE_TRACE ("ACE_String_Base<CHAR>::capacity");
- return this->buf_len_;
-}
-
template <class CHAR> ACE_INLINE bool
ACE_String_Base<CHAR>::is_empty (void) const
{
diff --git a/ACE/ace/System_Time.h b/ACE/ace/System_Time.h
index e40b21299f5..bf58d4d5640 100644
--- a/ACE/ace/System_Time.h
+++ b/ACE/ace/System_Time.h
@@ -25,7 +25,6 @@
#include "ace/Global_Macros.h"
#include "ace/os_include/os_time.h" /* For time_t. */
#include "ace/os_include/os_limits.h" /* For MAXPATHLEN. */
-#include "ace/MMAP_Memory_Pool.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/TP_Reactor.cpp b/ACE/ace/TP_Reactor.cpp
index 73557515dcb..1dcc78f04b3 100644
--- a/ACE/ace/TP_Reactor.cpp
+++ b/ACE/ace/TP_Reactor.cpp
@@ -102,7 +102,7 @@ ACE_TP_Reactor::ACE_TP_Reactor (ACE_Sig_Handler *sh,
ACE_Timer_Queue *tq,
int mask_signals,
int s_queue)
- : ACE_Select_Reactor (sh, tq, ACE_DISABLE_NOTIFY_PIPE_DEFAULT, 0, mask_signals, s_queue)
+ : ACE_Select_Reactor (sh, tq, 0, 0, mask_signals, s_queue)
{
ACE_TRACE ("ACE_TP_Reactor::ACE_TP_Reactor");
this->supress_notify_renew (1);
@@ -114,7 +114,7 @@ ACE_TP_Reactor::ACE_TP_Reactor (size_t max_number_of_handles,
ACE_Timer_Queue *tq,
int mask_signals,
int s_queue)
- : ACE_Select_Reactor (max_number_of_handles, restart, sh, tq, ACE_DISABLE_NOTIFY_PIPE_DEFAULT, 0, mask_signals, s_queue)
+ : ACE_Select_Reactor (max_number_of_handles, restart, sh, tq, 0, 0, mask_signals, s_queue)
{
ACE_TRACE ("ACE_TP_Reactor::ACE_TP_Reactor");
this->supress_notify_renew (1);
diff --git a/ACE/ace/Time_Request_Reply.cpp b/ACE/ace/Time_Request_Reply.cpp
index 7692b73bf45..e7524ce6ce7 100644
--- a/ACE/ace/Time_Request_Reply.cpp
+++ b/ACE/ace/Time_Request_Reply.cpp
@@ -130,11 +130,11 @@ ACE_Time_Request::encode (void *&buf)
// Compute the length *before* doing the marshaling.
buf = (void *) &this->transfer_;
- this->transfer_.block_forever_ = ACE_HTONL (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = ACE_HTONL (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = ACE_HTONL (this->transfer_.sec_timeout_);
- this->transfer_.msg_type_ = ACE_HTONL (this->transfer_.msg_type_);
- this->transfer_.time_ = ACE_HTONL (this->transfer_.time_);
+ this->transfer_.block_forever_ = htonl (this->transfer_.block_forever_);
+ this->transfer_.usec_timeout_ = htonl (this->transfer_.usec_timeout_);
+ this->transfer_.sec_timeout_ = htonl (this->transfer_.sec_timeout_);
+ this->transfer_.msg_type_ = htonl (this->transfer_.msg_type_);
+ this->transfer_.time_ = htonl (this->transfer_.time_);
return this->size (); // Always fixed
}
@@ -146,11 +146,11 @@ ACE_Time_Request::decode (void)
{
ACE_TRACE ("ACE_Time_Request::decode");
// Decode
- this->transfer_.block_forever_ = ACE_NTOHL (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = ACE_NTOHL (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = ACE_NTOHL (this->transfer_.sec_timeout_);
- this->transfer_.msg_type_ = ACE_NTOHL (this->transfer_.msg_type_);
- this->transfer_.time_ = ACE_NTOHL (this->transfer_.time_);
+ this->transfer_.block_forever_ = ntohl (this->transfer_.block_forever_);
+ this->transfer_.usec_timeout_ = ntohl (this->transfer_.usec_timeout_);
+ this->transfer_.sec_timeout_ = ntohl (this->transfer_.sec_timeout_);
+ this->transfer_.msg_type_ = ntohl (this->transfer_.msg_type_);
+ this->transfer_.time_ = ntohl (this->transfer_.time_);
this->time_ = this->transfer_.time_;
return 0;
diff --git a/ACE/ace/Timer_Queue_Adapters.cpp b/ACE/ace/Timer_Queue_Adapters.cpp
index 738e8f1d225..4a3c45dc399 100644
--- a/ACE/ace/Timer_Queue_Adapters.cpp
+++ b/ACE/ace/Timer_Queue_Adapters.cpp
@@ -54,7 +54,7 @@ template <class TQ> int
ACE_Async_Timer_Queue_Adapter<TQ>::schedule_ualarm (void)
{
ACE_Time_Value tv = this->timer_queue_.earliest_time ()
- - this->timer_queue_.gettimeofday ();
+ - ACE_OS::gettimeofday ();
// Beware of negative times and zero times (which cause problems for
// <ualarm>).
diff --git a/ACE/ace/Timer_Queue_T.cpp b/ACE/ace/Timer_Queue_T.cpp
index 246700f6aa2..82030315aab 100644
--- a/ACE/ace/Timer_Queue_T.cpp
+++ b/ACE/ace/Timer_Queue_T.cpp
@@ -9,11 +9,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-/*
- * Hook to specialize to add includes
- */
-//@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK
-
#include "ace/Timer_Queue_T.h"
#include "ace/Guard_T.h"
#include "ace/Log_Msg.h"
@@ -83,7 +78,7 @@ ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::calculate_timeout (ACE_Time_Value *m
return max_wait_time;
else
{
- ACE_Time_Value const cur_time = this->gettimeofday ();
+ ACE_Time_Value cur_time = this->gettimeofday ();
if (this->earliest_time () > cur_time)
{
@@ -412,7 +407,7 @@ ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::timeout (TIMER_QUEUE &timer_q
// Upcall to the <handler>s handle_timeout method.
if (event_handler->handle_timeout (cur_time, act) == -1)
{
- if (event_handler->reactor_timer_interface ())
+ if (event_handler->reactor ())
event_handler->reactor_timer_interface ()->cancel_timer (event_handler, 0);
else
timer_queue.cancel (event_handler, 0); // 0 means "call handle_close()".
diff --git a/ACE/ace/TkReactor/TkReactor.cpp b/ACE/ace/TkReactor.cpp
index 942f66d7d1d..7f6ae69e320 100644
--- a/ACE/ace/TkReactor/TkReactor.cpp
+++ b/ACE/ace/TkReactor.cpp
@@ -1,4 +1,4 @@
-#include "ace/TkReactor/TkReactor.h"
+#include "ace/TkReactor.h"
#include "ace/SOCK_Acceptor.h"
#include "ace/SOCK_Connector.h"
diff --git a/ACE/ace/TkReactor/TkReactor.h b/ACE/ace/TkReactor.h
index 80583bb8999..ca3f39474f6 100644
--- a/ACE/ace/TkReactor/TkReactor.h
+++ b/ACE/ace/TkReactor.h
@@ -21,7 +21,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/TkReactor/ACE_TkReactor_export.h"
+#include "ace/ACE_TkReactor_export.h"
#include "ace/Select_Reactor.h"
#include /**/ <tk.h>
diff --git a/ACE/ace/Truncate.h b/ACE/ace/Truncate.h
index efae24177d6..6ec6f9557bf 100644
--- a/ACE/ace/Truncate.h
+++ b/ACE/ace/Truncate.h
@@ -27,16 +27,16 @@
#include "ace/If_Then_Else.h"
#include "ace/Numeric_Limits.h"
-#if defined (__BORLANDC__) && __BORLANDC__ <= 0x590
+#if defined (__BORLANDC__) && __BORLANDC__ <= 0x582
# include "ace/Basic_Types.h"
-#endif /* __BORLANDC__ <= 0x590 */
+#endif /* __BORLANDC__ <= 0x582 */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_Utils
{
-#if !defined (__BORLANDC__) || __BORLANDC__ > 0x590
+#if !defined (__BORLANDC__) || __BORLANDC__ > 0x582
template<typename T> struct Sign_Check;
@@ -895,7 +895,7 @@ namespace ACE_Utils
return truncator() (val);
}
-#endif /* !__BORLANDC__ || __BORLANDC__ > 0x590 */
+#endif /* !__BORLANDC__ || __BORLANDC__ > 0x582 */
} // namespace ACE_Utils
diff --git a/ACE/ace/UUID.cpp b/ACE/ace/UUID.cpp
index 9b35fe76a52..65eac030b59 100644
--- a/ACE/ace/UUID.cpp
+++ b/ACE/ace/UUID.cpp
@@ -113,7 +113,7 @@ namespace ACE_Utils
// Get a buffer exactly the correct size. Use the nil UUID as a
// gauge. Don't forget the trailing nul.
size_t UUID_STRING_LENGTH = 36 + thr_id_.length () + pid_.length ();
- char *buf = 0;
+ char *buf;
if ((thr_id_.length () != 0) && (pid_.length () != 0))
{
@@ -161,20 +161,10 @@ namespace ACE_Utils
);
}
- // We allocated 'buf' above dynamically, so we shouldn't use
- // ACE_NEW_RETURN here to avoid a possible memory leak.
- ACE_NEW_NORETURN (this->as_string_,
- ACE_CString (buf, UUID_STRING_LENGTH));
-
- // we first free the dynamically allocated 'buf'.
+ ACE_NEW_RETURN (this->as_string_,
+ ACE_CString (buf, UUID_STRING_LENGTH),
+ 0);
delete [] buf;
-
- // then we test that ACE_NEW succeded for 'as_string_'
- // if not, we return 0 (NULL) to indicate failure.
- if( this->as_string_ == 0 )
- {
- return 0;
- }
}
return as_string_;
diff --git a/ACE/ace/Version.h b/ACE/ace/Version.h
index 3cede3b8bba..c940def3699 100644
--- a/ACE/ace/Version.h
+++ b/ACE/ace/Version.h
@@ -5,5 +5,5 @@
#define ACE_MAJOR_VERSION 5
#define ACE_MINOR_VERSION 5
-#define ACE_BETA_VERSION 4
-#define ACE_VERSION "5.5.4"
+#define ACE_BETA_VERSION 3
+#define ACE_VERSION "5.5.3"
diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp
index 29fec88714b..70447271dca 100644
--- a/ACE/ace/WFMO_Reactor.cpp
+++ b/ACE/ace/WFMO_Reactor.cpp
@@ -1192,7 +1192,7 @@ ACE_WFMO_Reactor::open (size_t size,
this->atomic_wait_array_[0] = this->lock_.lock ().proc_mutex_;
this->atomic_wait_array_[1] = this->ok_to_wait_.handle ();
- // Prevent memory leaks when the ACE_WFMO_Reactor is reopened.
+ // Prevent memory leaks when the ACE_WFMO_Reactor is reopened.
if (this->delete_handler_rep_)
{
if (this->handler_rep_.changes_required ())
@@ -2423,7 +2423,7 @@ ACE_WFMO_Reactor_Notify::handle_signal (int signum,
ACE_Event_Handler *event_handler =
buffer->eh_;
- bool const requires_reference_counting =
+ int requires_reference_counting =
event_handler->reference_counting_policy ().value () ==
ACE_Event_Handler::Reference_Counting_Policy::ENABLED;
diff --git a/ACE/ace/WFMO_Reactor.h b/ACE/ace/WFMO_Reactor.h
index e6d7c67e55e..a1ca110520e 100644
--- a/ACE/ace/WFMO_Reactor.h
+++ b/ACE/ace/WFMO_Reactor.h
@@ -1096,7 +1096,7 @@ public:
/// Returns true if WFMO_Reactor has been successfully initialized, else
/// false.
- virtual bool initialized (void);
+ virtual int initialized (void);
/// Returns the current size of the WFMO_Reactor's internal
/// descriptor table.
diff --git a/ACE/ace/WFMO_Reactor.inl b/ACE/ace/WFMO_Reactor.inl
index 7f72fdbe8f6..b2d24fb05d7 100644
--- a/ACE/ace/WFMO_Reactor.inl
+++ b/ACE/ace/WFMO_Reactor.inl
@@ -1132,7 +1132,7 @@ ACE_WFMO_Reactor::handler (ACE_HANDLE handle,
event_handler);
}
-ACE_INLINE bool
+ACE_INLINE int
ACE_WFMO_Reactor::initialized (void)
{
return this->open_for_business_;
diff --git a/ACE/ace/WIN32_Asynch_IO.cpp b/ACE/ace/WIN32_Asynch_IO.cpp
index 2ed1311936e..afe50d51c05 100644
--- a/ACE/ace/WIN32_Asynch_IO.cpp
+++ b/ACE/ace/WIN32_Asynch_IO.cpp
@@ -6,8 +6,7 @@ ACE_RCSID (ace,
Win32_Asynch_IO,
"$Id$")
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) && \
- (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 1))
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
#include "ace/WIN32_Proactor.h"
#include "ace/Message_Block.h"
@@ -167,7 +166,7 @@ ACE_WIN32_Asynch_Operation::open (const ACE_Handler::Proxy_Ptr &handler_proxy,
int
ACE_WIN32_Asynch_Operation::cancel (void)
{
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) \
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
&& ( (defined (_MSC_VER)) \
|| (defined (__BORLANDC__)) \
|| (defined (__MINGW32)))
@@ -187,7 +186,7 @@ ACE_WIN32_Asynch_Operation::cancel (void)
// result is non-zero. All the operations are cancelled then.
return 0;
-#else /* Not ACE_HAS_WIN32_OVERLAPPED_IO && _MSC... */
+#else /* Not ACE_HAS_WINNT4 && ACE_HAS_WINNT4!=0 && _MSC... */
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_HAS_AIO_CALLS */
}
@@ -1300,7 +1299,7 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
int priority,
int signal_number)
{
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if ((ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
static const size_t page_size = ACE_OS::getpagesize();
FILE_SEGMENT_ELEMENT buffer_pointers[ACE_IOV_MAX + 1];
@@ -1400,9 +1399,9 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
}
return initiate_result;
-#else
+#else /*#if ( (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))*/
ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32_OVERLAPPED_IO */
+#endif /*#if ( (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))*/
}
@@ -1700,7 +1699,7 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
int priority,
int signal_number)
{
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if ((ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
static const size_t page_size = ACE_OS::getpagesize();
FILE_SEGMENT_ELEMENT buffer_pointers[ACE_IOV_MAX + 1];
@@ -1805,11 +1804,11 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
}
return initiate_result;
-#else
+#else /*#if ((ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))*/
ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
+#endif /* */
}
@@ -2042,7 +2041,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
int signal_number,
int addr_family)
{
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
// Sanity check: make sure that enough space has been allocated by
// the caller.
size_t address_size =
@@ -2146,7 +2145,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
}
return -1;
}
-#else
+#else /* ACE_HAS_WINNT4 .......|| ACE_HAS_AIO_CALLS */
ACE_UNUSED_ARG (message_block);
ACE_UNUSED_ARG (bytes_to_read);
ACE_UNUSED_ARG (accept_handle);
@@ -2155,7 +2154,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
ACE_UNUSED_ARG (signal_number);
ACE_UNUSED_ARG (addr_family);
ACE_NOTSUP_RETURN (-1);
-#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || (defined (ACE_HAS_AIO_CALLS) */
}
ACE_WIN32_Asynch_Accept::~ACE_WIN32_Asynch_Accept (void)
@@ -2461,12 +2460,8 @@ ACE_WIN32_Asynch_Connect::connect (ACE_HANDLE connect_handle,
int ACE_WIN32_Asynch_Connect::post_result (ACE_WIN32_Asynch_Connect_Result * result,
bool post_enable)
{
- ACE_HANDLE handle = result->connect_handle ();
if (this->flg_open_ && post_enable)
{
- // NOTE: result is invalid after post_completion(). It's either deleted
- // or will be shortly via the proactor dispatch, regardless of success
- // or fail of the call.
if (this->win32_proactor_ ->post_completion (result) == 0)
return 0;
@@ -2475,15 +2470,14 @@ int ACE_WIN32_Asynch_Connect::post_result (ACE_WIN32_Asynch_Connect_Result * res
ACE_LIB_TEXT ("ACE_WIN32_Asynch_Connect::post_result: ")
ACE_LIB_TEXT (" <post_completion> failed")));
}
- else
- {
- // There was no call to post_completion() so manually delete result.
- delete result;
- }
+
+ ACE_HANDLE handle = result->connect_handle ();
if (handle != ACE_INVALID_HANDLE)
ACE_OS::closesocket (handle);
+ delete result;
+
return -1;
}
@@ -2957,7 +2951,7 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
int priority,
int signal_number)
{
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
// TransmitFile API limits us to DWORD range.
if (bytes_to_write > MAXDWORD || bytes_per_send > MAXDWORD)
@@ -3025,7 +3019,7 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
}
return -1;
}
-#else
+#else /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
ACE_UNUSED_ARG (file);
ACE_UNUSED_ARG (header_and_trailer);
ACE_UNUSED_ARG (bytes_to_write);
@@ -3037,7 +3031,7 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
ACE_UNUSED_ARG (priority);
ACE_UNUSED_ARG (signal_number);
ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_WINSOCK2 */
+#endif /* ACE_HAS_AIO_CALLS */
}
ACE_WIN32_Asynch_Transmit_File::~ACE_WIN32_Asynch_Transmit_File (void)
@@ -3758,4 +3752,4 @@ ACE_WIN32_Asynch_Write_Dgram::ACE_WIN32_Asynch_Write_Dgram (ACE_WIN32_Proactor *
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO && ACE_HAS_WINSOCK2 */
+#endif /* ACE_WIN32 || ACE_HAS_WINCE */
diff --git a/ACE/ace/WIN32_Asynch_IO.h b/ACE/ace/WIN32_Asynch_IO.h
index d49072e9fe8..66e30b20584 100644
--- a/ACE/ace/WIN32_Asynch_IO.h
+++ b/ACE/ace/WIN32_Asynch_IO.h
@@ -32,8 +32,7 @@
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) && \
- (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 1))
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
#include "ace/Asynch_IO_Impl.h"
#include "ace/Addr.h"
@@ -1932,6 +1931,6 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_WIN32_OVERLAPPED_IO && ACE_HAS_WINSOCK2 */
+#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
#include /**/ "ace/post.h"
#endif /* ACE_WIN32_ASYNCH_IO_H */
diff --git a/ACE/ace/WIN32_Proactor.cpp b/ACE/ace/WIN32_Proactor.cpp
index e35c3b01d64..7ace0d987b0 100644
--- a/ACE/ace/WIN32_Proactor.cpp
+++ b/ACE/ace/WIN32_Proactor.cpp
@@ -4,7 +4,7 @@
#include "ace/WIN32_Proactor.h"
-#if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
// WIN implemenatation of the Proactor.
#include "ace/Log_Msg.h"
diff --git a/ACE/ace/WIN32_Proactor.h b/ACE/ace/WIN32_Proactor.h
index e6db85ba930..addc5bfd94e 100644
--- a/ACE/ace/WIN32_Proactor.h
+++ b/ACE/ace/WIN32_Proactor.h
@@ -24,7 +24,7 @@
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO)
+#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
// WIN32 implementation of the Proactor.
#include "ace/WIN32_Asynch_IO.h"
diff --git a/ACE/ace/XtReactor/XtReactor.cpp b/ACE/ace/XtReactor.cpp
index 7bdef11b936..ab4612c9472 100644
--- a/ACE/ace/XtReactor/XtReactor.cpp
+++ b/ACE/ace/XtReactor.cpp
@@ -1,6 +1,6 @@
// $Id$
-#include "ace/XtReactor/XtReactor.h"
+#include "ace/XtReactor.h"
#include "ace/SOCK_Acceptor.h"
#include "ace/SOCK_Connector.h"
diff --git a/ACE/ace/XtReactor/XtReactor.h b/ACE/ace/XtReactor.h
index 22fb39ceeed..c0d0a25ab80 100644
--- a/ACE/ace/XtReactor/XtReactor.h
+++ b/ACE/ace/XtReactor.h
@@ -22,10 +22,12 @@
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/XtReactor/ACE_XtReactor_export.h"
+#include "ace/ACE_XtReactor_export.h"
#include "ace/Select_Reactor.h"
+//#define String XtString
#include /**/ <X11/Intrinsic.h>
+//#undef String
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc
index 4b6aca6fd21..dc92a721395 100644
--- a/ACE/ace/ace.mpc
+++ b/ACE/ace/ace.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*- now wouldn't this be cool...
// $Id$
-project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, filecache, versioned_namespace, pkgconfig {
+project(ACE) : acedefaults, core, other, codecs, token, svcconf, uuid, filecache, versioned_namespace, pkgconfig {
avoids = ace_for_tao
libout = $(ACE_ROOT)/lib
sharedname = ACE
@@ -367,7 +367,6 @@ project(ACE) : acedefaults, install, other, codecs, token, svcconf, uuid, fileca
Swap.inl
TSS_T.inl
ace_wchar.inl
- OS.inl
}
Header_Files {
diff --git a/ACE/ace/ace_flreactor.mpc b/ACE/ace/ace_flreactor.mpc
index b5c2c277bfb..af3f7afaf9c 100644
--- a/ACE/ace/ace_flreactor.mpc
+++ b/ACE/ace/ace_flreactor.mpc
@@ -1,32 +1,30 @@
// -*- MPC -*- now wouldn't this be cool...
// $Id$
-project(ACE_FlReactor) : acedefaults, install, acelib, ace_fl{
+project(ACE_FlReactor) : acedefaults, core, acelib, ace_fl{
sharedname = ACE_FlReactor
dynamicflags = ACE_FLREACTOR_BUILD_DLL
Source_Files {
- FlReactor
+ FlReactor.cpp
}
Header_Files {
- FlReactor
+ ACE_FlReactor_export.h
+ FlReactor.h
}
Inline_Files {
- FlReactor
}
Template_Files {
- FlReactor
}
Resource_Files {
- FlReactor
}
Pkgconfig_Files {
- FlReactor/ACE_FlReactor.pc.in
+ ACE_FlReactor.pc.in
}
}
diff --git a/ACE/ace/ace_for_tao.mpc b/ACE/ace/ace_for_tao.mpc
index 58b7a928fe5..cd28be5635b 100644
--- a/ACE/ace/ace_for_tao.mpc
+++ b/ACE/ace/ace_for_tao.mpc
@@ -11,7 +11,7 @@
// link. This ACE_FOR_TAO subset library must remain as small as
// possible.
-project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, pkgconfig {
+project(ACE_FOR_TAO) : acedefaults, core, svcconf, versioned_namespace, pkgconfig {
macros += ACE_LACKS_ACE_TOKEN
requires = ace_for_tao ace_svcconf
libout = $(ACE_ROOT)/lib
diff --git a/ACE/ace/ace_qtreactor.mpc b/ACE/ace/ace_qtreactor.mpc
index 324a29d02c6..549181b1348 100644
--- a/ACE/ace/ace_qtreactor.mpc
+++ b/ACE/ace/ace_qtreactor.mpc
@@ -1,38 +1,34 @@
// -*- MPC -*- now wouldn't this be cool...
// $Id$
-project(ACE_QtReactor) : acedefaults, install, acelib, ace_qt {
+project(ACE_QtReactor) : acedefaults, core, acelib, ace_qt {
sharedname = ACE_QtReactor
dynamicflags = ACE_QTREACTOR_BUILD_DLL
MOC_Files {
- QtReactor
+ QtReactor.h
}
Source_Files {
-
- QtReactor/QtReactor_moc.cpp
- QtReactor
+ QtReactor_moc.cpp
+ QtReactor.cpp
}
Header_Files {
- QtReactor
+ ACE_QtReactor_export.h
}
Inline_Files {
- QtReactor
}
Template_Files {
- QtReactor
}
Resource_Files {
- QtReactor
}
Pkgconfig_Files {
- QtReactor/ACE_QtReactor.pc.in
+ ACE_QtReactor.pc.in
}
}
diff --git a/ACE/ace/ace_tkreactor.mpc b/ACE/ace/ace_tkreactor.mpc
index 544c9185c23..fbbda18160c 100644
--- a/ACE/ace/ace_tkreactor.mpc
+++ b/ACE/ace/ace_tkreactor.mpc
@@ -1,32 +1,30 @@
// -*- MPC -*- now wouldn't this be cool...
// $Id$
-project(ACE_TkReactor) : acedefaults, install, acelib, ace_tk {
+project(ACE_TkReactor) : acedefaults, core, acelib, ace_tk {
sharedname = ACE_TkReactor
dynamicflags = ACE_TKREACTOR_BUILD_DLL
Source_Files {
- TkReactor
+ TkReactor.cpp
}
Header_Files {
- TkReactor
+ ACE_TkReactor_export.h
+ TkReactor.h
}
Inline_Files {
- TkReactor
}
Template_Files {
- TkReactor
}
Resource_Files {
- TkReactor
}
Pkgconfig_Files {
- TkReactor/ACE_TkReactor.pc.in
+ ACE_TkReactor.pc.in
}
}
diff --git a/ACE/ace/ace_xtreactor.mpc b/ACE/ace/ace_xtreactor.mpc
index 5efdaaed5ca..9d8c44e666f 100644
--- a/ACE/ace/ace_xtreactor.mpc
+++ b/ACE/ace/ace_xtreactor.mpc
@@ -1,32 +1,30 @@
// -*- MPC -*- now wouldn't this be cool...
// $Id$
-project(ACE_XtReactor) : acedefaults, install, acelib, ace_xt {
+project(ACE_XtReactor) : acedefaults, core, acelib, ace_xt {
sharedname = ACE_XtReactor
dynamicflags = ACE_XTREACTOR_BUILD_DLL
Source_Files {
- XtReactor
+ XtReactor.cpp
}
Header_Files {
- XtReactor
+ XtReactor.h
+ ACE_XtReactor_export.h
}
Inline_Files {
- XtReactor
}
Template_Files {
- XtReactor
}
Resource_Files {
- XtReactor
}
Pkgconfig_Files {
- XtReactor/ACE_XtReactor.pc.in
+ ACE_XtReactor.pc.in
}
}
diff --git a/ACE/ace/config-WinCE.h b/ACE/ace/config-WinCE.h
index 70a9694c857..8a31e29f9fd 100644
--- a/ACE/ace/config-WinCE.h
+++ b/ACE/ace/config-WinCE.h
@@ -68,6 +68,12 @@
#define ACE_HAS_POSITION_INDEPENDENT_POINTERS 1
+// CE is not NT.
+#if defined (ACE_HAS_WINNT4)
+# undef ACE_HAS_WINNT4
+#endif // ACE_HAS_WINNT4
+#define ACE_HAS_WINNT4 0
+
#define ACE_LACKS_MSG_WFMO
#define ACE_LACKS_UMASK
diff --git a/ACE/ace/config-aix-4.1.x.h b/ACE/ace/config-aix-4.1.x.h
new file mode 100644
index 00000000000..a739c1ae49a
--- /dev/null
+++ b/ACE/ace/config-aix-4.1.x.h
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+#ifndef ACE_AIX_VERS
+# define ACE_AIX_VERS 401
+#endif
+
+#include "ace/config-aix-4.x.h"
diff --git a/ACE/ace/config-aix-4.2.x.h b/ACE/ace/config-aix-4.2.x.h
new file mode 100644
index 00000000000..b44c851a437
--- /dev/null
+++ b/ACE/ace/config-aix-4.2.x.h
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+#ifndef ACE_AIX_VERS
+# define ACE_AIX_VERS 402
+#endif
+
+#include "ace/config-aix-4.x.h"
diff --git a/ACE/ace/config-aix-4.3.x.h b/ACE/ace/config-aix-4.3.x.h
new file mode 100644
index 00000000000..d6b2824ec35
--- /dev/null
+++ b/ACE/ace/config-aix-4.3.x.h
@@ -0,0 +1,8 @@
+/* -*- C++ -*- */
+// $Id$
+
+#ifndef ACE_AIX_VERS
+# define ACE_AIX_VERS 403
+#endif
+
+#include "ace/config-aix-4.x.h"
diff --git a/ACE/ace/config-aix-4.x.h b/ACE/ace/config-aix-4.x.h
new file mode 100644
index 00000000000..d434ad61003
--- /dev/null
+++ b/ACE/ace/config-aix-4.x.h
@@ -0,0 +1,347 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for OS
+// platforms running AIX 4.x using the IBM C++ compiler (xlC),
+// Visual Age C++ or g++.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+// Both IBM and g++ compilers set _THREAD_SAFE if compiler is asked to compile
+// threaded code (xlC_r, as opposed to xlC; and g++ -pthread)
+#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0)
+# if defined (ACE_HAS_THREADS)
+# undef ACE_HAS_THREADS
+# endif
+# if defined (_THREAD_SAFE)
+# define ACE_HAS_THREADS 1
+// # else
+// # define ACE_HAS_THREADS 0
+# endif /* _THREAD_SAFE */
+#endif /* !ACE_MT_SAFE || (ACE_MT_SAFE != 0) */
+
+#if defined (__xlC__) || defined (__IBMCPP__)
+ // AIX xlC, IBM C/C++, and Visual Age C++ compilers
+ //********************************************************************
+ //
+
+// Compiler does this with a builtin - it's not in libc.
+// Although ACE does have alloca() on this compiler/platform combination, it is
+// disabled by default since it can be dangerous. Uncomment the following line
+// if you ACE to use it.
+//# define ACE_HAS_ALLOCA
+
+// Compiler supports the ssize_t typedef.
+# define ACE_HAS_SSIZE_T
+
+// When using the preprocessor, Ignore info msg; invalid #pragma
+# if defined (__IBMCPP__) && (__IBMCPP__ < 400) // IBM C++ 3.6
+# define ACE_CC_PREPROCESSOR_ARGS "-E -qflag=w:w"
+# endif /* (__IBMCPP__) && (__IBMCPP__ < 400) */
+
+ // Keep an eye on this as the compiler and standards converge...
+# define ACE_LACKS_LINEBUFFERED_STREAMBUF
+# define ACE_LACKS_PRAGMA_ONCE
+
+ // C Set++ 3.1, IBM C/C++ 3.6, and Visual Age C++ 5 batch (__xlC__)
+# if defined (__xlC__)
+# if (__xlC__ < 0x0500)
+# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
+# endif /* __xlC__ < 0x0500 */
+# endif
+
+ // These are for Visual Age C++ only
+# if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
+# define ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS
+# define ACE_HAS_TYPENAME_KEYWORD
+ // When using -qtempinc, we don't need to see template implementation
+ // source (though we do need a pragma to find the correct source file).
+ // However, without -qtempinc (either -qnotempinc or -qtemplateregistry)
+ // we do need to see the source.
+# if defined (__TEMPINC__)
+# if !defined ACE_TEMPLATES_REQUIRE_PRAGMA
+# define ACE_TEMPLATES_REQUIRE_PRAGMA
+# endif
+# else
+# if !defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+# define ACE_TEMPLATES_REQUIRE_SOURCE
+# endif
+# endif /* __TEMPINC__ */
+
+# undef WIFEXITED
+# undef WEXITSTATUS
+
+# if (__IBMCPP__ >= 500) /* Visual Age C++ 5 */
+# define ACE_HAS_STANDARD_CPP_LIBRARY 1
+# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
+# endif /* __IBMCPP__ >= 500 */
+
+# if (__IBMCPP__ >= 600) /* Visual Age 6 and XL C/C++ 7 and up */
+# define ACE_HAS_TEMPLATE_TYPEDEFS
+# endif /* __IBMCPP__ >= 600 */
+# endif /* __IBMCPP__ */
+
+#elif defined (__GNUG__)
+ // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
+ // this must appear before its #include.
+# define ACE_HAS_STRING_CLASS
+
+# include "ace/config-g++-common.h"
+ // Denotes that GNU has cstring.h as standard, to redefine memchr().
+# define ACE_HAS_GNU_CSTRING_H
+# define ACE_HAS_SSIZE_T
+
+# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0))
+// We have to explicitly instantiate static template members prior to g++ 4.1
+# define ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION
+#endif /* g++ prior to 4.1 */
+
+# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0
+ // ACE_MT_SAFE is #defined below, for all compilers.
+# if !defined (_REENTRANT)
+# define _REENTRANT
+# endif /* _REENTRANT */
+# endif /* !ACE_MT_SAFE */
+
+#else /* ! __xlC__ && ! __GNUG__ */
+# ifdef __cplusplus /* Let it slide for C compilers. */
+# error unsupported compiler in ace/config-aix-4.x.h
+# endif /* __cplusplus */
+#endif /* ! __xlC__ && ! __GNUG__ */
+
+
+// Compiling for AIX.
+#ifndef AIX
+# define AIX
+#endif /* AIX */
+
+// Pick up all the detectable settings.
+#include "ace/config-posix.h"
+
+#if defined (ACE_HAS_POSIX_SEM_TIMEOUT)
+# undef ACE_HAS_POSIX_SEM_TIMEOUT
+#endif /* ACE_HAS_POSIX_SEM_TIMEOUT */
+
+// AIX shared libs look strangely like archive libs until you look inside
+// them.
+#if defined (ACE_DLL_SUFFIX)
+# undef ACE_DLL_SUFFIX
+#endif
+#define ACE_DLL_SUFFIX ".a"
+
+// Use BSD 4.4 socket definitions for pre-AIX 4.2. The _BSD setting also
+// controls the data type used for waitpid(), wait(), and wait3().
+#if (ACE_AIX_VERS < 402)
+# define _BSD 44
+# define ACE_HAS_UNION_WAIT
+#endif /* ACE_AIX_VERS < 402 */
+
+// This environment requires this thing, pre-AIX 4.3
+#if (ACE_AIX_VERS < 403)
+# define _BSD_INCLUDES
+#endif /* ACE_AIX_VERS < 403 */
+
+#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
+
+#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
+
+// ACE_HAS_AIX_BROKEN_SOCKET_HEADER may be required if your OS patches are
+// not up to date. On up-to-date 4.2+ systems, it should not be required.
+// 4.2+ has 4.4 BSD sendmsg/recvmsg
+#if (ACE_AIX_VERS < 402)
+# define ACE_HAS_AIX_BROKEN_SOCKET_HEADER
+#else
+# if (ACE_AIX_VERS == 402)
+# define ACE_HAS_SIZET_SOCKET_LEN
+# else
+# define ACE_HAS_SOCKLEN_T
+# endif
+# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
+#endif /* ACE_AIX_VERS < 402 */
+
+#if (ACE_AIX_VERS >= 403)
+// AIX has AIO, but the functions don't match those of other AIO-enabled
+// platforms. If this is to work, it'll require some significant work,
+// maybe moving the OS-abstraction stuff to an OS_AIO or some such thing.
+//# define ACE_HAS_AIO_CALLS
+#endif /* ACE_AIX_VERS >= 403 */
+
+#define ACE_HAS_AIX_HI_RES_TIMER
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+#if (ACE_AIX_VERS < 403)
+# define ACE_HAS_CHARPTR_DL
+#endif /* ACE_AIX_VERS < 403 */
+
+// Prototypes for both signal() and struct sigaction are consistent.
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+// OS has readdir and friends.
+#define ACE_HAS_DIRENT
+
+// OS supports the getrusage() system call
+#define ACE_HAS_GETRUSAGE
+
+#define ACE_HAS_GPERF
+
+#define ACE_HAS_H_ERRNO
+
+#define ACE_LACKS_STDINT_H
+#define ACE_LACKS_SYS_SYSCTL_H
+
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+#define ACE_HAS_NONCONST_SELECT_TIMEVAL
+#define ACE_HAS_IP_MULTICAST
+
+// Lacks perfect filtering, must bind group address.
+#if !defined ACE_LACKS_PERFECT_MULTICAST_FILTERING
+# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1
+#endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING */
+
+#define ACE_HAS_MSG
+#if (ACE_AIX_VERS < 402)
+# define ACE_LACKS_MSG_ACCRIGHTS
+# define ACE_LACKS_RLIMIT
+#endif
+
+// Compiler/platform supports poll().
+#define ACE_HAS_POLL
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+#define ACE_HAS_POSIX_TIME
+// ... but needs to include another header for it on 4.2+
+#if (ACE_AIX_VERS >= 402)
+# define ACE_HAS_BROKEN_POSIX_TIME
+#endif /* ACE_AIX_VERS > 402 */
+// ... and needs another typedef
+#define ACE_LACKS_TIMESPEC_T
+#define ACE_HAS_SELECT_H
+
+#define ACE_HAS_REENTRANT_FUNCTIONS
+
+// Compiler/platform defines the sig_atomic_t typedef
+#define ACE_HAS_SIG_ATOMIC_T
+#if (ACE_AIX_VERS >= 402)
+# define ACE_HAS_SIGINFO_T
+# define ACE_LACKS_SIGINFO_H
+#endif /* ACE_AIX_VERS >= 402 */
+#if (ACE_AIX_VERS >= 403)
+// it may exist in earlier revs, but I'm not sure and I don't have a
+// system to validate
+# define ACE_HAS_P_READ_WRITE
+#endif /* ACE_AIX_VERS >= 403 */
+
+#define ACE_HAS_SIGWAIT
+#define ACE_HAS_SOCKADDR_IN_SIN_LEN
+#define ACE_HAS_STRBUF_T
+
+// Compiler supports stropts.h
+#define ACE_HAS_STREAMS
+// #define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// AIX bzero()
+#define ACE_HAS_STRINGS
+
+#define ACE_HAS_STRUCT_NETDB_DATA
+
+// Dynamic linking is in good shape on newer OS/patch levels. If you have
+// trouble with the dynamic linking parts of ACE, and can't patch your OS
+// up to latest levels, comment this out.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+// This is tightly related to dynamic linking...
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+#define ACE_HAS_SVR4_GETTIMEOFDAY
+
+#define ACE_HAS_SYSV_IPC
+#define ACE_HAS_TIMOD_H
+#define ACE_HAS_XTI
+#define ACE_HAS_BROKEN_T_ERROR
+#define ACE_TLI_TCP_DEVICE "/dev/xti/tcp"
+
+#define ACE_HAS_UALARM
+
+#if (ACE_AIX_VERS >= 402)
+# define ACE_HAS_UCONTEXT_T
+#endif /* ACE_AIX_VERS >= 402 */
+
+#define ACE_HAS_UTIME
+
+// Platform has XPG4 wide character type and functions. However, the size
+// of wchar_t changes for 32- vs. 64-bit builds (unsigned short vs. unsigned
+// int, respectively).
+#define ACE_HAS_XPG4_MULTIBYTE_CHAR
+#ifdef __64BIT__
+# define ACE_SIZEOF_WCHAR 4
+#else
+# define ACE_SIZEOF_WCHAR 2
+#endif /* __64BIT__ */
+
+#define ACE_LACKS_NETINET_TCP_H
+
+// AIX uses LIBPATH to search for libraries
+#define ACE_LD_SEARCH_PATH "LIBPATH"
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+
+//**************************************************************
+//
+// Threads related definitions.
+//
+// The threads on AIX are generally POSIX P1003.1c (ACE_HAS_PTHREADS).
+// However, there is also a kernel thread ID (tid_t) that is used in
+// ACE_Log_Msg (printing the thread ID). The tid_t is not the same as
+// pthread_t, and can't derive one from the other - thread_self() gets
+// the tid_t (kernel thread ID) if called from a thread.
+// Thanks very much to Chris Lahey for straightening this out.
+
+#if defined (ACE_HAS_THREADS)
+# if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 1
+# endif
+
+# define ACE_HAS_PTHREADS
+// 4.3 and up has 1003.1c standard; 4.2 has draft 7
+# if (ACE_AIX_VERS >= 403)
+# define ACE_HAS_PTHREADS_STD
+# define ACE_HAS_PTHREADS_UNIX98_EXT
+# define ACE_HAS_PTHREAD_CONTINUE_NP
+# define ACE_HAS_PTHREAD_SUSPEND_NP
+# define ACE_HAS_RECURSIVE_MUTEXES
+# else
+# define ACE_HAS_PTHREADS_DRAFT7
+# define ACE_LACKS_RWLOCK_T
+# define ACE_LACKS_THREAD_STACK_ADDR
+// If ACE doesn't compile due to the lack of these methods, please
+// send email to ace-users@cs.wustl.edu reporting this.
+// #define ACE_LACKS_CONDATTR_PSHARED
+// #define ACE_LACKS_MUTEXATTR_PSHARED
+# define ACE_LACKS_SETSCHED
+# endif /* ACE_AIX_VERS >= 403 */
+
+# define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
+# define ACE_HAS_SIGTHREADMASK
+# define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
+# define ACE_LACKS_THREAD_PROCESS_SCOPING
+#else
+# undef ACE_HAS_THREADS
+#endif /* ACE_HAS_THREADS != 0 */
+
+#define ACE_MALLOC_ALIGN 8
+
+#if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) && !defined(_UNIX95)
+# define ACE_HAS_3_PARAM_WCSTOK
+#endif /* (_XOPEN_SOURCE -0) >= 500 && !_UNIX95 */
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-aix-5.x.h b/ACE/ace/config-aix-5.x.h
index 36d31fb2900..42cb40b96db 100644
--- a/ACE/ace/config-aix-5.x.h
+++ b/ACE/ace/config-aix-5.x.h
@@ -26,285 +26,7 @@
#if !defined (ACE_HAS_AIO_CALLS)
# define _ACE_DISABLE_AIO_CALLS_
#endif
-
-// Both IBM and g++ compilers set _THREAD_SAFE if compiler is asked to compile
-// threaded code (xlC_r, as opposed to xlC; and g++ -pthread)
-#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_THREADS)
-# undef ACE_HAS_THREADS
-# endif
-# if defined (_THREAD_SAFE)
-# define ACE_HAS_THREADS 1
-// # else
-// # define ACE_HAS_THREADS 0
-# endif /* _THREAD_SAFE */
-#endif /* !ACE_MT_SAFE || (ACE_MT_SAFE != 0) */
-
-#if defined (__xlC__) || defined (__IBMCPP__)
- // AIX xlC, IBM C/C++, and Visual Age C++ compilers
- //********************************************************************
- //
-
-// Compiler does this with a builtin - it's not in libc.
-// Although ACE does have alloca() on this compiler/platform combination, it is
-// disabled by default since it can be dangerous. Uncomment the following line
-// if you ACE to use it.
-//# define ACE_HAS_ALLOCA
-
-// Compiler supports the ssize_t typedef.
-# define ACE_HAS_SSIZE_T
-
-// When using the preprocessor, Ignore info msg; invalid #pragma
-# if defined (__IBMCPP__) && (__IBMCPP__ < 400) // IBM C++ 3.6
-# define ACE_CC_PREPROCESSOR_ARGS "-E -qflag=w:w"
-# endif /* (__IBMCPP__) && (__IBMCPP__ < 400) */
-
- // Keep an eye on this as the compiler and standards converge...
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_PRAGMA_ONCE
-
- // C Set++ 3.1, IBM C/C++ 3.6, and Visual Age C++ 5 batch (__xlC__)
-# if defined (__xlC__)
-# if (__xlC__ < 0x0500)
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-# endif /* __xlC__ < 0x0500 */
-# endif
-
- // These are for Visual Age C++ only
-# if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-# define ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS
-# define ACE_HAS_TYPENAME_KEYWORD
- // When using -qtempinc, we don't need to see template implementation
- // source (though we do need a pragma to find the correct source file).
- // However, without -qtempinc (either -qnotempinc or -qtemplateregistry)
- // we do need to see the source.
-# if defined (__TEMPINC__)
-# if !defined ACE_TEMPLATES_REQUIRE_PRAGMA
-# define ACE_TEMPLATES_REQUIRE_PRAGMA
-# endif
-# else
-# if !defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-# endif
-# endif /* __TEMPINC__ */
-
-# undef WIFEXITED
-# undef WEXITSTATUS
-
-# if (__IBMCPP__ >= 500) /* Visual Age C++ 5 */
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-# endif /* __IBMCPP__ >= 500 */
-
-# if (__IBMCPP__ >= 600) /* Visual Age 6 and XL C/C++ 7 and up */
-# define ACE_HAS_TEMPLATE_TYPEDEFS
-# endif /* __IBMCPP__ >= 600 */
-# endif /* __IBMCPP__ */
-
-#elif defined (__GNUG__)
- // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
- // this must appear before its #include.
-# define ACE_HAS_STRING_CLASS
-
-# include "ace/config-g++-common.h"
- // Denotes that GNU has cstring.h as standard, to redefine memchr().
-# define ACE_HAS_GNU_CSTRING_H
-# define ACE_HAS_SSIZE_T
-
-# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0))
-// We have to explicitly instantiate static template members prior to g++ 4.1
-# define ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION
-#endif /* g++ prior to 4.1 */
-
-# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0
- // ACE_MT_SAFE is #defined below, for all compilers.
-# if !defined (_REENTRANT)
-# define _REENTRANT
-# endif /* _REENTRANT */
-# endif /* !ACE_MT_SAFE */
-
-#else /* ! __xlC__ && ! __GNUG__ */
-# ifdef __cplusplus /* Let it slide for C compilers. */
-# error unsupported compiler in ace/config-aix-5.x.h
-# endif /* __cplusplus */
-#endif /* ! __xlC__ && ! __GNUG__ */
-
-// Compiling for AIX.
-#ifndef AIX
-# define AIX
-#endif /* AIX */
-
-// Pick up all the detectable settings.
-#include "ace/config-posix.h"
-
-#if defined (ACE_HAS_POSIX_SEM_TIMEOUT)
-# undef ACE_HAS_POSIX_SEM_TIMEOUT
-#endif /* ACE_HAS_POSIX_SEM_TIMEOUT */
-
-// AIX shared libs look strangely like archive libs until you look inside
-// them.
-#if defined (ACE_DLL_SUFFIX)
-# undef ACE_DLL_SUFFIX
-#endif
-#define ACE_DLL_SUFFIX ".a"
-
-#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-
-#define ACE_HAS_SOCKLEN_T
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-
-// AIX has AIO, but the functions don't match those of other AIO-enabled
-// platforms. If this is to work, it'll require some significant work,
-// maybe moving the OS-abstraction stuff to an OS_AIO or some such thing.
-//# define ACE_HAS_AIO_CALLS
-
-#define ACE_HAS_AIX_HI_RES_TIMER
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// OS has readdir and friends.
-#define ACE_HAS_DIRENT
-
-// OS supports the getrusage() system call
-#define ACE_HAS_GETRUSAGE
-
-#define ACE_HAS_GPERF
-
-#define ACE_HAS_H_ERRNO
-
-#define ACE_LACKS_STDINT_H
-#define ACE_LACKS_SYS_SYSCTL_H
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_IP_MULTICAST
-
-// Lacks perfect filtering, must bind group address.
-#if !defined ACE_LACKS_PERFECT_MULTICAST_FILTERING
-# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1
-#endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING */
-
-#define ACE_HAS_MSG
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_POSIX_TIME
-// ... but needs to include another header for it on 4.2+
-# define ACE_HAS_BROKEN_POSIX_TIME
-// ... and needs another typedef
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_HAS_SELECT_H
-
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SIGINFO_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_HAS_P_READ_WRITE
-
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SOCKADDR_IN_SIN_LEN
-#define ACE_HAS_STRBUF_T
-
-// Compiler supports stropts.h
-#define ACE_HAS_STREAMS
-// #define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// AIX bzero()
-#define ACE_HAS_STRINGS
-
-#define ACE_HAS_STRUCT_NETDB_DATA
-
-// Dynamic linking is in good shape on newer OS/patch levels. If you have
-// trouble with the dynamic linking parts of ACE, and can't patch your OS
-// up to latest levels, comment this out.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-// This is tightly related to dynamic linking...
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_TIMOD_H
-#define ACE_HAS_XTI
-#define ACE_HAS_BROKEN_T_ERROR
-#define ACE_TLI_TCP_DEVICE "/dev/xti/tcp"
-
-#define ACE_HAS_UALARM
-
-#define ACE_HAS_UCONTEXT_T
-
-#define ACE_HAS_UTIME
-
-// Platform has XPG4 wide character type and functions. However, the size
-// of wchar_t changes for 32- vs. 64-bit builds (unsigned short vs. unsigned
-// int, respectively).
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-#ifdef __64BIT__
-# define ACE_SIZEOF_WCHAR 4
-#else
-# define ACE_SIZEOF_WCHAR 2
-#endif /* __64BIT__ */
-
-#define ACE_LACKS_NETINET_TCP_H
-
-// AIX uses LIBPATH to search for libraries
-#define ACE_LD_SEARCH_PATH "LIBPATH"
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-//**************************************************************
-//
-// Threads related definitions.
-//
-// The threads on AIX are generally POSIX P1003.1c (ACE_HAS_PTHREADS).
-// However, there is also a kernel thread ID (tid_t) that is used in
-// ACE_Log_Msg (printing the thread ID). The tid_t is not the same as
-// pthread_t, and can't derive one from the other - thread_self() gets
-// the tid_t (kernel thread ID) if called from a thread.
-// Thanks very much to Chris Lahey for straightening this out.
-
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# endif
-
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_STD
-# define ACE_HAS_PTHREADS_UNIX98_EXT
-# define ACE_HAS_PTHREAD_CONTINUE_NP
-# define ACE_HAS_PTHREAD_SUSPEND_NP
-# define ACE_HAS_RECURSIVE_MUTEXES
-# define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-# define ACE_HAS_SIGTHREADMASK
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-# define ACE_LACKS_THREAD_PROCESS_SCOPING
-#else
-# undef ACE_HAS_THREADS
-#endif /* ACE_HAS_THREADS != 0 */
-
-#define ACE_MALLOC_ALIGN 8
-
-#if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) && !defined(_UNIX95)
-# define ACE_HAS_3_PARAM_WCSTOK
-#endif /* (_XOPEN_SOURCE -0) >= 500 && !_UNIX95 */
-
+#include "ace/config-aix-4.x.h"
#if defined (_ACE_DISABLE_AIO_CALLS_)
# if defined (ACE_HAS_AIO_CALLS)
# undef ACE_HAS_AIO_CALLS
@@ -327,13 +49,11 @@
// AIX 5.1 has netinet/tcp.h
#undef ACE_LACKS_NETINET_TCP_H
-#define ACE_HAS_3_PARAM_READDIR_R
#define ACE_HAS_POSIX_GETPWNAM_R
#define ACE_HAS_SCANDIR
-#define ACE_SCANDIR_CMP_USES_VOIDPTR
-#define ACE_SCANDIR_SEL_LACKS_CONST
+# define ACE_SCANDIR_CMP_USES_VOIDPTR
+# define ACE_SCANDIR_SEL_LACKS_CONST
#define ACE_HAS_SIGSUSPEND
#define ACE_HAS_TIMEZONE /* Call tzset() to set timezone */
-#define ACE_LACKS_SIGVAL_T
#endif /* ACE_CONFIG_AIX_5_X_H */
diff --git a/ACE/ace/config-cygwin32.h b/ACE/ace/config-cygwin32.h
index 215ffb8e37f..60fcf4576f3 100644
--- a/ACE/ace/config-cygwin32.h
+++ b/ACE/ace/config-cygwin32.h
@@ -80,7 +80,6 @@
#define ACE_HAS_POSITION_INDEPENDENT_POINTERS 1
#define ACE_HAS_SOCKADDR_MSG_NAME 1
#define ACE_LACKS_PRI_T 1
-#define ACE_HAS_3_PARAM_READDIR_R
// Compiler/platform supports alloca().
// Although ACE does have alloca() on this compiler/platform combination, it is
@@ -146,6 +145,7 @@
#define ACE_LACKS_FPUTWS 1
#define ACE_HAS_AUTOMATIC_INIT_FINI
+#define ACE_HAS_SNPRINTF
#define ACE_HAS_SIGWAIT
#define ACE_HAS_SIGINFO_T
diff --git a/ACE/ace/config-dgux-4.11-epc.h b/ACE/ace/config-dgux-4.11-epc.h
new file mode 100644
index 00000000000..4ac2079a768
--- /dev/null
+++ b/ACE/ace/config-dgux-4.11-epc.h
@@ -0,0 +1,189 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for DG/UX
+// 4.11 platforms using the EPC compiler.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#define ACE_DGUX
+
+// Platform requires (struct sockaddr *) for msg_name field of struct
+// msghdr.
+#define ACE_HAS_SOCKADDR_MSG_NAME
+
+// Platform lacks strcasecmp().
+#define ACE_LACKS_STRCASECMP
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+// Platform supports system configuration information.
+#define ACE_HAS_SYSINFO
+
+// Platform supports the POSIX regular expression library.
+#define ACE_HAS_REGEX
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+// #define ACE_HAS_SYS_SYSCALL_H
+
+// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
+#define ACE_HAS_REENTRANT_FUNCTIONS
+
+// Platform has POSIX terminal interface.
+#define ACE_HAS_TERMIOS
+
+// Compiler/platform correctly calls init()/fini() for shared libraries.
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Compiler/platform supports SunOS high resolution timers.
+// #define ACE_HAS_HI_RES_TIMER
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+// Compiler/platform supports alloca()
+// #define ACE_HAS_ALLOCA
+
+// Compiler/platform has <alloca.h>
+// #define ACE_HAS_ALLOCA_H
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Platform supports the /proc file system.
+#define ACE_HAS_PROC_FS
+
+// Platform supports the prusage_t struct.
+// #define ACE_HAS_PRUSAGE_T
+#define ACE_HAS_GETRUSAGE
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Platform supports SVR4 extended signals.
+#define ACE_HAS_SIGINFO_T
+
+// Compiler/platform provides the sockio.h file.
+#define ACE_HAS_SYS_SOCKIO_H
+
+// Compiler supports the ssize_t typedef.
+#define ACE_HAS_SSIZE_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform supports STREAM pipes.
+#define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+// #define ACE_HAS_SVR4_DYNAMIC_LINKING
+
+// Compiler/platform supports SVR4 gettimeofday() prototype.
+// #define ACE_HAS_SVR4_GETTIMEOFDAY
+
+// DG/UX uses the same gettimeofday() prototype as OSF/1.
+#define ACE_HAS_OSF1_GETTIMEOFDAY
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_SVR4_SIGNAL_T
+
+// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
+#define ACE_HAS_SVR4_TLI
+
+// Platform provides <sys/filio.h> header.
+// #define ACE_HAS_SYS_FILIO_H
+
+// Compiler/platform supports sys_siglist array.
+#define ACE_HAS_SYS_SIGLIST
+
+/* Turn off the following four defines if you want to disable threading. */
+// Compile using multi-thread libraries.
+#if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 0
+#endif
+
+// Platform supports threads.
+// #define ACE_HAS_THREADS
+
+// Platform supports POSIX pthreads *and* Solaris threads!
+// #define ACE_HAS_STHREADS
+// #define ACE_HAS_PTHREADS
+#define ACE_HAS_SIGWAIT
+// If ACE doesn't compile due to the lack of these methods, please
+// send email to schmidt@cs.wustl.edu reporting this.
+// #define ACE_LACKS_CONDATTR_PSHARED
+// #define ACE_LACKS_MUTEXATTR_PSHARED
+
+// Compiler/platform has thread-specific storage
+//
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
+// Reactor detects deadlock
+// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION
+
+// Platform supports ACE_TLI timod STREAMS module.
+#define ACE_HAS_TIMOD_H
+
+// Platform supports ACE_TLI tiuser header.
+#define ACE_HAS_TIUSER_H
+
+// Platform provides ACE_TLI function prototypes.
+#define ACE_HAS_TLI_PROTOTYPES
+
+// Platform supports ACE_TLI.
+#define ACE_HAS_TLI
+
+// Use the poll() event demultiplexor rather than select().
+//#define ACE_USE_POLL
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+
+// #define _USING_POSIX4A_DRAFT6
+#define _POSIX_SOURCE
+#define _DGUX_SOURCE
+// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
+#define ACE_HAS_UCONTEXT_T
+#define ACE_HAS_NONCONST_GETBY
+#define ACE_LACKS_MADVISE
+
+#if !defined (IP_ADD_MEMBERSHIP)
+# define IP_ADD_MEMBERSHIP 0x13
+#endif
+
+#if !defined (IP_DROP_MEMBERSHIP)
+# define IP_DROP_MEMBERSHIP 0x14
+#endif
+
+// Header files lack t_errno for ACE_TLI.
+#define ACE_LACKS_T_ERRNO
+
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+#define ACE_HAS_IDTYPE_T
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-dgux-4.x-ghs.h b/ACE/ace/config-dgux-4.x-ghs.h
new file mode 100644
index 00000000000..67b028c3bf4
--- /dev/null
+++ b/ACE/ace/config-dgux-4.x-ghs.h
@@ -0,0 +1,208 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for DG/UX
+// 4.x platforms using the Green Hills Multi C++ compiler.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#define ACE_DGUX
+
+# define ACE_CONFIG_INCLUDE_GHS_COMMON
+# include "ace/config-ghs-common.h"
+
+// Static objects do not get initialized correctly, so this is needed.
+#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
+
+// Platform requires (struct sockaddr *) for msg_name field of struct
+// msghdr.
+#define ACE_HAS_SOCKADDR_MSG_NAME
+
+// Platform lacks strcasecmp().
+#define ACE_LACKS_STRCASECMP
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+// Platform supports system configuration information.
+#define ACE_HAS_SYSINFO
+
+// Platform supports the POSIX regular expression library.
+#define ACE_HAS_REGEX
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
+//#define ACE_HAS_REENTRANT_FUNCTIONS
+
+// Platform has POSIX terminal interface.
+#define ACE_HAS_TERMIOS
+
+// Compiler/platform correctly calls init()/fini() for shared libraries.
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Compiler/platform supports SunOS high resolution timers.
+// #define ACE_HAS_HI_RES_TIMER
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+// Green Hills doesn't give a preprocessor symbol for long double
+#define ACE_SIZEOF_LONG_DOUBLE 8
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Platform supports the /proc file system.
+#define ACE_HAS_PROC_FS
+
+// Platform supports the prusage_t struct.
+// #define ACE_HAS_PRUSAGE_T
+#define ACE_HAS_GETRUSAGE
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Platform supports SVR4 extended signals.
+#define ACE_HAS_SIGINFO_T
+
+// Compiler/platform provides the sockio.h file.
+#define ACE_HAS_SYS_SOCKIO_H
+
+// Compiler supports the ssize_t typedef.
+#define ACE_HAS_SSIZE_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform supports STREAM pipes.
+#define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+// ... but redefines the entrypoint names with a leading underscore
+#define dlopen _dlopen
+#define dlclose _dlclose
+#define dlerror _dlerror
+#define dlsym _dlsym
+// ... and uses 'char *' rather than 'const char *'
+#define ACE_HAS_CHARPTR_DL
+
+// DG/UX uses the same gettimeofday() prototype as OSF/1.
+#define ACE_HAS_OSF1_GETTIMEOFDAY
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_SVR4_SIGNAL_T
+
+// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
+#define ACE_HAS_SVR4_TLI
+
+// Compiler/platform supports sys_siglist array.
+// On DG/UX this is only done if the /usr/include/sys/_int_dg_features.h
+// file determines it should be turned on. It will take some work to
+// figure out the magic options to turn it on reliably, so it'll have to
+// be delayed for now.
+//#define _TARGETTING_DGUXELF 1
+//#define _IX86_DG 1
+//#define _DGUX_TARGET 1
+//#define ACE_HAS_SYS_SIGLIST
+
+/* Turn off the following four defines if you want to disable threading. */
+// Compile using multi-thread libraries.
+#if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 1
+#endif
+
+// Platform supports threads.
+#define ACE_HAS_THREADS
+#define ACE_HAS_PTHREADS
+// DG/UX claims to implement draft 10 of the pthreads standard (which became
+// (with editorial change only) the final standard. To get the behavior, some
+// further macros need to be defined which are specific to DG/UX.
+// _POSIX4A_DRAFT10_SOURCE turns on the draft 10 variant of threads.
+// _POSIX4A_DRAFT_SOURCE turns on sched_yield().
+#define _POSIX4A_DRAFT10_SOURCE
+#define ACE_HAS_PTHREADS_STD
+#define _POSIX4_DRAFT_SOURCE
+// Well, here are some from the standard they don't have...
+#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
+#define ACE_HAS_SIGWAIT
+#define ACE_LACKS_CONDATTR_PSHARED
+#define ACE_LACKS_THREAD_PROCESS_SCOPING
+// The default thread stacksize on DG/UX 4.x is 4096. This needs to be bumped
+// up to do anything real in ACE.
+#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536
+
+// Need to #include <sched.h>
+#define ACE_NEEDS_SCHED_H
+
+// Compiler/platform has thread-specific storage
+//
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
+// Platform supports ACE_TLI timod STREAMS module.
+#define ACE_HAS_TIMOD_H
+
+// Platform supports ACE_TLI tiuser header.
+#define ACE_HAS_TIUSER_H
+
+// Platform provides ACE_TLI function prototypes.
+#define ACE_HAS_TLI_PROTOTYPES
+
+// Platform supports ACE_TLI.
+#define ACE_HAS_TLI
+
+// Platform doesn't have read-write locks natively.
+#define ACE_LACKS_RWLOCK_T
+
+// Platform doesn't have timespec_t data type.
+#define ACE_LACKS_TIMESPEC_T
+
+// Use the poll() event demultiplexor rather than select().
+//#define ACE_USE_POLL
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+
+#define ACE_TEMPLATES_REQUIRE_SOURCE
+
+#define ACE_HAS_UCONTEXT_T
+#define ACE_HAS_NONCONST_GETBY
+#define ACE_LACKS_MADVISE
+
+#if !defined (IP_ADD_MEMBERSHIP)
+#define IP_ADD_MEMBERSHIP 0x13
+#endif
+
+#if !defined (IP_DROP_MEMBERSHIP)
+# define IP_DROP_MEMBERSHIP 0x14
+#endif
+
+// Header files lack t_errno for ACE_TLI.
+#define ACE_LACKS_T_ERRNO
+
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-freebsd.h b/ACE/ace/config-freebsd.h
index 28c7744900e..6ed6e250bcc 100644
--- a/ACE/ace/config-freebsd.h
+++ b/ACE/ace/config-freebsd.h
@@ -225,7 +225,7 @@ extern "C" { char * cuserid (char *s); }
#define ACE_HAS_SIGWAIT
// Platform has POSIX terminal interface.
-#define ACE_HAS_TERMIOS
+#define ACE_HAS_TERMIOS
#if (__FreeBSD_version > 400000)
#define ACE_HAS_UCONTEXT_T
@@ -234,6 +234,10 @@ extern "C" { char * cuserid (char *s); }
#define ACE_HAS_PTHREADS_UNIX98_EXT
#endif
+#ifndef ACE_HAS_SNPRINTF
+#define ACE_HAS_SNPRINTF
+#endif
+
// 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
@@ -258,21 +262,11 @@ typedef union sigval sigval_t;
#define ACE_LACKS_WCSDUP
#define ACE_LACKS_ITOW
#define ACE_HAS_3_PARAM_WCSTOK
-#define ACE_HAS_3_PARAM_READDIR_R
#if (__FreeBSD_version >= 501000)
# define ACE_HAS_PTHREAD_SETSTACK
#endif
-#if (__FreeBSD_version < 700007)
-# define ACE_HAS_SIGVAL_SIGVAL_INT
-#endif
-
-#if (__FreeBSD_version >= 700028)
-# define ACE_HAS_SCTP
-# define ACE_HAS_LKSCTP
-#endif
-
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h
index 83b9350b8e1..0886e0442a0 100644
--- a/ACE/ace/config-g++-common.h
+++ b/ACE/ace/config-g++-common.h
@@ -67,7 +67,7 @@
// Take advantage of G++ (>= 4.x) visibility attributes to generate
// improved shared library binaries.
-#if (__GNUC__ >= 4)
+#if (__GNUC__ > 3)
# if defined (ACE_HAS_CUSTOM_EXPORT_MACROS) && ACE_HAS_CUSTOM_EXPORT_MACROS == 0
# undef ACE_HAS_CUSTOM_EXPORT_MACROS
@@ -78,24 +78,15 @@
# define ACE_Proper_Export_Flag __attribute__ ((visibility("default")))
# define ACE_Proper_Import_Flag
-# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
// Sadly, G++ 4.x silently ignores visibility attributes on
// template instantiations, which breaks singletons.
// As a workaround, we use the GCC visibility pragmas.
// And to make them fit in a macro, we use C99's _Pragma()
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470
-// This has been fixed in GCC 4.1.1 with FC6 but not with SuSE 10.2
-// that gets shipped with GCC 4.1.2 so we assume that with GCC 4.2
-// this will be fixed on the head. With FC6 just set this define yourself
-# ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS
-# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1
-# endif
-# endif
-
-# if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS) && GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS == 1
+# if 0 /* ... replace if/when gcc bug 17470 is fixed */
# define ACE_EXPORT_SINGLETON_DECLARATION(T) template class ACE_Proper_Export_Flag T
# define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class ACE_Proper_Export_Flag SINGLETON_TYPE <CLASS, LOCK>;
-# else /* ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
+# else /* ! GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
# define ACE_EXPORT_SINGLETON_DECLARATION(T) \
_Pragma ("GCC visibility push(default)") \
template class T \
@@ -104,15 +95,16 @@
_Pragma ("GCC visibility push(default)") \
template class SINGLETON_TYPE<CLASS, LOCK>; \
_Pragma ("GCC visibility pop")
-# endif /* ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
+# endif /* ! GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
// Note that the "__extension__" is needed to prevent g++ from issuing
// an error when using its "-pedantic" command line flag.
# define ACE_IMPORT_SINGLETON_DECLARATION(T) __extension__ extern template class T
# define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) __extension__ extern template class SINGLETON_TYPE<CLASS, LOCK>;
+
# endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */
-#endif /* __GNU__ >= 4 */
+#endif /* __GNU__ > 3 */
#if defined (ACE_HAS_GNU_REPO)
// -frepo causes unresolved symbols of basic_string left- and
diff --git a/ACE/ace/config-hpux-11.00.h b/ACE/ace/config-hpux-11.00.h
index 4e60f220cf0..a06e7bb84d0 100644
--- a/ACE/ace/config-hpux-11.00.h
+++ b/ACE/ace/config-hpux-11.00.h
@@ -135,8 +135,17 @@
// Compiler supports template specialization.
# define ACE_HAS_TEMPLATE_SPECIALIZATION
+// Preprocessor needs some help with data types
+# if defined (__LP64__)
+# define ACE_SIZEOF_LONG 8
+# else
+# define ACE_SIZEOF_LONG 4
+# endif
+
// Platform has XPG4 wide character support
# define ACE_HAS_XPG4_MULTIBYTE_CHAR
+# define ACE_HAS_WCHAR
+# define ACE_SIZEOF_WCHAR _WCHAR_T
# endif /* __cplusplus < 199707L */
@@ -166,6 +175,10 @@
#include /**/ <sys/stdsyms.h>
+#if defined (_INCLUDE_HPUX_SOURCE)
+# define ACE_HAS_SNPRINTF
+#endif
+
// HP-UX is a POSIX-compliant system - see what's available.
#include "ace/config-posix.h"
@@ -200,13 +213,6 @@
# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
#endif /* __LP64__ */
-// Preprocessor needs some help with data types
-#if defined (__LP64__)
-# define ACE_SIZEOF_LONG 8
-#else
-# define ACE_SIZEOF_LONG 4
-#endif
-
// Platform can do async I/O (aio_*) (set up in config-posix.h)
// ... but seems to require this in order to keep from hanging. Needs some
// investigation, maybe with HP. John Mulhern determined this value
@@ -411,9 +417,6 @@
# define ACE_HAS_3_PARAM_WCSTOK
#endif
-#define ACE_HAS_3_PARAM_READDIR_R
-
-
//////////////////////////////////////////////////////////////////////////
//
// STREAMS information
diff --git a/ACE/ace/config-irix5.2.h b/ACE/ace/config-irix5.2.h
new file mode 100644
index 00000000000..cdb1fb49bdd
--- /dev/null
+++ b/ACE/ace/config-irix5.2.h
@@ -0,0 +1,67 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for the SGI
+// Indigo2EX running Irix 5.2 platform using the gcc v2.6.x compiler
+// and libg++ v2.6.x.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+// Platform supports STREAM pipes (note that this is disabled by
+// default, see the manual page on pipe(2) to find out how to enable
+// it).
+//#define ACE_HAS_STREAM_PIPES
+
+// Platform supports getpagesize() call.
+#define ACE_HAS_GETPAGESIZE
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+#define ACE_HAS_SIGWAIT
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Platform requires void * for mmap().
+#define ACE_HAS_VOIDPTR_MMAP
+
+// Compiler/platform contains the <sys/syscall.h> file.
+#define ACE_HAS_SYS_SYSCALL_H
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+#define ACE_SIZEOF_LONG_DOUBLE 8
+
+#define IRIX5
+// Although ACE does have alloca() on this compiler/platform combination, it is
+// disabled by default since it can be dangerous. Uncomment the following line
+// if you ACE to use it.
+//#define ACE_HAS_ALLOCA
+// Compiler/platform has <alloca.h>
+#define ACE_HAS_ALLOCA_H
+#define ACE_HAS_BSTRING
+#define ACE_HAS_GETRUSAGE
+#define ACE_HAS_POSIX_NONBLOCK
+#define ACE_HAS_POSIX_TIME
+#define ACE_HAS_CPLUSPLUS_HEADERS
+#define ACE_HAS_POLL
+#define ACE_HAS_PROC_FS
+#define ACE_HAS_SIG_ATOMIC_T
+#define ACE_HAS_SIGINFO_T
+#define ACE_HAS_UCONTEXT_T
+#define ACE_HAS_STREAMS
+#define ACE_HAS_SSIZE_T
+#define ACE_HAS_STRERROR
+#define ACE_HAS_STRBUF_T
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+#define ACE_HAS_SVR4_SIGNAL_T
+#define ACE_HAS_SYS_SIGLIST
+#define ACE_HAS_SYS_FILIO_H
+#define ACE_HAS_SEMUN
+#define ACE_NEEDS_DEV_IO_CONVERSION
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-irix5.3-g++.h b/ACE/ace/config-irix5.3-g++.h
new file mode 100644
index 00000000000..c9f3cc99773
--- /dev/null
+++ b/ACE/ace/config-irix5.3-g++.h
@@ -0,0 +1,117 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for the SGI
+// Indigo2EX running Irix 5.3 platform using the GNU C++ Compiler
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
+// this must appear before its #include.
+#define ACE_HAS_STRING_CLASS
+
+#include "ace/config-g++-common.h"
+
+#define ACE_SIZEOF_LONG_DOUBLE 8
+
+// Platform supports getpagesize() call.
+#define ACE_HAS_GETPAGESIZE
+#define IRIX5
+#define ACE_HAS_SIGWAIT
+#define ACE_HAS_DIRENT
+
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Platform requires void * for mmap().
+#define ACE_HAS_VOIDPTR_MMAP
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+#define ACE_HAS_SYS_SYSCALL_H
+
+// Compiler/platform supports alloca()
+// Although ACE does have alloca() on this compiler/platform combination, it is
+// disabled by default since it can be dangerous. Uncomment the following line
+// if you ACE to use it.
+//#define ACE_HAS_ALLOCA
+
+// Compiler/platform has <alloca.h>
+#define ACE_HAS_ALLOCA_H
+
+// IRIX5 needs to define bzero() in this odd file <bstring.h>
+#define ACE_HAS_BSTRING
+
+// Compiler/platform has the getrusage() system call.
+#define ACE_HAS_GETRUSAGE
+
+// Denotes that GNU has cstring.h as standard
+// which redefines memchr()
+#define ACE_HAS_GNU_CSTRING_H
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// Platform supports the /proc file system.
+#define ACE_HAS_PROC_FS
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Platform supports SVR4 extended signals.
+#define ACE_HAS_SIGINFO_T
+#define ACE_HAS_UCONTEXT_T
+
+// Compiler supports the ssize_t typedef.
+#define ACE_HAS_SSIZE_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform supports STREAM pipes (note that this is disabled by
+// default, see the manual page on pipe(2) to find out how to enable
+// it).
+// #define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_IRIX_53_SIGNALS
+
+// Compiler/platform supports sys_siglist array.
+// #define ACE_HAS_SYS_SIGLIST
+
+// Platform provides <sys/filio.h> header.
+#define ACE_HAS_SYS_FILIO_H
+
+// Compiler/platform defines a union semun for SysV shared memory.
+#define ACE_HAS_SEMUN
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-irix5.3-sgic++.h b/ACE/ace/config-irix5.3-sgic++.h
new file mode 100644
index 00000000000..b1a4e4cb13c
--- /dev/null
+++ b/ACE/ace/config-irix5.3-sgic++.h
@@ -0,0 +1,120 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work
+// for the SGI Indigo2EX running Irix 5.3 platform using
+// the SGI C++ Compiler.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#define IRIX5
+
+#include <sys/bsd_types.h>
+#define _BSD_TYPES
+
+#define ACE_SIZEOF_LONG_DOUBLE 8
+
+#define ACE_LACKS_STDINT_H
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+// Platform supports getpagesize() call.
+#define ACE_HAS_GETPAGESIZE
+
+#define ACE_HAS_SIGWAIT
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Platform requires void * for mmap().
+#define ACE_HAS_VOIDPTR_MMAP
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+#define ACE_HAS_SYS_SYSCALL_H
+
+// Compiler/platform supports alloca()
+// Although ACE does have alloca() on this compiler/platform combination, it is
+// disabled by default since it can be dangerous. Uncomment the following line
+// if you ACE to use it.
+//#define ACE_HAS_ALLOCA
+
+// Compiler/platform has <alloca.h>
+#define ACE_HAS_ALLOCA_H
+
+// IRIX5 needs to define bzero() in this odd file <bstring.h>
+#define ACE_HAS_BSTRING
+
+// Compiler/platform has the getrusage() system call.
+#define ACE_HAS_GETRUSAGE
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// No multi-threading so use poll() call
+// - for easier debugging, if nothing else
+// #define ACE_USE_POLL
+
+// Platform supports the /proc file system.
+// #define ACE_HAS_PROC_FS
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Platform supports SVR4 extended signals.
+#define ACE_HAS_SIGINFO_T
+// #define ACE_HAS_UCONTEXT_T
+#define ACE_LACKS_UCONTEXT_H
+
+// Compiler supports the ssize_t typedef.
+#define ACE_HAS_SSIZE_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform supports STREAM pipes (note that this is disabled by
+// default, see the manual page on pipe(2) to find out how to enable
+// it).
+// #define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_IRIX_53_SIGNALS
+
+// Compiler/platform supports sys_siglist array.
+// #define ACE_HAS_SYS_SIGLIST
+
+// Platform provides <sys/filio.h> header.
+#define ACE_HAS_SYS_FILIO_H
+
+// Compiler/platform defines a union semun for SysV shared memory.
+#define ACE_HAS_SEMUN
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+#define ACE_NEEDS_DEV_IO_CONVERSION
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-irix6.x-common.h b/ACE/ace/config-irix6.x-common.h
index 82a419edd59..dc6350b6717 100644
--- a/ACE/ace/config-irix6.x-common.h
+++ b/ACE/ace/config-irix6.x-common.h
@@ -77,6 +77,9 @@
// Compiler/platform contains the <sys/syscall.h> file.
#define ACE_HAS_SYS_SYSCALL_H
+// Compiler/platform supports snprintf
+#define ACE_HAS_SNPRINTF
+
// Compiler/platform supports alloca()
// Although ACE does have alloca() on this compiler/platform combination, it is
// disabled by default since it can be dangerous. Uncomment the following line
@@ -101,6 +104,10 @@
// Platform contains <poll.h>.
#define ACE_HAS_POLL
+// No multi-threading so use poll() call
+// - for easier debugging, if nothing else
+// #define ACE_USE_POLL
+
// Platform supports the /proc file system.
#define ACE_HAS_PROC_FS
@@ -117,6 +124,11 @@
// Platform supports STREAMS.
#define ACE_HAS_STREAMS
+// Platform supports STREAM pipes (note that this is disabled by
+// default, see the manual page on pipe(2) to find out how to enable
+// it).
+// #define ACE_HAS_STREAM_PIPES
+
// Compiler/platform supports strerror ().
#define ACE_HAS_STRERROR
diff --git a/ACE/ace/config-irix6.x-sgic++-nothreads.h b/ACE/ace/config-irix6.x-sgic++-nothreads.h
new file mode 100644
index 00000000000..a2a0efb02ea
--- /dev/null
+++ b/ACE/ace/config-irix6.x-sgic++-nothreads.h
@@ -0,0 +1,5 @@
+/* -*- C++ -*- */
+// $Id$
+
+#error "Please use config-irix6.x-sgic++.h."
+#error "Set threads=0 in your platform_macros.GNU to disable multi-threading."
diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h
index 1a7c31a2246..95a7a07d8c0 100644
--- a/ACE/ace/config-linux-common.h
+++ b/ACE/ace/config-linux-common.h
@@ -43,11 +43,9 @@
// with shm_open/shm_unlink pairing in ACE which needs to be fixed when I have time.
# if defined (ACE_HAS_SHM_OPEN)
# undef ACE_HAS_SHM_OPEN
-# endif /* ACE_HAS_SHM_OPEN */
+# endif
-# if !defined (ACE_LACKS_LINUX_VERSION_H)
-# include <linux/version.h>
-# endif /* !ACE_LACKS_LINUX_VERSION_H */
+# include <linux/version.h>
# if defined (ACE_USES_FIFO_SEM)
// Don't use this for Linux NPTL since this has complete
@@ -124,6 +122,16 @@
# define ACE_LACKS_STRTOK_R_PROTOTYPE
// @note end of glibc 2.0 (0.961212-5)-specific configuration.
+// These macros determined by reading <stdio.h> on RH 7.1 and glibc's
+// <features.h>.
+# if defined (_BSD_SOURCE) \
+ || defined (_ISOC99_SOURCE) \
+ || defined (_ISOC9X_SOURCE) \
+ || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) \
+ || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)
+# define ACE_HAS_SNPRINTF
+# endif
+
# if __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1
// These were suggested by Robert Hanzlik <robi@codalan.cz> to get
// ACE to compile on Linux using glibc 2.1 and libg++/gcc 2.8.
@@ -237,7 +245,6 @@
#if __GLIBC__ >= 2
// glibc 2 and higher has wchar support
# define ACE_HAS_XPG4_MULTIBYTE_CHAR
-# define ACE_HAS_VFWPRINTF
#endif
#if __GLIBC__ < 2
@@ -254,8 +261,6 @@
# define ACE_HAS_3_PARAM_WCSTOK
#endif
-#define ACE_HAS_3_PARAM_READDIR_R
-
#if !defined (ACE_DEFAULT_BASE_ADDR)
# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
#endif /* ! ACE_DEFAULT_BASE_ADDR */
@@ -390,20 +395,13 @@
#define ACE_HAS_VOIDPTR_MMAP
-#if defined (ACE_LACKS_NETWORKING)
-# include "ace/config-posix-nonetworking.h"
-#else
-# define ACE_HAS_NETLINK
-# define ACE_HAS_GETIFADDRS
-#endif
+#define ACE_HAS_NETLINK
#if !defined (ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO)
// Detect if getsockname() and getpeername() returns random values in
// the sockaddr_in::sin_zero field by evaluation of the kernel
// version. Since version 2.5.47 this problem is fixed.
-# if !defined (ACE_LACKS_LINUX_VERSION_H)
-# include <linux/version.h>
-# endif /* !ACE_LACKS_LINUX_VERSION_H */
+#include <linux/version.h>
# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47))
# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 0
# else
diff --git a/ACE/ace/config-linux.h b/ACE/ace/config-linux.h
index ee3ca24eeeb..402ef191e16 100644
--- a/ACE/ace/config-linux.h
+++ b/ACE/ace/config-linux.h
@@ -58,6 +58,10 @@
#endif /* ACE_MT_SAFE */
+// This is certainly true for newer distributions. I'm not sure how
+// far back this goes.
+#define ACE_HAS_GETIFADDRS
+
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_LINUX_H */
diff --git a/ACE/ace/config-lite.h b/ACE/ace/config-lite.h
index f8edd3b9192..e36f2c525a5 100644
--- a/ACE/ace/config-lite.h
+++ b/ACE/ace/config-lite.h
@@ -122,14 +122,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL
// Once all C++ compilers support the standard reverse_iterator
// adapters, we can drop this generator macro or at least drop the
// MSVC++ or Sun Studio preprocessor conditional blocks.
-#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x580 \
- && !defined (_STLPORT_VERSION)
- // If we're not using the stlport4 C++ library (which has standard
- // iterators), we need to ensure this is included in order to test
- // the _RWSTD_NO_CLASS_PARTIAL_SPEC feature test macro below.
+#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x580
+ // We need to ensure that this is included in order to test
+ // _RWSTD_NO_CLASS_PARTIAL_SPEC below
# include <Cstd/stdcomp.h>
#endif /* __SUNPRO_CC <= 0x580 */
-#if defined (_MSC_VER) && (_MSC_VER < 1310) && !defined (_CPPLIB_VER)
+#if defined (_MSC_VER) && !defined (_CPPLIB_VER)
// MSVC++ 6 and the latest platform SDKs don't define a standard
// compliant reverse_iterator adapter.
//
diff --git a/ACE/ace/config-lynxos.h b/ACE/ace/config-lynxos.h
index 3d2ec76c8d5..739ecee49c8 100644
--- a/ACE/ace/config-lynxos.h
+++ b/ACE/ace/config-lynxos.h
@@ -54,6 +54,7 @@
#define ACE_HAS_MEMCHR
#define ACE_HAS_MSG
#define ACE_HAS_NONCONST_CLOCK_SETTIME
+#define ACE_HAS_NONCONST_GETBY
#define ACE_HAS_NONCONST_MSGSND
#define ACE_HAS_NONCONST_READV
#define ACE_HAS_NONCONST_SELECT_TIMEVAL
@@ -78,24 +79,29 @@
#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
#define ACE_HAS_TYPENAME_KEYWORD
#define ACE_LACKS_CONST_TIMESPEC_PTR
+#define ACE_LACKS_GETOPT_PROTOTYPE
#define ACE_LACKS_GETPGID
+#define ACE_LACKS_INET_ATON_PROTOTYPE
#define ACE_LACKS_MADVISE
#define ACE_LACKS_MKSTEMP_PROTOTYPE
#define ACE_LACKS_MKTEMP_PROTOTYPE
#define ACE_LACKS_PUTENV_PROTOTYPE
#define ACE_LACKS_REALPATH
+#define ACE_LACKS_REGEX_H
#define ACE_LACKS_RWLOCK_T
#define ACE_LACKS_SCANDIR_PROTOTYPE
#define ACE_LACKS_SETEGID
#define ACE_LACKS_SETEUID
#define ACE_LACKS_SIGINFO_H
+#define ACE_LACKS_STRCASECMP_PROTOTYPE
+#define ACE_LACKS_STRNCASECMP_PROTOTYPE
#define ACE_LACKS_STRPTIME
#define ACE_LACKS_SUSECONDS_T
#define ACE_LACKS_SWAB_PROTOTYPE
+#define ACE_LACKS_SYS_SELECT_H
#define ACE_LACKS_TIMESPEC_T
#define ACE_LACKS_UCONTEXT_H
#define ACE_LACKS_USECONDS_T
-#define ACE_LACKS_VSNPRINTF
#define ACE_LACKS_WCHAR_H
#define ACE_MALLOC_ALIGN 8
#define ACE_NEEDS_IPC_1C_H
@@ -107,11 +113,9 @@
# define ACE_HAS_PTHREADS
# define ACE_HAS_THREAD_SPECIFIC_STORAGE
# define ACE_LACKS_NULL_PTHREAD_STATUS
-# if ACE_LYNXOS_MAJOR == 4 && ACE_LYNXOS_MINOR == 0
-# define ACE_LACKS_SETDETACH
-# define ACE_LACKS_THREAD_PROCESS_SCOPING
-# define ACE_LACKS_THREAD_STACK_ADDR
-# endif
+# define ACE_LACKS_SETDETACH
+# define ACE_LACKS_THREAD_PROCESS_SCOPING
+# define ACE_LACKS_THREAD_STACK_ADDR
#endif /* ACE_MT_SAFE */
#define ACE_POSIX_AIOCB_PROACTOR
@@ -142,25 +146,5 @@
#define ALIGNBYTES (sizeof(int) - 1)
#define ALIGN(p) (((unsigned)p + ALIGNBYTES) & ~ALIGNBYTES)
-#if ACE_LYNXOS_MAJOR == 4 && ACE_LYNXOS_MINOR == 0
-# define ACE_LACKS_GETOPT_PROTOTYPE
-# define ACE_LACKS_INET_ATON_PROTOTYPE
-# define ACE_LACKS_REGEX_H
-# define ACE_LACKS_STRCASECMP_PROTOTYPE
-# define ACE_LACKS_STRNCASECMP_PROTOTYPE
-# define ACE_LACKS_SYS_SELECT_H
-# define ACE_HAS_NONCONST_GETBY
-#endif
-
-#if (ACE_LYNXOS_MAJOR > 4) || (ACE_LYNXOS_MAJOR == 4 && ACE_LYNXOS_MINOR >= 2)
-// LynxOS 4.2 additons
-# define ACE_HAS_POSIX_SEM_TIMEOUT
-# define ACE_HAS_MUTEX_TIMEOUTS
-#endif
-
-#if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
-# define ACE_HAS_BROKEN_THREAD_KEYFREE
-#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-m88k.h b/ACE/ace/config-m88k.h
new file mode 100644
index 00000000000..8409f53cd3b
--- /dev/null
+++ b/ACE/ace/config-m88k.h
@@ -0,0 +1,225 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for Motorola
+// 88k SVR4 platforms using pthreads from Florida State (ACE_HAS_FSU_PTHREADS).
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#if ! defined (__ACE_INLINE__)
+# define __ACE_INLINE__
+#endif /* ! __ACE_INLINE__ */
+
+#if defined (__GNUG__)
+# include "ace/config-g++-common.h"
+ // This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
+ // Maybe it will work?
+# undef ACE_HAS_TEMPLATE_SPECIALIZATION
+#endif /* __GNUG__ */
+
+#if !defined (m88k)
+#define m88k
+#endif
+
+extern "C" void pthread_init();
+
+#define PTHREAD_STACK_MIN 1024
+
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+#if !defined (IP_ADD_MEMBERSHIP)
+#define IP_ADD_MEMBERSHIP 0x13
+#endif /* m88k */
+
+#if !defined (IP_DROP_MEMBERSHIP)
+#define IP_DROP_MEMBERSHIP 0x14
+#endif /* m88k */
+
+struct sched_param
+{
+ int sched_priority;
+ int prio;
+};
+
+// This seems to be necessary for m88k.
+struct ip_mreq
+{
+ struct in_addr imr_multiaddr; // IP multicast address of the group
+ struct in_addr imr_interface; // local IP address of the interface
+};
+
+#if !defined (ACE_HAS_FSU_PTHREADS)
+# define ACE_HAS_FSU_PTHREADS
+#endif
+#if !defined (ACE_HAS_PTHREADS_DRAFT6)
+# define ACE_HAS_PTHREADS_DRAFT6
+#endif
+
+// Added for compilation on the m88k
+#if defined (m88k)
+# define ACE_LACKS_T_ERRNO
+# define ACE_LACKS_MADVISE
+# define ACE_HAS_GNU_CSTRING_H
+#endif /* m88k */
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Sun has the wrong prototype for sendmsg.
+#define ACE_HAS_NONCONST_SENDMSG
+
+// The SunOS 5.x version of rand_r is inconsistent with the header files...
+#define ACE_HAS_BROKEN_RANDR
+
+// Platform supports system configuration information.
+#define ACE_HAS_SYSINFO
+
+// Platform supports the POSIX regular expression library.
+#define ACE_HAS_REGEX
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+#define ACE_HAS_SYS_SYSCALL_H
+
+#if !defined (ACE_HAS_FSU_PTHREADS)
+// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
+#define ACE_HAS_REENTRANT_FUNCTIONS
+#endif /* ACE_HAS_FSU_PTHREADS */
+
+// Platform has POSIX terminal interface.
+#define ACE_HAS_TERMIOS
+
+// Compiler/platform correctly calls init()/fini() for shared libraries.
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+#if !defined (m88k)
+// Compiler/platform supports SunOS high resolution timers.
+# define ACE_HAS_HI_RES_TIMER
+#endif /* m88k */
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+// Compiler/platform supports alloca()
+// Although ACE does have alloca() on this compiler/platform combination, it is
+// disabled by default since it can be dangerous. Uncomment the following line
+// if you ACE to use it.
+//#define ACE_HAS_ALLOCA
+
+#if !defined (m88k)
+// Compiler/platform has <alloca.h>
+#define ACE_HAS_ALLOCA_H
+#endif /* m88k */
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Platform supports the /proc file system.
+#define ACE_HAS_PROC_FS
+
+#if !defined (m88k)
+// Platform supports the prusage_t struct.
+#define ACE_HAS_PRUSAGE_T
+#endif /* m88k */
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Platform supports SVR4 extended signals.
+#define ACE_HAS_SIGINFO_T
+#define ACE_HAS_UCONTEXT_T
+
+// Compiler/platform provides the sockio.h file.
+#define ACE_HAS_SYS_SOCKIO_H
+
+// Compiler supports the ssize_t typedef.
+#define ACE_HAS_SSIZE_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform supports STREAM pipes.
+#define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+
+// Compiler/platform supports SVR4 gettimeofday() prototype.
+#define ACE_HAS_SVR4_GETTIMEOFDAY
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_SVR4_SIGNAL_T
+
+// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
+#define ACE_HAS_SVR4_TLI
+
+// Platform provides <sys/filio.h> header.
+#define ACE_HAS_SYS_FILIO_H
+
+#if !defined (m88k)
+// Compiler/platform supports sys_siglist array.
+#define ACE_HAS_SYS_SIGLIST
+#endif /* m88k */
+
+/* Turn off the following five defines if you want to disable threading. */
+// Compile using multi-thread libraries.
+#if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 1
+#endif
+
+#define ACE_HAS_PTHREADS
+#define ACE_LACKS_RWLOCK_T
+
+// Platform supports threads.
+#define ACE_HAS_THREADS
+
+#if defined (ACE_HAS_FSU_PTHREADS)
+#define ACE_LACKS_THREAD_STACK_ADDR
+#endif /* ACE_HAS_FSU_PTHREADS */
+
+// Compiler/platform has thread-specific storage
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
+// Reactor detects deadlock
+// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION
+
+// Platform supports ACE_TLI timod STREAMS module.
+#define ACE_HAS_TIMOD_H
+
+// Platform supports ACE_TLI tiuser header.
+#define ACE_HAS_TIUSER_H
+
+// Platform provides ACE_TLI function prototypes.
+#define ACE_HAS_TLI_PROTOTYPES
+
+// Platform supports ACE_TLI.
+#define ACE_HAS_TLI
+
+// Use the poll() event demultiplexor rather than select().
+//#define ACE_USE_POLL
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-macosx-panther.h b/ACE/ace/config-macosx-panther.h
index 840d6a8f28a..52d8778d2b1 100644
--- a/ACE/ace/config-macosx-panther.h
+++ b/ACE/ace/config-macosx-panther.h
@@ -111,6 +111,9 @@
#define ACE_HAS_IP_MULTICAST
#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1
+//platform supports snprintf ()
+#define ACE_HAS_SNPRINTF
+
// Compiler/platform has the getrusage() system call.
#define ACE_HAS_GETRUSAGE
@@ -171,7 +174,6 @@
#define ACE_HAS_GETIFADDRS
#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
#define ACE_LACKS_UNNAMED_SEMAPHORE
-#define ACE_LACKS_SIGVAL_T
// dlcompat package (not part of base Darwin) is needed for dlopen().
// You may download directly from sourceforge and install or use fink
diff --git a/ACE/ace/config-macosx-tiger.h b/ACE/ace/config-macosx-tiger.h
index 4201ac8ddb6..4da967cd1a2 100644
--- a/ACE/ace/config-macosx-tiger.h
+++ b/ACE/ace/config-macosx-tiger.h
@@ -143,6 +143,9 @@
#define ACE_HAS_IP_MULTICAST
#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1
+//platform supports snprintf ()
+#define ACE_HAS_SNPRINTF
+
// Compiler/platform has the getrusage() system call.
#define ACE_HAS_GETRUSAGE
@@ -206,7 +209,6 @@
#define ACE_HAS_GETIFADDRS
#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
#define ACE_LACKS_UNNAMED_SEMAPHORE
-#define ACE_LACKS_SIGVAL_T
// dlcompat package (not part of base Darwin) is needed for dlopen().
// You may download directly from sourceforge and install or use fink
diff --git a/ACE/ace/config-macosx.h b/ACE/ace/config-macosx.h
index 215894604c6..6cfaa1eec67 100644
--- a/ACE/ace/config-macosx.h
+++ b/ACE/ace/config-macosx.h
@@ -113,6 +113,9 @@
#define ACE_HAS_IP_MULTICAST
#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1
+//platform supports snprintf ()
+#define ACE_HAS_SNPRINTF
+
// Compiler/platform has the getrusage() system call.
#define ACE_HAS_GETRUSAGE
@@ -171,7 +174,6 @@
#define ACE_HAS_GETIFADDRS
#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
#define ACE_LACKS_UNNAMED_SEMAPHORE
-#define ACE_LACKS_SIGVAL_T
// dlcompat package (not part of base Darwin) is needed for dlopen().
// You may download directly from sourceforge and install or use fink
diff --git a/ACE/ace/config-mit-pthread.h b/ACE/ace/config-mit-pthread.h
new file mode 100644
index 00000000000..afaf665c383
--- /dev/null
+++ b/ACE/ace/config-mit-pthread.h
@@ -0,0 +1,49 @@
+// $Id$
+
+#ifndef ACE_CONFIG_MIT_PTHREAD_H
+#define ACE_CONFIG_MIT_PTHREAD_H
+#include /**/ "ace/pre.h"
+
+// Platform uses int for select() rather than fd_set.
+#if !defined(ACE_HAS_SELECT_H)
+#define ACE_HAS_SELECT_H
+#endif
+
+// Threads
+#define ACE_HAS_THREADS
+#if !defined (ACE_MT_SAFE)
+ #define ACE_MT_SAFE 1
+#endif
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+#define ACE_HAS_PTHREADS
+#define ACE_HAS_PTHREADS_STD
+#define ACE_LACKS_PTHREAD_CANCEL
+#define ACE_HAS_SIGWAIT
+#define ACE_LACKS_THREAD_PROCESS_SCOPING
+//#define ACE_LACKS_THREAD_STACK_ADDR
+// If ACE doesn't compile due to the lack of these methods, please
+// send email to schmidt@cs.wustl.edu reporting this.
+// #define ACE_LACKS_CONDATTR_PSHARED
+// #define ACE_LACKS_MUTEXATTR_PSHARED
+#define ACE_LACKS_RWLOCK_T
+#define ACE_LACKS_SETSCHED
+
+#include <pthread.h>
+#if defined(_M_UNIX)
+#include <sys/regset.h>
+#endif
+
+#define ACE_LACKS_TIMEDWAIT_PROTOTYPES
+#define ACE_HAS_RECV_TIMEDWAIT
+#define ACE_HAS_RECVFROM_TIMEDWAIT
+#define ACE_HAS_RECVMSG_TIMEDWAIT
+#define ACE_HAS_SEND_TIMEDWAIT
+#define ACE_HAS_SENDTO_TIMEDWAIT
+#define ACE_HAS_SENDMSG_TIMEDWAIT
+#define ACE_HAS_READ_TIMEDWAIT
+#define ACE_HAS_READV_TIMEDWAIT
+#define ACE_HAS_WRITE_TIMEDWAIT
+#define ACE_HAS_WRITEV_TIMEDWAIT
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_MIT_PTHREAD_H */
diff --git a/ACE/ace/config-mklinux.h b/ACE/ace/config-mklinux.h
new file mode 100644
index 00000000000..7487484f103
--- /dev/null
+++ b/ACE/ace/config-mklinux.h
@@ -0,0 +1,20 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for MkLinux
+// platforms using GNU C++.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#include "ace/config-linux-common.h"
+
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+#undef ACE_HAS_SOCKLEN_T
+#define ACE_HAS_SIZET_SOCKET_LEN
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-netbsd.h b/ACE/ace/config-netbsd.h
index 931b473102e..c7508bba3bb 100644
--- a/ACE/ace/config-netbsd.h
+++ b/ACE/ace/config-netbsd.h
@@ -4,28 +4,12 @@
#ifndef ACE_CONFIG_H
#define ACE_CONFIG_H
-#ifndef ACE_MT_SAFE
-#define ACE_MT_SAFE 1
-#endif
-
-#if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# define ACE_HAS_THREADS 1
-# define ACE_HAS_PTHREADS 1
-# define ACE_HAS_PTHREADS_STD 1
-# define ACE_HAS_PTHREADS_UNIX98_EXT 1
-# define ACE_HAS_PTHREAD_RESUME_NP 1
-# define ACE_HAS_PTHREAD_SUSPEND_NP 1
-# define ACE_LACKS_PTHREAD_THR_SIGSETMASK 1
-# define ACE_LACKS_PTHREAD_YIELD 1
-#endif /* ACE_MT_SAFE */
-
#define ACE_HAS_CLOCK_SETTIME 1
#define ACE_HAS_CLOCK_GETTIME 1
#define ACE_HAS_SETTIMEOFDAY 1
#define ACE_HAS_GETTIMEOFDAY 1
#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R 1
#define ACE_HAS_3_PARAM_WCSTOK 1
-#define ACE_HAS_3_PARAM_READDIR_R 1
#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG 1
#define ACE_HAS_ALT_CUSERID 1
#define ACE_HAS_AUTOMATIC_INIT_FINI 1
@@ -52,6 +36,11 @@
#define ACE_HAS_POSITION_INDEPENDENT_POINTERS 1
#define ACE_HAS_POSIX_NONBLOCK 1
#define ACE_HAS_POSIX_TIME 1
+#define ACE_HAS_PTHREADS 1
+#define ACE_HAS_PTHREADS_STD 1
+#define ACE_HAS_PTHREADS_UNIX98_EXT 1
+#define ACE_HAS_PTHREAD_RESUME_NP 1
+#define ACE_HAS_PTHREAD_SUSPEND_NP 1
#define ACE_HAS_P_READ_WRITE 1
#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS 1
#define ACE_HAS_REENTRANT_FUNCTIONS 1
@@ -65,6 +54,7 @@
#define ACE_HAS_SIG_C_FUNC 1
#define ACE_HAS_SOCKADDR_IN_SIN_LEN 1
#define ACE_HAS_SOCKADDR_IN6_SIN6_LEN 1
+#define ACE_HAS_SNPRINTF 1
#define ACE_HAS_SOCKADDR_MSG_NAME 1
#define ACE_HAS_SOCKLEN_T 1
#define ACE_HAS_SSIZE_T 1
@@ -85,6 +75,7 @@
#define ACE_HAS_TEMPLATE_SPECIALIZATION 1
#define ACE_HAS_TEMPLATE_TYPEDEFS 1
#define ACE_HAS_TERMIOS 1
+#define ACE_HAS_THREADS 1
#define ACE_HAS_THREAD_SPECIFIC_STORAGE 1
#define ACE_HAS_TIMEZONE 1
#define ACE_HAS_TIMEZONE_GETTIMEOFDAY 1
@@ -125,6 +116,7 @@
#define ACE_LACKS_WCSDUP 1
#define ACE_LACKS_WCSICMP 1
#define ACE_LACKS_WCSNICMP 1
+#define ACE_MT_SAFE 1
#define ACE_NEW_THROWS_EXCEPTIONS 1
#define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR 1
#define ACE_TEMPLATES_REQUIRE_SOURCE 1
diff --git a/ACE/ace/config-openbsd.h b/ACE/ace/config-openbsd.h
index ff7ca61e423..ff5de9d77dd 100644
--- a/ACE/ace/config-openbsd.h
+++ b/ACE/ace/config-openbsd.h
@@ -229,6 +229,8 @@
// bogus compiler syntax error.
#define ACE_LACKS_CLEARERR
+#define ACE_HAS_SNPRINTF
+
// OpenBSD 3.2 lacks sched_setscheduler (see /usr/src/lib/libc_r/TODO)
#define ACE_LACKS_SETSCHED
diff --git a/ACE/ace/config-openvms.h b/ACE/ace/config-openvms.h
index 24eaceceb3c..39b488e49bf 100644
--- a/ACE/ace/config-openvms.h
+++ b/ACE/ace/config-openvms.h
@@ -84,6 +84,7 @@
#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS 1
#define ACE_LACKS_RAND_REENTRANT_FUNCTIONS 1
+#define ACE_HAS_SNPRINTF 1
#define ACE_HAS_P_READ_WRITE
#define ACE_HAS_CHARPTR_DL 1
#define ACE_HAS_CLOCK_GETTIME 1
diff --git a/ACE/ace/config-pharlap.h b/ACE/ace/config-pharlap.h
index 739a424ce19..fa274e22383 100644
--- a/ACE/ace/config-pharlap.h
+++ b/ACE/ace/config-pharlap.h
@@ -21,7 +21,8 @@
#endif
// Fortunately, PharLap ETS offers much of the Win32 API. But it's still on
-// Winsock 1.1
+// WinNT 3.5, Winsock 1.1
+#define ACE_HAS_WINNT4 0
#define ACE_HAS_WINSOCK2 0
// The TSS implementation doesn't pass muster on the TSS_Test, but it works
@@ -33,8 +34,6 @@
#define ACE_LACKS_MSYNC
#define ACE_LACKS_TCP_NODELAY
#define ACE_LACKS_MSG_WFMO
-#define ACE_LACKS_WIN32_MOVEFILEEX
-#define ACE_LACKS_WIN32_SECURITY_DESCRIPTORS
// There's no host table, by default. So using "localhost" won't work.
// If your system does have the ability to use "localhost" and you want to,
@@ -48,9 +47,8 @@
#define ACE_PAGE_SIZE 4096
#if defined (ACE_HAS_PHARLAP_RT)
-# define ACE_HAS_IP_MULTICAST
// ETS winsock doesn't define IP level socket options
-//# define IP_TOS 8
+# define IP_TOS 8
#endif /* ACE_HAS_PHARLAP_RT */
// Let the config-win32.h file do its thing
diff --git a/ACE/ace/config-posix-nonetworking.h b/ACE/ace/config-posix-nonetworking.h
deleted file mode 100644
index d87b20c340b..00000000000
--- a/ACE/ace/config-posix-nonetworking.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- C -*- */
-// $Id$
-
-/* The following configuration file is designed to work for RTEMS
- platforms using GNU C.
-*/
-
-#ifndef ACE_CONFIG_POSIX_NONETWORKING_H
-#define ACE_CONFIG_POSIX_NONETWORKING_H
-
-// Missing header files
-# define ACE_LACKS_SYS_UIO_H
-# define ACE_LACKS_SYS_SOCKET_H
-# define ACE_LACKS_NETINET_IN_H
-# define ACE_LACKS_NETDB_H
-# define ACE_LACKS_ARPA_INET_H
-# define ACE_LACKS_SYS_SELECT_H
-# define ACE_LACKS_NET_IF_H
-# define ACE_LACKS_SYSLOG_H
-# define ACE_LACKS_SYS_UN_H
-# define ACE_LACKS_MEMORY_H
-# define ACE_LACKS_SYS_SYSCTL_H
-# define ACE_LACKS_NETINET_TCP_H
-
-// Missing types
-# define ACE_LACKS_IOVEC
-# define ACE_LACKS_IN_ADDR
-# define ACE_LACKS_SOCKADDR_IN
-# define ACE_LACKS_SOCKADDR_UN
-# define ACE_LACKS_HOSTENT
-# define ACE_LACKS_SOCKADDR
-# define ACE_LACKS_IP_MREQ
-# define ACE_LACKS_PROTOENT
-# define ACE_LACKS_SERVENT
-# define ACE_LACKS_IFREQ
-# define ACE_LACKS_IFCONF
-# define ACE_LACKS_LINGER
-
-// Missing methods
-# define ACE_LACKS_GETHOSTBYADDR
-# define ACE_LACKS_GETHOSTBYNAME
-# define ACE_LACKS_GETIPNODEBYADDR
-# define ACE_LACKS_LISTEN
-# define ACE_LACKS_BIND
-# define ACE_LACKS_NTOHL
-# define ACE_LACKS_HTONL
-# define ACE_LACKS_HTONS
-# define ACE_LACKS_NTOHS
-# define ACE_LACKS_SELECT
-# define ACE_LACKS_SOCKET
-# define ACE_LACKS_SHUTDOWN
-# define ACE_LACKS_SETSOCKOPT
-# define ACE_LACKS_INET_ATON
-# define ACE_LACKS_INET_ADDR
-# define ACE_LACKS_INET_NTOA
-# define ACE_LACKS_GET_BCAST_ADDR
-# define ACE_LACKS_GETHOSTENT
-# define ACE_LACKS_GETSERVBYNAME
-# define ACE_LACKS_ACCEPT
-# define ACE_LACKS_CONNECT
-# define ACE_LACKS_GETPEERNAME
-# define ACE_LACKS_GETSOCKNAME
-# define ACE_LACKS_GETSOCKOPT
-# define ACE_LACKS_RECV
-# define ACE_LACKS_SEND
-# define ACE_LACKS_SENDTO
-# define ACE_LACKS_RECVFROM
-# define ACE_LACKS_RECVMSG
-# define ACE_LACKS_SENDMSG
-# define ACE_LACKS_GETHOSTBYADDR_R
-# define ACE_LACKS_GETPROTOBYNAME
-# define ACE_LACKS_GETPROTOBYNUMBER
-# define ACE_LACKS_GETSERVBYNAME
-# define ACE_LACKS_READV
-# define ACE_LACKS_WRITEV
-# define ACE_LACKS_SOCKETPAIR
-# undef ACE_HAS_MSG
-
-// Missing OS features
-# define ACE_LACKS_UNIX_SYSLOG
-# define ACE_LACKS_TCP_NODELAY
-
-// Missing ACE features
-# define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 1
-
-#endif /* ACE_CONFIG_POSIX_NONETWORKING_H */
diff --git a/ACE/ace/config-posix.h b/ACE/ace/config-posix.h
index dc1f0091ab5..42656c9989e 100644
--- a/ACE/ace/config-posix.h
+++ b/ACE/ace/config-posix.h
@@ -49,18 +49,17 @@
# undef ACE_HAS_THREADS
# else
# if defined(_POSIX_THREADS) && (_POSIX_THREADS-0 != -1 )
-# if !defined(ACE_HAS_THREADS)
-# define ACE_HAS_THREADS
-# endif /* ACE_HAS_THREADS */
+# if !defined(ACE_HAS_THREADS)
+# define ACE_HAS_THREADS
+# endif /* ACE_HAS_THREADS */
-# if !defined(ACE_HAS_PTHREADS)
-# define ACE_HAS_PTHREADS
-# endif /* ACE_HAS_PTHREADS */
-
-# if !defined(ACE_HAS_PTHREADS_STD)
-# define ACE_HAS_PTHREADS_STD
-# endif /* ACE_HAS_PTHREADS_STD */
+# if !defined(ACE_HAS_PTHREADS)
+# define ACE_HAS_PTHREADS
+# endif /* ACE_HAS_PTHREADS */
+# if !defined(ACE_HAS_PTHREADS_STD)
+# define ACE_HAS_PTHREADS_STD
+# endif /* ACE_HAS_PTHREADS_STD */
# endif /* _POSIX_THREADS */
# endif /* ACE_HAS_THREADS */
#endif /* !ACE_MT_SAFE */
@@ -71,4 +70,8 @@
# endif /* ACE_HAS_POSIX_MESSAGE_PASSING */
#endif /* _POSIX_MESSAGE_PASSING */
+#if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)
+# define ACE_HAS_SNPRINTF
+#endif /* _XOPEN_SOURCE */
+
#endif /* ACE_CONFIG_POSIX_H */
diff --git a/ACE/ace/config-qnx-neutrino.h b/ACE/ace/config-qnx-neutrino.h
index d8fedf532fe..32549c1aa87 100644
--- a/ACE/ace/config-qnx-neutrino.h
+++ b/ACE/ace/config-qnx-neutrino.h
@@ -15,6 +15,13 @@
#define _POSIX_NAME_MAX 14 /* Max bytes in a filename */
#define _POSIX_PATH_MAX 256 /* Num. bytes in pathname (excl. NULL) */
+// gcc can do inline
+#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+# if !defined (__ACE_INLINE__)
+# define __ACE_INLINE__
+# endif /* ! __ACE_INLINE__ */
+#endif
+
#if defined(__OPTIMIZE__)
# if defined(__X86__)
// string.h can't be used by ACE with __OPTIMIZE__.
@@ -64,7 +71,6 @@
#define ACE_HAS_MT_SAFE_MKTIME
#define ACE_HAS_MUTEX_TIMEOUTS
#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_NONCONST_SWAB
#define ACE_HAS_POSIX_SEM
#define ACE_HAS_POSIX_TIME
#define ACE_HAS_PTHREADS
@@ -78,6 +84,7 @@
#define ACE_HAS_SIG_ATOMIC_T
#define ACE_HAS_SIG_MACROS
#define ACE_HAS_SOCKADDR_IN_SIN_LEN
+#define ACE_HAS_SIZET_SOCKET_LEN
#define ACE_HAS_SSIZE_T
#define ACE_HAS_STRERROR
#define ACE_HAS_STRINGS
@@ -92,9 +99,9 @@
#define ACE_HAS_UCONTEXT_T
#define ACE_HAS_VOIDPTR_MMAP
#define ACE_HAS_VOIDPTR_SOCKOPT
+#define ACE_LACKS_CMSG_DATA_MEMBER
#define ACE_LACKS_CONDATTR_PSHARED
#define ACE_LACKS_CONST_TIMESPEC_PTR
-#define ACE_LACKS_CUSERID
#define ACE_LACKS_FORK
#define ACE_LACKS_LINEBUFFERED_STREAMBUF
#define ACE_LACKS_MADVISE
@@ -102,19 +109,17 @@
#define ACE_LACKS_NAMED_POSIX_SEM
#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_POLL_H
#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
+#define ACE_LACKS_RTTI
#define ACE_LACKS_RWLOCK_T
#define ACE_LACKS_SBRK
#define ACE_LACKS_SEEKDIR
#define ACE_LACKS_SOCKET_BUFSIZ
#define ACE_LACKS_SOCKETPAIR
-#define ACE_LACKS_STROPTS_H
#define ACE_LACKS_STREAM_MODULES
#define ACE_LACKS_STRRECVFD
#define ACE_LACKS_SYSCALL
#define ACE_LACKS_SYS_MSG_H
-#define ACE_LACKS_SYS_SHM_H
#define ACE_LACKS_SYSV_SHMEM
#define ACE_LACKS_TCP_NODELAY
#define ACE_LACKS_TELLDIR
diff --git a/ACE/ace/config-qnx-rtp-62x.h b/ACE/ace/config-qnx-rtp-62x.h
index a8f5b35ec92..a54bc100225 100644
--- a/ACE/ace/config-qnx-rtp-62x.h
+++ b/ACE/ace/config-qnx-rtp-62x.h
@@ -52,6 +52,7 @@
#define ACE_HAS_SIG_ATOMIC_T
#define ACE_HAS_SIG_MACROS
#define ACE_HAS_SOCKADDR_IN_SIN_LEN
+#define ACE_HAS_SNPRINTF
#define ACE_HAS_SOCKLEN_T
#define ACE_HAS_SSIZE_T
#define ACE_HAS_STRERROR
@@ -74,6 +75,7 @@
//
// ACE_LACKS Section
/////////////////////////////////////////////////////////////////
+#define ACE_LACKS_CMSG_DATA_MEMBER
#define ACE_LACKS_CONST_TIMESPEC_PTR
#define ACE_LACKS_LINEBUFFERED_STREAMBUF
#define ACE_LACKS_MADVISE
diff --git a/ACE/ace/config-qnx-rtp-pre62x.h b/ACE/ace/config-qnx-rtp-pre62x.h
index c1ba745d664..46734ef8670 100644
--- a/ACE/ace/config-qnx-rtp-pre62x.h
+++ b/ACE/ace/config-qnx-rtp-pre62x.h
@@ -73,6 +73,7 @@
//
// ACE_LACKS Section
/////////////////////////////////////////////////////////////////
+#define ACE_LACKS_CMSG_DATA_MEMBER
#define ACE_LACKS_CONDATTR_PSHARED
#define ACE_LACKS_CONST_TIMESPEC_PTR
#define ACE_LACKS_LINEBUFFERED_STREAMBUF
diff --git a/ACE/ace/config-rtems.h b/ACE/ace/config-rtems.h
index e2bf828b966..9379c2ffc19 100644
--- a/ACE/ace/config-rtems.h
+++ b/ACE/ace/config-rtems.h
@@ -33,12 +33,14 @@
# endif /* __cplusplus */
#endif /* ! __GNUG__ && ! __KCC */
-#include "ace/config-posix.h"
-
// Completely common part :-)
#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
+#if !defined (ACE_MAIN)
+# define ACE_MAIN ace_main
+#endif /* ! ACE_MAIN */
+
#define ACE_LACKS_REGEX_H
#define ACE_LACKS_STROPTS_H
#define ACE_LACKS_DLFCN_H
@@ -54,11 +56,13 @@
#define ACE_HAS_NONCONST_SELECT_TIMEVAL
#define ACE_LACKS_STRCASECMP
#define ACE_LACKS_MKSTEMP
+#define ACE_LACKS_PUTENV
#define ACE_LACKS_STRDUP
#define ACE_LACKS_STRTOK_R
#define ACE_LACKS_RAND_REENTRANT_FUNCTIONS
#define ACE_LACKS_REALPATH
#define ACE_LACKS_TEMPNAM
+#define ACE_LACKS_INTPTR_T
// Temporarily, enabling this results in compile errors with
// rtems 4.6.6.
@@ -71,15 +75,12 @@
// ... and the final standard even!
#define ACE_HAS_PTHREADS_STD
#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_PTHREAD_SCHEDPARAM
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
// XXX thread defines go here
#define ACE_MT_SAFE 1
#define ACE_PAGE_SIZE 4096
#define ACE_HAS_ALT_CUSERID
#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#define ACE_HAS_3_PARAM_READDIR_R
#define ACE_HAS_CLOCK_GETTIME
#define ACE_HAS_CLOCK_SETTIME
#define ACE_HAS_DIRENT
@@ -87,7 +88,6 @@
#define ACE_HAS_MEMCHR
#define ACE_HAS_MSG
#define ACE_HAS_MT_SAFE_MKTIME
-#define ACE_HAS_NONCONST_READV
#define ACE_HAS_POSIX_SEM
#define ACE_HAS_POSIX_TIME
#define ACE_HAS_REENTRANT_FUNCTIONS
@@ -106,6 +106,7 @@
#define ACE_LACKS_GETPGID
#define ACE_LACKS_TIMESPEC_T
#define ACE_LACKS_MADVISE
+#define ACE_LACKS_MKFIFO
#define ACE_LACKS_MMAP
#define ACE_LACKS_MPROTECT
#define ACE_LACKS_MSYNC
@@ -113,6 +114,7 @@
#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
#define ACE_LACKS_READDIR_R
#define ACE_LACKS_READLINK
+#define ACE_HAS_NONCONST_READV
#define ACE_LACKS_READV
#define ACE_LACKS_RLIMIT
#define ACE_LACKS_RLIMIT_PROTOTYPE
@@ -123,7 +125,6 @@
#define ACE_LACKS_SETREUID_PROTOTYPE
#define ACE_LACKS_SETREGID
#define ACE_LACKS_SETREGID_PROTOTYPE
-#define ACE_LACKS_SIGVAL_T
#define ACE_LACKS_STRPTIME
#define ACE_LACKS_STRRECVFD
#define ACE_LACKS_SI_ADDR
@@ -137,26 +138,76 @@
#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536
#define ACE_NEEDS_SCHED_H
#define ACE_HAS_POSIX_NONBLOCK
+#define ACE_LACKS_FDOPEN
#define ACE_HAS_TERMIOS
-// rtems 4.7 or higher
-#if (__RTEMS_MAJOR__ > 4) || (__RTEMS_MAJOR__ == 4 && __RTEMS_MINOR__ > 6)
-# define ACE_HAS_UALARM
-#else
-# define ACE_LACKS_INTPTR_T
-# undef ACE_HAS_SHM_OPEN
-# undef ACE_HAS_AIO_CALLS
-#endif
-
-// __RTEMS_REVISION__ could also be used but this is broken according
-// to the rtems people
+#if defined (ACE_LACKS_NETWORKING)
-#if !defined (_POSIX_REALTIME_SIGNALS)
-# define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#endif
+// Missing header files
+# define ACE_LACKS_SYS_UIO_H
+# define ACE_LACKS_SYS_SOCKET_H
+# define ACE_LACKS_NETINET_IN_H
+# define ACE_LACKS_NETDB_H
+# define ACE_LACKS_ARPA_INET_H
+# define ACE_LACKS_SYS_SELECT_H
+# define ACE_LACKS_NET_IF_H
+# define ACE_LACKS_SYSLOG_H
+# define ACE_LACKS_SYS_UN_H
+# define ACE_LACKS_MEMORY_H
+# define ACE_LACKS_SYS_SYSCTL_H
+# define ACE_LACKS_NETINET_TCP_H
+
+// Missing types
+# define ACE_LACKS_IOVEC
+# define ACE_LACKS_IN_ADDR
+# define ACE_LACKS_SOCKADDR_IN
+# define ACE_LACKS_HOSTENT
+# define ACE_LACKS_SOCKADDR
+# define ACE_LACKS_IP_MREQ
+# define ACE_LACKS_PROTOENT
+# define ACE_LACKS_SERVENT
+# define ACE_LACKS_IFREQ
+
+// Missing methods
+# define ACE_LACKS_GETHOSTBYADDR
+# define ACE_LACKS_GETHOSTBYNAME
+# define ACE_LACKS_GETIPNODEBYADDR
+# define ACE_LACKS_LISTEN
+# define ACE_LACKS_BIND
+# define ACE_LACKS_NTOHL
+# define ACE_LACKS_HTONL
+# define ACE_LACKS_HTONS
+# define ACE_LACKS_NTOHS
+# define ACE_LACKS_SELECT
+# define ACE_LACKS_SOCKET
+# define ACE_LACKS_SHUTDOWN
+# define ACE_LACKS_SETSOCKOPT
+# define ACE_LACKS_INET_ATON
+# define ACE_LACKS_INET_ADDR
+# define ACE_LACKS_INET_NTOA
+# define ACE_LACKS_GET_BCAST_ADDR
+# define ACE_LACKS_GETSERVBYNAME
+# define ACE_LACKS_ACCEPT
+# define ACE_LACKS_CONNECT
+# define ACE_LACKS_GETPEERNAME
+# define ACE_LACKS_GETSOCKNAME
+# define ACE_LACKS_GETSOCKOPT
+# define ACE_LACKS_RECV
+# define ACE_LACKS_SEND
+# define ACE_LACKS_SENDTO
+# define ACE_LACKS_RECVFROM
+# define ACE_LACKS_RECVMSG
+# define ACE_LACKS_SENDMSG
+# define ACE_LACKS_GETHOSTBYADDR_R
+# define ACE_LACKS_GETPROTOBYNAME
+# define ACE_LACKS_GETPROTOBYNUMBER
+# define ACE_LACKS_GETSERVBYNAME
+# undef ACE_HAS_MSG
+
+// Missing OS features
+# define ACE_LACKS_UNIX_SYSLOG
+# define ACE_LACKS_TCP_NODELAY
-#if defined (ACE_LACKS_NETWORKING)
-# include "ace/config-posix-nonetworking.h"
#endif
#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-sco-4.2-nothread.h b/ACE/ace/config-sco-4.2-nothread.h
new file mode 100644
index 00000000000..67ff29a6333
--- /dev/null
+++ b/ACE/ace/config-sco-4.2-nothread.h
@@ -0,0 +1,110 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for SCO UNIX
+// version 4.2 without threads.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#if defined (__GNUG__)
+# include "ace/config-g++-common.h"
+ // This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
+ // Maybe it will work?
+# undef ACE_HAS_TEMPLATE_SPECIALIZATION
+#endif /* __GNUG__ */
+
+// Compiling for SCO.
+#if !defined (SCO)
+#define SCO
+#endif /* SCO */
+
+#if ! defined (__ACE_INLINE__)
+#define __ACE_INLINE__
+#endif /* ! __ACE_INLINE__ */
+
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+#define ACE_DEFAULT_CLOSE_ALL_HANDLES 0
+
+#if defined (SCO) && !defined (MAXPATHLEN)
+#define MAXPATHLEN 1023
+#endif /* SCO */
+
+#define ACE_HAS_SIG_MACROS
+#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
+#define ACE_LACKS_SYSCALL
+#define ACE_LACKS_STRRECVFD
+#define ACE_LACKS_MMAP
+#define ACE_LACKS_SOCKETPAIR
+#define ACE_HAS_SEMUN
+#define ACE_LACKS_MSYNC
+#define ACE_LACKS_MADVISE
+#define ACE_LACKS_WRITEV
+#define ACE_LACKS_READV
+#define ACE_NEEDS_FTRUNCATE
+#define ACE_LACKS_RLIMIT
+#define ACE_LACKS_RECVMSG
+#define ACE_LACKS_SENDMSG
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Platform supports recvmsg and sendmsg.
+//#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+//#define ACE_HAS_SYS_SYSCALL_H
+
+// Fixes a problem with HP/UX not wrapping the mmap(2) header files
+// with extern "C".
+//#define ACE_HAS_BROKEN_MMAP_H
+
+// Prototypes for both signal() and struct sigaction are consistent.
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Header files lack t_errno for ACE_TLI.
+//#define ACE_LACKS_T_ERRNO
+
+// Compiler/platform supports poll().
+#define ACE_HAS_POLL
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Compiler/platform defines the sig_atomic_t typedef
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Compiler supports the ssize_t typedef.
+//#define ACE_HAS_SSIZE_T
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Platform/compiler supports void * as second parameter to gettimeofday().
+#define ACE_HAS_VOIDPTR_GETTIMEOFDAY
+
+// Note, this only works if the flag is set above!
+//#define ACE_HAS_GETRUSAGE
+
+// Platform uses int for select() rather than fd_set.
+#define ACE_SELECT_USES_INT
+
+// Platform has prototypes for ACE_TLI.
+//#define ACE_HAS_TLI_PROTOTYPES
+// Platform has the XLI version of ACE_TLI.
+// #define ACE_HAS_XLI
+
+#define ACE_HAS_GNU_CSTRING_H
+
+#define ACE_HAS_DIRENT
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-sco-5.0.0-fsu-pthread.h b/ACE/ace/config-sco-5.0.0-fsu-pthread.h
new file mode 100644
index 00000000000..6d94c55d3a8
--- /dev/null
+++ b/ACE/ace/config-sco-5.0.0-fsu-pthread.h
@@ -0,0 +1,15 @@
+/* -*- C++ -*- */
+// $Id$
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#include "ace/config-g++-common.h"
+#include "ace/config-sco-5.0.0.h"
+#include "ace/config-fsu-pthread.h"
+
+#define ACE_HAS_GNU_CSTRING_H
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-sco-5.0.0-mit-pthread.h b/ACE/ace/config-sco-5.0.0-mit-pthread.h
new file mode 100644
index 00000000000..bfc938a9213
--- /dev/null
+++ b/ACE/ace/config-sco-5.0.0-mit-pthread.h
@@ -0,0 +1,164 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for SCO UNIX
+// version 5.0 with MIT pthreads.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#if !defined (__ACE_INLINE__)
+#define __ACE_INLINE__
+#endif /* ! __ACE_INLINE__ */
+
+#if defined (__GNUG__)
+# include "ace/config-g++-common.h"
+ // This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
+ // Maybe it will work?
+# undef ACE_HAS_TEMPLATE_SPECIALIZATION
+#endif /* __GNUG__ */
+
+// Compiling for SCO.
+#if !defined (SCO)
+#define SCO
+#define _SVID3
+#endif /* SCO */
+
+#define ACE_DEFAULT_CLOSE_ALL_HANDLES 0
+#define ACE_HAS_SIG_MACROS
+// Optimize ACE_Handle_Set for select().
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+#if defined (SCO) && !defined (MAXPATHLEN)
+#define MAXPATHLEN 1023
+#endif /* SCO */
+
+#define ACE_LACKS_PWD_FUNCTIONS
+#define ACE_HAS_BIG_FD_SET
+
+//#define ACE_LACKS_SYSCALL
+//#define ACE_LACKS_STRRECVFD
+//#define ACE_NEEDS_FTRUNCATE
+#define ACE_LACKS_RLIMIT
+#define ACE_LACKS_MADVISE
+
+#define ACE_HAS_REENTRANT_FUNCTIONS
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+#define ACE_HAS_NONCONST_MSGSND
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+// Platform has POSIX terminal interface.
+#define ACE_HAS_TERMIOS
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+//#define ACE_HAS_SYS_SYSCALL_H
+
+// Fixes a problem with HP/UX not wrapping the mmap(2) header files
+// with extern "C".
+//#define ACE_HAS_BROKEN_MMAP_H
+
+// Prototypes for both signal() and struct sigaction are consistent.
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Header files lack t_errno for ACE_TLI.
+//#define ACE_LACKS_T_ERRNO
+
+// Compiler/platform supports poll().
+// #define ACE_HAS_POLL
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Compiler/platform defines the sig_atomic_t typedef
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Compiler supports the ssize_t typedef.
+//#define ACE_HAS_SSIZE_T
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// ???
+// #define ACE_HAS_VOIDPTR_GETTIMEOFDAY
+#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
+
+// Note, this only works if the flag is set above!
+//#define ACE_HAS_GETRUSAGE
+
+// Platform uses int for select() rather than fd_set.
+#define ACE_HAS_SELECT_H
+
+// Platform has prototypes for ACE_TLI.
+#define ACE_HAS_TLI
+//#define ACE_HAS_SVR4_TLI
+#define ACE_HAS_TLI_PROTOTYPES
+#define ACE_HAS_TIMOD_H
+#define ACE_HAS_TIUSER_H
+#define ACE_LACKS_T_ERRNO
+
+// Platform has the XLI version of ACE_TLI.
+// #define ACE_HAS_XLI
+
+#define ACE_HAS_GNU_CSTRING_H
+
+#define ACE_HAS_SIGINFO_T
+#define ACE_HAS_UCONTEXT_T
+
+#define ACE_HAS_INLINED_OSCALLS
+
+#define ACE_HAS_STRBUF_T
+#define ACE_HAS_STREAMS
+//#define ACE_HAS_STREAM_PIPES
+#define ACE_HAS_IP_MULTICAST
+
+// Threads
+#define ACE_HAS_THREADS
+#if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 1
+#endif
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+#define ACE_HAS_PTHREADS
+#define ACE_HAS_PTHREADS_STD
+#define ACE_LACKS_PTHREAD_CANCEL
+#define ACE_HAS_SIGWAIT
+#define ACE_LACKS_THREAD_PROCESS_SCOPING
+//#define ACE_LACKS_THREAD_STACK_ADDR
+// If ACE doesn't compile due to the lack of these methods, please
+// send email to schmidt@cs.wustl.edu reporting this.
+// #define ACE_LACKS_CONDATTR_PSHARED
+// #define ACE_LACKS_MUTEXATTR_PSHARED
+#define ACE_LACKS_RWLOCK_T
+#define ACE_LACKS_SETSCHED
+#define ACE_HAS_POSIX_TIME
+
+#include <pthread.h>
+#include <sys/regset.h>
+
+#define ACE_LACKS_TIMEDWAIT_PROTOTYPES
+#define ACE_HAS_RECV_TIMEDWAIT
+#define ACE_HAS_RECVFROM_TIMEDWAIT
+#define ACE_HAS_RECVMSG_TIMEDWAIT
+#define ACE_HAS_SEND_TIMEDWAIT
+#define ACE_HAS_SENDTO_TIMEDWAIT
+#define ACE_HAS_SENDMSG_TIMEDWAIT
+#define ACE_HAS_READ_TIMEDWAIT
+#define ACE_HAS_READV_TIMEDWAIT
+#define ACE_HAS_WRITE_TIMEDWAIT
+#define ACE_HAS_WRITEV_TIMEDWAIT
+#define ACE_HAS_DIRENT
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-sunos5.4-centerline-2.x.h b/ACE/ace/config-sunos5.4-centerline-2.x.h
new file mode 100644
index 00000000000..2aa9e407c43
--- /dev/null
+++ b/ACE/ace/config-sunos5.4-centerline-2.x.h
@@ -0,0 +1,157 @@
+/* -*- C++ -*- */
+// $Id$
+
+// The following configuration file is designed to work for SunOS 5.4
+// platforms using the Centerline 2.x C++ compiler.
+
+#ifndef ACE_CONFIG_H
+#define ACE_CONFIG_H
+#include /**/ "ace/pre.h"
+
+#define ACE_HAS_TEMPLATE_SPECIALIZATION
+
+// Platform supports pread() and pwrite()
+#define ACE_HAS_P_READ_WRITE
+
+#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
+
+#define ACE_HAS_XPG4_MULTIBYTE_CHAR
+
+// Platform supports System V IPC (most versions of UNIX, but not Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Sun has the wrong prototype for sendmsg.
+#define ACE_HAS_NONCONST_SENDMSG
+
+// The SunOS 5.x version of rand_r is inconsistent with the header files...
+#define ACE_HAS_BROKEN_RANDR
+
+// Platform supports system configuration information.
+#define ACE_HAS_SYSINFO
+
+// Platform supports the POSIX regular expression library
+#define ACE_HAS_REGEX
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+#define ACE_HAS_SYS_SYSCALL_H
+
+// Platform has POSIX terminal interface.
+#define ACE_HAS_TERMIOS
+
+// Compiler/platform correctly calls init()/fini() for shared libraries.
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// Compiler/platform has correctly prototyped header files.
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Compiler/platform supports SunOS high resolution timers.
+#define ACE_HAS_HI_RES_TIMER
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Platform supports the /proc file system.
+#define ACE_HAS_PROC_FS
+
+// Platform supports the prusage_t struct.
+#define ACE_HAS_PRUSAGE_T
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Platform supports SVR4 extended signals.
+#define ACE_HAS_SIGINFO_T
+#define ACE_HAS_UCONTEXT_T
+
+// Compiler/platform provides the sockio.h file.
+#define ACE_HAS_SYS_SOCKIO_H
+
+// Compiler supports the ssize_t typedef.
+#define ACE_HAS_SSIZE_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform supports STREAM pipes.
+#define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports strerror ().
+#define ACE_HAS_STRERROR
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_SVR4_SIGNAL_T
+
+// Platform lacks pthread_sigaction
+#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
+
+// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
+#define ACE_HAS_SVR4_TLI
+
+// Platform provides <sys/filio.h> header.
+#define ACE_HAS_SYS_FILIO_H
+
+// Compiler/platform supports sys_siglist array.
+#define ACE_HAS_SYS_SIGLIST
+
+/* Turn off the following defines if you want to disable threading. */
+// Compile using multi-thread libraries.
+#if !defined (ACE_MT_SAFE)
+# define ACE_MT_SAFE 1
+#endif
+
+// Platform supports threads.
+#define ACE_HAS_THREADS
+
+// Platform supports Solaris threads.
+#define ACE_HAS_STHREADS
+
+// Compiler/platform has thread-specific storage
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
+// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
+#define ACE_HAS_REENTRANT_FUNCTIONS
+
+/* end threading defines */
+
+#define ACE_HAS_PRIOCNTL
+#define ACE_NEEDS_LWP_PRIO_SET
+
+// Platform supports ACE_TLI timod STREAMS module.
+#define ACE_HAS_TIMOD_H
+
+// Platform supports ACE_TLI tiuser header.
+#define ACE_HAS_TIUSER_H
+
+// Platform provides ACE_TLI function prototypes.
+#define ACE_HAS_TLI_PROTOTYPES
+
+// Platform supports ACE_TLI.
+#define ACE_HAS_TLI
+
+#define ACE_NEEDS_DEV_IO_CONVERSION
+
+// Defines the page size of the system.
+#define ACE_PAGE_SIZE 4096
+#define ACE_HAS_IDTYPE_T
+#define ACE_HAS_DIRENT
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-sunos5.4-g++.h b/ACE/ace/config-sunos5.4-g++.h
index cb431bf7520..8530ebdecde 100644
--- a/ACE/ace/config-sunos5.4-g++.h
+++ b/ACE/ace/config-sunos5.4-g++.h
@@ -15,7 +15,6 @@
// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
// this must appear before its #include.
#define ACE_HAS_STRING_CLASS
-#define ACE_LACKS_SIGVAL_T
#include "ace/config-g++-common.h"
#define ACE_HAS_GNU_CSTRING_H
@@ -28,7 +27,7 @@
#define ACE_HAS_XPG4_MULTIBYTE_CHAR
// Platform has POSIX terminal interface.
-#define ACE_HAS_TERMIOS
+#define ACE_HAS_TERMIOS
// Platform supports System V IPC (most versions of UNIX, but not Win32)
#define ACE_HAS_SYSV_IPC
diff --git a/ACE/ace/config-sunos5.4-sunc++-4.x.h b/ACE/ace/config-sunos5.4-sunc++-4.x.h
index bb8e4a17a76..882307aab64 100644
--- a/ACE/ace/config-sunos5.4-sunc++-4.x.h
+++ b/ACE/ace/config-sunos5.4-sunc++-4.x.h
@@ -12,7 +12,6 @@
# define __ACE_INLINE__
#endif /* ! __ACE_INLINE__ */
-#define ACE_LACKS_SIGVAL_T
#define ACE_HAS_TEMPLATE_SPECIALIZATION
// Optimize ACE_Handle_Set for select().
diff --git a/ACE/ace/config-sunos5.5.h b/ACE/ace/config-sunos5.5.h
index 5fe33487e16..3323074f951 100644
--- a/ACE/ace/config-sunos5.5.h
+++ b/ACE/ace/config-sunos5.5.h
@@ -384,9 +384,9 @@
# endif /* __GNUC_MINOR__ */
#endif /* __GNUG__ */
-#if defined (i386) && (_FILE_OFFSET_BITS==32)
+#if defined (i386)
# define ACE_HAS_X86_STAT_MACROS
-#endif /* i386 && _FILE_OFFSET_BITS==32 */
+#endif /* i386 */
#define ACE_MALLOC_ALIGN 8
#define ACE_LACKS_SETREUID_PROTOTYPE
@@ -402,12 +402,5 @@
#undef ACE_HAS_PROC_FS
#undef ACE_HAS_PRUSAGE_T
#endif /* (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64) */
-
-#if defined (_POSIX_PTHREAD_SEMANTICS) || (_FILE_OFFSET_BITS == 64) || (_POSIX_C_SOURCE - 0 >= 199506L)
-# define ACE_HAS_3_PARAM_READDIR_R
-#endif
-
-#define ACE_LACKS_SIGVAL_T
-
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-sunos5.7.h b/ACE/ace/config-sunos5.7.h
index 239fba2d8c9..5e8b21a6469 100644
--- a/ACE/ace/config-sunos5.7.h
+++ b/ACE/ace/config-sunos5.7.h
@@ -69,6 +69,11 @@
// SunOS 5.7 has socklen_t
#define ACE_HAS_SOCKLEN_T
+// snprintf() is available at least from Solaris 7 on. If it can be determined
+// that it's also available in Solaris 2.6, this can be moved into
+// config-sunos5.6.h.
+#define ACE_HAS_SNPRINTF
+
#if defined (__sparcv9)
#define _LP64
#define ACE_SIZEOF_LONG 8 /* Needed to circumvent compiler bug #4294969 */
diff --git a/ACE/ace/config-sunos5.8.h b/ACE/ace/config-sunos5.8.h
index 1d9df968710..fdaa9c3bbe2 100644
--- a/ACE/ace/config-sunos5.8.h
+++ b/ACE/ace/config-sunos5.8.h
@@ -16,7 +16,6 @@
// This may be true for earlier Solaris versions, but I can only verify it
// for Solaris 8 and later.
#define ACE_HAS_VFWPRINTF
-#define ACE_SHM_OPEN_REQUIRES_ONE_SLASH
// This may be true for versions prior to Solaris 8 as well, but I don't
// have any to try it on.
diff --git a/ACE/ace/config-sunos5.9.h b/ACE/ace/config-sunos5.9.h
index 42043928fec..fd2cdd82acb 100644
--- a/ACE/ace/config-sunos5.9.h
+++ b/ACE/ace/config-sunos5.9.h
@@ -13,6 +13,5 @@
#include "ace/config-sunos5.8.h"
#define ACE_HAS_SENDFILE
-#define ACE_LACKS_THR_CONCURRENCY_FUNCS
#endif /* ACE_CONFIG_H */
diff --git a/ACE/ace/config-tandem-nsk-mips-v2.h b/ACE/ace/config-tandem-nsk-mips-v2.h
index 102092a9ea5..cba5b7b8148 100644
--- a/ACE/ace/config-tandem-nsk-mips-v2.h
+++ b/ACE/ace/config-tandem-nsk-mips-v2.h
@@ -109,6 +109,10 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform supports recvmsg and sendmsg
#define ACE_HAS_MSG
+// Platform has ACE_HAS_4_4BSD_SENDMSG_RECVMSG but its cmsghdr
+// structure does not contain an 'unsigned char cmsg_data[0]' member.
+#define ACE_LACKS_CMSG_DATA_MEMBER
+
// Platform defines ACE_HAS_MSG, but lacks msg_accrights{,len}.
#define ACE_LACKS_MSG_ACCRIGHTS
diff --git a/ACE/ace/config-tandem-nsk-mips-v3.h b/ACE/ace/config-tandem-nsk-mips-v3.h
index f975a979561..bd3500e0d5f 100644
--- a/ACE/ace/config-tandem-nsk-mips-v3.h
+++ b/ACE/ace/config-tandem-nsk-mips-v3.h
@@ -110,6 +110,10 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform supports recvmsg and sendmsg
#define ACE_HAS_MSG
+// Platform has ACE_HAS_4_4BSD_SENDMSG_RECVMSG but its cmsghdr
+// structure does not contain an 'unsigned char cmsg_data[0]' member.
+#define ACE_LACKS_CMSG_DATA_MEMBER
+
// Platform defines ACE_HAS_MSG, but lacks msg_accrights{,len}.
#define ACE_LACKS_MSG_ACCRIGHTS
diff --git a/ACE/ace/config-tru64.h b/ACE/ace/config-tru64.h
index d34d7e0f68a..d0e6556bd23 100644
--- a/ACE/ace/config-tru64.h
+++ b/ACE/ace/config-tru64.h
@@ -23,7 +23,8 @@
#define ACE_LACKS_CLEARERR
#endif /* ACE_MT_SAFE == 0 */
-#include "ace/config-posix.h"
+// Include unistd.h to define _POSIX_C_SOURCE.
+#include <unistd.h>
// Configuration-specific #defines:
// 1) g++ or cxx
@@ -168,6 +169,9 @@
#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
#if DIGITAL_UNIX >= 0x500
+# ifndef ACE_HAS_SNPRINTF
+# define ACE_HAS_SNPRINTF
+# endif /* ACE_HAS_SNPRINTF */
# define ACE_HAS_XPG4_MULTIBYTE_CHAR 1
#endif /* DIGITAL_UNIX >= 0x500 */
diff --git a/ACE/ace/config-unixware-7.1.0.udk.h b/ACE/ace/config-unixware-7.1.0.udk.h
index 33f4205fb04..549db4416dd 100644
--- a/ACE/ace/config-unixware-7.1.0.udk.h
+++ b/ACE/ace/config-unixware-7.1.0.udk.h
@@ -199,9 +199,24 @@
/* Platform supports POSIX Threads */
#define ACE_HAS_PTHREADS
+/* Platform supports POSIX Threads .4a Draft 4 */
+/* #undef ACE_HAS_PTHREADS_DRAFT4 */
+
+/* Platform supports POSIX Threads .4a Draft 6 */
+/* #undef ACE_HAS_PTHREADS_DRAFT6 */
+
+/* Platform supports POSIX Threads .1c Draft 7 */
+/* #undef ACE_HAS_PTHREADS_DRAFT7 */
+
/* Platform supports POSIX.1c-1995 threads */
#define ACE_HAS_PTHREADS_STD
+/* Platform has pthread_condattr_setkind_np(). */
+/* #undef ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP */
+
+/* Platform has pthread_mutexattr_setkind_np(). */
+/* #undef ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP */
+
/* pthread.h declares an enum with PTHREAD_PROCESS_PRIVATE and
PTHREAD_PROCESS_SHARED values */
#define ACE_HAS_PTHREAD_PROCESS_ENUM
@@ -394,6 +409,9 @@
/* Platform needs to #include <sched.h> to get thread scheduling defs. */
#define ACE_NEEDS_SCHED_H 1
+/* Turns off the LM_DEBUG and LM_ERROR logging macros... */
+/* #undef ACE_NLOGGING */
+
/* The OS/platform supports the poll() event demultiplexor */
#define ACE_USE_POLL 1
diff --git a/ACE/ace/config-vxworks5.x.h b/ACE/ace/config-vxworks5.x.h
index af1cedc425e..df5faa15189 100644
--- a/ACE/ace/config-vxworks5.x.h
+++ b/ACE/ace/config-vxworks5.x.h
@@ -194,7 +194,6 @@
#define ACE_LACKS_UTSNAME_T
#define ACE_LACKS_UNAME
#define ACE_LACKS_STRPTIME
-#define ACE_LACKS_VSNPRINTF
#define ACE_LACKS_WAIT
#define ACE_LACKS_WAITPID
#define ACE_LACKS_DUP2
@@ -246,7 +245,6 @@
#define ACE_LACKS_TERMIOS_H
#define ACE_LACKS_POLL_H
#define ACE_LACKS_WCTYPE_H
-#define ACE_LACKS_SIGVAL_T
// Not sure if these should always be defined.
#define ACE_LACKS_SYS_UN_H
diff --git a/ACE/ace/config-vxworks6.2.h b/ACE/ace/config-vxworks6.2.h
index 36069489479..fa680b8c6e4 100644
--- a/ACE/ace/config-vxworks6.2.h
+++ b/ACE/ace/config-vxworks6.2.h
@@ -109,6 +109,7 @@
#define ACE_HAS_SIGINFO_T
#define ACE_HAS_SIGWAIT
#define ACE_HAS_SIG_ATOMIC_T
+#define ACE_HAS_SNPRINTF
#define ACE_HAS_STRERROR
#define ACE_HAS_THREADS
#define ACE_HAS_SYSCTL
@@ -131,7 +132,6 @@
#define ACE_LACKS_MPROTECT
#define ACE_LACKS_MSYNC
#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_SIGVAL_T
#define ACE_LACKS_SYS_PARAM_H
#define ACE_LACKS_PWD_FUNCTIONS
#define ACE_LACKS_READDIR_R
@@ -210,7 +210,6 @@
#define ACE_HAS_SETENV
#define ACE_HAS_3_PARAM_WCSTOK
#define ACE_HAS_WCHAR
- #define ACE_HAS_VFWPRINTF
#define ACE_SIZEOF_WCHAR 2
#else
// We are building for kernel mode
diff --git a/ACE/ace/config-vxworks6.3.h b/ACE/ace/config-vxworks6.3.h
index 25a36d9bc44..0cd0d9fa800 100644
--- a/ACE/ace/config-vxworks6.3.h
+++ b/ACE/ace/config-vxworks6.3.h
@@ -2,7 +2,7 @@
// $Id$
// The following configuration file is designed to work for VxWorks
-// 6.3 platforms using one of these compilers:
+// 6.2 platforms using one of these compilers:
// 1) The GNU g++ compiler that is shipped with VxWorks 6.3
#ifndef ACE_CONFIG_H
@@ -49,6 +49,7 @@
#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
#define ACE_HAS_NONCONST_GETBY
#define ACE_HAS_NONCONST_SWAB
+#define ACE_HAS_NONCONST_READV
#define ACE_LACKS_UNIX_SYSLOG
#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 32768
#define ACE_DEFAULT_THREAD_KEYS 16
@@ -73,6 +74,7 @@
#define ACE_HAS_SIGINFO_T
#define ACE_HAS_SIGWAIT
#define ACE_HAS_SIG_ATOMIC_T
+#define ACE_HAS_SNPRINTF
#define ACE_HAS_STRERROR
#define ACE_HAS_THREADS
#define ACE_HAS_SYSCTL
@@ -103,7 +105,6 @@
#define ACE_LACKS_RWLOCK_T
#define ACE_LACKS_SBRK
#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_SIGVAL_T
#define ACE_LACKS_SEMBUF_T
#define ACE_LACKS_SIGINFO_H
#define ACE_LACKS_SI_ADDR
@@ -123,6 +124,9 @@
#define ACE_THR_PRI_OTHER_DEF ACE_THR_PRI_FIFO_DEF
#define ACE_HAS_SIGTIMEDWAIT
#define ACE_HAS_SIGSUSPEND
+#if !defined (ACE_VXWORKS_SPARE)
+# define ACE_VXWORKS_SPARE spare4
+#endif /* ! ACE_VXWORKS_SPARE */
#define ACE_HAS_GETIFADDRS
#define ACE_LACKS_SETEGID
@@ -169,7 +173,6 @@
#define ACE_HAS_SETENV
#define ACE_HAS_3_PARAM_WCSTOK
#define ACE_HAS_WCHAR
- #define ACE_HAS_VFWPRINTF
#define ACE_SIZEOF_WCHAR 2
#define ACE_HAS_SHM_OPEN
#define ACE_HAS_AIO_CALLS
@@ -180,7 +183,6 @@
#else
// We are building for kernel mode
#define ACE_LACKS_SUSECONDS_T
- #define ACE_LACKS_INTPTR_T
#define ACE_LACKS_INTTYPES_H
#define ACE_LACKS_STDINT_H
#define ACE_LACKS_UNAME
@@ -249,9 +251,6 @@
// Only when building for kernel mode we can use TSS emulation, in rtp mode
// we can't use the WIND_TCB struct anymore
# define ACE_HAS_TSS_EMULATION
-# if !defined (ACE_VXWORKS_SPARE)
-# define ACE_VXWORKS_SPARE spare4
-# endif /* ! ACE_VXWORKS_SPARE */
# endif
// VxWorks has no recursive mutexes. This was set in the past but it doesn't
// work with the pthread support, so only set it for the time being when pthread
@@ -267,10 +266,10 @@
// Needed include to get all VxWorks CPU types
#include "types/vxCpu.h"
-#if defined (CPU) && (CPU == PENTIUM || CPU == PENTIUM2 || CPU == PENTIUM3 || CPU == PENTIUM4)
- // If running an Intel Pentium the
- // ACE_OS::gethrtime () can use the RDTSC instruction.
- # define ACE_HAS_PENTIUM
+#if (CPU == PENTIUM || CPU == PENTIUM2 || CPU == PENTIUM3 || CPU == PENTIUM4)
+// If running an Intel Pentium the
+// ACE_OS::gethrtime () can use the RDTSC instruction.
+# define ACE_HAS_PENTIUM
#endif
// VxWorks defines the CPU define MAP, undef it to prevent problems with
diff --git a/ACE/ace/config-vxworks6.4.h b/ACE/ace/config-vxworks6.4.h
deleted file mode 100644
index fbc957b9b85..00000000000
--- a/ACE/ace/config-vxworks6.4.h
+++ /dev/null
@@ -1,312 +0,0 @@
-//* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for VxWorks
-// 6.4 platforms using one of these compilers:
-// 1) The GNU g++ compiler that is shipped with VxWorks 6.4
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include /**/ "ace/pre.h"
-
-#if ! defined (VXWORKS)
-# define VXWORKS
-#endif /* ! VXWORKS */
-
-#if ! defined (ACE_VXWORKS)
-# define ACE_VXWORKS 0x640
-#endif /* ! ACE_VXWORKS */
-
-#if !defined (__RTP__)
- // Fix for wrong typedef of time_t in kernel mode
- #ifndef _TIME_T
- #define _TIME_T
- typedef long time_t;
- #endif
-#endif
-
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Compiler-specific configuration.
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-
-# define ACE_LACKS_IOSTREAM_FX
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
- // GNU 3.3+ toolchain supports long long types but fails to define this so STL
- // skips some definitions
-# if !defined (_GLIBCPP_USE_LONG_LONG)
-# define _GLIBCPP_USE_LONG_LONG
-# endif
-# endif /* (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) */
-
-#elif defined (__DCC__)
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-#else /* ! __GNUG__ && ! ghs && !__DCC__ */
-# ifdef __cplusplus /* Let it slide for C compilers. */
-# error unsupported compiler on VxWorks
-# endif /* __cplusplus */
-#endif /* ! __GNUG__ && ! ghs */
-
-// OS-specific configuration
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#define ACE_HAS_3_PARAM_READDIR_R
-#define ACE_HAS_NONCONST_GETBY
-#define ACE_HAS_NONCONST_SWAB
-#define ACE_LACKS_UNIX_SYSLOG
-#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 32768
-#define ACE_DEFAULT_THREAD_KEYS 16
-#define ACE_HAS_BROKEN_ACCEPT_ADDR
-#define ACE_HAS_NONCONST_SENDMSG
-#define ACE_HAS_NONCONST_WRITEV
-#define ACE_HAS_CHARPTR_DL
-#define ACE_HAS_CLOCK_GETTIME
-#define ACE_HAS_CLOCK_SETTIME
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_DIRENT
-#define ACE_HAS_DLL 0
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_MSG
-#define ACE_HAS_NONCONST_READV
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_REENTRANT_FUNCTIONS
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_STRERROR
-#define ACE_HAS_THREADS
-#define ACE_HAS_SYSCTL
-#define ACE_LACKS_EXEC
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_FILELOCKS
-#define ACE_LACKS_FORK
-#define ACE_LACKS_GETHOSTENT
-#define ACE_LACKS_GETSERVBYNAME
-#define ACE_LACKS_GETPROTOBYNAME
-#define ACE_LACKS_GETPROTOBYNUMBER
-#define ACE_LACKS_GETIPNODEBYADDR
-#define ACE_LACKS_GETIPNODEBYNAME_IPV6
-#define ACE_LACKS_LSTAT
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_MALLOC_H
-#define ACE_LACKS_MEMORY_H
-#define ACE_LACKS_MKFIFO
-#define ACE_LACKS_MKSTEMP
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_SYS_PARAM_H
-#define ACE_LACKS_PWD_FUNCTIONS
-#define ACE_LACKS_READLINK
-#define ACE_LACKS_REALPATH
-#define ACE_LACKS_PIPE
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SBRK
-#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_SEMBUF_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_LACKS_SIGVAL_T
-#define ACE_LACKS_SI_ADDR
-#define ACE_LACKS_SOCKETPAIR
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_TELLDIR
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_LACKS_TRUNCATE
-#define ACE_LACKS_UCONTEXT_H
-#define ACE_LACKS_USECONDS_T
-#define ACE_LACKS_UMASK
-#define ACE_LACKS_STRPTIME
-#define ACE_LACKS_MKTEMP
-#define ACE_LACKS_TEMPNAM
-#define ACE_PAGE_SIZE 4096
-#define ACE_THR_PRI_FIFO_DEF 101
-#define ACE_THR_PRI_OTHER_DEF ACE_THR_PRI_FIFO_DEF
-#define ACE_HAS_SIGTIMEDWAIT
-#define ACE_HAS_SIGSUSPEND
-#define ACE_HAS_GETIFADDRS
-
-#define ACE_LACKS_SETEGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_SETSID
-#define ACE_LACKS_SETUID
-#define ACE_LACKS_SETEUID
-#define ACE_LACKS_GETEUID
-#define ACE_LACKS_GETUID
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_GETEGID
-#define ACE_LACKS_GETGID
-#define ACE_LACKS_SETGID
-
-#define ACE_LACKS_SYS_UIO_H
-#define ACE_LACKS_SYS_IPC_H
-#define ACE_LACKS_SYS_SEM_H
-#define ACE_LACKS_STROPTS_H
-#define ACE_LACKS_SYS_MSG_H
-#define ACE_LACKS_PWD_H
-#define ACE_LACKS_SYS_SHM_H
-#define ACE_LACKS_TERMIOS_H
-#define ACE_LACKS_POLL_H
-#define ACE_LACKS_FCNTL
-
-// Some string things
-#define ACE_LACKS_STRCASECMP
-#define ACE_LACKS_ITOW
-#define ACE_LACKS_WCSDUP
-#define ACE_LACKS_WCSICMP
-#define ACE_LACKS_WCSNICMP
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-#define ACE_LACKS_SYMLINKS
-
-#if defined __RTP__
- // We are building for RTP mode
- #define ACE_HAS_SVR4_DYNAMIC_LINKING
- #define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
- #define ACE_LACKS_REGEX_H
- #define ACE_HAS_SETENV
- #define ACE_HAS_3_PARAM_WCSTOK
- #define ACE_HAS_WCHAR
- #define ACE_HAS_VFWPRINTF
- #define ACE_SIZEOF_WCHAR 2
- #define ACE_HAS_SHM_OPEN
- #define ACE_HAS_AIO_CALLS
- // VxWorks seems to either not define this or define as zero up till now
- #if !defined (IOV_MAX) || (IOV_MAX == 0)
- #define ACE_IOV_MAX 16
- #endif
-#else
- // We are building for kernel mode
- #define ACE_LACKS_SUSECONDS_T
- #define ACE_LACKS_INTPTR_T
- #define ACE_LACKS_INTTYPES_H
- #define ACE_LACKS_STDINT_H
- #define ACE_LACKS_UNAME
- #define ACE_LACKS_UTSNAME_T
- #define ACE_LACKS_RAND_REENTRANT_FUNCTIONS
- #define ACE_LACKS_DLFCN_H
- #define ACE_LACKS_WAIT
- #define ACE_LACKS_WAITPID
- #define ACE_LACKS_SYS_TIME_H
- #define ACE_LACKS_SYS_SELECT_H
- #define ACE_LACKS_STRINGS_H
- #define ACE_MKDIR_LACKS_MODE
- #define ACE_HAS_SIZET_PTR_ASCTIME_R_AND_CTIME_R
- #define ACE_LACKS_SEARCH_H
- #define ACE_LACKS_SYSCONF
- #define ACE_LACKS_GETPPID
- #define ACE_LACKS_WCHAR_H
- #define ACE_LACKS_WCTYPE_H
- #define ACE_LACKS_WCSCAT
- #define ACE_LACKS_WCSCHR
- #define ACE_LACKS_WCSCMP
- #define ACE_LACKS_WCSCPY
- #define ACE_LACKS_WCSCSPN
- #define ACE_LACKS_WCSLEN
- #define ACE_LACKS_WCSNCAT
- #define ACE_LACKS_WCSNCMP
- #define ACE_LACKS_WCSNCPY
- #define ACE_LACKS_WCSPBRK
- #define ACE_LACKS_WCSRCHR
- #define ACE_LACKS_WCSSPN
- #define ACE_LACKS_WCSSTR
- #define ACE_LACKS_WCSTOK
- #define ACE_LACKS_TOWLOWER
- #define ACE_LACKS_TOWUPPER
- #define ACE_LACKS_WCSTOD
- #define ACE_LACKS_WCSTOL
- #define ACE_LACKS_WCSTOUL
- #define ACE_LACKS_FGETWC
- #define ACE_LACKS_FGETWS
- #define ACE_LACKS_FPUTWS
- #define ACE_HAS_IOCTL_INT_3_PARAM
- #define ACE_LACKS_MMAP
- #define ACE_LACKS_MSYNC
- #define ACE_LACKS_MPROTECT
- #if !defined (ACE_MAIN)
- # define ACE_MAIN ace_main
- #endif /* ! ACE_MAIN */
-#endif
-
-// It is possible to enable pthread support with VxWorks, when the user decides
-// to use this, we need some more defines
-#if defined ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_STD
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-# define ACE_HAS_POSIX_SEM
-# define ACE_LACKS_MUTEXATTR_PSHARED
-# define ACE_LACKS_CONDATTR_PSHARED
-// Include this file, the sys/stat.h file shipped with VxWorks has old types
-// and without this include we get a lot of compile errors. A TSR has been filed
-// so that hopefully in the future we can zap this include
-#include "types/vxTypesOld.h"
-#else
-# define ACE_LACKS_PTHREAD_H
-# if !defined __RTP__
-// Only when building for kernel mode we can use TSS emulation, in rtp mode
-// we can't use the WIND_TCB struct anymore
-# define ACE_HAS_TSS_EMULATION
-# if !defined (ACE_VXWORKS_SPARE)
-# define ACE_VXWORKS_SPARE spare4
-# endif /* ! ACE_VXWORKS_SPARE */
-# endif
-// VxWorks has no recursive mutexes. This was set in the past but it doesn't
-// work with the pthread support, so only set it for the time being when pthread
-// is disabled
-# define ACE_HAS_RECURSIVE_MUTEXES
-# define ACE_LACKS_COND_T
-# define ACE_HAS_MUTEX_TIMEOUTS
-#endif
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// Needed include to get all VxWorks CPU types
-#include "types/vxCpu.h"
-#if defined __RTP__
- #if defined (_VX_CPU) && (_VX_CPU == _VX_PENTIUM || _VX_CPU == _VX_PENTIUM2 || _VX_CPU == _VX_PENTIUM3 || _VX_CPU == _VX_PENTIUM4)
- // If running an Intel Pentium the
- // ACE_OS::gethrtime () can use the RDTSC instruction.
- # define ACE_HAS_PENTIUM
- #endif
-#else
- #if defined (CPU) && (CPU == PENTIUM || CPU == PENTIUM2 || CPU == PENTIUM3 || CPU == PENTIUM4)
- // If running an Intel Pentium the
- // ACE_OS::gethrtime () can use the RDTSC instruction.
- # define ACE_HAS_PENTIUM
- #endif
-#endif
-
-// VxWorks defines the CPU define MAP, undef it to prevent problems with
-// application code
-#if defined (MAP)
-#undef MAP
-#endif /* MAP */
-
-#if !defined (ACE_NEEDS_HUGE_THREAD_STACKSIZE)
-# define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536
-#endif /* ACE_NEEDS_HUGE_THREAD_STACKSIZE */
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// By default, don't include RCS Id strings in object code.
-#if !defined (ACE_USE_RCSID)
-#define ACE_USE_RCSID 0
-#endif /* !ACE_USE_RCSID */
-
-#include /**/ "ace/post.h"
-#endif /* ACE_CONFIG_H */
-
diff --git a/ACE/ace/config-win32-borland.h b/ACE/ace/config-win32-borland.h
index 2646135e8a8..91b81ece8a1 100644
--- a/ACE/ace/config-win32-borland.h
+++ b/ACE/ace/config-win32-borland.h
@@ -110,10 +110,21 @@
# define ACE_LACKS_INLINE_ASSEMBLY
#endif
-#define ACE_WCSDUP_EQUIVALENT ::_wcsdup
-#define ACE_STRCASECMP_EQUIVALENT ::stricmp
-#define ACE_STRNCASECMP_EQUIVALENT ::strnicmp
-#define ACE_HAS_ITOA 1
+#if (__BORLANDC__ >= 0x600)
+# define ACE_LACKS_PTRDIFF_T
+# define ACE_PTRDIFF_T_TYPE std::ptrdiff_t
+# define ACE_HAS_DINKUM_STL
+# undef ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS
+# define ACE_STRCASECMP_EQUIVALENT std::strcasecmp
+# define ACE_STRNCASECMP_EQUIVALENT std::strncasecmp
+# define ACE_LACKS_WCSDUP
+# define ACE_HAS_3_PARAM_WCSTOK
+#else
+# define ACE_WCSDUP_EQUIVALENT ::_wcsdup
+# define ACE_STRCASECMP_EQUIVALENT ::stricmp
+# define ACE_STRNCASECMP_EQUIVALENT ::strnicmp
+# define ACE_HAS_ITOA 1
+#endif
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_WIN32_BORLAND_H */
diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h
index 7beabb8ded6..18ae219fe3d 100644
--- a/ACE/ace/config-win32-common.h
+++ b/ACE/ace/config-win32-common.h
@@ -37,8 +37,24 @@
# endif /* !_FILE_OFFSET_BITS */
#endif /* _WIN64 || WIN64 */
-#if !defined (_WIN32_WINNT)
-# define _WIN32_WINNT 0x0400
+// Define this if you're running NT >= 4.0 (Win2K == NT 5).
+// Setting applies to : building ACE
+// Runtime restrictions: System must be Windows NT => 4.0
+#if !defined (ACE_HAS_WINNT4)
+# define ACE_HAS_WINNT4 1 /* assuming Win NT 4.0 or greater */
+#endif
+
+#if (defined (ACE_HAS_WINNT4) && ACE_HAS_WINNT4 != 0)
+# if !defined (_WIN32_WINNT)
+# define _WIN32_WINNT 0x0400
+# endif
+#else
+// On Win9X, a shared address SHOULD be between the 2nd and 3rd Gb.
+// Note this will not work for NT: The addresses above 2Gb are
+// reserved for the system, so this one will fail.
+# if !defined (ACE_DEFAULT_BASE_ADDR)
+# define ACE_DEFAULT_BASE_ADDR ((char*) ((2048UL+512UL)*1024UL*1024UL))
+# endif
#endif
// If the invoking procedure turned off debugging by setting NDEBUG, then
@@ -185,8 +201,14 @@
// probably don't want too big a value for ACE_IOV_MAX since it may
// mostly go to waste or the size of the activation record may become
// excessively large.
+
#if !defined (ACE_IOV_MAX)
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
# define ACE_IOV_MAX 64
+#else
+// Win 95/98/me need a smaller value than WinNT versions of Windows.
+# define ACE_IOV_MAX 16
+#endif /* #if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
#endif /* ACE_IOV_MAX */
#if !defined (ACE_HAS_WINCE)
@@ -265,7 +287,9 @@
#define ACE_LACKS_WAIT
#define ACE_LACKS_IOVEC
+#define ACE_HAS_SNPRINTF
#define ACE_HAS_VFWPRINTF
+#define ACE_HAS_VSWPRINTF
#define ACE_MKDIR_LACKS_MODE
@@ -302,8 +326,10 @@
// Platform supports the /proc file system.
//define ACE_HAS_PROC_FS
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
// Platform supports the rusage struct.
#define ACE_HAS_GETRUSAGE
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
// Compiler/platform supports SVR4 signal typedef.
//define ACE_HAS_SVR4_SIGNAL_T
@@ -524,19 +550,20 @@
# define ACE_HAS_IP_MULTICAST
#endif /* ACE_HAS_WINSOCK2 */
-#if !defined (ACE_HAS_WINCE) || defined (PPC) /* CE only on some CPUs */
-# define ACE_HAS_INTERLOCKED_EXCHANGEADD
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || \
+ defined (ACE_HAS_WINCE) /* WinCE 3 has these */
+# if !defined (ACE_HAS_WINCE) || defined (PPC) /* CE only on some CPUs */
+# define ACE_HAS_INTERLOCKED_EXCHANGEADD
+# endif
+# define ACE_HAS_WIN32_TRYLOCK
#endif
-#define ACE_HAS_WIN32_TRYLOCK
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
+#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_USES_WINCE_SEMA_SIMULATION)
# define ACE_HAS_SIGNAL_OBJECT_AND_WAIT
// If CancelIO is undefined get the updated sp2-sdk from MS
# define ACE_HAS_CANCEL_IO
-# define ACE_HAS_WIN32_OVERLAPPED_IO
-# define ACE_HAS_WIN32_NAMED_PIPES
-#endif /* !defined (ACE_USES_WINCE_SEMA_SIMULATION) && !ACE_HAS_PHARLAP */
+#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_USES_WINCE_SEMA_SIMULATION) */
#if !defined (ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION)
# define ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION EXCEPTION_CONTINUE_SEARCH
@@ -550,15 +577,6 @@
# endif /* WINSOCK_VERSION */
#endif /* ACE_HAS_WINSOCK2_GQOS */
-// These are the defaults and can be overridden by a user's config.h
-#if !defined (ACE_DEFAULT_FILE_PERMS)
-# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE | \
- FILE_SHARE_DELETE)
-// This alternate used to be used for pre-NT4 systems; may still be needed
-// by knock-offs such as CE and Pharlap.
-//# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE)
-#endif /* !defined (ACE_DEFAULT_FILE_PERMS) */
-
#define ACE_SIZEOF_WCHAR 2
#define ACE_HAS_MUTEX_TIMEOUTS
#define ACE_LACKS_STRUCT_DIR
diff --git a/ACE/ace/config-win32-interix.h b/ACE/ace/config-win32-interix.h
index 954bc24cc45..53ace409799 100644
--- a/ACE/ace/config-win32-interix.h
+++ b/ACE/ace/config-win32-interix.h
@@ -53,6 +53,7 @@
#define ACE_SIZEOF_LONG_DOUBLE 12
#define ACE_PAGE_SIZE 4096
+#define ACE_HAS_SNPRINTF
#define ACE_HAS_SYSV_IPC
#define ACE_HAS_SVR4_SIGNAL_T
#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
diff --git a/ACE/ace/config-win32-mingw.h b/ACE/ace/config-win32-mingw.h
index b9c59685622..50b78b4f4ef 100644
--- a/ACE/ace/config-win32-mingw.h
+++ b/ACE/ace/config-win32-mingw.h
@@ -88,6 +88,15 @@
# define ACE_HAS_PENTIUM
#endif
+#if !defined (ACE_HAS_WINNT4)
+# if (defined (WINNT) && WINNT == 1) \
+ || (defined (__WINNT__) && __WINNT__ == 1)
+# define ACE_HAS_WINNT4 1
+# else
+# define ACE_HAS_WINNT4 0
+# endif
+#endif
+
#define ACE_INT64_FORMAT_SPECIFIER ACE_LIB_TEXT ("%I64d")
#define ACE_UINT64_FORMAT_SPECIFIER ACE_LIB_TEXT ("%I64u")
diff --git a/ACE/ace/config-win32-msvc.h b/ACE/ace/config-win32-msvc.h
index b6758dfa96f..9b85888b05b 100644
--- a/ACE/ace/config-win32-msvc.h
+++ b/ACE/ace/config-win32-msvc.h
@@ -65,22 +65,12 @@
# error This version of Microsoft Visual C++ is not supported.
#endif
-// MFC changes the behavior of operator new at all MSVC versions from 6 up
-// by throwing a static CMemoryException* instead of std::bad_alloc
-// (see ace/OS_Memory.h). This MFC exception object needs to be cleaned up
-// by calling its Delete() method.
+// MFC changes the behavior of operator new at all MSVC versions from 6 up,
+// see ace/OS_Memory.h (throws a static CMemoryException* instead of std::bad_alloc)
#if defined (ACE_HAS_MFC) && (ACE_HAS_MFC == 1)
# if !defined (ACE_NEW_THROWS_EXCEPTIONS)
# define ACE_NEW_THROWS_EXCEPTIONS
# endif
-# if defined (ACE_bad_alloc)
-# undef ACE_bad_alloc
-# endif
-# define ACE_bad_alloc CMemoryException *e
-# if defined (ACE_del_bad_alloc)
-# undef ACE_del_bad_alloc
-# endif
-# define ACE_del_bad_alloc e->Delete();
#endif /* ACE_HAS_MFC && ACE_HAS_MFC==1 */
#if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
diff --git a/ACE/ace/os_include/net/os_if.h b/ACE/ace/os_include/net/os_if.h
index c689e07ab7e..9c312425649 100644
--- a/ACE/ace/os_include/net/os_if.h
+++ b/ACE/ace/os_include/net/os_if.h
@@ -49,10 +49,6 @@
# endif /* HPUX && IOR */
#endif /* !ACE_LACKS_NET_IF_H */
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-# include /**/ <ws2tcpip.h>
-#endif /* ACE_HAS_WINSOCK2 */
-
// Place all additions (especially function declarations) within extern "C" {}
#ifdef __cplusplus
extern "C"
@@ -63,59 +59,6 @@ extern "C"
struct ifafilt;
#endif /* ACE_HAS_BROKEN_IF_HEADER */
-#if defined (ACE_LACKS_IFREQ)
-struct ifreq {
-#define IFNAMSIZ 16
- char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_broadaddr;
- short ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- int ifru_phys;
- int ifru_media;
- caddr_t ifru_data;
- int (*ifru_tap)(struct ifnet *, struct ether_header *, struct mbuf *);
- } ifr_ifru;
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-#define ifr_metric ifr_ifru.ifru_metric /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
-#define ifr_media ifr_ifru.ifru_media /* physical media */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_tap ifr_ifru.ifru_tap /* tap function */
-};
-#endif /* ACE_LACKS_IFREQ */
-
-#if defined (ACE_LACKS_IFCONF)
-struct ifconf {
- int ifc_len;
- union {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
- };
-#endif /* ACE_LACKS_IFCONF */
-
-#if !defined (IFF_UP)
-# define IFF_UP 0x1
-#endif /* IFF_UP */
-
-#if !defined (IFF_LOOPBACK)
-# define IFF_LOOPBACK 0x8
-#endif /* IFF_LOOPBACK */
-
-#if !defined (IFF_BROADCAST)
-# define IFF_BROADCAST 0x2
-#endif /* IFF_BROADCAST */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/ACE/ace/os_include/netinet/os_in.h b/ACE/ace/os_include/netinet/os_in.h
index f8af16f84fb..9b43db20e0a 100644
--- a/ACE/ace/os_include/netinet/os_in.h
+++ b/ACE/ace/os_include/netinet/os_in.h
@@ -85,14 +85,6 @@ extern "C"
};
# endif /* ACE_LACKS_SOCKADDR_IN */
-# if defined (ACE_LACKS_SOCKADDR_UN)
- struct sockaddr_un {
- u_char sun_len; /* sockaddr len including null */
- u_char sun_family; /* AF_UNIX */
- char sun_path[104]; /* path name (gag) */
- };
-#endif /* ACE_LACKS_SOCKADDR_UN */
-
# if defined (ACE_LACKS_IP_MREQ)
struct ip_mreq
{
@@ -169,10 +161,6 @@ extern "C"
# define IPPROTO_IP 0
# endif /* IPPROTO_IP */
-# if !defined (IPPROTO_TCP)
-# define IPPROTO_TCP 6
-# endif /* IPPROTO_TCP */
-
# if !defined (INADDR_ANY)
# define INADDR_ANY (u_long)0x00000000
# endif /* INADDR_ANY */
diff --git a/ACE/ace/os_include/netinet/os_tcp.h b/ACE/ace/os_include/netinet/os_tcp.h
index e0d6c4124d6..45fa48657e2 100644
--- a/ACE/ace/os_include/netinet/os_tcp.h
+++ b/ACE/ace/os_include/netinet/os_tcp.h
@@ -34,10 +34,6 @@ extern "C"
{
#endif /* __cplusplus */
-# if !defined (TCP_NODELAY)
-# define TCP_NODELAY 0x01
-# endif /* TCP_NODELAY */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/ACE/ace/os_include/os_errno.h b/ACE/ace/os_include/os_errno.h
index 6d2656dba16..9c9be161384 100644
--- a/ACE/ace/os_include/os_errno.h
+++ b/ACE/ace/os_include/os_errno.h
@@ -141,10 +141,6 @@ extern int t_errno;
# define EBUSY ETIME
#endif /* EBUSY */
-#if !defined (ECANCELED)
-# define ECANCELED 125
-#endif /* ECANCELED */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/ACE/ace/os_include/os_limits.h b/ACE/ace/os_include/os_limits.h
index ea66cdefd93..17dba75622a 100644
--- a/ACE/ace/os_include/os_limits.h
+++ b/ACE/ace/os_include/os_limits.h
@@ -102,11 +102,11 @@ extern "C"
# define ACE_IOV_MAX IOV_MAX
#endif /* ACE_IOV_MAX */
-#if defined (ACE_VXWORKS) && ((ACE_VXWORKS == 0x620) || (ACE_VXWORKS == 0x630) || (ACE_VXWORKS == 0x640)) && !defined (__RTP__)
+#if defined (ACE_VXWORKS) && (ACE_VXWORKS == 0x620)
# if defined (PIPE_BUF) && (PIPE_BUF == -1)
# undef PIPE_BUF
# endif
-#endif /* ACE_VXWORKS */
+#endif /* ACE_VXWORKS == 0x620 */
#if !defined (PIPE_BUF)
# define PIPE_BUF 5120
diff --git a/ACE/ace/os_include/os_signal.h b/ACE/ace/os_include/os_signal.h
index c1a4511041c..8266d4b365f 100644
--- a/ACE/ace/os_include/os_signal.h
+++ b/ACE/ace/os_include/os_signal.h
@@ -157,8 +157,12 @@ extern "C"
#if defined (ACE_VXWORKS)
# define ACE_NSIG (_NSIGS + 1)
-#elif defined (__Lynx__) || defined (ACE_HAS_RTEMS)
+#elif defined (__Lynx__)
# define ACE_NSIG (NSIG + 1)
+#elif defined (ACE_HAS_RTEMS)
+# define ACE_NSIG (SIGRTMAX)
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)
+# define ACE_NSIG _NSIG
#else
// All other platforms set NSIG to one greater than the
// highest-numbered signal.
@@ -167,15 +171,37 @@ extern "C"
#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 */
typedef void (*ACE_SignalHandler)(int);
typedef void (*ACE_SignalHandlerV)(int);
-#elif defined (ACE_HAS_LYNXOS_SIGNALS) || defined (ACE_HAS_TANDEM_SIGNALS)
+ //# 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);
- typedef void (*ACE_SignalHandlerV)(void);
+# 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);
@@ -208,15 +234,19 @@ extern "C"
// Defining POSIX4 real-time signal range.
#if defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
-# define ACE_SIGRTMIN SIGRTMIN
-# define ACE_SIGRTMAX SIGRTMAX
+#define ACE_SIGRTMIN SIGRTMIN
+#define ACE_SIGRTMAX SIGRTMAX
+
#else /* !ACE_HAS_POSIX_REALTIME_SIGNALS */
-# ifndef ACE_SIGRTMIN
-# define ACE_SIGRTMIN 0
-# endif /* ACE_SIGRTMIN */
-# ifndef ACE_SIGRTMAX
-# define ACE_SIGRTMAX 0
-# endif /* ACE_SIGRTMAX */
+
+#ifndef ACE_SIGRTMIN
+#define ACE_SIGRTMIN 0
+#endif /* ACE_SIGRTMIN */
+
+#ifndef ACE_SIGRTMAX
+#define ACE_SIGRTMAX 0
+#endif /* ACE_SIGRTMAX */
+
#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
#if defined (DIGITAL_UNIX)
diff --git a/ACE/ace/os_include/os_stdio.h b/ACE/ace/os_include/os_stdio.h
index cfb1843c563..feeb4371fec 100644
--- a/ACE/ace/os_include/os_stdio.h
+++ b/ACE/ace/os_include/os_stdio.h
@@ -37,7 +37,7 @@
# include /**/ <ioLib.h>
// for remCurIdGet()
# include /**/ <remLib.h>
-# if defined (__RTP__) && ((ACE_VXWORKS == 0x620) || (ACE_VXWORKS == 0x630) || (ACE_VXWORKS == 0x640))
+# if defined (__RTP__) && ((ACE_VXWORKS == 0x620) || (ACE_VXWORKS == 0x630))
# define L_cuserid _PARM_L_cuserid
# endif
#endif /* ACE_VXWORKS */
diff --git a/ACE/ace/os_include/sys/os_resource.h b/ACE/ace/os_include/sys/os_resource.h
index 4fa753431de..cd28e932fa1 100644
--- a/ACE/ace/os_include/sys/os_resource.h
+++ b/ACE/ace/os_include/sys/os_resource.h
@@ -70,6 +70,10 @@ extern "C"
FILETIME ru_utime;
FILETIME ru_stime;
};
+#else /* !ACE_WIN32 */
+# if defined (m88k)
+# define RUSAGE_SELF 1
+# endif /* m88k */
#endif /* ACE_WIN32 */
#if defined (ACE_LACKS_RLIMIT_PROTOTYPE)
diff --git a/ACE/ace/os_include/sys/os_socket.h b/ACE/ace/os_include/sys/os_socket.h
index 7b18c047b25..376cf548555 100644
--- a/ACE/ace/os_include/sys/os_socket.h
+++ b/ACE/ace/os_include/sys/os_socket.h
@@ -27,7 +27,13 @@
#include "ace/os_include/sys/os_uio.h"
#if !defined (ACE_LACKS_SYS_SOCKET_H)
+# if defined (ACE_HAS_AIX_BROKEN_SOCKET_HEADER)
+# undef __cplusplus
+# endif /* ACE_HAS_AIX_BROKEN_SOCKET_HEADER */
# include /**/ <sys/socket.h>
+# if defined (ACE_HAS_AIX_BROKEN_SOCKET_HEADER)
+# define __cplusplus
+# endif /* ACE_HAS_AIX_BROKEN_SOCKET_HEADER */
#endif /* !ACE_LACKS_SYS_SOCKET_H */
#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620)
@@ -64,13 +70,6 @@ extern "C"
};
# endif /* ACE_LACKS_SOCKADDR */
-# if defined (ACE_LACKS_LINGER)
- struct linger {
- int l_onoff; /* option on/off */
- int l_linger; /* linger time */
- };
-# endif /* ACE_LACKS_LINGER */
-
#if defined (ACE_WIN32)
struct msghdr
{
@@ -96,6 +95,13 @@ extern "C"
#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 */
// Increase the range of "address families". Please note that this
@@ -113,10 +119,6 @@ extern "C"
# define AF_LOCAL 1
#endif /* AF_LOCAL */
-#if !defined (AF_UNIX)
-# define AF_UNIX AF_LOCAL
-#endif /* AF_UNIX */
-
#if !defined (AF_INET)
# define AF_INET 2
#endif /* AF_INET */
@@ -164,10 +166,6 @@ extern "C"
# define SOCK_DGRAM 2
#endif /* SOCK_DGRAM */
-#if !defined (SOCK_SEQPACKET)
-# define SOCK_SEQPACKET 5
-#endif /* SOCK_SEQPACKET */
-
#if !defined (SOL_SOCKET)
# define SOL_SOCKET 0xffff
#endif /* SOL_SOCKET */
@@ -176,10 +174,6 @@ extern "C"
# define SO_REUSEADDR 0x0004
#endif /* SO_REUSEADDR */
-#if !defined (SO_LINGER)
-# define SO_LINGER 0x0080
-#endif /* SO_LINGER */
-
#if !defined (SO_SNDBUF)
# define SO_SNDBUF 0x1001
#endif /* SO_SNDBUF */
@@ -188,14 +182,6 @@ extern "C"
# define SO_RCVBUF 0x1002
#endif /* SO_RCVBUF */
-#if !defined (SO_BROADCAST)
-# define SO_BROADCAST 0x0020
-#endif /* SO_BROADCAST */
-
-#if !defined (SO_ERROR)
-# define SO_ERROR 0x1007
-#endif /* SO_ERROR */
-
#if defined (ACE_HAS_IPV6)
# if defined (ACE_USES_IPV4_IPV6_MIGRATION)
# define ACE_ADDRESS_FAMILY_INET AF_UNSPEC
diff --git a/ACE/ace/os_include/sys/os_time.h b/ACE/ace/os_include/sys/os_time.h
index d8d061b5d62..7f65f5cb568 100644
--- a/ACE/ace/os_include/sys/os_time.h
+++ b/ACE/ace/os_include/sys/os_time.h
@@ -41,11 +41,11 @@ extern "C"
#endif /* __cplusplus */
#if defined (ACE_HAS_SVR4_GETTIMEOFDAY)
-# if !defined (SCO)
+# if !defined (m88k) && !defined (SCO)
int gettimeofday (struct timeval *tp, void * = 0);
# else
int gettimeofday (struct timeval *tp);
-# endif /* !SCO */
+# endif /* !m88k && !SCO */
#elif defined (ACE_HAS_OSF1_GETTIMEOFDAY)
int gettimeofday (struct timeval *tp, struct timezone * = 0);
#elif defined (ACE_HAS_VOIDPTR_GETTIMEOFDAY)
diff --git a/ACE/ace/os_include/sys/os_types.h b/ACE/ace/os_include/sys/os_types.h
index d9895abdecc..dbf1cfa412f 100644
--- a/ACE/ace/os_include/sys/os_types.h
+++ b/ACE/ace/os_include/sys/os_types.h
@@ -77,7 +77,7 @@ typedef double ACE_timer_t;
#else
typedef off_t ACE_OFF_T;
#endif
-
+
#if defined (ACE_SIZEOF_LONG) && ACE_SIZEOF_LONG == 8
typedef off_t ACE_LOFF_T;
#elif defined (ACE_HAS_RTEMS) || defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__APPLE__) || \
@@ -89,7 +89,7 @@ typedef double ACE_timer_t;
typedef offset_t ACE_LOFF_T;
#elif defined (WIN32)
typedef __int64 ACE_LOFF_T;
-#elif (defined (ACE_VXWORKS) && (ACE_VXWORKS == 0x640 || ACE_VXWORKS == 0x630 || ACE_VXWORKS == 0x620 || ACE_VXWORKS == 0x551)) || \
+#elif (defined (ACE_VXWORKS) && (ACE_VXWORKS == 0x630 || ACE_VXWORKS == 0x620 || ACE_VXWORKS == 0x551)) || \
defined (ACE_LYNXOS_MAJOR) || \
(defined (ACE_OPENVMS) && !defined (_LARGEFILE))
typedef long long ACE_LOFF_T;