summaryrefslogtreecommitdiff
path: root/ACE/ace
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
commita3b7dea69399648c2a7a0153044a4a0ab10109f4 (patch)
tree0d4aa36885e171bacce4f30edfea290e5fbd8140 /ACE/ace
parent2bb628ef1397bc2ff4c26817bb71c338214c35ed (diff)
downloadATCD-a3b7dea69399648c2a7a0153044a4a0ab10109f4.tar.gz
ChangeLogTag:Sat Jan 6 00:06:52 UTC 2007 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace')
-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
38 files changed, 234 insertions, 759 deletions
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")