summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2007-01-06 00:13:33 +0000
committerSteve Huston <shuston@riverace.com>2007-01-06 00:13:33 +0000
commitcdba33425e62a49ab141b6a767b5d11f7c9e9be0 (patch)
tree0d4aa36885e171bacce4f30edfea290e5fbd8140
parent109260f4c483c042c5db16e716229df694817d0a (diff)
downloadATCD-cdba33425e62a49ab141b6a767b5d11f7c9e9be0.tar.gz
ChangeLogTag:Sat Jan 6 00:06:52 UTC 2007 Steve Huston <shuston@riverace.com>
-rw-r--r--ACE/ACE-INSTALL.html55
-rw-r--r--ACE/ChangeLog105
-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/Configuration.cpp35
-rw-r--r--ACE/ace/Default_Constants.h11
-rw-r--r--ACE/ace/Dev_Poll_Reactor.cpp2
-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.cpp9
-rw-r--r--ACE/ace/OS_NS_Thread.cpp9
-rw-r--r--ACE/ace/OS_NS_stdio.inl4
-rw-r--r--ACE/ace/OS_NS_sys_mman.inl46
-rw-r--r--ACE/ace/OS_NS_unistd.cpp12
-rw-r--r--ACE/ace/Pagefile_Memory_Pool.cpp8
-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/README7
-rw-r--r--ACE/ace/SPIPE_Acceptor.cpp18
-rw-r--r--ACE/ace/SPIPE_Acceptor.h8
-rw-r--r--ACE/ace/Sock_Connect.cpp539
-rw-r--r--ACE/ace/WIN32_Asynch_IO.cpp33
-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/config-WinCE.h6
-rw-r--r--ACE/ace/config-lite.h2
-rw-r--r--ACE/ace/config-pharlap.h8
-rw-r--r--ACE/ace/config-win32-common.h52
-rw-r--r--ACE/ace/config-win32-mingw.h9
-rw-r--r--ACE/tests/CDR_File_Test.cpp4
-rw-r--r--ACE/tests/Malloc_Test.cpp25
-rw-r--r--ACE/tests/Message_Queue_Test.cpp8
-rw-r--r--ACE/tests/OS_Test.cpp2
-rw-r--r--ACE/tests/Proactor_Scatter_Gather_Test.cpp4
-rw-r--r--ACE/tests/Proactor_Test.cpp36
-rw-r--r--ACE/tests/Proactor_Test_IPV6.cpp14
-rw-r--r--ACE/tests/Proactor_Timer_Test.cpp4
-rw-r--r--ACE/tests/SPIPE_Test.cpp10
-rw-r--r--ACE/tests/Svc_Handler_Test.cpp4
-rw-r--r--ACE/tests/UPIPE_SAP_Test.cpp14
51 files changed, 416 insertions, 862 deletions
diff --git a/ACE/ACE-INSTALL.html b/ACE/ACE-INSTALL.html
index 8c83dae39f4..8208ee37113 100644
--- a/ACE/ACE-INSTALL.html
+++ b/ACE/ACE-INSTALL.html
@@ -182,7 +182,7 @@ document</a>.</p><p>
IRIX 6.x; UnixWare 7.1.0;
Linux on PPC; OpenMVS;
Tandem; SCO; FreeBSD; NetBSD; OpenBSD;
- Macintosh OS X; OS/9; PharLap TNT Embedded ToolSuite 9.1;
+ Macintosh OS X; OS/9; PharLap TNT Embedded ToolSuite 13;
QNX RTP and Neutrino 2.0; Interix (Windows Services for Unix)
</td>
</tr><tr>
@@ -624,15 +624,6 @@ https://msdn.microsoft.com/visualc/downloads/default.aspx</a> for information.
programs that uses ACE. Otherwise you may experience problems
finding ace.dll or aced.dll.<br>
<br>
- </li><li>If you are building for Windows NT 4 or later (Windows 2000, XP, etc.)
- then you can start building without anymore changes. If you are building
- on Windows 9x/Me, then you should add the line <br>
- <br>
- <code>#define ACE_HAS_WINNT4 0</code><br>
- <br>
- before the #include statement in ACE_ROOT\ace\config.h and it
- will turn off some WinNT/Win2K-specific code in ACE.<br>
- <br>
</li><li>If you want to use the standard C++ headers (iostream, cstdio, ...
as defined by the C++ Standard Draft 2) that comes with MSVC,
then add the line: <br>
@@ -784,15 +775,6 @@ to check <a href="#win32nonic">here</a> first. <p>
<br>
<code>#include "ace/config-win32.h"</code><br>
<br>
- If you are building for Windows NT 4, Windows 2000, or Windows XP,
- then you can start without any more changes. If you are building
- on Windows 9x/Me, then you should add the line <br>
- <br>
- <code>#define ACE_HAS_WINNT4 0</code><br>
- <br>
- before the #include statement in ACE_ROOT\ace\config.h and it
- will turn off some WinNT/Win2K-specific code in ACE.<br>
- <br>
</li><li>Open a Command Prompt (DOS Box).<br>
<br>
</li><li>Set the ACE_ROOT environment variable to point to the ACE_wrappers
@@ -936,15 +918,6 @@ For our build we require the packages
<blockquote><code></code><pre> #include "ace/config-win32.h"
</pre></blockquote>
- If you are building for Windows 9X/Me (ie, <em>not</em> WinNT or
- Win2K), you will need to add:
-
- <blockquote><code></code><pre> #define ACE_HAS_WINNT4 0
- </pre></blockquote>
-
- before the <code>#include</code> line.
- <br><br>
-
</li><li> Create a file called <tt>platform_macros.GNU</tt> in the
<tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
@@ -2407,15 +2380,27 @@ libraries.
to your <code>bin/MakeProjectCreator/config</code> file and regenerate the
GNU makefiles as described <a href="#power">here</a>.</p><p>
- </p></li><li><strong>PharLap TNT Embedded ToolSuite (ETS)</strong><p>
-
- ACE has been ported to <a href="http://www.pharlap.com/">PharLap's</a> TNT Embedded
- ToolSuite (ETS) version 9.1. The port is being tested with
- Microsoft Visual C++ 6.</p><p> To build for PharLap, use the
- ace/config-pharlap.h configuration file, and the instructions
+ </p></li><li><strong>PharLap ETS</strong><p>
+
+ ACE has been ported to Ardence's
+ <a href="http://www.ardence.com/embedded/products.aspx?ID=71">PharLap ETS</a>
+ version 13. The port was originally done for Pharlap 9.1 and MSVC 6,
+ but has been updated to Pharlap ETS 13 with Visual Studio .NET 2003
+ (VC7.1).</p><p> To build for PharLap, you'll need to use MPC to
+ generate .sln/.vcproj files with the ETS configurations. For example:
+ <pre>
+cd \ace\ACE_wrappers
+perl bin/mwc.pl -type vc71 -relative ACE_ROOT=C:/ace/ACE_wrappers -relative TAO_ROOT=C:/ace/ACE_wrappers/TAO -value_template configurations='"ETS Debug"' -value_template configurations+='"ETS Release"' -name_modifier *_ETS TAO_ACE.mwc
+ </pre>
+ That command will generate the same .sln and .vproj files as for
+ regular Windows builds with VC7.1, but they'll have names with an
+ <code>_ETS</code> suffix and will include the "ETS Debug" and
+ "ETS Release" configurations.</p><p>
+ After generating the needed VC7.1 files, use the ace/config-pharlap.h
+ configuration file, and the instructions
for building on Windows. Building the ACE library is the same as
for regular Windows platforms, except you choose one of the PharLap
- ETS configurations to build within Visual C++. Only static
+ ETS configurations to build within Visual Studio. Only static
library configurations are available for PharLap at this time.
For an example of how to build
binaries, see the tests directory. The tests_pharlap_msvc.lnk
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 40665ddbdd4..8abd682e22a 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,108 @@
+Sat Jan 6 00:06:52 UTC 2007 Steve Huston <shuston@riverace.com>
+
+ * ace/config-WinCE.h: Removed the ACE_HAS_WINNT4 stuff.
+
+ * ace/config-pharlap.h: Removed the ACE_HAS_WINNT4 stuff and added
+ ACE_LACKS_WIN32_SECURITY_DESCRIPTORS and ACE_LACKS_WIN32_MOVEFILEEX.
+ Added ACE_HAS_IP_MULTICAST.
+ Thanks to David Hauck for helping with these changes.
+
+ * ace/config-lite.h: Removed another vestige of MSVC 6 support.
+
+ * ace/Default_Constants.h:
+ * ace/config-win32-common.h: Moved the Win32 ACE_DEFAULT_FILE_PERMS
+ settings to config-win32-common.h
+ Also removed all the pre-NT4 stuff from config-win32-common.h.
+
+ * ace/Asynch_Acceptor.{h cpp}:
+ * ace/Asynch_IO.{h cpp}:
+ * ace/Asynch_IO_Impl.{h cpp}:
+ * ace/Message_Queue.{h cpp inl}:
+ * ace/Message_Queue_T.{h cpp}:
+ * ace/Proactor.{h cpp}:
+ * ace/Proactor_Impl.{h cpp}:
+ * ace/WIN32_Asynch_IO.{h cpp}:
+ * ace/WIN32_Proactor.{h cpp}:
+ ACE_Message_Queue_NT and ACE_Asynch_IO switched from using
+ ACE_HAS_WINNT4==1 and maybe some other platforms to using the new
+ ACE_HAS_WIN32_OVERLAPPED_IO setting. It's now incumbent on the
+ config maintainer to keep config-win32-*.h, config-WinCE.h,
+ config-pharlap.h, etc. up to date on these features as the
+ various versions do or don't support them.
+
+ * ace/config-win32-mingw.h: Removed ACE_HAS_WINNT4 section.
+
+ * ace/Configuration.cpp (ACE_Configuration_Win32Registry::remove_section):
+ Removed the pre-NT4 section that checked for non-empty section.
+
+ * ace/Mem_Map.cpp: Removed all the support for ACE_USE_MAPPING_NAME
+ since it was used only for pre-NT4 Windows.
+
+ * ace/Msg_WFMO_Reactor.cpp (wait_for_multiple_events): Removed the
+ pre-NT4 code block that switched to MsgWaitForMultipleObjectsEx.
+ All Win platforms without ACE_LACKS_MSG_WMFO can do this now.
+
+ * ace/OS_NS_stdio.inl (rename):
+ * tests/OS_Test.cpp: The ability to rename a file to one that exists
+ without removing the 'to' file first is now detected by the new
+ feature macro ACE_LACKS_WIN32_MOVEFILEEX instead of ACE_HAS_WINNT4.
+
+ * ace/OS_NS_unistd.cpp (pread, pwrite): The Windows code that can do
+ overlapped is now built based on ACE_HAS_WIN32_OVERLAPPED_IO instead
+ of ACE_HAS_WINNT4.
+
+ * ace/Pagefile_Memory_Pool.cpp: Setting up a security descriptor for
+ the file mapping is now determined by the lack of
+ ACE_LACKS_WIN32_SECURITY_DESCRIPTORS, not ACE_HAS_WINNT4.
+
+ * ace/README: Added descriptions for ACE_HAS_WIN32_OVERLAPPED_IO,
+ ACE_HAS_WIN32_NAMED_PIPES, ACE_LACKS_WIN32_SECURITY_DESCRIPTORS,
+ ACE_LACKS_WIN32_MOVEFILEEX.
+
+ * ace/Sock_Connect.cpp: Removed all the code that rummaged through
+ the registry looking for net interfaces on Windows. Getting
+ interface info now requires WinCE, Pharlap, or Winsock2. This removes
+ support for Win95, Win98, etc.
+
+ * ace/SPIPE_Acceptor.{cpp h} (ACE_SPIPE_Acceptor): Now useable on
+ Windows when ACE_HAS_WIN32_NAMED_PIPES is set, not ACE_HAS_WINNT4.
+ Similar to above with ACE_HAS_WIN32_OVERLAPPED_IO - config
+ maintainers need to manage this setting.
+
+ * ace/OS_NS_Thread.cpp (sched_params): Fix mis-aligned #if block
+ for ACE_HAS_PHARLAP_RT. Also, for scope == ACE_SCOPE_PROCESS, return
+ -1, ENOTSUP for Pharlap; it doesn't have SetPriorityClass().
+
+ * ACE-INSTALL.html: Removed mention of ACE_HAS_WINNT4 and building
+ for Win95/98/Me - ACE now requires WinNT 4 or later.
+ Updated the information for building for Pharlap ETS.
+
+ * tests/CDR_File_Test.cpp:
+ * tests/Svc_Handler_Test.cpp: Removed the check for NT4 or better when
+ setting TEST_CAN_UNLINK_IN_ADVANCE. VxWorks is the only case
+ remaining where this needs to be set.
+
+ * tests/Malloc_Test.cpp: Removed the Win NT4 case checks for setting
+ ACE_TEST_REMAP_ON_FAULT; Win9x is no longer supported. Also, when
+ deciding address ranges for testing, decide at run time based on
+ GetVersionInfo() on Windows, not on preprocessor checks.
+
+ * tests/Message_Queue_Test.cpp: Use ACE_HAS_WIN32_OVERLAPPED_IO to
+ decide whether or not to test ACE_Message_Queue_NT.
+
+ * tests/Proactor_Scatter_Gather_Test.cpp: Decide whether or not to
+ run this test based on ACE_HAS_WIN32_OVERLAPPED_IO instead of
+ ACE_HAS_WINNT4.
+
+ * ace/Proactor_Timer_Test.cpp: Run this test on Windows based on
+ ACE_HAS_WIN32_OVERLAPPED_IO instead of !ACE_HAS_WINCE.
+
+ * tests/SPIPE_Test.cpp:
+ * tests/UPIPE_SAP_Test.cpp: Manage which features to test on Windows
+ based on ACE_HAS_WIN32_NAMED_PIPES instead of ACE_HAS_WINNT4.
+
+ * ace/Dev_Poll_Reactor.cpp: Fixed spelling error in a comment.
+
Fri Jan 5 21:46:16 UTC 2007 Wallace Zhang <zhang_w@ociweb.com>
* ace/Process.cpp:
diff --git a/ACE/ace/Asynch_Acceptor.cpp b/ACE/ace/Asynch_Acceptor.cpp
index 374658afefe..fd7525a30c8 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_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
// This only works on platforms that support async i/o.
#include "ace/OS_Errno.h"
@@ -239,8 +239,6 @@ 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
@@ -252,7 +250,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
error = 1;
}
-#if !defined (ACE_HAS_AIO_CALLS)
+#if defined (ACE_WIN32)
// 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
@@ -267,7 +265,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
{
error = 1;
}
-#endif /* ACE_HAS_AIO_CALLS */
+#endif /* ACE_WIN32 */
// Parse address.
ACE_INET_Addr local_address;
@@ -342,7 +340,6 @@ 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
@@ -370,14 +367,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_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
- && ( defined (_MSC_VER) || (defined (__BORLANDC__)))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) && \
+ (defined (_MSC_VER) || defined (__BORLANDC__))
return (int) ::CancelIo (this->listen_handle_);
#else
// Supported now
return this->asynch_accept_.cancel();
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && ((defined (_MSC_VER)) || (defined (__BORLANDC__))) */
+#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) && (defined (_MSC_VER)) || defined (__BORLANDC__)) */
}
template <class HANDLER> void
@@ -396,7 +393,7 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (const
str.get_local_addr (local_address);
str.get_remote_addr (remote_address);
-#elif (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
+#elif defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
ACE_Message_Block &message_block = result.message_block ();
@@ -427,7 +424,7 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (const
#else
// just in case
errno = ENOTSUP;
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
+#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
return;
}
diff --git a/ACE/ace/Asynch_Acceptor.h b/ACE/ace/Asynch_Acceptor.h
index 80ae20a3667..f615557feb8 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_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
// 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_WIN32 || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || 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 cfcaf28aa2c..07027962100 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || 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_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
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 /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
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_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
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 /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Write_Stream::implementation (void) const
@@ -1330,6 +1330,6 @@ ACE_Asynch_Write_Dgram::Result::~Result (void)
{
}
-#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Asynch_IO.h b/ACE/ace/Asynch_IO.h
index c4ae5c8ca3b..873ef6f40e9 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
#include "ace/Synch_Traits.h"
#if defined (ACE_HAS_THREADS)
@@ -49,8 +49,7 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-# if defined (ACE_WIN32) && ! defined (ACE_HAS_WINCE) \
- && ! defined (ACE_HAS_PHARLAP)
+# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
typedef TRANSMIT_FILE_BUFFERS ACE_TRANSMIT_FILE_BUFFERS;
typedef LPTRANSMIT_FILE_BUFFERS ACE_LPTRANSMIT_FILE_BUFFERS;
typedef PTRANSMIT_FILE_BUFFERS ACE_PTRANSMIT_FILE_BUFFERS;
@@ -59,7 +58,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_WIN32 */
+# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
struct ACE_TRANSMIT_FILE_BUFFERS
{
void *Head;
@@ -76,7 +75,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_WIN32 */
+# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
// Forward declarations
class ACE_Proactor;
@@ -338,7 +337,7 @@ public:
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
/**
* Same as above but with scatter support, through chaining of composite
* message blocks using the continuation field.
@@ -348,7 +347,7 @@ public:
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */
/// Return the underlying implementation class.
// (this should be protected...)
@@ -462,7 +461,7 @@ public:
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
/**
* Same as above but with gather support, through chaining of composite
* message blocks using the continuation field.
@@ -472,7 +471,7 @@ public:
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */
/// 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 8dba289d6ec..5349f5e7ca1 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || 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_WIN32 || ACE_HAS_WINCE */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
diff --git a/ACE/ace/Asynch_IO_Impl.h b/ACE/ace/Asynch_IO_Impl.h
index 3e0af19f2e7..b1af7a57d25 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || 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_AIO_CALLS || !ACE_HAS_WINCE && ACE_WIN32 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
#include /**/ "ace/post.h"
#endif /* ACE_ASYNCH_IO_IMPL_H */
diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp
index 3201b66bd4a..039c2a1c192 100644
--- a/ACE/ace/Configuration.cpp
+++ b/ACE/ace/Configuration.cpp
@@ -576,47 +576,12 @@ 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/Default_Constants.h b/ACE/ace/Default_Constants.h
index 15aeb799399..754904ea84f 100644
--- a/ACE/ace/Default_Constants.h
+++ b/ACE/ace/Default_Constants.h
@@ -278,18 +278,11 @@
// Default file permissions.
# if !defined (ACE_DEFAULT_FILE_PERMS)
-# 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)
+# if 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_WIN32 */
+# endif /* ACE_VXWORKS */
# 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 ae6824725fc..8bf63534735 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 their are
+ // perform a "speculative" read when determining if there are
// notifications to dispatch.
if (ACE::set_flags (this->notification_pipe_.read_handle (),
ACE_NONBLOCK) == -1)
diff --git a/ACE/ace/Mem_Map.cpp b/ACE/ace/Mem_Map.cpp
index d2bc4102ce6..0f8775018c4 100644
--- a/ACE/ace/Mem_Map.cpp
+++ b/ACE/ace/Mem_Map.cpp
@@ -13,49 +13,12 @@
#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
@@ -178,31 +141,6 @@ 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 504af19b0fb..7295c2b9c8f 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_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
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_WIN32 && ACE_HAS_WINNT4 != 0 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue.h b/ACE/ace/Message_Queue.h
index 4f9fc0f107f..5a4b26fbfd6 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_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
# 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_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
/**
* @class ACE_Message_Queue_NT
*
@@ -617,7 +617,7 @@ private:
ACE_HANDLE completion_port_;
};
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue.inl b/ACE/ace/Message_Queue.inl
index 388198a0bf5..452b33f8e6f 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_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
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_WIN32 && ACE_HAS_WINNT4 != 0 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Message_Queue_T.cpp b/ACE/ace/Message_Queue_T.cpp
index 9052769d52f..4eabd618369 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_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
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_WIN32 && ACE_HAS_WINNT4 != 0 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
#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 329258fabd0..b1695c84248 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_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
class ACE_Message_Queue_NT;
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO*/
/**
* @class ACE_Message_Queue
@@ -933,13 +933,13 @@ public:
#endif /* defined (ACE_VXWORKS) */
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
/// Factory method for a NT message queue.
static ACE_Message_Queue_NT *
create_NT_message_queue (size_t max_threads);
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
};
/**
diff --git a/ACE/ace/Msg_WFMO_Reactor.cpp b/ACE/ace/Msg_WFMO_Reactor.cpp
index 868c631c53b..bbc95b948fa 100644
--- a/ACE/ace/Msg_WFMO_Reactor.cpp
+++ b/ACE/ace/Msg_WFMO_Reactor.cpp
@@ -39,20 +39,11 @@ 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
diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp
index dd8283c40de..014226cbbe2 100644
--- a/ACE/ace/OS_NS_Thread.cpp
+++ b/ACE/ace/OS_NS_Thread.cpp
@@ -3629,6 +3629,8 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params,
return -1;
}
+# endif /* ACE_HAS_PHARLAP_RT */
+
if (sched_params.scope () == ACE_SCOPE_THREAD)
{
@@ -3649,13 +3651,16 @@ 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);
@@ -3682,6 +3687,8 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params,
}
::CloseHandle (hProcess);
return 0;
+#endif /* ACE_HAS_PHARLAP_RT */
+
}
else
{
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index 8564e7c880c..72a13d34b1f 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -794,7 +794,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_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
+# elif defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_MOVEFILEEX)
// 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 +826,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_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
+# elif defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_MOVEFILEEX)
// 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
diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl
index 422d07e9c35..cd9a65d5a84 100644
--- a/ACE/ace/OS_NS_sys_mman.inl
+++ b/ACE/ace/OS_NS_sys_mman.inl
@@ -91,41 +91,19 @@ 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)
{
-# 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.
+ 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_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);
- }
+ *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_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index 10ba2d9a0b2..81b2c9e3aa9 100644
--- a/ACE/ace/OS_NS_unistd.cpp
+++ b/ACE/ace/OS_NS_unistd.cpp
@@ -442,7 +442,7 @@ ACE_OS::pread (ACE_HANDLE handle,
DWORD bytes_read;
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
+# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
OVERLAPPED overlapped;
overlapped.Internal = 0;
@@ -473,7 +473,7 @@ ACE_OS::pread (ACE_HANDLE handle,
}
}
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
+# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
BOOL result = ::ReadFile (handle,
buf,
@@ -483,7 +483,7 @@ ACE_OS::pread (ACE_HANDLE handle,
if (result == FALSE)
return -1;
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
+# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
// Reset the original file pointer position
if (::SetFilePointer (handle,
@@ -564,7 +564,7 @@ ACE_OS::pwrite (ACE_HANDLE handle,
LARGE_INTEGER loffset;
loffset.QuadPart = offset;
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
+# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
OVERLAPPED overlapped;
overlapped.Internal = 0;
@@ -592,7 +592,7 @@ ACE_OS::pwrite (ACE_HANDLE handle,
return -1;
}
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
+# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
// Go to the correct position
if (! ::SetFilePointerEx (handle, loffset, 0, FILE_BEGIN))
@@ -609,7 +609,7 @@ ACE_OS::pwrite (ACE_HANDLE handle,
if (result == FALSE)
return -1;
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
+# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
// Reset the original file pointer position
if (::SetFilePointer (handle,
diff --git a/ACE/ace/Pagefile_Memory_Pool.cpp b/ACE/ace/Pagefile_Memory_Pool.cpp
index 125dd041f9e..fcad91bfe93 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_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if !defined (ACE_LACKS_WIN32_SECURITY_DESCRIPTORS)
// 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 /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* ACE_LACKS_WIN32_SECURITY_DESCRIPTORS */
// 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_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if !defined (ACE_LACKS_WIN32_SECURITY_DESCRIPTORS)
&sa,
#else
0,
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* !ACE_LACKS_WIN32_SECURITY_DESCRIPTORS */
PAGE_READWRITE | SEC_RESERVE,
size_high,
size_low,
diff --git a/ACE/ace/Proactor.cpp b/ACE/ace/Proactor.cpp
index 1a7106ad0af..481c7eef5b5 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || 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_WIN32 || ACE_HAS_AIO_CALLS*/
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
diff --git a/ACE/ace/Proactor.h b/ACE/ace/Proactor.h
index cff212a4f39..bcea10ec0fa 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || 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_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS*/
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
#include /**/ "ace/post.h"
diff --git a/ACE/ace/Proactor_Impl.cpp b/ACE/ace/Proactor_Impl.cpp
index 0ab848c5920..fe08453778e 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
-// This only works on Win32 platforms and on Unix platforms supporting
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+// This only works on standard 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 0081010d8e6..607fbd0af09 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_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
-// This only works on Win32 platforms and on Unix platforms supporting
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
+// This only works on standard 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_WIN32 && ACE_HAS_WINCE) || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
#include /**/ "ace/post.h"
#endif /* ACE_PROACTOR_IMPL_H */
diff --git a/ACE/ace/README b/ACE/ace/README
index cc2ccf1cfcd..13743b8c708 100644
--- a/ACE/ace/README
+++ b/ACE/ace/README
@@ -829,6 +829,8 @@ 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)
@@ -1162,7 +1164,10 @@ 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
diff --git a/ACE/ace/SPIPE_Acceptor.cpp b/ACE/ace/SPIPE_Acceptor.cpp
index 960adfc786c..ba5806bae29 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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
: sa_ (0), pipe_handle_ (ACE_INVALID_HANDLE)
-#endif /* ACE_WIN32 */
+#endif /* ACE_HAS_WIN32_NAMED_PIPES */
{
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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
this->sa_ = sa;
this->pipe_mode_ = pipe_mode;
#else
ACE_UNUSED_ARG (sa);
ACE_UNUSED_ARG (pipe_mode);
-#endif /* ACE_WIN32 */
+#endif /* ACE_HAS_WIN32_NAMED_PIPES */
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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#elif defined (ACE_HAS_WIN32_NAMED_PIPES)
// 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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
// 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_WIN32 */
+#endif /* ACE_HAS_WIN32_NAMED_PIPES */
// 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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#elif defined (ACE_HAS_WIN32_NAMED_PIPES)
// 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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#elif defined (ACE_HAS_WIN32_NAMED_PIPES)
ACE_UNUSED_ARG (restart);
ACE_UNUSED_ARG (remote_addr);
diff --git a/ACE/ace/SPIPE_Acceptor.h b/ACE/ace/SPIPE_Acceptor.h
index 6e0bb7ed8aa..2c7d9958756 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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
#include "ace/Manual_Event.h"
-#endif /* ACE_WIN32 */
+#endif /* ACE_HAS_WIN32_NAMED_PIPES */
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_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
// 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_WIN32 */
+#endif /* ACE_HAS_WIN32_NAMED_PIPES */
};
diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp
index c0ceecbf8c6..6dd4e67f624 100644
--- a/ACE/ace/Sock_Connect.cpp
+++ b/ACE/ace/Sock_Connect.cpp
@@ -162,201 +162,6 @@ 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.
@@ -823,9 +628,89 @@ get_ip_interfaces_win32 (size_t &count,
delete [] octet_buffer;
return 0;
-# 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.
+# 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.
+
int i, n_interfaces, status;
INTERFACE_INFO info[64];
@@ -943,263 +828,7 @@ get_ip_interfaces_win32 (size_t &count,
return 0;
-#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 */
+# endif /* ACE_HAS_WINCE */
}
#elif defined (ACE_HAS_GETIFADDRS)
static int
diff --git a/ACE/ace/WIN32_Asynch_IO.cpp b/ACE/ace/WIN32_Asynch_IO.cpp
index 1d058c291fb..2ed1311936e 100644
--- a/ACE/ace/WIN32_Asynch_IO.cpp
+++ b/ACE/ace/WIN32_Asynch_IO.cpp
@@ -6,7 +6,8 @@ ACE_RCSID (ace,
Win32_Asynch_IO,
"$Id$")
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) && \
+ (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 1))
#include "ace/WIN32_Proactor.h"
#include "ace/Message_Block.h"
@@ -166,7 +167,7 @@ ACE_WIN32_Asynch_Operation::open (const ACE_Handler::Proxy_Ptr &handler_proxy,
int
ACE_WIN32_Asynch_Operation::cancel (void)
{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) \
&& ( (defined (_MSC_VER)) \
|| (defined (__BORLANDC__)) \
|| (defined (__MINGW32)))
@@ -186,7 +187,7 @@ ACE_WIN32_Asynch_Operation::cancel (void)
// result is non-zero. All the operations are cancelled then.
return 0;
-#else /* Not ACE_HAS_WINNT4 && ACE_HAS_WINNT4!=0 && _MSC... */
+#else /* Not ACE_HAS_WIN32_OVERLAPPED_IO && _MSC... */
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_HAS_AIO_CALLS */
}
@@ -1299,7 +1300,7 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
int priority,
int signal_number)
{
-#if ((ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
static const size_t page_size = ACE_OS::getpagesize();
FILE_SEGMENT_ELEMENT buffer_pointers[ACE_IOV_MAX + 1];
@@ -1399,9 +1400,9 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
}
return initiate_result;
-#else /*#if ( (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))*/
+#else
ACE_NOTSUP_RETURN (-1);
-#endif /*#if ( (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))*/
+#endif /* ACE_WIN32_OVERLAPPED_IO */
}
@@ -1699,7 +1700,7 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
int priority,
int signal_number)
{
-#if ((ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
static const size_t page_size = ACE_OS::getpagesize();
FILE_SEGMENT_ELEMENT buffer_pointers[ACE_IOV_MAX + 1];
@@ -1804,11 +1805,11 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
}
return initiate_result;
-#else /*#if ((ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))*/
+#else
ACE_NOTSUP_RETURN (-1);
-#endif /* */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
}
@@ -2041,7 +2042,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
int signal_number,
int addr_family)
{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || (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 =
@@ -2145,7 +2146,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
}
return -1;
}
-#else /* ACE_HAS_WINNT4 .......|| ACE_HAS_AIO_CALLS */
+#else
ACE_UNUSED_ARG (message_block);
ACE_UNUSED_ARG (bytes_to_read);
ACE_UNUSED_ARG (accept_handle);
@@ -2154,7 +2155,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_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || (defined (ACE_HAS_AIO_CALLS) */
+#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
}
ACE_WIN32_Asynch_Accept::~ACE_WIN32_Asynch_Accept (void)
@@ -2956,7 +2957,7 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
int priority,
int signal_number)
{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
// TransmitFile API limits us to DWORD range.
if (bytes_to_write > MAXDWORD || bytes_per_send > MAXDWORD)
@@ -3024,7 +3025,7 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
}
return -1;
}
-#else /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
+#else
ACE_UNUSED_ARG (file);
ACE_UNUSED_ARG (header_and_trailer);
ACE_UNUSED_ARG (bytes_to_write);
@@ -3036,7 +3037,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_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_WINSOCK2 */
}
ACE_WIN32_Asynch_Transmit_File::~ACE_WIN32_Asynch_Transmit_File (void)
@@ -3757,4 +3758,4 @@ ACE_WIN32_Asynch_Write_Dgram::ACE_WIN32_Asynch_Write_Dgram (ACE_WIN32_Proactor *
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_WIN32 || ACE_HAS_WINCE */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO && ACE_HAS_WINSOCK2 */
diff --git a/ACE/ace/WIN32_Asynch_IO.h b/ACE/ace/WIN32_Asynch_IO.h
index 66e30b20584..d49072e9fe8 100644
--- a/ACE/ace/WIN32_Asynch_IO.h
+++ b/ACE/ace/WIN32_Asynch_IO.h
@@ -32,7 +32,8 @@
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) && \
+ (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 1))
#include "ace/Asynch_IO_Impl.h"
#include "ace/Addr.h"
@@ -1931,6 +1932,6 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO && ACE_HAS_WINSOCK2 */
#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 7ace0d987b0..e35c3b01d64 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_WINCE))
+#if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO)
// 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 addc5bfd94e..e6db85ba930 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_WINCE))
+#if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO)
// WIN32 implementation of the Proactor.
#include "ace/WIN32_Asynch_IO.h"
diff --git a/ACE/ace/config-WinCE.h b/ACE/ace/config-WinCE.h
index 8a31e29f9fd..70a9694c857 100644
--- a/ACE/ace/config-WinCE.h
+++ b/ACE/ace/config-WinCE.h
@@ -68,12 +68,6 @@
#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-lite.h b/ACE/ace/config-lite.h
index 343ae136ca1..f8edd3b9192 100644
--- a/ACE/ace/config-lite.h
+++ b/ACE/ace/config-lite.h
@@ -129,7 +129,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
// the _RWSTD_NO_CLASS_PARTIAL_SPEC feature test macro below.
# include <Cstd/stdcomp.h>
#endif /* __SUNPRO_CC <= 0x580 */
-#if defined (_MSC_VER) && !defined (_CPPLIB_VER)
+#if defined (_MSC_VER) && (_MSC_VER < 1310) && !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-pharlap.h b/ACE/ace/config-pharlap.h
index fa274e22383..739a424ce19 100644
--- a/ACE/ace/config-pharlap.h
+++ b/ACE/ace/config-pharlap.h
@@ -21,8 +21,7 @@
#endif
// Fortunately, PharLap ETS offers much of the Win32 API. But it's still on
-// WinNT 3.5, Winsock 1.1
-#define ACE_HAS_WINNT4 0
+// Winsock 1.1
#define ACE_HAS_WINSOCK2 0
// The TSS implementation doesn't pass muster on the TSS_Test, but it works
@@ -34,6 +33,8 @@
#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,
@@ -47,8 +48,9 @@
#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-win32-common.h b/ACE/ace/config-win32-common.h
index c0fd492ef28..7beabb8ded6 100644
--- a/ACE/ace/config-win32-common.h
+++ b/ACE/ace/config-win32-common.h
@@ -37,24 +37,8 @@
# endif /* !_FILE_OFFSET_BITS */
#endif /* _WIN64 || WIN64 */
-// 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
+#if !defined (_WIN32_WINNT)
+# define _WIN32_WINNT 0x0400
#endif
// If the invoking procedure turned off debugging by setting NDEBUG, then
@@ -201,14 +185,8 @@
// 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)
@@ -324,10 +302,8 @@
// 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
@@ -548,20 +524,19 @@
# define ACE_HAS_IP_MULTICAST
#endif /* ACE_HAS_WINSOCK2 */
-#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
+#if !defined (ACE_HAS_WINCE) || defined (PPC) /* CE only on some CPUs */
+# define ACE_HAS_INTERLOCKED_EXCHANGEADD
#endif
+#define ACE_HAS_WIN32_TRYLOCK
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_USES_WINCE_SEMA_SIMULATION)
+#if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
# define ACE_HAS_SIGNAL_OBJECT_AND_WAIT
// If CancelIO is undefined get the updated sp2-sdk from MS
# define ACE_HAS_CANCEL_IO
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_USES_WINCE_SEMA_SIMULATION) */
+# define ACE_HAS_WIN32_OVERLAPPED_IO
+# define ACE_HAS_WIN32_NAMED_PIPES
+#endif /* !defined (ACE_USES_WINCE_SEMA_SIMULATION) && !ACE_HAS_PHARLAP */
#if !defined (ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION)
# define ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION EXCEPTION_CONTINUE_SEARCH
@@ -575,6 +550,15 @@
# 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-mingw.h b/ACE/ace/config-win32-mingw.h
index 50b78b4f4ef..b9c59685622 100644
--- a/ACE/ace/config-win32-mingw.h
+++ b/ACE/ace/config-win32-mingw.h
@@ -88,15 +88,6 @@
# 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/tests/CDR_File_Test.cpp b/ACE/tests/CDR_File_Test.cpp
index ec837123c5d..92f92631073 100644
--- a/ACE/tests/CDR_File_Test.cpp
+++ b/ACE/tests/CDR_File_Test.cpp
@@ -406,9 +406,7 @@ run_main (int argc, ACE_TCHAR *argv[])
filename.get_path_name ()),
1);
-#if (!defined (ACE_WIN32) \
- || (defined (ACE_HAS_WINNT4) && ACE_HAS_WINNT4 == 1)) && \
- !defined (VXWORKS)
+#if !defined (VXWORKS)
# define TEST_CAN_UNLINK_IN_ADVANCE
#endif
diff --git a/ACE/tests/Malloc_Test.cpp b/ACE/tests/Malloc_Test.cpp
index 88c2bd5e669..5b260a680a0 100644
--- a/ACE/tests/Malloc_Test.cpp
+++ b/ACE/tests/Malloc_Test.cpp
@@ -44,9 +44,7 @@ typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> MALLOC;
#if !defined (linux) && !defined (ACE_OPENVMS) \
&& !(defined (ACE_WIN32) \
- && (defined (ghs) \
- || defined (__MINGW32__) \
- || (!defined(ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0)))) \
+ && (defined (ghs) || defined (__MINGW32__) )) \
&& !(defined (__OpenBSD__) && defined (ACE_HAS_PTHREADS))
#define ACE_TEST_REMAP_ON_FAULT
// Linux seems to have problem when calling mmap from the signal handler.
@@ -76,12 +74,9 @@ static const void *PARENT_BASE_ADDR = ACE_DEFAULT_BASE_ADDR;
// Note that on HP-UX on PA-RISC hardware, a single range of a file
// cannot be mapped into multiple virtual address ranges, even across
// processes. So, though the whole PI pointer thing is tested here,
-// it isn't actually using multiple address ranges. Also, on Win9x,
-// you need to map shared views to the same address.
+// it isn't actually using multiple address ranges.
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 && !defined (HPUX)) \
- && !(defined (ACE_WIN32) \
- && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0)))
+#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 && !defined (HPUX))
# define CHILD_ADDR_DELTA (1024*1024)
#else
# define CHILD_ADDR_DELTA 0
@@ -307,14 +302,16 @@ child (void)
return 0;
}
-#if defined (ACE_WIN32) \
- && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0))
+#if defined (ACE_WIN32)
// On Win9x/Me, a shared address needs to be on the shared arena,
// betweeen the second and third megabyte in the virtual address space
// of the process. Also, a mapped view of a file is shared on the same
// virtual address on every 32 bit process. On WinNT/2k, memory above
// 2Gb is reserved for the system. So, we need to check at runtime
// (we want an ACE_HAS_WINNT4 == 0 ace to run on either).
+// To catch any odd case arising from Pharlap and/or WinCE, do the
+// run time check and run the NT4-or-better code unless we're on
+// CE or something other than NT4 (Pharlap reports itself as NT 3.51).
static void
get_base_addrs (void)
{
@@ -323,20 +320,20 @@ get_base_addrs (void)
if (::GetVersionEx(&vinfo) == 0)
return;
- if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
+ if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
+ vinfo.dwMajorVersion >= 4)
PARENT_BASE_ADDR = (char*) (64 * 1024*1024);
else
PARENT_BASE_ADDR = (char*) ((2048UL + 512UL)*(1024UL*1024UL));
CHILD_BASE_ADDR = CHILD_ADDR_DELTA + (char*) PARENT_BASE_ADDR;
}
-#endif /* defined (ACE_WIN32) && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0)) */
+#endif /* defined (ACE_WIN32) */
int
run_main (int argc, ACE_TCHAR *[])
{
-#if defined (ACE_WIN32) \
- && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0))
+#if defined (ACE_WIN32)
get_base_addrs();
#endif
diff --git a/ACE/tests/Message_Queue_Test.cpp b/ACE/tests/Message_Queue_Test.cpp
index 4198ca5b6fd..27ae29f0470 100644
--- a/ACE/tests/Message_Queue_Test.cpp
+++ b/ACE/tests/Message_Queue_Test.cpp
@@ -299,7 +299,7 @@ single_thread_performance_test (int queue_type = 0)
-1);
message = "ACE_Message_Queue_Vx, single thread test";
}
-#elif defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
+#elif defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO)
else
{
ACE_NEW_RETURN (msgq,
@@ -495,7 +495,7 @@ performance_test (int queue_type = 0)
-1);
message = "ACE_Message_Queue_Vx";
}
-#elif defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
+#elif defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO)
else
{
ACE_NEW_RETURN (queue_wrapper.q_,
@@ -659,7 +659,7 @@ run_main (int argc, ACE_TCHAR *argv[])
if (status == 0)
status = single_thread_performance_test ();
-# if defined (VXWORKS) || (defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0))
+# if defined (VXWORKS) || defined (ACE_HAS_WIN32_OVERLAPPED_IO)
// Test ACE_Message_Queue_Vx. or ACE_Message_Queue_NT
if (status == 0)
status = single_thread_performance_test (1);
@@ -668,7 +668,7 @@ run_main (int argc, ACE_TCHAR *argv[])
if (status == 0)
status = performance_test ();
-# if defined (VXWORKS) || (defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0))
+# if defined (VXWORKS) || defined (ACE_HAS_WIN32_OVERLAPPED_IO)
// Test ACE_Message_Queue_Vx or ACE_Message_Queue_NT
if (status == 0)
status = performance_test (1);
diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp
index 85a1f11bca1..d270a19d66c 100644
--- a/ACE/tests/OS_Test.cpp
+++ b/ACE/tests/OS_Test.cpp
@@ -92,7 +92,7 @@ rename_test (void)
}
ACE_OS::fclose (f);
-#if defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && ACE_HAS_WINNT4 == 0
+#if defined (ACE_WIN32) && defined (ACE_LACKS_WIN32_MOVEFILEEX)
// Can't rename if new_file exists already.
ACE_OS::unlink (new_file);
#endif
diff --git a/ACE/tests/Proactor_Scatter_Gather_Test.cpp b/ACE/tests/Proactor_Scatter_Gather_Test.cpp
index a3cbb335a34..acc7e11c5b7 100644
--- a/ACE/tests/Proactor_Scatter_Gather_Test.cpp
+++ b/ACE/tests/Proactor_Scatter_Gather_Test.cpp
@@ -28,7 +28,7 @@
#include "test_config.h"
-#if ((defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
// This currently only works on Win32 platforms (NT SP2 and above).
// Support for Unix platforms supporting POSIX aio calls should be added in future.
@@ -1482,4 +1482,4 @@ run_main (int, ACE_TCHAR *[])
return 0;
}
-#endif /* (ACE_HAS_WINNT4 && ACE_HAS_WINNT4 != 0) && !ACE_HAS_WINCE) */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
diff --git a/ACE/tests/Proactor_Test.cpp b/ACE/tests/Proactor_Test.cpp
index 9d739b2d5e3..28a5dbcff8a 100644
--- a/ACE/tests/Proactor_Test.cpp
+++ b/ACE/tests/Proactor_Test.cpp
@@ -20,7 +20,7 @@ ACE_RCSID (tests,
Proactor_Test,
"$Id$")
-#if defined (ACE_HAS_THREADS) && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS))
// This only works on Win32 platforms and on Unix platforms
// supporting POSIX aio calls.
@@ -50,7 +50,7 @@ ACE_RCSID (tests,
#include "ace/Atomic_Op.h"
#include "ace/Synch_Traits.h"
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+#if defined (ACE_WIN32)
# include "ace/WIN32_Proactor.h"
@@ -60,7 +60,7 @@ ACE_RCSID (tests,
# include "ace/POSIX_CB_Proactor.h"
# include "ace/SUN_Proactor.h"
-#endif /* defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) */
+#endif /* ACE_WIN32 */
#include "Proactor_Test.h"
@@ -205,7 +205,7 @@ MyTask::create_proactor (ProactorType type_proactor, size_t max_op)
ACE_ASSERT (this->proactor_ == 0);
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+#if defined (ACE_WIN32)
ACE_UNUSED_ARG (type_proactor);
ACE_UNUSED_ARG (max_op);
@@ -269,7 +269,7 @@ MyTask::create_proactor (ProactorType type_proactor, size_t max_op)
break;
}
-#endif // (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+#endif /* ACE_WIN32 */
// always delete implementation 1 , not !(proactor_impl == 0)
ACE_NEW_RETURN (this->proactor_,
@@ -1281,7 +1281,7 @@ Client::initiate_write_stream (void)
static const size_t complete_message_length = ACE_OS::strlen (complete_message);
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_WIN32)
ACE_Message_Block *mb1 = 0,
*mb2 = 0,
@@ -1319,7 +1319,7 @@ Client::initiate_write_stream (void)
ACE_TEXT ("Client::ACE_Asynch_Stream::writev")),
-1);
}
-#else /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#else /* ACE_WIN32 */
ACE_Message_Block *mb = 0;
@@ -1346,7 +1346,7 @@ Client::initiate_write_stream (void)
ACE_TEXT ("write")),
-1);
}
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#endif /* ACE_WIN32 */
this->io_count_++;
this->total_w_++;
@@ -1362,7 +1362,7 @@ Client::initiate_read_stream (void)
static const size_t complete_message_length =
ACE_OS::strlen (complete_message);
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
ACE_Message_Block *mb1 = 0,
*mb2 = 0,
*mb3 = 0,
@@ -1411,7 +1411,7 @@ Client::initiate_read_stream (void)
ACE_TEXT ("Client::ACE_Asynch_Read_Stream::readv")),
-1);
}
-#else /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#else /* ACE_HAS_WIN32_OVERLAPPED_IO */
// Try to read more chunks
size_t blksize = ( complete_message_length > BUFSIZ ) ?
@@ -1444,7 +1444,7 @@ Client::initiate_read_stream (void)
ACE_TEXT ("read")),
-1);
}
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
this->io_count_++;
this->total_r_++;
@@ -1495,7 +1495,7 @@ Client::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
ACE_TEXT ("error"),
result.error ()));
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_WIN32)
size_t bytes_transferred = result.bytes_transferred ();
char index = 0;
for (ACE_Message_Block* mb_i = &mb;
@@ -1526,7 +1526,7 @@ Client::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
index,
mb_i->rd_ptr ()));
}
-#else /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#else /* ACE_WIN32 */
// write 0 at string end for proper printout (if end of mb, it's 0 already)
mb.rd_ptr()[0] = '\0';
// move rd_ptr backwards as required for printout
@@ -1535,7 +1535,7 @@ Client::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
ACE_TEXT ("%s = %s\n"),
ACE_TEXT ("message_block"),
mb.rd_ptr ()));
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#endif /* ACE_WIN32 */
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("**** end of message ****************\n")));
@@ -1638,7 +1638,7 @@ Client::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
ACE_TEXT ("error"),
result.error ()));
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_WIN32)
char index = 0;
for (ACE_Message_Block* mb_i = &mb;
mb_i != 0;
@@ -1654,14 +1654,14 @@ Client::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
index,
mb_i->rd_ptr ()));
}
-#else /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#else /* ACE_WIN32 */
// write 0 at string end for proper printout
mb.rd_ptr()[result.bytes_transferred ()] = '\0'; // for proper printout
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %s\n"),
ACE_TEXT ("message_block"),
mb.rd_ptr ()));
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#endif /* ACE_WIN32 */
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("**** end of message ****************\n")));
@@ -1934,4 +1934,4 @@ run_main (int, ACE_TCHAR *[])
return 0;
}
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
diff --git a/ACE/tests/Proactor_Test_IPV6.cpp b/ACE/tests/Proactor_Test_IPV6.cpp
index 7ac9443d0ae..003f6915612 100644
--- a/ACE/tests/Proactor_Test_IPV6.cpp
+++ b/ACE/tests/Proactor_Test_IPV6.cpp
@@ -20,7 +20,7 @@ ACE_RCSID (tests,
Proactor_Test,
"$Id$")
-#if defined (ACE_HAS_THREADS) && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS))
// This only works on Win32 platforms and on Unix platforms
// supporting POSIX aio calls.
@@ -50,7 +50,7 @@ ACE_RCSID (tests,
#include "ace/Atomic_Op.h"
#include "ace/Synch_Traits.h"
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
# include "ace/WIN32_Proactor.h"
@@ -60,7 +60,7 @@ ACE_RCSID (tests,
# include "ace/POSIX_CB_Proactor.h"
# include "ace/SUN_Proactor.h"
-#endif /* defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) */
+#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */
#include "Proactor_Test.h"
@@ -1678,7 +1678,7 @@ Client::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
ACE_TEXT ("error"),
result.error ()));
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
+#if defined (ACE_WIN32)
char index = 0;
for (ACE_Message_Block* mb_i = &mb;
mb_i != 0;
@@ -1694,14 +1694,14 @@ Client::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
index,
mb_i->rd_ptr ()));
}
-#else /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#else /* ACE_WIN32 */
// write 0 at string end for proper printout
mb.rd_ptr()[result.bytes_transferred ()] = '\0'; // for proper printout
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %s\n"),
ACE_TEXT ("message_block"),
mb.rd_ptr ()));
-#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
+#endif /* ACE_WIN32 */
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("**** end of message ****************\n")));
@@ -1981,4 +1981,4 @@ run_main (int, ACE_TCHAR *[])
return 0;
}
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
diff --git a/ACE/tests/Proactor_Timer_Test.cpp b/ACE/tests/Proactor_Timer_Test.cpp
index 7871c883e75..7d81bcb5ef1 100644
--- a/ACE/tests/Proactor_Timer_Test.cpp
+++ b/ACE/tests/Proactor_Timer_Test.cpp
@@ -27,7 +27,7 @@ ACE_RCSID (tests,
Proactor_Timer_Test,
"$Id$")
-#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
+#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
// This only works on Win32 platforms and on Unix platforms
// supporting POSIX aio calls.
@@ -340,4 +340,4 @@ run_main (int, ACE_TCHAR *[])
return 0;
}
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS */
+#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */
diff --git a/ACE/tests/SPIPE_Test.cpp b/ACE/tests/SPIPE_Test.cpp
index 22a4427af44..31e0ae86653 100644
--- a/ACE/tests/SPIPE_Test.cpp
+++ b/ACE/tests/SPIPE_Test.cpp
@@ -32,9 +32,7 @@
ACE_RCSID(tests, SPIPE_Test, "SPIPE_Test.cpp,v 4.36 2002/03/06 21:48:03 nanbor Exp")
-#if defined (ACE_HAS_STREAM_PIPES) \
- || (defined (ACE_WIN32) && defined(ACE_HAS_WINNT4) \
- && (ACE_HAS_WINNT4 !=0))
+#if defined (ACE_HAS_STREAM_PIPES) || defined (ACE_HAS_WIN32_NAMED_PIPES)
# define TEST_HAS_STREAM_PIPES
#endif
@@ -64,7 +62,7 @@ client (void *)
if (cli_stream.close () == -1)
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("close")));
-#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
// Wait for server to get ready...
ACE_OS::sleep (1);
@@ -134,7 +132,7 @@ server (void *)
new_stream.close ();
acceptor.close ();
-#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
+#if defined (ACE_HAS_WIN32_NAMED_PIPES)
// Initialize an NT bytestream named pipe listener.
if (acceptor.open (ACE_SPIPE_Addr (rendezvous),
1,
@@ -177,7 +175,7 @@ server (void *)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End of connection. Closing handle\n")));
new_stream.close ();
acceptor.close ();
-#endif /* (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
+#endif /* defined (ACE_HAS_WIN32NAMED_PIPES) */
return 0;
}
diff --git a/ACE/tests/Svc_Handler_Test.cpp b/ACE/tests/Svc_Handler_Test.cpp
index c36d8483e08..09393447ba2 100644
--- a/ACE/tests/Svc_Handler_Test.cpp
+++ b/ACE/tests/Svc_Handler_Test.cpp
@@ -101,9 +101,7 @@ run_main (int argc, ACE_TCHAR *argv[])
file.get_path_name ()),
1);
-#if (!defined (ACE_WIN32) \
- || (defined (ACE_HAS_WINNT4) && ACE_HAS_WINNT4 == 1)) && \
- !defined (VXWORKS)
+#if !defined (VXWORKS)
# define TEST_CAN_UNLINK_IN_ADVANCE
#endif
diff --git a/ACE/tests/UPIPE_SAP_Test.cpp b/ACE/tests/UPIPE_SAP_Test.cpp
index 24d08fdc5f7..296d746fbb6 100644
--- a/ACE/tests/UPIPE_SAP_Test.cpp
+++ b/ACE/tests/UPIPE_SAP_Test.cpp
@@ -27,9 +27,8 @@
ACE_RCSID(tests, UPIPE_SAP_Test, "$Id$")
-#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || \
- (defined (ACE_WIN32) && \
- defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)))
+#if defined (ACE_HAS_THREADS) && \
+ (defined (ACE_HAS_STREAM_PIPES) || defined (ACE_HAS_WIN32_NAMED_PIPES))
// Global pattern
static ACE_UPIPE_Addr addr (ACE_TEXT ("pattern"));
@@ -138,16 +137,15 @@ acceptor (void *args)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) exiting thread\n")));
return 0;
}
-#endif /* ACE_HAS_THREADS && defined ACE_HAS_STREAM_PIPES || (ACE_WIN32&&NT4)*/
+#endif /* ACE_HAS_THREADS && (ACE_HAS_STREAM_PIPES || ACE_HAS_WIN32_NAMED_PIPES) */
int
run_main (int, ACE_TCHAR *[])
{
ACE_START_TEST (ACE_TEXT ("UPIPE_SAP_Test"));
-#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || \
- (defined (ACE_WIN32) && \
- defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)))
+#if defined (ACE_HAS_THREADS) && \
+ (defined (ACE_HAS_STREAM_PIPES) || defined (ACE_HAS_WIN32_NAMED_PIPES))
ACE_UPIPE_Acceptor acc (addr);
@@ -178,7 +176,7 @@ run_main (int, ACE_TCHAR *[])
#else
ACE_ERROR ((LM_INFO, ACE_TEXT ("UPIPE is not supported on this platform\n")));
#endif /* !defined (ACE_HAS_THREADS) */
-#endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) && NT4) */
+#endif /* ACE_HAS_THREADS && (ACE_HAS_STREAM_PIPES || ACE_HAS_WIN32_NAMED_PIPES) */
ACE_END_TEST;
return 0;