diff options
Diffstat (limited to 'ACE/ace')
318 files changed, 531 insertions, 9894 deletions
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index 2376de0f58d..06b0289b89a 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -59,9 +59,6 @@ ACE::out_of_handles (int error) #if defined (ACE_WIN32) // On Win32, we need to check for ENOBUFS also. error == ENOBUFS || -#elif defined (HPUX) - // On HPUX, we need to check for EADDRNOTAVAIL also. - error == EADDRNOTAVAIL || #elif defined (ACE_LINUX) // On linux, we need to check for ENOENT also. error == ENOENT || @@ -69,11 +66,6 @@ ACE::out_of_handles (int error) error == EINVAL || // Without threads check for EOPNOTSUPP error == EOPNOTSUPP || -#elif defined (sun) - // On sun, we need to check for ENOSR also. - error == ENOSR || - // Without threads check for ENOTSUP - error == ENOTSUP || #elif defined (__FreeBSD__) // On FreeBSD we need to check for EOPNOTSUPP (LinuxThreads) or // ENOSYS (libc_r threads) also. diff --git a/ACE/ace/ACE.inl b/ACE/ace/ACE.inl index 4e7a77e5d87..5c7b15e4072 100644 --- a/ACE/ace/ACE.inl +++ b/ACE/ace/ACE.inl @@ -216,7 +216,7 @@ ACE::sendv_n (ACE_HANDLE handle, ACE_INLINE ssize_t ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) { -#if defined (ACE_WIN32) || defined (HPUX) || defined (ACE_MQX) +#if defined (ACE_WIN32) || defined (ACE_MQX) return ACE_OS::send (handle, (const char *) buf, len); #else return ACE_OS::write (handle, (const char *) buf, len); @@ -226,7 +226,7 @@ ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) ACE_INLINE ssize_t ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len) { -#if defined (ACE_WIN32) || defined (ACE_OPENVMS) || defined (ACE_MQX) +#if defined (ACE_WIN32) || defined (ACE_MQX) return ACE_OS::recv (handle, (char *) buf, len); #else return ACE_OS::read (handle, (char *) buf, len); diff --git a/ACE/ace/ARGV.h b/ACE/ace/ARGV.h index f45f176a97c..eb03fc776f4 100644 --- a/ACE/ace/ARGV.h +++ b/ACE/ace/ARGV.h @@ -320,13 +320,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/ARGV.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/ARGV.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("ARGV.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_ARGUMENT_VECTOR_H */ diff --git a/ACE/ace/Abstract_Timer_Queue.h b/ACE/ace/Abstract_Timer_Queue.h index cd17f28d0ef..23e46afc4c1 100644 --- a/ACE/ace/Abstract_Timer_Queue.h +++ b/ACE/ace/Abstract_Timer_Queue.h @@ -218,13 +218,7 @@ public: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Abstract_Timer_Queue.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Abstract_Timer_Queue.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_ABSTRACT_TIMER_QUEUE_H */ diff --git a/ACE/ace/Acceptor.h b/ACE/ace/Acceptor.h index e0dc84ee258..5ebbeeb5fa7 100644 --- a/ACE/ace/Acceptor.h +++ b/ACE/ace/Acceptor.h @@ -684,13 +684,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Acceptor.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Active_Map_Manager_T.h b/ACE/ace/Active_Map_Manager_T.h index 78dd7a3f991..be1e78ad596 100644 --- a/ACE/ace/Active_Map_Manager_T.h +++ b/ACE/ace/Active_Map_Manager_T.h @@ -192,13 +192,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Active_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Active_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Active_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_ACTIVE_MAP_MANAGER_T_H */ diff --git a/ACE/ace/Arg_Shifter.h b/ACE/ace/Arg_Shifter.h index 547d772e12d..c714b992ecb 100644 --- a/ACE/ace/Arg_Shifter.h +++ b/ACE/ace/Arg_Shifter.h @@ -226,13 +226,7 @@ typedef ACE_Arg_Shifter_T<ACE_TCHAR> ACE_Arg_Shifter; ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Arg_Shifter.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Arg_Shifter.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Array_Base.h b/ACE/ace/Array_Base.h index c2020aae474..13b71310509 100644 --- a/ACE/ace/Array_Base.h +++ b/ACE/ace/Array_Base.h @@ -55,8 +55,8 @@ public: typedef value_type const * const_pointer; typedef ptrdiff_t difference_type; typedef ACE_Allocator::size_type size_type; - - ACE_DECLARE_STL_REVERSE_ITERATORS + typedef std::reverse_iterator<iterator> reverse_iterator; + typedef std::reverse_iterator<const_iterator> const_reverse_iterator; /// Dynamically create an uninitialized array. ACE_Array_Base (size_type size = 0, @@ -236,13 +236,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Array_Base.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Array_Base.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Array_Base.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Array_Map.h b/ACE/ace/Array_Map.h index 4feefe97066..3e12910f74d 100644 --- a/ACE/ace/Array_Map.h +++ b/ACE/ace/Array_Map.h @@ -33,13 +33,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if defined __SUNPRO_CC && !defined _RWSTD_ALLOCATOR -# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator_interface< \ - std::allocator<void>, \ - std::pair<K, V> > -#else -# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> > -#endif +#define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> > /** * @class ACE_Array_Map @@ -92,7 +86,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * -# operator= */ template<typename Key, typename Value, class EqualTo = std::equal_to<Key>, - class Alloc = ACE_ARRAY_MAP_DEFAULT_ALLOCATOR (Key, Value) > + class Alloc = std::allocator<std::pair<Key,Value>>> class ACE_Array_Map { public: @@ -110,7 +104,8 @@ public: typedef value_type const * const_iterator; typedef ptrdiff_t difference_type; typedef size_t size_type; - ACE_DECLARE_STL_REVERSE_ITERATORS + typedef std::reverse_iterator<iterator> reverse_iterator; + typedef std::reverse_iterator<const_iterator> const_reverse_iterator; /// Default Constructor. /** @@ -287,13 +282,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # include "ace/Array_Map.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/Array_Map.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Array_Map.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ +#include "ace/Array_Map.cpp" #include /**/ "ace/post.h" diff --git a/ACE/ace/Asynch_Acceptor.h b/ACE/ace/Asynch_Acceptor.h index 7760ba53d5c..16f4edb0dc3 100644 --- a/ACE/ace/Asynch_Acceptor.h +++ b/ACE/ace/Asynch_Acceptor.h @@ -260,13 +260,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Asynch_Acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Asynch_Acceptor.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Asynch_Connector.cpp b/ACE/ace/Asynch_Connector.cpp index 480c24b9551..5d9d5fdd16e 100644 --- a/ACE/ace/Asynch_Connector.cpp +++ b/ACE/ace/Asynch_Connector.cpp @@ -7,7 +7,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE) +#if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS) // This only works on platforms that support async I/O. #include "ace/OS_NS_sys_socket.h" diff --git a/ACE/ace/Asynch_Connector.h b/ACE/ace/Asynch_Connector.h index ad09d0a1879..aa1f763411a 100644 --- a/ACE/ace/Asynch_Connector.h +++ b/ACE/ace/Asynch_Connector.h @@ -18,7 +18,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE) +#if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS) // This only works on platforms that support async i/o. #include "ace/Asynch_IO.h" @@ -154,13 +154,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Asynch_Connector.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Asynch_Connector.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Asynch_IO.cpp b/ACE/ace/Asynch_IO.cpp index b745791a118..5502dd2191c 100644 --- a/ACE/ace/Asynch_IO.cpp +++ b/ACE/ace/Asynch_IO.cpp @@ -432,7 +432,7 @@ ACE_Asynch_Read_File::read (ACE_Message_Block &message_block, signal_number); } -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) int ACE_Asynch_Read_File::readv (ACE_Message_Block &message_block, size_t bytes_to_read, @@ -455,7 +455,7 @@ ACE_Asynch_Read_File::readv (ACE_Message_Block &message_block, priority, signal_number); } -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ ACE_Asynch_Operation_Impl * ACE_Asynch_Read_File::implementation () const @@ -540,7 +540,7 @@ ACE_Asynch_Write_File::write (ACE_Message_Block &message_block, signal_number); } -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) int ACE_Asynch_Write_File::writev (ACE_Message_Block &message_block, size_t bytes_to_write, @@ -563,7 +563,7 @@ ACE_Asynch_Write_File::writev (ACE_Message_Block &message_block, priority, signal_number); } -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ ACE_Asynch_Operation_Impl * ACE_Asynch_Write_File::implementation () const diff --git a/ACE/ace/Asynch_IO.h b/ACE/ace/Asynch_IO.h index 677c814d201..c528be4188e 100644 --- a/ACE/ace/Asynch_IO.h +++ b/ACE/ace/Asynch_IO.h @@ -4,9 +4,8 @@ /** * @file Asynch_IO.h * - * This works on Win32 (defined (ACE_WIN32) && !defined - * (ACE_HAS_WINCE)) platforms and on POSIX4 platforms with {aio_*} - * routines (defined (ACE_HAS_AIO_CALLS)) + * This works on Win32 (defined (ACE_WIN32)) platforms and on + * POSIX4 platforms with {aio_*} routines (defined (ACE_HAS_AIO_CALLS)) * * On Win32 platforms, the implementation of * {ACE_Asynch_Transmit_File} and {ACE_Asynch_Accept} are only @@ -639,7 +638,7 @@ public: int priority = 0, int signal_number = ACE_SIGRTMIN); -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with scatter support, through chaining of composite * message blocks using the continuation field. @@ -653,7 +652,7 @@ public: const void *act = 0, int priority = 0, int signal_number = ACE_SIGRTMIN); -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ /// Return the underlying implementation class. // (this should be protected...) @@ -774,7 +773,7 @@ public: int priority = 0, int signal_number = ACE_SIGRTMIN); -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with gather support, through chaining of composite * message blocks using the continuation field. @@ -788,7 +787,7 @@ public: const void *act = 0, int priority = 0, int signal_number = ACE_SIGRTMIN); -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ /// Return the underlying implementation class. // (this should be protected...) diff --git a/ACE/ace/Asynch_IO_Impl.h b/ACE/ace/Asynch_IO_Impl.h index 2f7e952ad15..40e79e25de6 100644 --- a/ACE/ace/Asynch_IO_Impl.h +++ b/ACE/ace/Asynch_IO_Impl.h @@ -160,7 +160,7 @@ public: int priority, int signal_number) = 0; -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with scatter support, through chaining of composite * message blocks using the continuation field. @@ -170,7 +170,7 @@ public: const void *act, int priority, int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ protected: /// Do-nothing constructor. @@ -224,7 +224,7 @@ public: int priority, int signal_number) = 0; -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with gather support, through chaining of composite * message blocks using the continuation field. @@ -234,7 +234,7 @@ public: const void *act, int priority, int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ protected: /// Do-nothing constructor. @@ -293,7 +293,7 @@ public: int priority, int signal_number) = 0; -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with scatter support, through chaining of composite * message blocks using the continuation field. @@ -307,7 +307,7 @@ public: const void *act, int priority, int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ /// This starts off an asynchronous read. Upto @a bytes_to_read will /// be read and stored in the @a message_block. @@ -317,7 +317,7 @@ public: int priority, int signal_number) = 0; -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with scatter support, through chaining of composite * message blocks using the continuation field. @@ -327,7 +327,7 @@ public: const void *act, int priority, int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ protected: /// Do-nothing constructor. @@ -376,7 +376,7 @@ public: int priority, int signal_number) = 0; -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with gather support, through chaining of composite * message blocks using the continuation field. @@ -390,7 +390,7 @@ public: const void *act, int priority, int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ /// This starts off an asynchronous write. Upto @a bytes_to_write /// will be written from the @a message_block. @@ -400,7 +400,7 @@ public: int priority, int signal_number) = 0; -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if defined (ACE_WIN32) /** * Same as above but with gather support, through chaining of composite * message blocks using the continuation field. @@ -410,7 +410,7 @@ public: const void *act, int priority, int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ +#endif /* defined (ACE_WIN32) */ protected: /// Do-nothing constructor. diff --git a/ACE/ace/Atomic_Op.cpp b/ACE/ace/Atomic_Op.cpp index 4b16b311743..52394cd01a3 100644 --- a/ACE/ace/Atomic_Op.cpp +++ b/ACE/ace/Atomic_Op.cpp @@ -7,10 +7,6 @@ #if defined (ACE_HAS_BUILTIN_ATOMIC_OP) -#if defined (ACE_INCLUDE_ATOMIC_OP_SPARC) -# include "ace/Atomic_Op_Sparc.h" -#endif /* ACE_INCLUDE_ATOMIC_OP_SPARC */ - namespace { #if defined (_MSC_VER) // Disable "no return value" warning, as we will be putting @@ -27,10 +23,6 @@ single_cpu_increment (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp + 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), 1); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) ); @@ -51,10 +43,6 @@ single_cpu_decrement (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp - 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), -1); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) ); @@ -74,10 +62,6 @@ single_cpu_exchange (volatile long *value, long rhs) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("lwz %0,%1" : "=r" (tmp) : "m" (rhs) ); @@ -97,10 +81,6 @@ single_cpu_exchange_add (volatile long *value, long rhs) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "xadd %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_add_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #elif defined(__GNUC__) && defined(__PPC__) long tmp; asm("add %0,%1,%2" : "=r" (tmp) : "r" (*value), "r" (rhs) ); @@ -140,10 +120,6 @@ multi_cpu_increment (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp + 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), 1); #else /* ACE_HAS_INTEL_ASSEMBLY*/ ACE_UNUSED_ARG (value); ACE_NOTSUP_RETURN (-1); @@ -158,10 +134,6 @@ multi_cpu_decrement (volatile long *value) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); return tmp - 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast<volatile unsigned long*> (value), -1); #else /* ACE_HAS_INTEL_ASSEMBLY*/ ACE_UNUSED_ARG (value); ACE_NOTSUP_RETURN (-1); @@ -176,10 +148,6 @@ multi_cpu_exchange (volatile long *value, long rhs) // The XCHG instruction automatically follows LOCK semantics asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #else /* ACE_HAS_INTEL_ASSEMBLY*/ ACE_UNUSED_ARG (value); ACE_UNUSED_ARG (rhs); @@ -194,10 +162,6 @@ multi_cpu_exchange_add (volatile long *value, long rhs) unsigned long addr = reinterpret_cast<unsigned long> (value); asm( "lock ; xadd %0, (%1)" : "+r"(rhs) : "r"(addr) ); return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_add_long ( - reinterpret_cast<volatile unsigned long*> (value), rhs); #elif defined (WIN32) && !defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) # if defined (_MSC_VER) __asm diff --git a/ACE/ace/Atomic_Op.h b/ACE/ace/Atomic_Op.h index 3534c1bef0c..0c505666976 100644 --- a/ACE/ace/Atomic_Op.h +++ b/ACE/ace/Atomic_Op.h @@ -43,8 +43,6 @@ # define ACE_HAS_BUILTIN_ATOMIC_OP # elif defined (ACE_HAS_VXATOMICLIB) # define ACE_HAS_BUILTIN_ATOMIC_OP -# elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && !defined (ACE_HAS_BUILTIN_ATOMIC_OP) -# define ACE_HAS_BUILTIN_ATOMIC_OP # endif /* WIN32 */ #endif /* ACE_HAS_THREADS */ diff --git a/ACE/ace/Atomic_Op.inl b/ACE/ace/Atomic_Op.inl index 517e3ca7d0e..12fb795946e 100644 --- a/ACE/ace/Atomic_Op.inl +++ b/ACE/ace/Atomic_Op.inl @@ -8,10 +8,6 @@ # include <vxAtomicLib.h> #endif -#if defined (ACE_HAS_SOLARIS_ATOMIC_LIB) -# include <atomic.h> -#endif - ACE_BEGIN_VERSIONED_NAMESPACE_DECL #if defined (ACE_HAS_BUILTIN_ATOMIC_OP) @@ -44,8 +40,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator++ () return ::InterlockedIncrement (const_cast<long *> (&this->value_)); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicInc (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_))) + 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_inc_ulong_nv (reinterpret_cast<volatile unsigned long*>(&this->value_)); #else /* WIN32 */ return (*increment_fn_) (&this->value_); #endif /* WIN32 */ @@ -66,8 +60,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-- () return ::InterlockedDecrement (const_cast<long *> (&this->value_)); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicDec (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_))) - 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_dec_ulong_nv (reinterpret_cast<volatile unsigned long*>(&this->value_)); #else /* WIN32 */ return (*decrement_fn_) (&this->value_); #endif /* WIN32 */ @@ -90,8 +82,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator+= (long rhs) rhs) + rhs; #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicAdd (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs) + rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ return (*exchange_add_fn_) (&this->value_, rhs) + rhs; #endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ @@ -108,8 +98,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-= (long rhs) -rhs) - rhs; #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicSub (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs) - rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (reinterpret_cast<volatile unsigned long*>(&this->value_), -rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ return (*exchange_add_fn_) (&this->value_, -rhs) - rhs; #endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ @@ -160,8 +148,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (long rhs) ::InterlockedExchange (const_cast<long *> (&this->value_), rhs); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs); #else /* WIN32 */ (*exchange_fn_) (&this->value_, rhs); #endif /* WIN32 */ @@ -178,8 +164,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= ( ::InterlockedExchange (const_cast<long *> (&this->value_), rhs.value_); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs.value_); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs.value_); #else /* WIN32 */ (*exchange_fn_) (&this->value_, rhs.value_); #endif /* WIN32 */ @@ -195,8 +179,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::exchange (long newval) return ::InterlockedExchange (const_cast<long *> (&this->value_), newval); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), newval); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), newval); #else /* WIN32 */ return (*exchange_fn_) (&this->value_, newval); #endif /* WIN32 */ @@ -243,8 +225,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator++ () return static_cast<unsigned long> (::InterlockedIncrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_)))); #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicInc (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))))) + 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_inc_ulong_nv (&this->value_); #else /* WIN32 */ return static_cast<unsigned long> ((*increment_fn_) (reinterpret_cast<volatile long *> (&this->value_))); #endif /* WIN32 */ @@ -265,8 +245,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator-- () return static_cast<unsigned long> (::InterlockedDecrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_)))); #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicDec (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))))) - 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_dec_ulong_nv (&this->value_); #else /* WIN32 */ return static_cast<unsigned long> ((*decrement_fn_) (reinterpret_cast<volatile long *> (&this->value_))); #endif /* WIN32 */ @@ -289,8 +267,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator+= (unsigned long rhs) rhs)) + rhs; #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicAdd (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))), rhs)) + rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (&this->value_, rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ return static_cast<unsigned long> ((*exchange_add_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs)) + rhs; #endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ @@ -307,8 +283,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator-= (unsigned long rhs) -static_cast<long>(rhs))) - rhs; #elif defined (ACE_HAS_VXATOMICLIB) return static_cast<unsigned long> (::vxAtomicSub (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))), rhs)) - rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (&this->value_, -rhs); #else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ long l_rhs = static_cast<long> (rhs); return static_cast<unsigned long> ((*exchange_add_fn_) (reinterpret_cast<volatile long *> (&this->value_), -l_rhs)) - rhs; @@ -360,8 +334,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= (unsigned long rhs) ::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), rhs); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (&this->value_, rhs); #else /* WIN32 */ (*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs); #endif /* WIN32 */ @@ -378,8 +350,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= ( ::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs.value_); #elif defined (ACE_HAS_VXATOMICLIB) ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), rhs.value_); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (&this->value_, rhs.value_); #else /* WIN32 */ (*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs.value_); #endif /* WIN32 */ @@ -395,8 +365,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::exchange (unsigned long newval) return ::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), newval); #elif defined (ACE_HAS_VXATOMICLIB) return ::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), newval); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_swap_ulong (&this->value_, newval); #else /* WIN32 */ return (*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), newval); #endif /* WIN32 */ diff --git a/ACE/ace/Atomic_Op_GCC_T.h b/ACE/ace/Atomic_Op_GCC_T.h index 13d363163ea..751387f9ce7 100644 --- a/ACE/ace/Atomic_Op_GCC_T.h +++ b/ACE/ace/Atomic_Op_GCC_T.h @@ -120,14 +120,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Atomic_Op_GCC_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Atomic_Op_GCC_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Atomic_Op_GCC_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */ diff --git a/ACE/ace/Atomic_Op_Sparc.c b/ACE/ace/Atomic_Op_Sparc.c deleted file mode 100644 index 9e59864ae8a..00000000000 --- a/ACE/ace/Atomic_Op_Sparc.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * - * This is a C file for a reason. The Sun C++ compiler does not accept - * inline assembler. - * - * Portions of this code are based on atomic operations found in the - * linux kernel source code. - */ - -#if defined (ACE_INCLUDE_ATOMIC_OP_SPARC) - -#if defined(__i386) && defined(__SUNPRO_C) -static void -__sunpro_asm_code() { - __asm("\n\ - .globl ace_atomic_add_long \n\ - .type ace_atomic_add_long,@function \n\ - .align 4 \n\ -ace_atomic_add_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - lock; xadd %eax, (%edx) \n\ - addl 0x00000008(%esp), %eax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_long \n\ - .type ace_atomic_swap_long,@function \n\ - .align 4 \n\ -ace_atomic_swap_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - xchg %eax, (%edx) \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_add_long \n\ - .type ace_atomic_swap_add_long,@function \n\ - .align 4 \n\ -ace_atomic_swap_add_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - lock; xadd %eax, (%edx) \n\ - ret \n\ - "); -} - -#elif defined(__x86_64) && defined(__SUNPRO_C) - -static void -__sunpro_asm_code() { - __asm("\n\ - .globl ace_atomic_add_long \n\ - .type ace_atomic_add_long,@function \n\ - .align 16 \n\ -ace_atomic_add_long: \n\ - movq %rsi, %rax \n\ - lock; xaddq %rax, (%rdi) \n\ - addq %rsi, %rax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_long \n\ - .type ace_atomic_swap_long,@function \n\ - .align 16 \n\ -ace_atomic_swap_long: \n\ - xchgq %rsi, (%rdi) \n\ - movq %rsi, %rax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_add_long \n\ - .type ace_atomic_swap_add_long,@function \n\ - .align 16 \n\ -ace_atomic_swap_add_long: \n\ - lock; xaddq %rsi, (%rdi) \n\ - movq %rsi, %rax \n\ - ret \n\ - "); -} - -#elif defined (__sparcv9) - -unsigned long -ace_atomic_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_add:\n" - "add %o2, %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_add\n" - "mov %o3, %o2\n" - "retl\n" - "add %o2, %o1, %o0\n"); -} - -unsigned long -ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_swap:\n" - "mov %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_swap\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o3, %o0\n"); -} - -unsigned long -ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_swap_add:\n" - "mov %o2, %o4\n" - "add %o2, %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_swap_add\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o4, %o0\n"); -} - -#else - -unsigned long -ace_atomic_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_add:\n" - "add %o2, %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_add\n" - "mov %o3, %o2\n" - "retl\n" - "add %o2, %o1, %o0\n"); -} - -unsigned long -ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_swap:\n" - "mov %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_swap\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o3, %o0\n"); -} - -unsigned long -ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_swap_add:\n" - "mov %o2, %o4\n" - "add %o2, %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_swap_add\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o4, %o0\n"); -} - -# endif /* __sparcv9 */ - -#elif !defined (__GNUC__) && !defined (__INTEL_COMPILER) -/* Make compilers stop complaining about an empty translation unit */ -static int shut_up_compiler = 0; -#endif /* ACE_INCLUDE_ATOMIC_OP_SPARC */ diff --git a/ACE/ace/Atomic_Op_Sparc.h b/ACE/ace/Atomic_Op_Sparc.h deleted file mode 100644 index 3c4d883c2af..00000000000 --- a/ACE/ace/Atomic_Op_Sparc.h +++ /dev/null @@ -1,12 +0,0 @@ -/* -*- C++ -*- */ -#ifndef ACE_ATOMIC_OP_SPARC_H -#define ACE_ATOMIC_OP_SPARC_H - -extern "C" -{ - unsigned long ace_atomic_add_long (volatile unsigned long *dest, long rhs); - unsigned long ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs); - unsigned long ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs); -} - -#endif /* ACE_ATOMIC_OP_SPARC_H */ diff --git a/ACE/ace/Atomic_Op_T.h b/ACE/ace/Atomic_Op_T.h index 599ae7075b6..e3752ccbd4c 100644 --- a/ACE/ace/Atomic_Op_T.h +++ b/ACE/ace/Atomic_Op_T.h @@ -344,13 +344,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Atomic_Op_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Atomic_Op_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Atomic_Op_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /*ACE_ATOMIC_OP_T_H*/ diff --git a/ACE/ace/Auto_Event.h b/ACE/ace/Auto_Event.h index 324eb20ad25..c71e46c17be 100644 --- a/ACE/ace/Auto_Event.h +++ b/ACE/ace/Auto_Event.h @@ -92,13 +92,7 @@ public: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Auto_Event.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Auto_Event.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_AUTO_EVENT_H */ diff --git a/ACE/ace/Auto_Functor.h b/ACE/ace/Auto_Functor.h index cbf4827b6a4..e64bcdf6bb3 100644 --- a/ACE/ace/Auto_Functor.h +++ b/ACE/ace/Auto_Functor.h @@ -109,9 +109,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # include "ace/Auto_Functor.inl" #endif /* __ACE_INLINE__ */ -#if defined(ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/Auto_Functor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ +#include "ace/Auto_Functor.cpp" #include /**/ "ace/post.h" #endif /* ACE_AUTO_FUNCTOR_H*/ diff --git a/ACE/ace/Auto_IncDec_T.h b/ACE/ace/Auto_IncDec_T.h index dde2b427a93..afbde550e51 100644 --- a/ACE/ace/Auto_IncDec_T.h +++ b/ACE/ace/Auto_IncDec_T.h @@ -65,13 +65,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Auto_IncDec_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Auto_IncDec_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Auto_IncDec_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Auto_Ptr.h b/ACE/ace/Auto_Ptr.h index 01236ce8198..43b704e02bb 100644 --- a/ACE/ace/Auto_Ptr.h +++ b/ACE/ace/Auto_Ptr.h @@ -192,13 +192,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Auto_Ptr.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Auto_Ptr.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Auto_Ptr.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if defined (_MSC_VER) // Restore the warning state to what it was before entry. diff --git a/ACE/ace/Based_Pointer_T.h b/ACE/ace/Based_Pointer_T.h index 902e90f2a36..254371f305e 100644 --- a/ACE/ace/Based_Pointer_T.h +++ b/ACE/ace/Based_Pointer_T.h @@ -176,13 +176,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Based_Pointer_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Based_Pointer_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Based_Pointer_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Basic_Types.h b/ACE/ace/Basic_Types.h index fce2426fd5c..cccde07113f 100644 --- a/ACE/ace/Basic_Types.h +++ b/ACE/ace/Basic_Types.h @@ -266,12 +266,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL #else /* ! BYTE_ORDER && ! __BYTE_ORDER */ // We weren't explicitly told, so we have to figure it out . . . // Note that Itanium hardware (IA64) can run in either byte order. It's - // selected by the OS when loading; Windows runs little, HP-UX runs big. + // selected by the OS when loading; Windows runs little. # if defined (i386) || defined (__i386__) || defined (_M_IX86) || \ defined (vax) || defined (__LITTLE_ENDIAN__) || \ defined (ARM) || defined (_M_IA64) || defined (_M_AMD64) || \ defined (__amd64) || \ - ((defined (__ia64__) || defined (__ia64)) && !defined (__hpux)) + ((defined (__ia64__) || defined (__ia64))) // We know these are little endian. # define ACE_LITTLE_ENDIAN 0x0123 # define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN diff --git a/ACE/ace/Bound_Ptr.h b/ACE/ace/Bound_Ptr.h index 0464ef030dd..3b736a14942 100644 --- a/ACE/ace/Bound_Ptr.h +++ b/ACE/ace/Bound_Ptr.h @@ -366,13 +366,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Bound_Ptr.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Bound_Ptr.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Bound_Ptr.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/CDR_Base.cpp b/ACE/ace/CDR_Base.cpp index 9fbc28b305f..f2213f379eb 100644 --- a/ACE/ace/CDR_Base.cpp +++ b/ACE/ace/CDR_Base.cpp @@ -811,7 +811,7 @@ ACE_CDR::Fixed ACE_CDR::Fixed::from_integer (ACE_CDR::ULongLong val) ACE_CDR::Fixed ACE_CDR::Fixed::from_floating (LongDouble val) { -#if defined ACE_OPENVMS || (defined ACE_VXWORKS && !defined __RTP__) +#if defined ACE_VXWORKS && !defined __RTP__ typedef double BigFloat; #elif defined NONNATIVE_LONGDOUBLE typedef LongDouble::NativeImpl BigFloat; diff --git a/ACE/ace/CDR_Base.h b/ACE/ace/CDR_Base.h index 84085cf4482..2e2ce3bdf10 100644 --- a/ACE/ace/CDR_Base.h +++ b/ACE/ace/CDR_Base.h @@ -264,7 +264,7 @@ public: // VxWorks' compiler (gcc 2.96) gets confused by the operator long // double, so we avoid using long double as the NativeImpl. // Linux's x86 long double format (12 or 16 bytes) is incompatible - // with Windows, Solaris, AIX, MacOS X and HP-UX (and probably others) + // with Windows, and MacOS X (and probably others) // long double format (8 or 16 bytes). If you need 32-bit Linux to // inter-operate with 64-bit Linux you will want to define this // macro to 0 so that "long double" is used. Otherwise, do not define diff --git a/ACE/ace/CE_Screen_Output.cpp b/ACE/ace/CE_Screen_Output.cpp deleted file mode 100644 index 8711f1e57c4..00000000000 --- a/ACE/ace/CE_Screen_Output.cpp +++ /dev/null @@ -1,156 +0,0 @@ -#include "ace/CE_Screen_Output.h" -#if defined (ACE_HAS_WINCE) - -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_CE_Screen_Output::ACE_CE_Screen_Output(HWND hEdit) -: handler_(hEdit) -, pFile_(0) -{ -} - -ACE_CE_Screen_Output::ACE_CE_Screen_Output() -: handler_(0) -, pFile_(0) -{ -} - -ACE_CE_Screen_Output::~ACE_CE_Screen_Output() -{ - if (pFile_ != 0) { - fclose(pFile_); - } -} - -void ACE_CE_Screen_Output::log(ACE_Log_Record &log_record) -{ - ACE_TCHAR verbose_msg[ACE_Log_Record::MAXVERBOSELOGMSGLEN]; - int result = log_record.format_msg (ACE_TEXT("WindozeCE"), // host name - 0, // verbose flag - verbose_msg); - - if (result == 0) - { - verbose_msg[ ACE_OS::strlen(verbose_msg) - 1 ] = 0; // CE does not like '\n' by itself. - *this << verbose_msg << endl; - } -} - -void ACE_CE_Screen_Output::SetOutputWindow(HWND hEdit) -{ - handler_ = hEdit; -} - -void ACE_CE_Screen_Output::clear() -{ - SetWindowText(handler_, 0); -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (ACE_TCHAR* output) -{ - int length = GetWindowTextLength(handler_); - SendMessage(handler_, EM_SETSEL, length, length); - SendMessage(handler_, EM_REPLACESEL, 0, (LPARAM)output); - - if (pFile_ != 0) - { - fwprintf(pFile_, L"%s", output); - } - - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (const ACE_TCHAR* output) -{ - ACE_TCHAR* buffer = ACE_OS::strdup(output); - if (buffer != 0) - { - *this << buffer; - delete buffer; - } - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (ACE_ANTI_TCHAR* output) -{ - *this << ACE_TEXT_CHAR_TO_TCHAR(output); - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (const ACE_ANTI_TCHAR* output) -{ - *this << ACE_TEXT_CHAR_TO_TCHAR(output); - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (char output) -{ - *this << (int)output; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned char output) -{ - *this << (int)output; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned short output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%u"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (int output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%d"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned int output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%du"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (float output) -{ - ACE_TCHAR buffer[20]; - swprintf(buffer, ACE_TEXT("%f"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (long output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%l"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned long output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%lu"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (FILE* pFile) -{ - pFile_ = pFile; - return *this; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif // ACE_HAS_WINCE diff --git a/ACE/ace/CE_Screen_Output.h b/ACE/ace/CE_Screen_Output.h deleted file mode 100644 index 032f03924b6..00000000000 --- a/ACE/ace/CE_Screen_Output.h +++ /dev/null @@ -1,104 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CE_Screen_Output.h - * - * @author Si Mong Park <spark@ociweb.com> - */ -//============================================================================= - -#ifndef ACE_CE_SCREEN_OUTPUT_H -#define ACE_CE_SCREEN_OUTPUT_H - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_WINCE) - -#include "ace/Log_Msg_Callback.h" -#include "ace/Log_Record.h" - -namespace -{ - const ACE_TCHAR endl[] = ACE_TEXT("\r\n"); - const ACE_TCHAR tab[] = ACE_TEXT("\t"); -} - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_CE_Screen_Output - * - * @brief Replacement of text output for Windows CE. - * - * This class allows standard text output to be displayed on - * text window for Windows CE. Generally, all ACE output will - * go through under CE if and only if user uses Windows CE - * implementation by using main_ce instead of main. - * Also, for the easier debugging purpose, object pointer of - * this class can be gotten from ACE_Log_Msg::msg_callback() - * and then can be used directly by user just like cout stream. - */ -class ACE_Export ACE_CE_Screen_Output : public ACE_Log_Msg_Callback -{ -public: - ACE_CE_Screen_Output (HWND hEdit); - - ACE_CE_Screen_Output (); - - virtual ~ACE_CE_Screen_Output(); - - /// Implementation of pure virtual function from ACE_Log_Msg_Callback. - virtual void log (ACE_Log_Record &log_record); - - /// Interface to specify active window handle. - void SetOutputWindow (HWND hWnd); - - void clear (); - - /// Stream insertion operator that performs actual print out. - /** - * @note This is the only one operator that performs output. All - * other perators convert the type and use this operator - * underneath. - */ - ACE_CE_Screen_Output& operator << (ACE_TCHAR*); - ACE_CE_Screen_Output& operator << (const ACE_TCHAR*); - - ACE_CE_Screen_Output& operator << (ACE_ANTI_TCHAR* output); - ACE_CE_Screen_Output& operator << (const ACE_ANTI_TCHAR* output); - - ACE_CE_Screen_Output& operator << (char output); - ACE_CE_Screen_Output& operator << (unsigned char output); - - ACE_CE_Screen_Output& operator << (unsigned short output); - - ACE_CE_Screen_Output& operator << (int output); - ACE_CE_Screen_Output& operator << (unsigned int output); - - ACE_CE_Screen_Output& operator << (float output); - - ACE_CE_Screen_Output& operator << (long output); - ACE_CE_Screen_Output& operator << (unsigned long output); - - ACE_CE_Screen_Output& operator << (FILE* pFile); - -private: - ACE_CE_Screen_Output (ACE_CE_Screen_Output&); - -private: - HWND handler_; - - /// FILE pointer that used to save output to file. This class does - /// not own the file handler pointer. - FILE* pFile_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif // ACE_HAS_WINCE -#endif // ACE_CE_SCREEN_OUTPUT_H diff --git a/ACE/ace/Cache_Map_Manager_T.h b/ACE/ace/Cache_Map_Manager_T.h index 10490c2167e..ce8016af06e 100644 --- a/ACE/ace/Cache_Map_Manager_T.h +++ b/ACE/ace/Cache_Map_Manager_T.h @@ -384,13 +384,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Cache_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Cache_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Cache_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Cached_Connect_Strategy_T.h b/ACE/ace/Cached_Connect_Strategy_T.h index dd7ac7d3da2..dd762faa2eb 100644 --- a/ACE/ace/Cached_Connect_Strategy_T.h +++ b/ACE/ace/Cached_Connect_Strategy_T.h @@ -247,13 +247,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Cached_Connect_Strategy_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Cached_Connect_Strategy_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* CACHED_CONNECT_STRATEGY_T_H */ diff --git a/ACE/ace/Caching_Strategies_T.h b/ACE/ace/Caching_Strategies_T.h index 7cbad12d5d8..8960ddd937b 100644 --- a/ACE/ace/Caching_Strategies_T.h +++ b/ACE/ace/Caching_Strategies_T.h @@ -538,13 +538,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Caching_Strategies_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Caching_Strategies_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Caching_Strategies_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Caching_Utility_T.h b/ACE/ace/Caching_Utility_T.h index a8d4755541b..66ba434c9dd 100644 --- a/ACE/ace/Caching_Utility_T.h +++ b/ACE/ace/Caching_Utility_T.h @@ -288,13 +288,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Caching_Utility_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Caching_Utility_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Cleanup_Strategies_T.h b/ACE/ace/Cleanup_Strategies_T.h index 65a67cb3143..9ec2afcdb6e 100644 --- a/ACE/ace/Cleanup_Strategies_T.h +++ b/ACE/ace/Cleanup_Strategies_T.h @@ -130,13 +130,7 @@ public: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Cleanup_Strategies_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Cleanup_Strategies_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* CLEANUP_STRATEGIES_H */ diff --git a/ACE/ace/Condition_T.cpp b/ACE/ace/Condition_T.cpp index 3c16a20201f..539bdf1232b 100644 --- a/ACE/ace/Condition_T.cpp +++ b/ACE/ace/Condition_T.cpp @@ -128,10 +128,9 @@ ACE_Condition<MUTEX>::wait (MUTEX &mutex, } } -// Peform an "alertable" timed wait. If the argument ABSTIME == 0 -// then we do a regular cond_wait(), else we do a timed wait for up to -// ABSTIME using the Solaris cond_timedwait() function. - +/// Peform an "alertable" timed wait. If @a abstime == 0 +/// then we do a regular cond_wait(), else we do a timed wait for up to +/// @a abstime template <class MUTEX> int ACE_Condition<MUTEX>::wait (const ACE_Time_Value *abstime) { diff --git a/ACE/ace/Condition_T.h b/ACE/ace/Condition_T.h index 34523edb875..f70ea1dad13 100644 --- a/ACE/ace/Condition_T.h +++ b/ACE/ace/Condition_T.h @@ -152,13 +152,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Condition_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Condition_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Condition_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_HAS_THREADS */ diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp index 01e10fc9c0c..56cb81fd8ea 100644 --- a/ACE/ace/Configuration.cpp +++ b/ACE/ace/Configuration.cpp @@ -966,11 +966,7 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey, HKEY result = 0; // Make a copy of hKey int errnum; -#if defined (ACE_HAS_WINCE) - if ((errnum = RegOpenKeyEx (hKey, 0, 0, 0, &result)) != ERROR_SUCCESS) -#else if ((errnum = RegOpenKey (hKey, 0, &result)) != ERROR_SUCCESS) -#endif // ACE_HAS_WINCE { errno = errnum; return 0; @@ -994,17 +990,9 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey, // Open the key HKEY subkey; -#if defined (ACE_HAS_WINCE) - if ((errnum = ACE_TEXT_RegOpenKeyEx (result, - temp, - 0, - 0, - &subkey)) != ERROR_SUCCESS) -#else if ((errnum = ACE_TEXT_RegOpenKey (result, temp, &subkey)) != ERROR_SUCCESS) -#endif // ACE_HAS_WINCE { // try creating it if (!create || (errnum = ACE_TEXT_RegCreateKeyEx (result, diff --git a/ACE/ace/Connector.h b/ACE/ace/Connector.h index 11617eeb870..2903ad6a750 100644 --- a/ACE/ace/Connector.h +++ b/ACE/ace/Connector.h @@ -564,13 +564,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Connector.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Connector.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Containers_T.cpp b/ACE/ace/Containers_T.cpp index c4ac4b5e2da..1b3b6b144bc 100644 --- a/ACE/ace/Containers_T.cpp +++ b/ACE/ace/Containers_T.cpp @@ -1396,7 +1396,7 @@ ACE_Bounded_Set_Iterator<T>::done () const { ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::done"); - return static_cast<ACE_CAST_CONST size_t> (this->next_) >= + return static_cast<size_t> (this->next_) >= this->s_.cur_size_; } diff --git a/ACE/ace/Containers_T.h b/ACE/ace/Containers_T.h index d52a970921a..533a48924bb 100644 --- a/ACE/ace/Containers_T.h +++ b/ACE/ace/Containers_T.h @@ -986,18 +986,6 @@ template <class T> class ACE_DLList_Reverse_Iterator; typedef ACE_Double_Linked_List<ACE_DLList_Node> ACE_DLList_Base; -//typedef ACE_Double_Linked_List_Iterator <ACE_DLList_Node> -// ACE_DLList_Iterator_Base; -//typedef ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node> -// ACE_DLList_Reverse_Iterator_Base; -//@@ These two typedefs (inherited from James Hu's original design) -// have been removed because Sun CC 4.2 had problems with it. I guess -// having the DLList_Iterators inheriting from a class which is -// actually a typedef leads to problems. #define'ing rather than -// typedef'ing worked, but as per Carlos's reccomendation, I'm just -// replacing all references to the base classes with their actual -// type. Matt Braun (6/15/99) - /** * @class ACE_DLList * @@ -2019,13 +2007,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Containers_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Containers_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Containers_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Countdown_Time_T.h b/ACE/ace/Countdown_Time_T.h index d3817db8c44..86bbf224f7e 100644 --- a/ACE/ace/Countdown_Time_T.h +++ b/ACE/ace/Countdown_Time_T.h @@ -89,13 +89,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Countdown_Time_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Countdown_Time_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Countdown_Time_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #endif /* ACE_COUNTDOWN_TIME_T_H */ diff --git a/ACE/ace/DLL_Manager.cpp b/ACE/ace/DLL_Manager.cpp index 7eddc0484fe..ec1a2a0e1b2 100644 --- a/ACE/ace/DLL_Manager.cpp +++ b/ACE/ace/DLL_Manager.cpp @@ -123,44 +123,6 @@ ACE_DLL_Handle::open (const ACE_TCHAR *dll_name, { if (this->open_i (name->c_str (), open_mode, errors)) break; - -#if defined (AIX) -# define SHR_O ACE_TEXT("(shr.o)") -# define SHR_O_LEN (sizeof (SHR_O) / sizeof(ACE_TCHAR) - 1) - // AIX often puts the shared library file (most often named - // shr.o) inside an archive library. If this is an archive - // library name, then try appending [shr.o] and retry. - if (ACE_TString::npos != name->strstr (ACE_TEXT (".a"))) - { - ACE_TCHAR aix_pathname[MAXPATHLEN + 1]; - if (name->length () + SHR_O_LEN <= MAXPATHLEN) - { - ACE_OS::strcpy (aix_pathname, name->c_str()); - ACE_OS::strcat (aix_pathname, SHR_O); - } - else - { - if (errors) - { - errors->push ("path is too long"); - } - - if (ACE::debug ()) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open: ") - ACE_TEXT ("('%s(shr.o)') is too long\n"), - name->c_str())); - } - - return -1; - } - open_mode |= RTLD_MEMBER; - - if (this->open_i (aix_pathname, open_mode, errors)) - break; - } -#endif /* AIX */ } if (this->handle_ == ACE_SHLIB_INVALID_HANDLE) @@ -286,11 +248,7 @@ ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors, ACE_TStri // BTW. Handle lifecycle management is a little crazy in ACE if (this->handle_ != ACE_SHLIB_INVALID_HANDLE) { -#if defined (ACE_OPENVMS) - void *sym = ACE::ldsymbol (this->handle_, auto_name.get ()); -#else void *sym = ACE_OS::dlsym (this->handle_, auto_name.get ()); -#endif // Linux says that the symbol could be null and that it isn't an // error. So you should check the error message also, but since @@ -758,13 +716,7 @@ ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload) void * const unload_policy_ptr = dll_handle->symbol (ACE_TEXT ("_get_dll_unload_policy"), 1); -#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) - int const temp_p = - reinterpret_cast<int> (unload_policy_ptr); -#else - intptr_t const temp_p = - reinterpret_cast<intptr_t> (unload_policy_ptr); -#endif + intptr_t const temp_p = reinterpret_cast<intptr_t> (unload_policy_ptr); dll_unload_policy const the_policy = reinterpret_cast<dll_unload_policy> (temp_p); diff --git a/ACE/ace/Date_Time.inl b/ACE/ace/Date_Time.inl index ef2a39b4d3e..25bb2e2e0db 100644 --- a/ACE/ace/Date_Time.inl +++ b/ACE/ace/Date_Time.inl @@ -9,22 +9,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_Date_Time::update (const ACE_Time_Value& timevalue) { -#if defined (ACE_HAS_WINCE) - // CE doesn't do localtime(). - FILETIME file_time = timevalue; - FILETIME local_file_time; - SYSTEMTIME sys_time; - ::FileTimeToLocalFileTime (&file_time, &local_file_time); - ::FileTimeToSystemTime (&local_file_time, &sys_time); - this->day_ = sys_time.wDay; - this->month_ = sys_time.wMonth; - this->year_ = sys_time.wYear; - this->hour_ = sys_time.wHour; - this->minute_ = sys_time.wMinute; - this->second_ = sys_time.wSecond; - this->microsec_ = sys_time.wMilliseconds * 1000; - this->wday_ = sys_time.wDayOfWeek; -#else time_t time = timevalue.sec (); struct tm tm_time; ACE_OS::localtime_r (&time, &tm_time); @@ -36,7 +20,6 @@ ACE_Date_Time::update (const ACE_Time_Value& timevalue) this->second_ = tm_time.tm_sec; this->microsec_ = timevalue.usec (); this->wday_ = tm_time.tm_wday; -#endif /* ACE_HAS_WINCE */ } ACE_INLINE void diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp index f1e3e03342e..6ac51473285 100644 --- a/ACE/ace/Dev_Poll_Reactor.cpp +++ b/ACE/ace/Dev_Poll_Reactor.cpp @@ -13,8 +13,6 @@ # if defined (ACE_HAS_DEV_POLL) # if defined (ACE_LINUX) # include /**/ <linux/devpoll.h> -# elif defined (HPUX_VERS) && HPUX_VERS < 1123 -# include /**/ <devpoll.h> # else # include /**/ <sys/devpoll.h> # endif /* ACE_LINUX */ @@ -2337,24 +2335,7 @@ ACE_Dev_Poll_Reactor::mask_ops_i (ACE_HANDLE handle, { short const events = this->reactor_mask_to_poll_event (new_mask); -#if defined (sun) - // Apparently events cannot be updated on-the-fly on Solaris so - // remove the existing events, and then add the new ones. - struct pollfd pfd[2]; - - pfd[0].fd = handle; - pfd[0].events = POLLREMOVE; - pfd[0].revents = 0; - pfd[1].fd = (events == POLLREMOVE ? ACE_INVALID_HANDLE : handle); - pfd[1].events = events; - pfd[1].revents = 0; - - // Change the events associated with the given file descriptor. - if (ACE_OS::write (this->poll_fd_, - pfd, - sizeof (pfd)) != sizeof (pfd)) - return -1; -#elif defined (ACE_HAS_EVENT_POLL) +#if defined (ACE_HAS_EVENT_POLL) struct epoll_event epev; ACE_OS::memset (&epev, 0, sizeof (epev)); diff --git a/ACE/ace/Dump_T.h b/ACE/ace/Dump_T.h index ead87898acf..3d1cc3650ac 100644 --- a/ACE/ace/Dump_T.h +++ b/ACE/ace/Dump_T.h @@ -68,13 +68,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL ((void *) this); #endif /* ACE_NDEBUG */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Dump_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Dump_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_DUMP_T_H */ diff --git a/ACE/ace/Dynamic_Service.h b/ACE/ace/Dynamic_Service.h index 713a5aac98f..ed866b3f78e 100644 --- a/ACE/ace/Dynamic_Service.h +++ b/ACE/ace/Dynamic_Service.h @@ -74,13 +74,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Dynamic_Service.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) # include "ace/Dynamic_Service.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -# pragma implementation ("Dynamic_Service.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/ETCL/ETCL_l.cpp b/ACE/ace/ETCL/ETCL_l.cpp index b4fcaace55e..1addcb5319e 100644 --- a/ACE/ace/ETCL/ETCL_l.cpp +++ b/ACE/ace/ETCL/ETCL_l.cpp @@ -1529,18 +1529,7 @@ FILE *file; b->yy_input_file = file; b->yy_fill_buffer = 1; -#if defined (ACE_HAS_WINCE) - // Mimic the behavior as WinCE does not have isatty(). - if ((file != 0) && (file == ACE_OS::fileno(file))) { - b->yy_is_interactive = 1; - } - else { - b->yy_is_interactive = 0; - } -#else b->yy_is_interactive = file ? (ACE_OS::isatty( ACE_OS::fileno(file) ) > 0) : 0; -#endif // ACE_HAS_WINCE - } diff --git a/ACE/ace/ETCL/ETCL_y.cpp b/ACE/ace/ETCL/ETCL_y.cpp index 15e2c0116c2..37321652c84 100644 --- a/ACE/ace/ETCL/ETCL_y.cpp +++ b/ACE/ace/ETCL/ETCL_y.cpp @@ -351,13 +351,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ -#if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#endif /* __hpux */ -#endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ diff --git a/ACE/ace/Env_Value_T.h b/ACE/ace/Env_Value_T.h index 6e97e3602d7..e080cafcec6 100644 --- a/ACE/ace/Env_Value_T.h +++ b/ACE/ace/Env_Value_T.h @@ -78,9 +78,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Env_Value_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Env_Value_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -151,9 +149,5 @@ ACE_Convert (const ACE_TCHAR *s, T &t) ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Env_Value_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #include /**/ "ace/post.h" #endif /* ACE_ENV_VALUE_T_H */ diff --git a/ACE/ace/Event.h b/ACE/ace/Event.h index 78682631d9d..f0727003f53 100644 --- a/ACE/ace/Event.h +++ b/ACE/ace/Event.h @@ -77,13 +77,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Event.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Event.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Event.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_EVENT_H */ diff --git a/ACE/ace/Event_Handler_T.h b/ACE/ace/Event_Handler_T.h index a222459388e..c4597926762 100644 --- a/ACE/ace/Event_Handler_T.h +++ b/ACE/ace/Event_Handler_T.h @@ -173,13 +173,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Event_Handler_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Event_Handler_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Event_Handler_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_EVENT_HANDLER_H */ diff --git a/ACE/ace/Framework_Component_T.h b/ACE/ace/Framework_Component_T.h index a4e7d4ee356..e23f11889f5 100644 --- a/ACE/ace/Framework_Component_T.h +++ b/ACE/ace/Framework_Component_T.h @@ -57,13 +57,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL ACE_Framework_Repository::instance ()->register_component \ (new ACE_Framework_Component_T<CLASS> (INSTANCE)); -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Framework_Component_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Framework_Component_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_FRAMEWORK_COMPONENT_T_H */ diff --git a/ACE/ace/Free_List.h b/ACE/ace/Free_List.h index 38e30e6c1b0..a6252fe85ed 100644 --- a/ACE/ace/Free_List.h +++ b/ACE/ace/Free_List.h @@ -137,13 +137,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Free_List.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Free_List.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_FREE_LIST_H */ diff --git a/ACE/ace/Functor_T.h b/ACE/ace/Functor_T.h index efa33f879b6..4a9fb185dd2 100644 --- a/ACE/ace/Functor_T.h +++ b/ACE/ace/Functor_T.h @@ -180,13 +180,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Functor_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Functor_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Functor_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_FUNCTOR_T_H */ diff --git a/ACE/ace/Future.h b/ACE/ace/Future.h index 4858bcad6f8..e07756fc880 100644 --- a/ACE/ace/Future.h +++ b/ACE/ace/Future.h @@ -362,13 +362,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Future.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Future.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_HAS_THREADS */ diff --git a/ACE/ace/Future_Set.h b/ACE/ace/Future_Set.h index abee861e31c..ed1eb0999bf 100644 --- a/ACE/ace/Future_Set.h +++ b/ACE/ace/Future_Set.h @@ -126,13 +126,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Future_Set.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Future_Set.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_HAS_THREADS */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Global_Macros.h b/ACE/ace/Global_Macros.h index e8e64b20a6c..bc9b20a4962 100644 --- a/ACE/ace/Global_Macros.h +++ b/ACE/ace/Global_Macros.h @@ -559,27 +559,7 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC */ # define ACE_Local_Service_Export -#if defined (ACE_OPENVMS) -# define ACE_PREPROC_STRINGIFY(A) #A -# define ACE_MAKE_SVC_REGISTRAR_ARG(A) ACE_PREPROC_STRINGIFY(A), (void*)&A -# define ACE_FACTORY_DEFINE(CLS,SERVICE_CLASS) \ -void ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (void *p) { \ - ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object * _p = \ - static_cast< ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object *> (p); \ - ACE_ASSERT (_p != 0); \ - delete _p; } \ -extern "C" CLS##_Export ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object *\ -ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (ACE_Service_Object_Exterminator *gobbler) \ -{ \ - ACE_TRACE (#SERVICE_CLASS); \ - if (gobbler != 0) \ - *gobbler = (ACE_Service_Object_Exterminator) ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS); \ - return new SERVICE_CLASS; \ -} \ -ACE_Dynamic_Svc_Registrar ace_svc_reg_##SERVICE_CLASS \ - (ACE_MAKE_SVC_REGISTRAR_ARG(ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS))); -#else -# define ACE_FACTORY_DEFINE(CLS,SERVICE_CLASS) \ +#define ACE_FACTORY_DEFINE(CLS,SERVICE_CLASS) \ void ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (void *p) { \ ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object * _p = \ static_cast< ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object *> (p); \ @@ -593,7 +573,6 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC *gobbler = (ACE_Service_Object_Exterminator) ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS); \ return new SERVICE_CLASS; \ } -#endif /** * For service classes scoped within namespaces, use this macro in @@ -621,27 +600,7 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC * this will ensure unique generated signatures for the various C * style functions. */ -#if defined (ACE_OPENVMS) -# define ACE_PREPROC_STRINGIFY(A) #A -# define ACE_MAKE_SVC_REGISTRAR_ARG(A) ACE_PREPROC_STRINGIFY(A), (void*)&A -# define ACE_FACTORY_NAMESPACE_DEFINE(CLS,SERVICE_CLASS,NAMESPACE_CLASS) \ -void ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (void *p) { \ - ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object * _p = \ - static_cast< ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object *> (p); \ - ACE_ASSERT (_p != 0); \ - delete _p; } \ -extern "C" CLS##_Export ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object *\ -ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (ACE_Service_Object_Exterminator *gobbler) \ -{ \ - ACE_TRACE (#SERVICE_CLASS); \ - if (gobbler != 0) \ - *gobbler = (ACE_Service_Object_Exterminator) ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS); \ - return new NAMESPACE_CLASS; \ -} \ -ACE_Dynamic_Svc_Registrar ace_svc_reg_##SERVICE_CLASS \ - (ACE_MAKE_SVC_REGISTRAR_ARG(ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS))); -#else -# define ACE_FACTORY_NAMESPACE_DEFINE(CLS,SERVICE_CLASS,NAMESPACE_CLASS) \ +#define ACE_FACTORY_NAMESPACE_DEFINE(CLS,SERVICE_CLASS,NAMESPACE_CLASS) \ void ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (void *p) { \ ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object * _p = \ static_cast< ACE_VERSIONED_NAMESPACE_NAME::ACE_Service_Object *> (p); \ @@ -655,7 +614,6 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC *gobbler = (ACE_Service_Object_Exterminator) ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS); \ return new NAMESPACE_CLASS; \ } -#endif /// The canonical name for a service factory method # define ACE_SVC_NAME(SERVICE_CLASS) ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) @@ -676,20 +634,7 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC # define ACE_SVC_FACTORY_DEFINE(X) ACE_FACTORY_DEFINE (ACE_Svc, X) //@} -#if defined (ACE_WIN32) -// These are used in SPIPE_Acceptor/Connector, but are ignored at runtime. -# if defined (ACE_HAS_WINCE) -# if !defined (PIPE_TYPE_MESSAGE) -# define PIPE_TYPE_MESSAGE 0 -# endif -# if !defined (PIPE_READMODE_MESSAGE) -# define PIPE_READMODE_MESSAGE 0 -# endif -# if !defined (PIPE_WAIT) -# define PIPE_WAIT 0 -# endif -# endif /* ACE_HAS_WINCE */ -#else /* !ACE_WIN32 */ +#if !defined (ACE_WIN32) // Add some typedefs and macros to enhance Win32 conformance... # if !defined (LPSECURITY_ATTRIBUTES) # define LPSECURITY_ATTRIBUTES int @@ -736,8 +681,7 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC # if !defined(PIPE_TYPE_MESSAGE) # define PIPE_TYPE_MESSAGE 0 # endif /* !defined PIPE_TYPE_MESSAGE */ -#endif /* ACE_WIN32 */ - +#endif /* !ACE_WIN32 */ // Some useful abstractions for expressions involving // ACE_Allocator.malloc (). The difference between ACE_NEW_MALLOC* diff --git a/ACE/ace/Guard_T.h b/ACE/ace/Guard_T.h index d7ffa9cd7af..b73346b6b4e 100644 --- a/ACE/ace/Guard_T.h +++ b/ACE/ace/Guard_T.h @@ -378,13 +378,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Guard_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Guard_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Guard_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_GUARD_T_H */ diff --git a/ACE/ace/Handle_Set.inl b/ACE/ace/Handle_Set.inl index 60e31a21a9c..49fb76559a3 100644 --- a/ACE/ace/Handle_Set.inl +++ b/ACE/ace/Handle_Set.inl @@ -1,7 +1,6 @@ // -*- C++ -*- #include "ace/Log_Category.h" -// AIX defines bzero() in this odd file... used by FD_ZERO #if defined (ACE_HAS_STRINGS) # include "ace/os_include/os_strings.h" #endif /* ACE_HAS_STRINGS */ diff --git a/ACE/ace/Hash_Cache_Map_Manager_T.h b/ACE/ace/Hash_Cache_Map_Manager_T.h index e8abfbcb464..9b94124afab 100644 --- a/ACE/ace/Hash_Cache_Map_Manager_T.h +++ b/ACE/ace/Hash_Cache_Map_Manager_T.h @@ -196,13 +196,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Hash_Cache_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Hash_Cache_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Cache_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Hash_Map_Manager_T.h b/ACE/ace/Hash_Map_Manager_T.h index 6960498bfe7..045c2935020 100644 --- a/ACE/ace/Hash_Map_Manager_T.h +++ b/ACE/ace/Hash_Map_Manager_T.h @@ -1281,13 +1281,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # include "ace/Hash_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Hash_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_HASH_MAP_MANAGER_T_H */ diff --git a/ACE/ace/Hash_Map_With_Allocator_T.h b/ACE/ace/Hash_Map_With_Allocator_T.h index 21eaec5f6ba..eb8473305d6 100644 --- a/ACE/ace/Hash_Map_With_Allocator_T.h +++ b/ACE/ace/Hash_Map_With_Allocator_T.h @@ -97,14 +97,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Hash_Map_With_Allocator_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Hash_Map_With_Allocator_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Map_With_Allocator_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #include /**/ "ace/post.h" #endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_H */ diff --git a/ACE/ace/Hash_Multi_Map_Manager_T.h b/ACE/ace/Hash_Multi_Map_Manager_T.h index c3e446e1876..dfa34ea9c5f 100644 --- a/ACE/ace/Hash_Multi_Map_Manager_T.h +++ b/ACE/ace/Hash_Multi_Map_Manager_T.h @@ -946,13 +946,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # include "ace/Hash_Multi_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Hash_Multi_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Multi_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_HASH_MULTI_MAP_MANAGER_T_H */ diff --git a/ACE/ace/High_Res_Timer.cpp b/ACE/ace/High_Res_Timer.cpp index ef30f0833fb..1546cd03d07 100644 --- a/ACE/ace/High_Res_Timer.cpp +++ b/ACE/ace/High_Res_Timer.cpp @@ -227,7 +227,7 @@ ACE_High_Res_Timer::global_scale_factor () #endif /* (ACE_WIN32 || ACE_HAS_POWERPC_TIMER || \ ACE_HAS_PENTIUM) && \ ! ACE_HAS_HI_RES_TIMER && - ((WIN32 && ! WINCE) || ghs || __GNUG__) */ + ((WIN32) || ghs || __GNUG__) */ return ACE_High_Res_Timer::global_scale_factor_; } diff --git a/ACE/ace/High_Res_Timer.h b/ACE/ace/High_Res_Timer.h index ff4d544159b..6c94f3566d3 100644 --- a/ACE/ace/High_Res_Timer.h +++ b/ACE/ace/High_Res_Timer.h @@ -29,7 +29,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * * @brief A high resolution timer class wrapper that encapsulates * OS-specific high-resolution timers, such as those found on - * Solaris, AIX, Win32/Pentium, and VxWorks. + * Win32/Pentium, and VxWorks. * * Most of the member functions don't return values. The only * reason that one would fail is if high-resolution time isn't @@ -58,9 +58,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * This is probably not a problem profiling code, but could be * on if the high resolution timer class is used to initiate * actions after a "long" timeout. - * On Solaris, a scale factor of 1000 should be used because its - * high-resolution timer returns nanoseconds. However, on Intel - * platforms, we use RDTSC which returns the number of clock + * On Intel platforms, we use RDTSC which returns the number of clock * ticks since system boot. For a 200MHz cpu, each clock tick * is 1/200 of a microsecond; the global_scale_factor_ should * therefore be 200 or 200000 if it's in unit/millisecond. @@ -75,8 +73,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * you query for your @c timer.stop() value might not be the one * you queried for @c timer.start(). Its not clear how much * divergence there would be, if any. - * This issue is not mentioned in the Solaris 2.5.1 gethrtime - * man page. * A RDTSC NOTE: RDTSC is the Intel Pentium read-time stamp counter * and is actualy a 64 bit clock cycle counter, which is increased * with every cycle. It has a low overhead and can be read within @@ -109,7 +105,7 @@ public: * global_scale_factor_. This allows applications to set the scale * factor just once for all High_Res_Timers. Check * High_Res_Timer.cpp for the default global_scale_factors for - * several platforms. For many platforms (e.g., Solaris), the + * several platforms. For many platforms the * global_scale_factor_ is set to 1000 so that <scale_factor> need * not be set. Careful, a <scale_factor> of 0 will cause division * by zero exceptions. diff --git a/ACE/ace/IOStream.h b/ACE/ace/IOStream.h index ca5e831bc9b..38ebe090593 100644 --- a/ACE/ace/IOStream.h +++ b/ACE/ace/IOStream.h @@ -343,16 +343,6 @@ typedef ostream& (*__omanip_)(ostream&); // operators. Notice how the <ipfx> and <isfx> functions are used. #define GET_SIG(MT,DT) inline virtual MT& operator>> (DT v) -# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) -#define GET_CODE { \ - if (ipfx (0)) \ - { \ - (*((istream*)this)) >> (v); \ - } \ - isfx (); \ - return *this; \ - } -# else #define GET_CODE { \ if (ipfx (0)) \ { \ @@ -361,7 +351,6 @@ typedef ostream& (*__omanip_)(ostream&); isfx (); \ return *this; \ } -# endif #define GET_PROT(MT,DT,CODE) GET_SIG(MT,DT) CODE #define GET_FUNC(MT,DT) GET_PROT(MT,DT,GET_CODE) @@ -370,16 +359,6 @@ typedef ostream& (*__omanip_)(ostream&); // operators. Notice how the <opfx> and <osfx> functions are used. #define PUT_SIG(MT,DT) inline virtual MT& operator<< (DT v) -# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) -#define PUT_CODE { \ - if (opfx ()) \ - { \ - (*((ostream *) this)) << (v); \ - } \ - osfx (); \ - return *this; \ - } -# else #define PUT_CODE { \ if (opfx ()) \ { \ @@ -388,7 +367,6 @@ typedef ostream& (*__omanip_)(ostream&); osfx (); \ return *this; \ } -# endif #define PUT_PROT(MT,DT,CODE) PUT_SIG(MT,DT) CODE #define PUT_FUNC(MT,DT) PUT_PROT(MT,DT,PUT_CODE) @@ -442,10 +420,6 @@ typedef ostream& (*__omanip_)(ostream&); inline virtual MT& operator<<(__omanip_ func) CODE2 \ inline virtual MT& operator<<(__manip_ func) CODE2 -# if defined (ACE_LACKS_SIGNED_CHAR) - #define GET_FUNC_SET1(MT,CODE,CODE2) GET_FUNC_SET0(MT,CODE,CODE2) - #define PUT_FUNC_SET1(MT,CODE,CODE2) PUT_FUNC_SET0(MT,CODE,CODE2) -# else #define GET_FUNC_SET1(MT,CODE,CODE2) \ GET_PROT(MT,signed char &,CODE) \ GET_PROT(MT,signed char *,CODE) \ @@ -455,7 +429,6 @@ typedef ostream& (*__omanip_)(ostream&); PUT_FUNC(MT,signed char) \ PUT_FUNC(MT,const signed char *) \ PUT_FUNC_SET0(MT,CODE,CODE2) -# endif /* ACE_LACKS_SIGNED_CHAR */ #define GET_MANIP_CODE { if (ipfx ()) { (*func) (*this); } isfx (); return *this; } #define PUT_MANIP_CODE { if (opfx ()) { (*func) (*this); } osfx (); return *this; } diff --git a/ACE/ace/IOStream_T.h b/ACE/ace/IOStream_T.h index c65a42a18b5..0ac556978a5 100644 --- a/ACE/ace/IOStream_T.h +++ b/ACE/ace/IOStream_T.h @@ -266,18 +266,11 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -# if defined (__ACE_INLINE__) -# include "ace/IOStream_T.inl" -# endif /* __ACE_INLINE__ */ - -# if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/IOStream_T.cpp" -# endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -# if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -# pragma implementation ("IOStream_T.cpp") -# endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ -#endif /* ACE_LACKS_ACE_IOSTREAM */ +#if defined (__ACE_INLINE__) +# include "ace/IOStream_T.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/IOStream_T.cpp" #include /**/ "ace/post.h" #endif /* ACE_IOSTREAM_T_H */ diff --git a/ACE/ace/Intrusive_Auto_Ptr.h b/ACE/ace/Intrusive_Auto_Ptr.h index 7757e6d5c0c..88357cf0215 100644 --- a/ACE/ace/Intrusive_Auto_Ptr.h +++ b/ACE/ace/Intrusive_Auto_Ptr.h @@ -140,13 +140,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Intrusive_Auto_Ptr.inl" #endif /* __ACE_INLINE __ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Intrusive_Auto_Ptr.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Intrusive_Auto_Ptr.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Intrusive_List.h b/ACE/ace/Intrusive_List.h index c5017cd730c..58a820a840b 100644 --- a/ACE/ace/Intrusive_List.h +++ b/ACE/ace/Intrusive_List.h @@ -124,13 +124,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Intrusive_List.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Intrusive_List.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Intrusive_List.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_INTRUSIVE_LIST_H */ diff --git a/ACE/ace/Intrusive_List_Node.h b/ACE/ace/Intrusive_List_Node.h index 8fe5c40b205..73506d48ba7 100644 --- a/ACE/ace/Intrusive_List_Node.h +++ b/ACE/ace/Intrusive_List_Node.h @@ -70,13 +70,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Intrusive_List_Node.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Intrusive_List_Node.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Intrusive_List_Node.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_INTRUSIVE_LIST_NODE_H */ diff --git a/ACE/ace/LOCK_SOCK_Acceptor.h b/ACE/ace/LOCK_SOCK_Acceptor.h index b4e099ba285..07d3a46210a 100644 --- a/ACE/ace/LOCK_SOCK_Acceptor.h +++ b/ACE/ace/LOCK_SOCK_Acceptor.h @@ -26,11 +26,11 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * * @brief Specialize ACE_SOCK_Acceptor to lock around <accept>; * - * This class is necessary since some OS platforms (e.g., - * Solaris 2.5) do not allow multiple threads/processes to - * simultaneously call <accept> on the same listen-mode - * port/socket. Thus, we need to protect against multiple - * concurrent accesses by using the appropriate type of lock. + * This class is necessary since some OS platforms do not allow + * multiple threads/processes to simultaneously call @c accept + * on the same listen-mode port/socket. Thus, we need to + * protect against multiple concurrent accesses by using + * the appropriate type of lock. */ template <class ACE_LOCK> class ACE_LOCK_SOCK_Acceptor : public ACE_SOCK_Acceptor @@ -53,13 +53,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/LOCK_SOCK_Acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("LOCK_SOCK_Acceptor.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_LOCK_SOCK_ACCEPTOR_H */ diff --git a/ACE/ace/Lib_Find.cpp b/ACE/ace/Lib_Find.cpp index a5918e499d9..085ed0b938e 100644 --- a/ACE/ace/Lib_Find.cpp +++ b/ACE/ace/Lib_Find.cpp @@ -16,101 +16,6 @@ # include "ace/OS_NS_strings.h" #endif /* ACE_WIN32 */ -#if defined (ACE_OPENVMS) -#include "ace/RB_Tree.h" -#include "ace/Thread_Mutex.h" -#include "ace/Singleton.h" - -#include /**/ "descrip.h" -#include /**/ "chfdef.h" -#include /**/ "stsdef.h" -#include /**/ "libdef.h" - -extern "C" int LIB$FIND_IMAGE_SYMBOL(...); - -/** - * @internal - * - * Implements a class to register symbols and addresses for use with DLL - * symbol retrieval. - * - * OpenVMS restricts symbol length to 31 characters encoding any symbols - * longer than that. In these cases dlsym() only works with the encoded - * names. - * This creates serious problems for the service configurator framework - * where the factory method names often exceed 31 chars and where loading - * is based on retrieval of method pointers using the *full* name. - * For OpenVMS we therefor added this singleton class and the - * ACE_Dynamic_Svc_Registrar class which registers full names and function - * pointers with this singleton at the time the static ACE_Dynamic_Svc_Registrar - * object is created in a (service) DLL. - * By forcing the DLL to load using a common symbol ("NULL") we trigger static - * object creation *before* the full names are referenced. - * Symbol references will be resolved as follows on OpenVMS: - * - first try directly from DLL using the RTL dlsym() function and if that fails; - * - try to find symbol in singleton registry. - */ -class ACE_LD_Symbol_Registry -{ -public: - typedef ACE_RB_Tree<const ACE_TCHAR*, - void*, - ACE_Less_Than<const ACE_TCHAR*>, - ACE_Thread_Mutex> - TREE; - - void register_symbol (const ACE_TCHAR* symname, void* symaddr); - - void* find_symbol (const ACE_TCHAR* symname); - - ACE_LD_Symbol_Registry () = default; - -private: - TREE symbol_registry_; -}; - -void -ACE_LD_Symbol_Registry::register_symbol (const ACE_TCHAR* symname, - void* symaddr) -{ - int const result = symbol_registry_.bind (symname, symaddr); - if (result == 1) - { - ACELIB_DEBUG((LM_INFO, ACE_TEXT ("ACE_LD_Symbol_Registry:") - ACE_TEXT (" duplicate symbol %s registered\n"), - ACE_TEXT_ALWAYS_CHAR (symname))); - } - else if (result == -1) - { - ACELIB_ERROR((LM_ERROR, ACE_TEXT ("ACE_LD_Symbol_Registry:") - ACE_TEXT (" failed to register symbol %s\n"), - ACE_TEXT_ALWAYS_CHAR (symname))); - } -} - -void* -ACE_LD_Symbol_Registry::find_symbol (const ACE_TCHAR* symname) -{ - void* symaddr = 0; - int const result = symbol_registry_.find (symname, symaddr); - - return (result == 0 ? symaddr : 0); -} - -/// Declare a process wide singleton -ACE_SINGLETON_DECLARE (ACE_Singleton, - ACE_LD_Symbol_Registry, - ACE_Thread_Mutex) - -typedef ACE_Singleton<ACE_LD_Symbol_Registry, ACE_Thread_Mutex> - ACE_LD_SYMBOL_REGISTRY; - -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, ACE_LD_Symbol_Registry, ACE_SYNCH_MUTEX); - - -#endif - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL int @@ -119,86 +24,15 @@ ACE::ldfind (const ACE_TCHAR* filename, size_t maxpathnamelen) { ACE_TRACE ("ACE::ldfind"); -#if defined (ACE_OPENVMS) - if (ACE_OS::strlen (filename) >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - - dsc$descriptor nameDsc; - nameDsc.dsc$b_class = DSC$K_CLASS_S; - nameDsc.dsc$b_dtype = DSC$K_DTYPE_T; - nameDsc.dsc$w_length = ACE_OS::strlen (filename); - nameDsc.dsc$a_pointer = (char*)filename; - - char symbol[] = "NULL"; - dsc$descriptor symbolDsc; - symbolDsc.dsc$b_class = DSC$K_CLASS_S; - symbolDsc.dsc$b_dtype = DSC$K_DTYPE_T; - symbolDsc.dsc$w_length = ACE_OS::strlen (symbol); - symbolDsc.dsc$a_pointer = symbol; - - int symbolValue; - int result; - try - { - result = LIB$FIND_IMAGE_SYMBOL (&nameDsc, &symbolDsc, &symbolValue, 0, 0); - } - catch (chf$signal_array &sig) - { - result = sig.chf$l_sig_name; - } - - int severity = result & STS$M_SEVERITY; - int conditionId = result & STS$M_COND_ID; - if (severity == STS$K_SUCCESS || severity == STS$K_WARNING || severity == STS$K_INFO || - (severity == STS$K_ERROR && conditionId == (LIB$_KEYNOTFOU & STS$M_COND_ID))) - { - ACE_OS::strcpy (pathname, filename); - return 0; - } - - if (ACE_OS::strlen (filename) + ACE_OS::strlen (ACE_DLL_PREFIX) >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - - - ACE_OS::strcpy (pathname, ACE_DLL_PREFIX); - ACE_OS::strcat (pathname, filename); - nameDsc.dsc$w_length = ACE_OS::strlen (pathname); - nameDsc.dsc$a_pointer = pathname; - try - { - result = LIB$FIND_IMAGE_SYMBOL (&nameDsc, &symbolDsc, &symbolValue, 0, 0); - } - catch (chf$signal_array &sig) - { - result = sig.chf$l_sig_name; - } - - severity = result & STS$M_SEVERITY; - conditionId = result & STS$M_COND_ID; - if (severity == STS$K_SUCCESS || severity == STS$K_WARNING || severity == STS$K_INFO || - (severity == STS$K_ERROR && conditionId == (LIB$_KEYNOTFOU & STS$M_COND_ID))) - { - return 0; - } - errno = ENOENT; - return -1; -#endif /* ACE_OPENVMS */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && \ - !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) ACE_TCHAR expanded_filename[MAXPATHLEN]; if (ACE_TEXT_ExpandEnvironmentStrings (filename, expanded_filename, sizeof expanded_filename / sizeof (ACE_TCHAR))) filename = expanded_filename; -#endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ ACE_TCHAR tempcopy[MAXPATHLEN + 1]; ACE_TCHAR searchpathname[MAXPATHLEN + 1]; @@ -338,7 +172,7 @@ ACE::ldfind (const ACE_TCHAR* filename, // OS platform). else { -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) ACE_TCHAR *file_component = 0; DWORD pathlen = ACE_TEXT_SearchPath (0, @@ -389,29 +223,6 @@ ACE::ldfind (const ACE_TCHAR* filename, # endif /* ACE_WIN32 || !ACE_USES_WCHAR */ # endif /* ACE_DEFAULT_LD_SEARCH_PATH */ -#if defined (ACE_HAS_WINCE) - ACE_TCHAR *ld_path_temp = 0; - if (ld_path != 0) - { - ld_path_temp = (ACE_TCHAR *) - ACE_OS::malloc ((ACE_OS::strlen (ld_path) + 2) - * sizeof (ACE_TCHAR)); - if (ld_path_temp != 0) - { - ACE_OS::strcpy (ld_path_temp, - ACE_LD_SEARCH_PATH_SEPARATOR_STR); - - ACE_OS::strcat (ld_path_temp, ld_path); - ld_path = ld_path_temp; - } - else - { - ACE_OS::free ((void *) ld_path_temp); - ld_path = ld_path_temp = 0; - } - } -#endif /* ACE_HAS_WINCE */ - if (ld_path != 0 && (ld_path = ACE_OS::strdup (ld_path)) != 0) { @@ -492,10 +303,6 @@ ACE::ldfind (const ACE_TCHAR* filename, nextholder); } -#if defined (ACE_HAS_WINCE) - if (ld_path_temp != 0) - ACE_OS::free (ld_path_temp); -#endif /* ACE_HAS_WINCE */ #if defined (ACE_HAS_ALLOC_HOOKS) ACE_Allocator::instance()->free ((void *) ld_path); #else @@ -506,7 +313,7 @@ ACE::ldfind (const ACE_TCHAR* filename, #endif /* ACE_LD_DECORATOR_STR && !ACE_DISABLE_DEBUG_DLL_CHECK */ return result; } -#endif /* ACE_WIN32 && !ACE_HAS_WINCE */ +#endif /* ACE_WIN32 */ } #if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) } @@ -572,29 +379,6 @@ ACE::ldname (const ACE_TCHAR *entry_point) #endif /* ACE_NEEDS_DL_UNDERSCORE */ } -#if defined (ACE_OPENVMS) -void -ACE::ldregister (const ACE_TCHAR *entry_point, - void* entry_addr) -{ - ACE_LD_SYMBOL_REGISTRY::instance ()->register_symbol (entry_point, - entry_addr); -} - -void * -ACE::ldsymbol (ACE_SHLIB_HANDLE sh, const ACE_TCHAR *entry_point) -{ - void* symaddr = ACE_OS::dlsym (sh, entry_point); - // if not found through dlsym() try registry - if (!symaddr) - { - symaddr = ACE_LD_SYMBOL_REGISTRY::instance ()->find_symbol (entry_point); - } - - return symaddr; -} -#endif - int ACE::get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len) { diff --git a/ACE/ace/Lib_Find.h b/ACE/ace/Lib_Find.h index 3c72a1fc572..6496a93dc4d 100644 --- a/ACE/ace/Lib_Find.h +++ b/ACE/ace/Lib_Find.h @@ -16,9 +16,6 @@ #include /**/ "ace/config-all.h" #include /**/ "ace/ACE_export.h" #include "ace/os_include/os_stdio.h" -#if defined (ACE_OPENVMS) -# include "ace/OS_NS_dlfcn.h" -#endif ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -57,26 +54,6 @@ namespace ACE */ extern ACE_Export ACE_TCHAR *ldname (const ACE_TCHAR *entry_point); - -#if defined (ACE_OPENVMS) - /** - * Registers an @a entry_point and its address for later retrieval - * through the ACE::ldsymbol () method. - * For use in cases where the OS compiler encodes long symbolnames. - */ - extern ACE_Export void ldregister (const ACE_TCHAR *entry_point, - void* entry_addr); - - /** - * Looks up an @a entry_point address either from previously registered - * symbols or through ACE_OS::dlsym (). - * Returns 0 in case the entry_point is not found, otherwise nonzero. - * For use in cases where the OS compiler encodes long symbolnames. - */ - extern ACE_Export void *ldsymbol (ACE_SHLIB_HANDLE sh, - const ACE_TCHAR *entry_point); -#endif - /** * Returns the temporary directory including the trailing slash in * @a buffer. Returns -1 for an error or if the buffer_len is not diff --git a/ACE/ace/Local_Name_Space_T.h b/ACE/ace/Local_Name_Space_T.h index 6a65c22448e..04dc0e5acd2 100644 --- a/ACE/ace/Local_Name_Space_T.h +++ b/ACE/ace/Local_Name_Space_T.h @@ -254,13 +254,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Local_Name_Space_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Local_Name_Space_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_LOCAL_NAME_SPACE_T_H */ diff --git a/ACE/ace/Lock_Adapter_T.h b/ACE/ace/Lock_Adapter_T.h index 360f2d02479..dbc02adb6bb 100644 --- a/ACE/ace/Lock_Adapter_T.h +++ b/ACE/ace/Lock_Adapter_T.h @@ -107,13 +107,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Lock_Adapter_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Lock_Adapter_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Lock_Adapter_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_LOCK_ADAPTER_T_H */ diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 88f584c2ed1..dd7e904b36e 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -80,11 +80,11 @@ public: }; #endif /* ACE_MT_SAFE */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_NT_Event_Log #elif defined (ACE_ANDROID) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_Android_Logcat -#elif !defined (ACE_LACKS_UNIX_SYSLOG) && !defined (ACE_HAS_WINCE) +#elif !defined (ACE_LACKS_UNIX_SYSLOG) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_UNIX_Syslog #endif @@ -1262,12 +1262,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, break; case 'P': // Process ID -#if defined (ACE_OPENVMS) - // Print the process id in hex on OpenVMS. - ACE_OS::strcpy (fp, ACE_TEXT ("x")); -#else ACE_OS::strcpy (fp, ACE_TEXT ("d")); -#endif if (can_check) this_len = ACE_OS::snprintf (bp, bspace, format, @@ -1400,11 +1395,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, # if defined (ACE_WIN32) // Windows uses 'c' for a wide character ACE_OS::strcpy (fp, ACE_TEXT ("c")); # else // Other platforms behave differently -# if defined (HPUX) // HP-Unix compatible - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# else // Other ACE_OS::strcpy (fp, ACE_TEXT ("lc")); -# endif /* HPUX */ # endif # else /* ACE_USES_WCHAR */ @@ -1822,9 +1813,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, { #if defined (ACE_HAS_WCHAR) wchar_t *wchar_str = va_arg (argp, wchar_t *); -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -# elif defined (ACE_WIN32) +# if defined (ACE_WIN32) # if defined (ACE_USES_WCHAR) ACE_OS::strcpy (fp, ACE_TEXT ("s")); # else /* ACE_USES_WCHAR */ @@ -1832,7 +1821,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, # endif /* ACE_USES_WCHAR */ # else ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -# endif /* HPUX */ +# endif /* ACE_HAS_WCHAR */ if (can_check) this_len = ACE_OS::snprintf (bp, bspace, format, wchar_str ? wchar_str : ACE_TEXT_WIDE("(null)")); @@ -1858,11 +1847,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, this_len = ACE_OS::sprintf (bp, format, va_arg (argp, int)); #elif defined (ACE_USES_WCHAR) -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# else ACE_OS::strcpy (fp, ACE_TEXT ("lc")); -# endif /* HPUX */ if (can_check) this_len = ACE_OS::snprintf (bp, bspace, format, va_arg (argp, wint_t)); @@ -1894,11 +1879,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, ACE_OS::strcpy (fp, ACE_TEXT ("C")); # endif /* ACE_USES_WCHAR */ #elif defined (ACE_USES_WCHAR) -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# else ACE_OS::strcpy (fp, ACE_TEXT ("lc")); -# endif /* HPUX */ #else /* ACE_WIN32 */ ACE_OS::strcpy (fp, ACE_TEXT ("u")); #endif /* ACE_WIN32 */ @@ -1941,11 +1922,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, ACE_OS::strcpy (fp, ACE_TEXT ("S")); # endif /* ACE_USES_WCHAR */ #elif defined (ACE_HAS_WCHAR) -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -# else ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -# endif /* HPUX */ #endif /* ACE_WIN32 / ACE_HAS_WCHAR */ if (can_check) this_len = ACE_OS::snprintf @@ -2518,7 +2495,7 @@ bool ACE_Log_Formatter::process_conversion () ACE_OS::strcpy (this->fp_, "ls"); return false; case 'Z': -#if (defined ACE_WIN32 && !defined ACE_USES_WCHAR) || defined HPUX +#if (defined ACE_WIN32 && !defined ACE_USES_WCHAR) ACE_OS::strcpy (this->fp_, "S"); #elif defined ACE_WIN32 ACE_OS::strcpy (this->fp_, "s"); diff --git a/ACE/ace/Log_Msg.h b/ACE/ace/Log_Msg.h index b36fc903eca..2608b6c0eb2 100644 --- a/ACE/ace/Log_Msg.h +++ b/ACE/ace/Log_Msg.h @@ -374,10 +374,6 @@ public: /// restarted. bool restart () const; - // = Notice that the following two function is equivalent to - // "void msg_ostream (HANDLE)" and "HANDLE msg_ostream ()" - // on Windows CE. There is no <iostream.h> support on CE. - /// Update the ostream without overwriting the delete_ostream_ flag. void msg_ostream (ACE_OSTREAM_TYPE *); diff --git a/ACE/ace/Log_Record.h b/ACE/ace/Log_Record.h index 0cca3bfe113..152e2940eb4 100644 --- a/ACE/ace/Log_Record.h +++ b/ACE/ace/Log_Record.h @@ -73,11 +73,11 @@ public: /// FILE if the corresponding type is enabled. int print (const ACE_TCHAR host_name[], u_long verbose_flag, -#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_STDERR) +#if !defined (ACE_LACKS_STDERR) FILE *fp = stderr); #else FILE *fp); -#endif /* ACE_HAS_WINCE */ +#endif /* ACE_LACKS_STDERR */ #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) /// Write the contents of the logging record to the appropriate diff --git a/ACE/ace/MEM_Acceptor.h b/ACE/ace/MEM_Acceptor.h index 2ee834409cf..eebc834e5f6 100644 --- a/ACE/ace/MEM_Acceptor.h +++ b/ACE/ace/MEM_Acceptor.h @@ -24,10 +24,7 @@ #include "ace/MEM_Stream.h" #include "ace/MEM_Addr.h" - -#if !defined (ACE_HAS_WINCE) #include "ace/OS_QoS.h" -#endif // ACE_HAS_WINCE ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -151,14 +148,12 @@ protected: bool restart = true, bool reset_new_handle = false) const; -#if !defined (ACE_HAS_WINCE) int accept (ACE_SOCK_Stream &new_stream, ACE_Accept_QoS_Params qos_params, ACE_Addr *remote_addr = 0, ACE_Time_Value *timeout = 0, bool restart = true, bool reset_new_handle = false) const; -#endif // ACE_HAS_WINCE private: /// The filename prefix of the created mmap files. It should diff --git a/ACE/ace/MEM_Acceptor.inl b/ACE/ace/MEM_Acceptor.inl index 4d31ef56f20..35b2d9adaa2 100644 --- a/ACE/ace/MEM_Acceptor.inl +++ b/ACE/ace/MEM_Acceptor.inl @@ -27,7 +27,6 @@ ACE_MEM_Acceptor::accept (ACE_SOCK_Stream &new_stream, (new_stream, remote_addr, timeout, restart, reset_new_handle); } -#if !defined (ACE_HAS_WINCE) ACE_INLINE int ACE_MEM_Acceptor::accept (ACE_SOCK_Stream &new_stream, ACE_Accept_QoS_Params qos_params, @@ -39,7 +38,6 @@ ACE_MEM_Acceptor::accept (ACE_SOCK_Stream &new_stream, return this->ACE_SOCK_Acceptor::accept (new_stream, qos_params, remote_addr, timeout, restart, reset_new_handle); } -#endif // ACE_HAS_WINCE ACE_INLINE int ACE_MEM_Acceptor::get_local_addr (ACE_MEM_Addr &sap) const diff --git a/ACE/ace/MMAP_Memory_Pool.cpp b/ACE/ace/MMAP_Memory_Pool.cpp index ea1c432895e..a2689104e79 100644 --- a/ACE/ace/MMAP_Memory_Pool.cpp +++ b/ACE/ace/MMAP_Memory_Pool.cpp @@ -255,10 +255,6 @@ ACE_MMAP_Memory_Pool::commit_backing_store_name (size_t rounded_bytes, -1); } -#if defined (ACE_OPENVMS) - ::fsync(this->mmap_.handle()); -#endif - // Increment by one to put us at the beginning of the next chunk... ++map_size; #endif /* __Lynx__ */ @@ -294,11 +290,7 @@ ACE_MMAP_Memory_Pool::map_file (size_t map_size) 0, this->sa_) == -1 || (this->base_addr_ != 0 -#ifdef ACE_HAS_WINCE - && this->mmap_.addr () == 0)) // WinCE does not allow users to specify alloc addr. -#else && this->mmap_.addr () != this->base_addr_)) -#endif // ACE_HAS_WINCE { #if 0 ACELIB_ERROR ((LM_ERROR, diff --git a/ACE/ace/Malloc_T.cpp b/ACE/ace/Malloc_T.cpp index c336a0d8fde..23f2558de3a 100644 --- a/ACE/ace/Malloc_T.cpp +++ b/ACE/ace/Malloc_T.cpp @@ -476,17 +476,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open () 0, this->cb_ptr_); - // Why aC++ in 64-bit mode can't grok this, I have no - // idea... but it ends up with an extra bit set which makes - // size_ really big without this hack. -#if defined (__hpux) && defined (__LP64__) - size_t hpux11_hack = (rounded_bytes - sizeof *this->cb_ptr_) - / sizeof (MALLOC_HEADER); - p->size_ = hpux11_hack; -#else - p->size_ = (rounded_bytes - sizeof *this->cb_ptr_) - / sizeof (MALLOC_HEADER); -#endif /* (__hpux) && defined (__LP64__) */ + p->size_ = (rounded_bytes - sizeof *this->cb_ptr_) / sizeof (MALLOC_HEADER); ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nchunks_); ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_); diff --git a/ACE/ace/Malloc_T.h b/ACE/ace/Malloc_T.h index c519caff0ed..273bb013dcb 100644 --- a/ACE/ace/Malloc_T.h +++ b/ACE/ace/Malloc_T.h @@ -881,13 +881,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Malloc_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Malloc_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Malloc_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_MALLOC_H */ diff --git a/ACE/ace/Managed_Object.h b/ACE/ace/Managed_Object.h index c038a617167..d18863842af 100644 --- a/ACE/ace/Managed_Object.h +++ b/ACE/ace/Managed_Object.h @@ -100,6 +100,9 @@ template <class TYPE> class ACE_Managed_Object { public: + /// Get the preallocated object identified by "id". Returns a + /// pointer to the object. Beware: no error indication is provided, + /// because it can _only_ be used for accessing preallocated objects. static TYPE *get_preallocated_object (ACE_Object_Manager::Preallocated_Object identifier) { // The preallocated objects are in a separate, "read-only" array so @@ -112,12 +115,9 @@ public: return &((ACE_Cleanup_Adapter<TYPE> *) ACE_Object_Manager::preallocated_object[identifier])->object (); } - // Get the preallocated object identified by "id". Returns a - // pointer to the object. Beware: no error indication is provided, - // because it can _only_ be used for accessing preallocated objects. - // @note The function definition is inlined here so that it compiles - // on AIX 4.1 w/xlC v. 3.01. - + /// Get the preallocated array identified by "id". Returns a + /// pointer to the array. Beware: no error indication is provided, + /// because it can _only_ be used for accessing preallocated arrays. static TYPE *get_preallocated_array (ACE_Object_Manager::Preallocated_Array identifier) { // The preallocated array are in a separate, "read-only" array so @@ -130,11 +130,6 @@ public: return &((ACE_Cleanup_Adapter<TYPE> *) ACE_Object_Manager::preallocated_array[identifier])->object (); } - // Get the preallocated array identified by "id". Returns a - // pointer to the array. Beware: no error indication is provided, - // because it can _only_ be used for accessing preallocated arrays. - // @note The function definition is inlined here so that it compiles - // on AIX 4.1 w/xlC v. 3.01. protected: // Disallow instantiation of this class. @@ -151,13 +146,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Managed_Object.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Managed_Object.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Managed_Object.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Manual_Event.h b/ACE/ace/Manual_Event.h index e3e8e14e38c..b4754c49194 100644 --- a/ACE/ace/Manual_Event.h +++ b/ACE/ace/Manual_Event.h @@ -88,13 +88,7 @@ public: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Manual_Event.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Manual_Event.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_MANUAL_EVENT_H */ diff --git a/ACE/ace/Map_Manager.h b/ACE/ace/Map_Manager.h index 0fa8735c88e..0c887a412a9 100644 --- a/ACE/ace/Map_Manager.h +++ b/ACE/ace/Map_Manager.h @@ -696,13 +696,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Map_Manager.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Map_Manager.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Map_Manager.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Map_T.h b/ACE/ace/Map_T.h index 4773818d113..3e6d29fa145 100644 --- a/ACE/ace/Map_T.h +++ b/ACE/ace/Map_T.h @@ -1552,13 +1552,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Map_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Map_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Map_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_MAP_T_H */ diff --git a/ACE/ace/Mem_Map.cpp b/ACE/ace/Mem_Map.cpp index 47fa9b2b3d2..e44677922f0 100644 --- a/ACE/ace/Mem_Map.cpp +++ b/ACE/ace/Mem_Map.cpp @@ -188,8 +188,6 @@ ACE_Mem_Map::open (const ACE_TCHAR *file_name, #if defined (INTEGRITY) || defined (__QNXNTO__) || defined (ACE_VXWORKS) this->handle_ = ACE_OS::shm_open (file_name, flags, perms, sa); -#elif defined (ACE_OPENVMS) - ACE_OSCALL (::open (file_name, flags, perms, "shr=get,put,upd"), ACE_HANDLE, this->handle_); #else this->handle_ = ACE_OS::open (file_name, flags, perms, sa); #endif /* INTEGRITY */ diff --git a/ACE/ace/Message_Block_T.h b/ACE/ace/Message_Block_T.h index dc7f3e0ed50..0265992931c 100644 --- a/ACE/ace/Message_Block_T.h +++ b/ACE/ace/Message_Block_T.h @@ -73,13 +73,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Message_Block_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Message_Block_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Message_Block_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_MESSAGE_BLOCK_T_H */ diff --git a/ACE/ace/Message_Queue_T.h b/ACE/ace/Message_Queue_T.h index 5c9473fdb78..f4be9145dde 100644 --- a/ACE/ace/Message_Queue_T.h +++ b/ACE/ace/Message_Queue_T.h @@ -1566,13 +1566,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Message_Queue_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Message_Queue_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Metrics_Cache_T.h b/ACE/ace/Metrics_Cache_T.h index 46ba0333fe2..9488c81b7ae 100644 --- a/ACE/ace/Metrics_Cache_T.h +++ b/ACE/ace/Metrics_Cache_T.h @@ -222,13 +222,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Metrics_Cache_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Metrics_Cache_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Metrics_Cache_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* defined (ACE_COMPILE_TIMEPROBES) */ diff --git a/ACE/ace/Module.h b/ACE/ace/Module.h index 881d4076616..bb5f31578d2 100644 --- a/ACE/ace/Module.h +++ b/ACE/ace/Module.h @@ -201,13 +201,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Module.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Module.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Module.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp index 9ed53f08b30..9524a483c64 100644 --- a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.cpp @@ -16,12 +16,10 @@ namespace ACE #if defined (ACE_HAS_WIN32_PDH) , Windows_Multi_Instance_Monitor ( ACE_TEXT ("\\Network Interface(*)\\Bytes Received/sec")) -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , Linux_Network_Interface_Monitor ( " %*[^:]: %lu %*u %*u %*u %*u %*u %*u %*u %*u %*u") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("rbytes")) #elif defined (__NetBSD__) || defined (__OpenBSD__) , BSD_Network_Interface_Monitor (ACE_TEXT ("ibytes")) #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h index cecc79da264..de3158513d3 100644 --- a/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h +++ b/ACE/ace/Monitor_Control/Bytes_Received_Monitor.h @@ -23,10 +23,8 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -52,10 +50,8 @@ namespace ACE : public Monitor_Base #if defined (ACE_HAS_WIN32_PDH) , public Windows_Multi_Instance_Monitor -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp index 98a05b365ed..b196f2f01f5 100644 --- a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.cpp @@ -16,12 +16,10 @@ namespace ACE #if defined (ACE_HAS_WIN32_PDH) , Windows_Multi_Instance_Monitor ( ACE_TEXT ("\\Network Interface(*)\\Bytes Sent/sec")) -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , Linux_Network_Interface_Monitor ( " %*[^:]: %*u %*u %*u %*u %*u %*u %*u %*u %lu %*u") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("obytes")) #elif defined (__FreeBSD__) || defined (__Lynx__) , FreeBSD_Network_Interface_Monitor (ACE_TEXT ("obytes")) #elif defined (__NetBSD__) || defined (__OpenBSD__) diff --git a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h index 132b6d74004..8672d6749bf 100644 --- a/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h +++ b/ACE/ace/Monitor_Control/Bytes_Sent_Monitor.h @@ -23,10 +23,8 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -52,10 +50,8 @@ namespace ACE : public Monitor_Base #if defined (ACE_HAS_WIN32_PDH) , public Windows_Multi_Instance_Monitor -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp b/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp index 60ca87f76c4..af3bfe97163 100644 --- a/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp +++ b/ACE/ace/Monitor_Control/CPU_Load_Monitor.cpp @@ -2,10 +2,6 @@ #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) -#if defined (ACE_HAS_KSTAT) -#include <sys/sysinfo.h> -#endif - #if defined (ACE_LINUX) #include "ace/OS_NS_stdio.h" #endif @@ -27,7 +23,7 @@ namespace ACE #if defined (ACE_HAS_WIN32_PDH) , Windows_Monitor (ACE_TEXT("\\Processor(_Total)\\% Processor Time")) #endif -#if defined (ACE_LINUX) || defined (ACE_HAS_KSTAT) +#if defined (ACE_LINUX) , user_ (0) , wait_ (0) , kernel_ (0) @@ -37,10 +33,6 @@ namespace ACE #endif #if defined (ACE_LINUX) , file_ptr_ (0) -#elif defined (ACE_HAS_KSTAT) - , kstats_ (0) - , kstat_ (0) - , kstat_id_ (0) #endif { this->init (); @@ -58,7 +50,7 @@ namespace ACE this->access_kstats (&this->idle_); #endif -#if defined (ACE_LINUX) || defined (ACE_HAS_KSTAT) +#if defined (ACE_LINUX) double delta_idle = this->idle_ - this->prev_idle_; double total = this->user_ + this->wait_ + this->kernel_ + this->idle_; @@ -109,12 +101,6 @@ namespace ACE this->prev_total_ = this->user_ + this->wait_ + this->kernel_ + this->prev_idle_; -#elif defined (ACE_HAS_KSTAT) - /// Stored similarly to Linux, in a system file. - this->access_kstats (&this->prev_idle_); - - this->prev_total_ = - this->user_ + this->wait_ + this->kernel_ + this->prev_idle_; #endif } @@ -160,93 +146,6 @@ namespace ACE ACE_OS::fclose (this->file_ptr_); } #endif - -#if defined (ACE_HAS_KSTAT) - void - CPU_Load_Monitor::access_kstats (unsigned long *which_idle) - { - this->kstats_ = kstat_open (); - - if (this->kstats_ == 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("opening kstats file failed\n"))); - return; - } - - this->kstat_id_ = this->kstats_->kc_chain_id; - - while (true) - { - this->kernel_ = 0UL; - this->wait_ = 0UL; - this->user_ = 0UL; - (*which_idle) = 0UL; - - /// Unlike Linux's "/proc/stat", there is no entry for total CPU - /// stats, so we have to sum them manually. - for (this->kstat_ = this->kstats_->kc_chain; - this->kstat_ != 0; - this->kstat_ = this->kstat_->ks_next) - { - int result = ACE_OS::strncmp (this->kstat_->ks_name, - "cpu_stat", - ACE_OS::strlen ("cpu_stat")); - - if (result == 0) - { - /// Because the kstat chain can change dynamically, - /// watch the chain ID and restart the walk if the ID - /// differs from what we saw during the walk. The restart - /// is done by breaking from the cycle with kstat_ not 0. - - kid_t kstat_id = kstat_read (this->kstats_, this->kstat_, 0); - - if (kstat_id != this->kstat_id_) - { - break; - } - - cpu_stat_t &kstat_cpu = - *((cpu_stat_t *) this->kstat_->ks_data); - - this->kernel_ += kstat_cpu.cpu_sysinfo.cpu[CPU_KERNEL]; - this->wait_ += kstat_cpu.cpu_sysinfo.cpu[CPU_WAIT]; - this->user_ += kstat_cpu.cpu_sysinfo.cpu[CPU_USER]; - (*which_idle) += kstat_cpu.cpu_sysinfo.cpu[CPU_IDLE]; - } - } - - if (this->kstat_ != 0) - { - /// The ID changed underneath us, so get the new one and - /// start again. - this->kstat_id_ = kstat_chain_update (this->kstats_); - - if (! this->kstat_id_ > 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("kstat chain update ") - ACE_TEXT ("returned null id\n"))); - return; - } - } - else - { - /// Clean run, exit the WHILE loop. - break; - } - } - - int status = kstat_close (this->kstats_); - - if (status != 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("closing kstats file failed\n"))); - } - } -#endif } } diff --git a/ACE/ace/Monitor_Control/CPU_Load_Monitor.h b/ACE/ace/Monitor_Control/CPU_Load_Monitor.h index 037cb5d19b2..f286478039b 100644 --- a/ACE/ace/Monitor_Control/CPU_Load_Monitor.h +++ b/ACE/ace/Monitor_Control/CPU_Load_Monitor.h @@ -23,8 +23,6 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/os_include/os_kstat.h" #endif #include "ace/Monitor_Control/Monitor_Control_export.h" @@ -67,15 +65,11 @@ namespace ACE void access_proc_stat (unsigned long *which_idle); #endif -#if defined (ACE_HAS_KSTAT) - void access_kstats (unsigned long *which_idle); -#endif - private: static const char* default_name_; - /// Common to Linux and Solaris implementations. -#if defined (ACE_LINUX) || defined (ACE_HAS_KSTAT) + /// Linux implementation +#if defined (ACE_LINUX) unsigned long user_; unsigned long wait_; unsigned long kernel_; @@ -86,10 +80,6 @@ namespace ACE #if defined (ACE_LINUX) FILE *file_ptr_; char buf_[1024]; -#elif defined (ACE_HAS_KSTAT) - kstat_ctl_t *kstats_; - kstat_t *kstat_; - kid_t kstat_id_; #endif }; } diff --git a/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.cpp b/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.cpp index b0534ca00be..1ba3229d9e7 100644 --- a/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.cpp @@ -1,6 +1,6 @@ #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#if defined (ACE_LINUX) || defined (AIX) +#if defined (ACE_LINUX) #include "ace/Log_Category.h" #include "ace/OS_NS_stdio.h" @@ -119,4 +119,4 @@ namespace ACE ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* defined (ACE_LINUX) || defined (AIX) */ +#endif /* defined (ACE_LINUX) */ diff --git a/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.h b/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.h index 5622c7138f3..e60e8c5fcad 100644 --- a/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.h +++ b/ACE/ace/Monitor_Control/Linux_Network_Interface_Monitor.h @@ -21,7 +21,7 @@ #include "ace/Monitor_Control/Monitor_Control_export.h" -#if defined (ACE_LINUX) || defined (AIX) +#if defined (ACE_LINUX) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -67,7 +67,7 @@ namespace ACE ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* defined (ACE_LINUX) || defined (AIX) */ +#endif /* defined (ACE_LINUX) */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp b/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp index 49593fee95c..ab288a05dfa 100644 --- a/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Memory_Usage_Monitor.cpp @@ -1,7 +1,3 @@ -#if defined (ACE_HAS_KSTAT) -#include <sys/sysinfo.h> -#endif - #include "ace/Monitor_Control/Memory_Usage_Monitor.h" #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) @@ -41,15 +37,6 @@ namespace ACE double percent_mem_usage = used_ram / this->sysinfo_.totalram * 100.0; this->receive (percent_mem_usage); -#elif defined (ACE_HAS_KSTAT) - unsigned long page_size = sysconf (_SC_PAGE_SIZE); - unsigned long total = sysconf (_SC_PHYS_PAGES) * page_size; - unsigned long free = sysconf (_SC_AVPHYS_PAGES) * page_size; - - double used = total - free; - double percent_mem_usage = used / total * 100.0; - - this->receive (percent_mem_usage); #endif } diff --git a/ACE/ace/Monitor_Control/Monitor_Control.mpc b/ACE/ace/Monitor_Control/Monitor_Control.mpc index 11366c50ada..5073b019163 100644 --- a/ACE/ace/Monitor_Control/Monitor_Control.mpc +++ b/ACE/ace/Monitor_Control/Monitor_Control.mpc @@ -2,7 +2,6 @@ project(Monitor_Control) : acelib, ace_etcl_parser, ace_output, install { dynamicflags += MONITOR_CONTROL_BUILD_DLL sharedname = ACE_Monitor_Control - avoids += wince Source_Files { Auto_Update_Starter.cpp @@ -21,7 +20,6 @@ project(Monitor_Control) : acelib, ace_etcl_parser, ace_output, install { Num_Threads_Monitor.cpp Packets_Received_Monitor.cpp Packets_Sent_Monitor.cpp - Solaris_Network_Interface_Monitor.cpp Windows_Monitor.cpp Windows_Multi_Instance_Monitor.cpp } diff --git a/ACE/ace/Monitor_Control/Num_Threads_Monitor.h b/ACE/ace/Monitor_Control/Num_Threads_Monitor.h index 422a71c79ea..7a20d2d0b78 100644 --- a/ACE/ace/Monitor_Control/Num_Threads_Monitor.h +++ b/ACE/ace/Monitor_Control/Num_Threads_Monitor.h @@ -23,14 +23,6 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -/// There is apparently no way to query the number of threads on the -/// Solaris platform. The only benchmark I've seen had to put hooks -/// in the thread creation functions to keep track of the highest -/// thread ID, then check all the IDs less than that to see if the -/// threads still exist. Since we don't have that option in this -/// framework, which is to be used by existing applications, this -/// particular OS monitor is left unimplemented on Solaris. #endif #include "ace/Monitor_Control/Monitor_Control_export.h" diff --git a/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp b/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp index c01091eacce..4d222b86514 100644 --- a/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Packets_Received_Monitor.cpp @@ -16,12 +16,10 @@ namespace ACE #if defined (ACE_HAS_WIN32_PDH) , Windows_Multi_Instance_Monitor ( ACE_TEXT ("\\Network Interface(*)\\Packets Received/sec")) -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , Linux_Network_Interface_Monitor ( " %*[^:]: %*u %lu %*u %*u %*u %*u %*u %*u %*u %*u") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("ipackets")) #elif defined (__FreeBSD__) || defined (__Lynx__) , FreeBSD_Network_Interface_Monitor (ACE_TEXT ("ipackets")) #elif defined (__NetBSD__) || defined (__OpenBSD__) diff --git a/ACE/ace/Monitor_Control/Packets_Received_Monitor.h b/ACE/ace/Monitor_Control/Packets_Received_Monitor.h index d7f80a1491d..d0338dfde6b 100644 --- a/ACE/ace/Monitor_Control/Packets_Received_Monitor.h +++ b/ACE/ace/Monitor_Control/Packets_Received_Monitor.h @@ -23,10 +23,8 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -52,10 +50,8 @@ namespace ACE : public Monitor_Base #if defined (ACE_HAS_WIN32_PDH) , public Windows_Multi_Instance_Monitor -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp index fc880ed7ae0..5c3046c0e3e 100644 --- a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp +++ b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.cpp @@ -16,12 +16,10 @@ namespace ACE #if defined (ACE_HAS_WIN32_PDH) , Windows_Multi_Instance_Monitor ( ACE_TEXT ("\\Network Interface(*)\\Packets Sent/sec")) -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , Linux_Network_Interface_Monitor ( " %*[^:]: %*u %*u %*u %*u %*u %*u %*u %*u %*u %lu") /// Scan format for /proc/net/dev -#elif defined (ACE_HAS_KSTAT) - , Solaris_Network_Interface_Monitor (ACE_TEXT ("opackets")) #elif defined (__NetBSD__) || defined (__OpenBSD__) , BSD_Network_Interface_Monitor (ACE_TEXT ("opackets")) #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h index c547434b46a..85de0ca1d63 100644 --- a/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h +++ b/ACE/ace/Monitor_Control/Packets_Sent_Monitor.h @@ -23,10 +23,8 @@ #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H) #include "ace/Monitor_Control/Windows_Multi_Instance_Monitor.h" -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) #include "ace/Monitor_Control/Linux_Network_Interface_Monitor.h" -#elif defined (ACE_HAS_KSTAT) -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" #elif defined (__FreeBSD__) || defined (__Lynx__) #include "ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h" #elif defined (__NetBSD__) || defined (__OpenBSD__) @@ -52,10 +50,8 @@ namespace ACE : public Monitor_Base #if defined (ACE_HAS_WIN32_PDH) , public Windows_Multi_Instance_Monitor -#elif defined (ACE_LINUX) || defined (AIX) +#elif defined (ACE_LINUX) , public Linux_Network_Interface_Monitor -#elif defined (ACE_HAS_KSTAT) - , public Solaris_Network_Interface_Monitor #elif defined (__NetBSD__) || defined (__OpenBSD__) , public BSD_Network_Interface_Monitor #elif defined (__FreeBSD__) || defined (__Lynx__) diff --git a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp b/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp deleted file mode 100644 index a3e09a8afa2..00000000000 --- a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp +++ /dev/null @@ -1,221 +0,0 @@ -#include "ace/Monitor_Control/Solaris_Network_Interface_Monitor.h" - -#if defined (ACE_HAS_KSTAT) - -#include "ace/Log_Category.h" -#include "ace/OS_NS_stdio.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - namespace Monitor_Control - { - Solaris_Network_Interface_Monitor::Solaris_Network_Interface_Monitor ( - const ACE_TCHAR *lookup_str) - : value_ (0UL), - start_ (0UL), - lookup_str_ (lookup_str) - { - this->init (); - } - - void - Solaris_Network_Interface_Monitor::update_i () - { - this->access_kstats (this->value_); - this->value_ -= this->start_; - } - - void - Solaris_Network_Interface_Monitor::clear_impl () - { - this->init (); - } - - void - Solaris_Network_Interface_Monitor::init () - { - unsigned long i; - - for (i = 0UL; i < MAX_LO_INTERFACES; ++i) - { - this->value_array_lo_[i] = 0UL; - } - - for (i = 0UL; i < MAX_HME_INTERFACES; ++i) - { - this->value_array_hme_[i] = 0UL; - } - - this->access_kstats (this->start_); - } - - void - Solaris_Network_Interface_Monitor::access_kstats ( - ACE_UINT64 &which_member) - { - this->kstats_ = kstat_open (); - - if (this->kstats_ == 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("opening kstats file failed\n"))); - return; - } - - this->kstat_id_ = this->kstats_->kc_chain_id; - int status = 0; - - while (true) - { - /// We have to sum the network interfaces manually. - for (this->kstat_ = this->kstats_->kc_chain; - this->kstat_ != 0; - this->kstat_ = this->kstat_->ks_next) - { - if (ACE_OS::strcmp (this->kstat_->ks_class, "net") != 0) - { - continue; - } - - unsigned long ks_instance = this->kstat_->ks_instance; - - if (ACE_OS::strcmp (this->kstat_->ks_module, "lo") == 0) - { - /// Interfaces 'lo' have only packet counters. - if (this->lookup_str_ == ACE_TEXT ("obytes") - || this->lookup_str_ == ACE_TEXT ("rbytes")) - { - continue; - } - - status = this->check_ks_module (ks_instance, - MAX_LO_INTERFACES, - "MAX_LO_INTERFACES", - this->value_array_lo_, - which_member); - - if (status == -1) - { - /// Unrecoverable error, diagnostic already output. - (void) kstat_close (this->kstats_); - return; - } - else if (status == 1) - { - /// The kstat_id changed underneath us, start over. - break; - } - } - else if (ACE_OS::strcmp (this->kstat_->ks_module, "hme") == 0 - || ACE_OS::strcmp (this->kstat_->ks_module, "bge") == 0) - { - status = this->check_ks_module (ks_instance, - MAX_HME_INTERFACES, - "MAX_HME_INTERFACES", - this->value_array_hme_, - which_member); - - if (status == -1) - { - /// Unrecoverable error, diagnostic already output. - (void) kstat_close (this->kstats_); - return; - } - else if (status == 1) - { - /// The kstat_id changed underneath us, start over. - break; - } - } - } - - if (this->kstat_) - { - this->kstat_id_ = kstat_chain_update (this->kstats_); - - if (! this->kstat_id_ > 0) - { - ACELIB_ERROR ((LM_ERROR, "kstat is is not > 0.\n")); - break; - } - } - else - { - break; - } - } - - status = kstat_close (this->kstats_); - - if (status != 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("closing kstats file failed\n"))); - } - } - - int - Solaris_Network_Interface_Monitor::check_ks_module ( - const unsigned long ks_instance, - const unsigned long which_max, - const char *max_str, - ACE_UINT64 *value_array, - ACE_UINT64 &which_member) - { - if (! (ks_instance < which_max)) - { - ACELIB_ERROR_RETURN ((LM_ERROR, - "%s exceeded.\n", - max_str), - -1); - } - - /// Because the kstat chain can change dynamically, - /// watch the chain ID and restart the walk if the ID - /// differs from what we saw during the walk. The restart - /// is done by breaking from the cycle with kstat_ not 0. - - kid_t kstat_id = - kstat_read (this->kstats_, this->kstat_, 0); - - if (kstat_id != this->kstat_id_) - { - /// This return value restarts the walk as described above. - return 1; - } - - kstat_named_t *value = - (kstat_named_t *) kstat_data_lookup ( - this->kstat_, - ACE_TEXT_ALWAYS_CHAR (this->lookup_str_.rep ())); - - if (value == 0) - { - /// Just return and let the calling FOR loop advance. - return 0; - } - - if (value->data_type != KSTAT_DATA_UINT32) - { - ACELIB_ERROR_RETURN ((LM_ERROR, - "Wrong data type.\n"), - -1); - } - - /// Guard against overflow. - value_array[ks_instance] += - value->value.ui32 - - static_cast<ACE_UINT32> (value_array[ks_instance]); - - which_member += value_array[ks_instance]; - - return 0; - } - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* defined (ACE_HAS_KSTAT) */ diff --git a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h b/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h deleted file mode 100644 index 15dbc9c50e1..00000000000 --- a/ACE/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h +++ /dev/null @@ -1,89 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Solaris_Network_Interface_Monitor.h - * - * @author Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - -#ifndef SOLARIS_NETWORK_INTERFACE_MONITOR_H -#define SOLARIS_NETWORK_INTERFACE_MONITOR_H - -#include /**/ "ace/pre.h" - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Monitor_Control/Monitor_Control_export.h" - -#if defined (ACE_HAS_KSTAT) - -#include "ace/os_include/os_kstat.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - namespace Monitor_Control - { - /** - * @class Solaris_Network_Interface_Monitor - * - * @brief Mixin class for network interface monitors compiled on - * Solaris machines. - */ - class MONITOR_CONTROL_Export Solaris_Network_Interface_Monitor - { - protected: - /// The kstat interface can access a wealth of - /// network information about the system. To get the specific - /// value we want to monitor, we just vary the lookup string. - Solaris_Network_Interface_Monitor (const ACE_TCHAR *lookup_str); - - /// Platform-specific implementation. - void update_i (); - - /// Platform-specific reset. - void clear_impl (); - - protected: - ACE_UINT64 value_; - - private: - /// Common code. - - void init (); - void access_kstats (ACE_UINT64 &which_member); - int check_ks_module (const unsigned long ks_instance, - const unsigned long which_max, - const char *max_str, - ACE_UINT64 *value_array, - ACE_UINT64 &which_member); - - - private: - static const unsigned long MAX_LO_INTERFACES = 5UL; - static const unsigned long MAX_HME_INTERFACES = 10UL; - ACE_UINT64 value_array_lo_[MAX_LO_INTERFACES]; - ACE_UINT64 value_array_hme_[MAX_HME_INTERFACES]; - ACE_UINT64 start_; - ACE_TString lookup_str_; - kstat_ctl_t *kstats_; - kstat_t *kstat_; - kid_t kstat_id_; - }; - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* defined (ACE_HAS_KSTAT) */ - -#include /**/ "ace/post.h" - -#endif // SOLARIS_NETWORK_INTERFACE_MONITOR_H diff --git a/ACE/ace/Mutex.h b/ACE/ace/Mutex.h index ba784f63b7f..16950c71872 100644 --- a/ACE/ace/Mutex.h +++ b/ACE/ace/Mutex.h @@ -161,7 +161,7 @@ public: # define ACE_MUTEX_PROCESS_LOCK_IS_SEMA ACE_sema_t process_sema_; typedef ACE_sema_t Process_Lock; -#elif defined ACE_HAS_PTHREADS || defined ACE_HAS_STHREADS +#elif defined ACE_HAS_PTHREADS # define ACE_MUTEX_USE_PROCESS_LOCK # define ACE_MUTEX_PROCESS_LOCK_IS_MUTEX typedef ACE_mutex_t Process_Lock; diff --git a/ACE/ace/Node.h b/ACE/ace/Node.h index ca0c8b422e1..523cbec4b35 100644 --- a/ACE/ace/Node.h +++ b/ACE/ace/Node.h @@ -70,13 +70,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Node.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Node.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_NODE_H */ diff --git a/ACE/ace/OS_Errno.cpp b/ACE/ace/OS_Errno.cpp index 065eb39e133..8c082487b73 100644 --- a/ACE/ace/OS_Errno.cpp +++ b/ACE/ace/OS_Errno.cpp @@ -1,11 +1,9 @@ // -*- C++ -*- #include "ace/OS_Errno.h" -// Inlining this class on debug builds with gcc on Solaris can cause -// deadlocks during static initialization. On non debug builds it -// causes compilation errors. -#if !defined (ACE_HAS_INLINED_OSCALLS) || \ - (defined (__GNUG__) && defined (__sun__)) +// Inlining this class on debug builds with gcc deadlocks during static +// initialization. On non debug builds it causes compilation errors. +#if !defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE # endif /* ACE_INLINE */ @@ -13,31 +11,3 @@ # include "ace/OS_Errno.inl" #endif /* ACE_HAS_INLINED_OSCALLS */ -#if defined (ACE_HAS_WINCE_BROKEN_ERRNO) - -#include "ace/OS_Memory.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_CE_Errno *ACE_CE_Errno::instance_ = 0; -DWORD ACE_CE_Errno::errno_key_ = 0xffffffff; - -void -ACE_CE_Errno::init () -{ - ACE_NEW (ACE_CE_Errno::instance_, - ACE_CE_Errno ()); - ACE_CE_Errno::errno_key_ = TlsAlloc (); -} - -void -ACE_CE_Errno::fini () -{ - TlsFree (ACE_CE_Errno::errno_key_); - delete ACE_CE_Errno::instance_; - ACE_CE_Errno::instance_ = 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ diff --git a/ACE/ace/OS_Errno.h b/ACE/ace/OS_Errno.h index d50463c9b68..3f2555b3fb5 100644 --- a/ACE/ace/OS_Errno.h +++ b/ACE/ace/OS_Errno.h @@ -55,18 +55,13 @@ public: /// Reset the value of @c errno to <error>. ~ACE_Errno_Guard (); -#if defined (ACE_HAS_WINCE_BROKEN_ERRNO) - /// Assign @a errno_ref to <error_>. - int operator= (const ACE_ERRNO_TYPE &errno_ref); -#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ - - /// Assign <error> to <error_>. + /// Assign @a erro> to error_. int operator= (int error); - /// Compare <error> with <error_> for equality. + /// Compare @a error with error_ for equality. bool operator== (int error); - /// Compare <error> with <error_> for inequality. + /// Compare @a error with error_ for inequality. bool operator!= (int error); private: @@ -81,11 +76,10 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -// Inlining this class on debug builds with gcc on Solaris can cause +// Inlining this class on debug builds with can cause // deadlocks during static initialization. On non debug builds it // causes compilation errors. -#if defined (ACE_HAS_INLINED_OSCALLS) && \ - (!defined (__GNUG__) || !defined (__sun__)) +#if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE # endif /* ACE_INLINE */ diff --git a/ACE/ace/OS_Errno.inl b/ACE/ace/OS_Errno.inl index 0a7fa0f4ff2..32d9ea284bd 100644 --- a/ACE/ace/OS_Errno.inl +++ b/ACE/ace/OS_Errno.inl @@ -35,14 +35,6 @@ ACE_Errno_Guard::~ACE_Errno_Guard () #endif /* ACE_MT_SAFE */ } -#if defined (ACE_HAS_WINCE_BROKEN_ERRNO) -ACE_INLINE int -ACE_Errno_Guard::operator= (const ACE_ERRNO_TYPE &error) -{ - return this->error_ = error; -} -#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ - ACE_INLINE int ACE_Errno_Guard::operator= (int error) { diff --git a/ACE/ace/OS_Memory.h b/ACE/ace/OS_Memory.h index fd8262de6ae..eec0b65df8f 100644 --- a/ACE/ace/OS_Memory.h +++ b/ACE/ace/OS_Memory.h @@ -123,40 +123,13 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * @param ptr the base pointer * @param alignment the required alignment */ -#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) -inline unsigned int -ACE_align_binary (unsigned int ptr, unsigned int alignment) -{ - unsigned int const tmp = alignment - 1; - return (ptr + tmp) & (~tmp); -} -#else inline uintptr_t ACE_align_binary (uintptr_t ptr, uintptr_t alignment) { uintptr_t const tmp = alignment - 1; return (ptr + tmp) & (~tmp); } -#endif -#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) -/// Return the next address aligned to a required boundary -inline char * -ACE_ptr_align_binary (char const * ptr, unsigned int alignment) -{ - return - reinterpret_cast<char *> ( - ACE_align_binary (reinterpret_cast<unsigned int> (ptr), alignment)); -} - -/// Return the next address aligned to a required boundary -inline char * -ACE_ptr_align_binary (unsigned char const * ptr, unsigned int alignment) -{ - return - ACE_ptr_align_binary (reinterpret_cast<char const *> (ptr), alignment); -} -#else /// Return the next address aligned to a required boundary inline char * ACE_ptr_align_binary (char const * ptr, uintptr_t alignment) @@ -173,7 +146,6 @@ ACE_ptr_align_binary (unsigned char const * ptr, uintptr_t alignment) return ACE_ptr_align_binary (reinterpret_cast<char const *> (ptr), alignment); } -#endif /* ACE_OPENVMS && __INITIAL_POINTER_SIZE < 64 */ //@} ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index a99cdd35ef2..d4e3c82b253 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -30,9 +30,6 @@ ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args) #if !defined(ACE_WIN32) && defined (__IBMCPP__) && (__IBMCPP__ >= 400) # define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ (*THR_ID = ::_beginthreadex ((void(_Optlink*)(void*))ENTRY_POINT, STACK, STACKSIZE, ARGS), *THR_ID) -#elif defined (ACE_HAS_WINCE) -# define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ - CreateThread (0, STACKSIZE, (unsigned long (__stdcall *) (void *)) ENTRY_POINT, ARGS, (FLAGS) & (CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION), (unsigned long *) THR_ID) #elif defined(ACE_HAS_WTHREADS) // Green Hills compiler gets confused when __stdcall is embedded in // parameter list, so we define the type ACE_WIN32THRFUNC_T and use it @@ -1466,13 +1463,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, // Wait to be awakened by a ACE_OS::signal() or // ACE_OS::broadcast(). # if defined (ACE_WIN32) -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) result = ::WaitForSingleObject (cv->sema_, msec_timeout); -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - // Can't use Win32 API on our simulated semaphores. - result = ACE_OS::sema_wait (&cv->sema_, - timeout); -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) // Inline the call to ACE_OS::sema_wait () because it takes an // ACE_Time_Value argument. Avoid the cost of that conversion . . . @@ -1657,16 +1648,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, return -1; // Wait to be awakened by a ACE_OS::signal() or ACE_OS::broadcast(). -# if defined (ACE_USES_WINCE_SEMA_SIMULATION) - // Can't use Win32 API on simulated semaphores. - result = ACE_OS::sema_wait (&cv->sema_, - timeout); - - if (result == -1 && errno == ETIME) - result = WAIT_TIMEOUT; -# else result = ::WaitForSingleObject (cv->sema_, msec_timeout); -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ // Reacquire lock to avoid race conditions. if (ACE_OS::thread_mutex_lock (&cv->waiters_lock_) != 0) @@ -1748,16 +1730,7 @@ ACE_OS::cond_wait (ACE_cond_t *cv, // Wait to be awakened by a ACE_OS::cond_signal() or // ACE_OS::cond_broadcast(). -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) result = ::WaitForSingleObject (cv->sema_, INFINITE); -# else - // Can't use Win32 API on simulated semaphores. - result = ACE_OS::sema_wait (&cv->sema_); - - if (result != WAIT_OBJECT_0 && errno == ETIME) - result = WAIT_TIMEOUT; - -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ // Reacquire lock to avoid race conditions. if (ACE_OS::thread_mutex_lock (&cv->waiters_lock_) != 0) @@ -1904,14 +1877,6 @@ ACE_OS::mutex_init (ACE_mutex_t *m, ::pthread_mutexattr_destroy (&l_attributes); return result; -# elif defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (sa); - ACE_UNUSED_ARG (lock_type); - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_init (m, lock_scope, attributes), - result), - int); # elif defined (ACE_HAS_WTHREADS) m->type_ = lock_scope; @@ -1920,20 +1885,11 @@ ACE_OS::mutex_init (ACE_mutex_t *m, switch (lock_scope) { case USYNC_PROCESS: -# if defined (ACE_HAS_WINCE) - // @@todo (brunsch) This idea should be moved into ACE_OS_Win32. - m->proc_mutex_ = - ::CreateMutexW (ACE_OS::default_win32_security_attributes_r - (sa, &sa_buffer, &sd_buffer), - FALSE, - ACE_Ascii_To_Wide (name).wchar_rep ()); -# else /* ACE_HAS_WINCE */ m->proc_mutex_ = - ::CreateMutexA (ACE_OS::default_win32_security_attributes_r - (sa, &sa_buffer, &sd_buffer), - FALSE, - name); -# endif /* ACE_HAS_WINCE */ + ::CreateMutexA (ACE_OS::default_win32_security_attributes_r + (sa, &sa_buffer, &sd_buffer), + FALSE, + name); if (m->proc_mutex_ == 0) ACE_FAIL_RETURN (-1); else @@ -1985,9 +1941,6 @@ ACE_OS::mutex_destroy (ACE_mutex_t *m) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_destroy (m), result), int); # endif /* ACE_LACKS_PTHREAD_MUTEX_DESTROY */ -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_destroy (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2069,9 +2022,6 @@ ACE_OS::mutex_lock (ACE_mutex_t *m) // Note, don't use "::" here since the following call is often a macro. int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_lock (m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_lock (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2243,9 +2193,6 @@ ACE_OS::mutex_trylock (ACE_mutex_t *m) // Note, don't use "::" here since the following call is often a macro. int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_trylock (m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_trylock (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2344,9 +2291,6 @@ ACE_OS::mutex_unlock (ACE_mutex_t *m) // Note, don't use "::" here since the following call is often a macro. int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_unlock (m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_unlock (m), result), int); # elif defined (ACE_HAS_WTHREADS) switch (m->type_) { @@ -2587,20 +2531,11 @@ ACE_OS::event_init (ACE_event_t *event, ACE_UNUSED_ARG (arg); SECURITY_ATTRIBUTES sa_buffer; SECURITY_DESCRIPTOR sd_buffer; -# if defined (ACE_HAS_WINCE) - // @@todo (brunsch) This idea should be moved into ACE_OS_Win32. - *event = ::CreateEventW (ACE_OS::default_win32_security_attributes_r - (sa, &sa_buffer, &sd_buffer), - manual_reset, - initial_state, - ACE_Ascii_To_Wide (name).wchar_rep ()); -# else /* ACE_HAS_WINCE */ *event = ::CreateEventA (ACE_OS::default_win32_security_attributes_r (sa, &sa_buffer, &sd_buffer), manual_reset, initial_state, name); -# endif /* ACE_HAS_WINCE */ if (*event == 0) ACE_FAIL_RETURN (-1); else @@ -3055,72 +2990,15 @@ ACE_OS::event_timedwait (ACE_event_t *event, int ACE_OS::lwp_getparams (ACE_Sched_Params &sched_params) { -#if defined (ACE_HAS_STHREADS) || defined (sun) - // Get the class TS and RT class IDs. - ACE_id_t rt_id; - ACE_id_t ts_id; - if (ACE_OS::scheduling_class ("RT", rt_id) == -1 - || ACE_OS::scheduling_class ("TS", ts_id) == -1) - return -1; - - // Get this LWP's scheduling parameters. - pcparms_t pcparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcparms, 0, sizeof pcparms); - pcparms.pc_cid = PC_CLNULL; - - if (ACE_OS::priority_control (P_LWPID, - P_MYID, - PC_GETPARMS, - (char *) &pcparms) == -1) - return -1; - else if (pcparms.pc_cid == rt_id) - { - // RT class. - rtparms_t rtparms; - ACE_OS::memcpy (&rtparms, pcparms.pc_clparms, sizeof rtparms); - - sched_params.policy (ACE_SCHED_FIFO); - sched_params.priority (rtparms.rt_pri); - sched_params.scope (ACE_SCOPE_THREAD); - ACE_Time_Value quantum (rtparms.rt_tqsecs, - rtparms.rt_tqnsecs == RT_TQINF - ? 0 : rtparms.rt_tqnsecs * 1000); - sched_params.quantum (quantum); - return 0; - } - else if (pcparms.pc_cid == ts_id) - { - /* TS class */ - tsparms_t tsparms; - ACE_OS::memcpy (&tsparms, pcparms.pc_clparms, sizeof tsparms); - - sched_params.policy (ACE_SCHED_OTHER); - sched_params.priority (tsparms.ts_upri); - sched_params.scope (ACE_SCOPE_THREAD); - return 0; - } - else - return -1; - -#else /* ! ACE_HAS_STHREADS && ! sun */ ACE_UNUSED_ARG (sched_params); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_STHREADS && ! sun */ } int ACE_OS::lwp_setparams (const ACE_Sched_Params &sched_params) { -#if defined (ACE_HAS_STHREADS) || defined (sun) - ACE_Sched_Params lwp_params (sched_params); - lwp_params.scope (ACE_SCOPE_LWP); - return ACE_OS::sched_params (lwp_params); -#else /* ! ACE_HAS_STHREADS && ! sun */ ACE_UNUSED_ARG (sched_params); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_STHREADS && ! sun */ } #if defined ACE_HAS_THREADS && defined ACE_LACKS_RWLOCK_T @@ -3250,9 +3128,7 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, ACE_id_t id) { ACE_OS_TRACE ("ACE_OS::sched_params"); -#if defined (ACE_HAS_STHREADS) - return ACE_OS::set_scheduling_params (sched_params, id); -#elif defined (ACE_HAS_PTHREADS) && \ +#if defined (ACE_HAS_PTHREADS) && \ (!defined (ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) if (sched_params.quantum () != ACE_Time_Value::zero) @@ -3293,20 +3169,13 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, result), int); } -# if defined (sun) - // We need to be able to set LWP priorities on Suns, even without - // ACE_HAS_STHREADS, to obtain preemption. - else if (sched_params.scope () == ACE_SCOPE_LWP) - return ACE_OS::set_scheduling_params (sched_params, id); -# endif /* sun */ else // sched_params.scope () == ACE_SCOPE_LWP, which isn't POSIX { errno = EINVAL; return -1; } -#elif defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) - +#elif defined (ACE_WIN32) // PharLap ETS can act on the current thread - it can set the // quantum also, unlike Win32. All this only works on the RT // version. @@ -3318,16 +3187,13 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, if (sched_params.quantum() != ACE_Time_Value::zero) EtsSetTimeSlice (sched_params.quantum().msec()); # endif - # else - if (sched_params.quantum () != ACE_Time_Value::zero) { // I don't know of a way to set the quantum on Win32. errno = EINVAL; return -1; } - # endif /* ACE_HAS_PHARLAP_RT */ if (sched_params.scope () == ACE_SCOPE_THREAD) @@ -3415,132 +3281,19 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, ACE_UNUSED_ARG (sched_params); ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_STHREADS */ +#endif /* ACE_HAS_PTHREADS */ } int -ACE_OS::scheduling_class (const char *class_name, ACE_id_t &id) +ACE_OS::scheduling_class (const char */*class_name*/, ACE_id_t &/*id*/) { -#if defined (ACE_HAS_PRIOCNTL) - // Get the priority class ID. - pcinfo_t pcinfo; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); - - ACE_OS::strcpy (pcinfo.pc_clname, class_name); - if (ACE_OS::priority_control (P_ALL /* ignored */, - P_MYID /* ignored */, - PC_GETCID, - (char *) &pcinfo) == -1) - { - return -1; - } - else - { - id = pcinfo.pc_cid; - return 0; - } -#else /* ! ACE_HAS_PRIOCNTL */ - ACE_UNUSED_ARG (class_name); - ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_PRIOCNTL */ } int -ACE_OS::set_scheduling_params (const ACE_Sched_Params &sched_params, - ACE_id_t id) +ACE_OS::set_scheduling_params (const ACE_Sched_Params &/*sched_params*/, ACE_id_t /*id*/) { -#if defined (ACE_HAS_PRIOCNTL) - // Set priority class, priority, and quantum of this LWP or process as - // specified in sched_params. - - // Get the priority class ID. - ACE_id_t class_id; - if (ACE_OS::scheduling_class (sched_params.policy() == ACE_SCHED_OTHER ? - "TS" : - "RT", class_id) == -1) - { - return -1; - } - - pcparms_t pcparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcparms, 0, sizeof pcparms); - - pcparms.pc_cid = class_id; - - if (sched_params.policy () == ACE_SCHED_OTHER && - sched_params.quantum () == ACE_Time_Value::zero) - // SunOS doesn't support non-zero quantums in time-sharing class: use - // real-time class instead. - { - tsparms_t tsparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&tsparms, 0, sizeof tsparms); - - // Don't change ts_uprilim (user priority limit) - tsparms.ts_uprilim = TS_NOCHANGE; - tsparms.ts_upri = sched_params.priority (); - - // Package up the TS class ID and parameters for the - // priority_control () call. - ACE_OS::memcpy (pcparms.pc_clparms, &tsparms, sizeof tsparms); - } - else if (sched_params.policy () == ACE_SCHED_FIFO || - (sched_params.policy () == ACE_SCHED_RR && - sched_params.quantum () != ACE_Time_Value::zero)) - // must have non-zero quantum for RR, to make it meaningful - // A zero quantum with FIFO has special significance: it actually - // means infinite time quantum, i.e., run-to-completion. - { - rtparms_t rtparms; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&rtparms, 0, sizeof rtparms); - - rtparms.rt_pri = sched_params.priority (); - - if (sched_params.quantum () == ACE_Time_Value::zero) - { - // rtparms.rt_tqsecs is ignored with RT_TQINF - rtparms.rt_tqnsecs = RT_TQINF; - } - else - { - rtparms.rt_tqsecs = (ulong) sched_params.quantum ().sec (); - rtparms.rt_tqnsecs = sched_params.quantum ().usec () * 1000; - } - - // Package up the RT class ID and parameters for the - // priority_control () call. - ACE_OS::memcpy (pcparms.pc_clparms, &rtparms, sizeof rtparms); - } - else - { - errno = EINVAL; - return -1; - } - - if (ACE_OS::priority_control ((idtype_t) (sched_params.scope () == ACE_SCOPE_THREAD - ? ACE_SCOPE_PROCESS - : sched_params.scope ()), - id, - PC_SETPARMS, - (char *) &pcparms) < 0) - { - return ACE_OS::last_error (); - } - - return 0; -#else /* ! ACE_HAS_PRIOCNTL */ - ACE_UNUSED_ARG (sched_params); - ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_PRIOCNTL */ } int @@ -3719,9 +3472,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # if defined (ACE_HAS_ONLY_SCHED_OTHER) // SunOS, thru version 5.6, only supports SCHED_OTHER. spolicy = SCHED_OTHER; -# elif defined (ACE_HAS_ONLY_SCHED_FIFO) - // NonStop OSS standard pthread supports only SCHED_FIFO. - spolicy = SCHED_FIFO; # else // Make sure to enable explicit scheduling, in case we didn't // enable it above (for non-default priority). @@ -3782,7 +3532,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # if defined (PTHREAD_MAX_PRIORITY) && !defined(ACE_HAS_PTHREADS) /* For MIT pthreads... */ sparam.prio = ACE_MIN (priority, PTHREAD_MAX_PRIORITY); -# elif defined(ACE_HAS_PTHREADS) && !defined (ACE_HAS_STHREADS) +# elif defined(ACE_HAS_PTHREADS) // The following code forces priority into range. if (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO)) sparam.sched_priority = @@ -3804,20 +3554,12 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # endif /* PTHREAD_MAX_PRIORITY */ { -# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER) - // SunOS, through 5.6, POSIX only allows priorities > 0 to - // ::pthread_attr_setschedparam. If a priority of 0 was - // requested, set the thread priority after creating it, below. - if (priority > 0) -# endif /* sun && ACE_HAS_ONLY_SCHED_OTHER */ + (void) ACE_ADAPT_RETVAL(::pthread_attr_setschedparam (&attr, &sparam), + result); + if (result != 0) { - (void) ACE_ADAPT_RETVAL(::pthread_attr_setschedparam (&attr, &sparam), - result); - if (result != 0) - { - ::pthread_attr_destroy (&attr); - return -1; - } + ::pthread_attr_destroy (&attr); + return -1; } } } @@ -3885,7 +3627,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, } # endif /* !ACE_HAS_PTHREAD_ATTR_SETCREATESUSPEND_NP */ -# if ! defined(ACE_LACKS_THR_CONCURRENCY_FUNCS) if (ACE_BIT_ENABLED (flags, THR_NEW_LWP)) { // Increment the number of LWPs by one to emulate the @@ -3912,7 +3653,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, return -1; } } -# endif /* ! ACE_LACKS_THR_CONCURRENCY_FUNCS */ } ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_create (thr_id, @@ -3929,75 +3669,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, if (result != -1) *thr_handle = *thr_id; -# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER) - // SunOS prior to 5.7: - - // If the priority is 0, then we might have to set it now because we - // couldn't set it with ::pthread_attr_setschedparam, as noted - // above. This doesn't provide strictly correct behavior, because - // the thread was created (above) with the priority of its parent. - // (That applies regardless of the inherit_sched attribute: if it - // was PTHREAD_INHERIT_SCHED, then it certainly inherited its - // parent's priority. If it was PTHREAD_EXPLICIT_SCHED, then "attr" - // was initialized by the SunOS ::pthread_attr_init () to contain - // NULL for the priority, which indicated to SunOS ::pthread_create - // () to inherit the parent priority.) - if (priority == 0) - { - // Check the priority of this thread, which is the parent - // of the newly created thread. If it is 0, then the - // newly created thread will have inherited the priority - // of 0, so there's no need to explicitly set it. - struct sched_param sparam; - int policy = 0; - ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_getschedparam (thr_self (), - &policy, - &sparam), - result), int, - result); - - // The only policy supported by by SunOS, thru version 5.6, - // is SCHED_OTHER, so that's hard-coded here. - policy = ACE_SCHED_OTHER; - - if (sparam.sched_priority != 0) - { - ACE_OS::memset ((void *) &sparam, 0, sizeof sparam); - // The memset to 0 sets the priority to 0, so we don't need - // to explicitly set sparam.sched_priority. - - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setschedparam (*thr_id, - policy, - &sparam), - result), - int); - } - } - -# if defined (ACE_NEEDS_LWP_PRIO_SET) -# if 0 - // It would be useful if we could make this work. But, it requires - // a mechanism for determining the ID of an LWP to which another - // thread is bound. Is there a way to do that? Instead, just rely - // on the code in ACE_Thread_Adapter::invoke () to set the LWP - // priority. - - // If the thread is bound, then set the priority on its LWP. - if (ACE_BIT_ENABLED (flags, THR_BOUND)) - { - ACE_Sched_Params sched_params (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO) || - ACE_BIT_ENABLED (flags, THR_SCHED_RR) ? - ACE_SCHED_FIFO : - ACE_SCHED_OTHER, - priority); - result = ACE_OS::lwp_setparams (sched_params, - /* ? How do we find the ID of the LWP - to which *thr_id is bound? */); - } -# endif /* 0 */ -# endif /* ACE_NEEDS_LWP_PRIO_SET */ - -# endif /* sun && ACE_HAS_ONLY_SCHED_OTHER */ auto_thread_args.release (); // *** Set pthread name (second try) @@ -4016,51 +3687,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, # endif /* !ACE_HAS_PTHREAD_ATTR_SETNAME */ return result; -# elif defined (ACE_HAS_STHREADS) - int result; - int start_suspended = ACE_BIT_ENABLED (flags, THR_SUSPENDED); - - if (priority != ACE_DEFAULT_THREAD_PRIORITY) - // If we need to set the priority, then we need to start the - // thread in a suspended mode. - ACE_SET_BITS (flags, THR_SUSPENDED); - - ACE_OSCALL (ACE_ADAPT_RETVAL (::thr_create (stack, stacksize, - thread_args->entry_point (), - thread_args, - flags, thr_id), result), - int, result); - - if (result != -1) - { - // With SunOS threads, ACE_thread_t and ACE_hthread_t are the same. - *thr_handle = *thr_id; - - if (priority != ACE_DEFAULT_THREAD_PRIORITY) - { - // Set the priority of the new thread and then let it - // continue, but only if the user didn't start it suspended - // in the first place! - result = ACE_OS::thr_setprio (*thr_id, priority); - if (result != 0) - { - errno = result; - return -1; - } - - if (start_suspended == 0) - { - result = ACE_OS::thr_continue (*thr_id); - if (result != 0) - { - errno = result; - return -1; - } - } - } - } - auto_thread_args.release (); - return result; # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (thr_name); ACE_UNUSED_ARG (stack); @@ -4075,7 +3701,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, flags | THR_SUSPENDED); // Have to duplicate the handle because // CWinThread::~CWinThread() closes the original handle. -# if !defined (ACE_HAS_WINCE) (void) ::DuplicateHandle (::GetCurrentProcess (), cwin_thread->m_hThread, ::GetCurrentProcess (), @@ -4083,7 +3708,6 @@ ACE_OS::thr_create (ACE_THR_FUNC func, 0, TRUE, DUPLICATE_SAME_ACCESS); -# endif /* ! ACE_HAS_WINCE */ *thr_id = cwin_thread->m_nThreadID; if (ACE_BIT_ENABLED (flags, THR_SUSPENDED) == 0) @@ -4220,7 +3844,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, return 0; } -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (func); ACE_UNUSED_ARG (args); @@ -4242,8 +3866,6 @@ ACE_OS::thr_exit (ACE_THR_FUNC_RETURN status) #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_EXIT) ::pthread_exit (status); -# elif defined (ACE_HAS_STHREADS) - ::thr_exit (status); # elif defined (ACE_HAS_WTHREADS) // Can't call it here because on NT, the thread is exited // directly by ACE_Thread_Adapter::invoke (). @@ -4519,11 +4141,6 @@ ACE_OS::thr_keycreate_native (ACE_OS_thread_key_t *key, ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_key_create (key, dest), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_keycreate (key, dest), - result), - int); # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (dest); *key = ::TlsAlloc (); @@ -4531,7 +4148,7 @@ ACE_OS::thr_keycreate_native (ACE_OS_thread_key_t *key, if (*key == ACE_SYSCALL_FAILED) ACE_FAIL_RETURN (-1); return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (key); ACE_UNUSED_ARG (dest); @@ -4625,9 +4242,6 @@ ACE_OS::thr_keyfree_native (ACE_OS_thread_key_t key) # endif /* ACE_LACKS_PTHREAD_KEY_DELETE */ # elif defined (ACE_HAS_THR_KEYDELETE) return ::thr_keydelete (key); -# elif defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (key); - ACE_NOTSUP_RETURN (-1); # elif defined (ACE_HAS_WTHREADS) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::TlsFree (key), ace_result_), int, -1); # else @@ -4684,36 +4298,7 @@ ACE_OS::thr_setprio (const ACE_Sched_Priority prio) ACE_hthread_t my_thread_id; ACE_OS::thr_self (my_thread_id); - int const status = ACE_OS::thr_setprio (my_thread_id, prio); - -#if defined (ACE_NEEDS_LWP_PRIO_SET) - // If the thread is in the RT class, then set the priority on its - // LWP. (Instead of doing this if the thread is in the RT class, it - // should be done for all bound threads. But, there doesn't appear - // to be an easy way to determine if the thread is bound.) - - if (status == 0) - { - // Find what scheduling class the thread's LWP is in. - ACE_Sched_Params sched_params (ACE_SCHED_OTHER, 0); - if (ACE_OS::lwp_getparams (sched_params) == -1) - { - return -1; - } - else if (sched_params.policy () == ACE_SCHED_FIFO || - sched_params.policy () == ACE_SCHED_RR) - { - // This thread's LWP is in the RT class, so we need to set - // its priority. - sched_params.priority (prio); - return ACE_OS::lwp_setparams (sched_params); - } - // else this is not an RT thread. Nothing more needs to be - // done. - } -#endif /* ACE_NEEDS_LWP_PRIO_SET */ - - return status; + return ACE_OS::thr_setprio (my_thread_id, prio); } # if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) @@ -4727,17 +4312,14 @@ ACE_OS::thr_setspecific_native (ACE_OS_thread_key_t key, void *data) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_setspecific (key, data), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setspecific (key, data), result), int); # elif defined (ACE_HAS_WTHREADS) ::TlsSetValue (key, data); return 0; -# else /* ACE_HAS_STHREADS */ +# else /* ACE_HAS_PTHREADS */ ACE_UNUSED_ARG (key); ACE_UNUSED_ARG (data); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (key); ACE_UNUSED_ARG (data); diff --git a/ACE/ace/OS_NS_Thread.h b/ACE/ace/OS_NS_Thread.h index 8ae8f7141aa..18d38698efa 100644 --- a/ACE/ace/OS_NS_Thread.h +++ b/ACE/ace/OS_NS_Thread.h @@ -45,18 +45,6 @@ # endif # define ACE_EXPORT_MACRO ACE_Export -# if defined (ACE_HAS_PRIOCNTL) - // Need to #include thread.h before #defining THR_BOUND, etc., - // when building without threads on SunOS 5.x. -# if defined (sun) -# include /**/ <thread.h> -# endif /* sun */ - - // Need to #include these before #defining USYNC_PROCESS on SunOS 5.x. -# include /**/ <sys/rtpriocntl.h> -# include /**/ <sys/tspriocntl.h> -# endif /* ACE_HAS_PRIOCNTL */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL # if defined (ACE_WIN32) @@ -88,17 +76,9 @@ extern "C" { # if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) -# include /**/ <synch.h> -# include /**/ <thread.h> -# define ACE_SCOPE_PROCESS P_PID -# define ACE_SCOPE_LWP P_LWPID -# define ACE_SCOPE_THREAD (ACE_SCOPE_LWP + 1) -# else -# define ACE_SCOPE_PROCESS 0 -# define ACE_SCOPE_LWP 1 -# define ACE_SCOPE_THREAD 2 -# endif /* ACE_HAS_STHREADS */ +# define ACE_SCOPE_PROCESS 0 +# define ACE_SCOPE_LWP 1 +# define ACE_SCOPE_THREAD 2 # if !defined (ACE_HAS_PTHREADS) # define ACE_SCHED_OTHER 0 @@ -106,57 +86,7 @@ extern "C" { # define ACE_SCHED_RR 2 # endif /* ! ACE_HAS_PTHREADS */ -# if defined (ACE_HAS_PTHREADS) -// moved to pthread.h -# elif defined (ACE_HAS_STHREADS) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Solaris threads, without PTHREADS. -// Typedefs to help compatibility with Windows NT and Pthreads. -typedef thread_t ACE_thread_t; -// Native TSS key type (not for general use) -typedef thread_key_t ACE_OS_thread_key_t; -// Application TSS key type (use this type except in TSS Emulation) -# if defined (ACE_HAS_TSS_EMULATION) - typedef u_int ACE_thread_key_t; -# else /* ! ACE_HAS_TSS_EMULATION */ - typedef ACE_OS_thread_key_t ACE_thread_key_t; -# endif /* ! ACE_HAS_TSS_EMULATION */ -typedef mutex_t ACE_mutex_t; -# if !defined (ACE_LACKS_RWLOCK_T) -typedef rwlock_t ACE_rwlock_t; -# endif /* !ACE_LACKS_RWLOCK_T */ -# if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_USES_FIFO_SEM) -typedef sema_t ACE_sema_t; -# endif /* !ACE_HAS_POSIX_SEM */ - -typedef cond_t ACE_cond_t; -struct ACE_Export ACE_condattr_t -{ - int type; -}; -struct ACE_Export ACE_mutexattr_t -{ - int type; -}; -typedef ACE_thread_t ACE_hthread_t; -typedef ACE_mutex_t ACE_thread_mutex_t; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# define THR_CANCEL_DISABLE 0 -# define THR_CANCEL_ENABLE 0 -# define THR_CANCEL_DEFERRED 0 -# define THR_CANCEL_ASYNCHRONOUS 0 -# define THR_JOINABLE 0 -# define THR_SCHED_FIFO 0 -# define THR_SCHED_RR 0 -# define THR_SCHED_DEFAULT 0 -# define THR_INHERIT_SCHED 0 -# define THR_SCOPE_PROCESS 0 - -# elif defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) # include /**/ <sysLib.h> // for sysClkRateGet() # include /**/ <types/vxTypes.h> # if !defined (__RTP__) @@ -230,8 +160,8 @@ typedef struct typedef ACE_VX_TASK_ID ACE_thread_t; typedef ACE_VX_TASK_ID ACE_hthread_t; // Key type: the ACE TSS emulation requires the key type be unsigned, -// for efficiency. (Current POSIX and Solaris TSS implementations also -// use u_int, so the ACE TSS emulation is compatible with them.) +// for efficiency. (Current POSIX implementation use u_int, so the +// ACE TSS emulation is compatible with them.) // Native TSS key type typedef u_int ACE_OS_thread_key_t; // Application TSS key type (use this type except in TSS Emulation) @@ -264,31 +194,7 @@ typedef struct typedef HANDLE ACE_event_t; # if defined (ACE_WIN32) -//@@ ACE_USES_WINCE_SEMA_SIMULATION is used to debug -// semaphore simulation on WinNT. It should be -// changed to ACE_USES_HAS_WINCE at some later point. -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) typedef HANDLE ACE_sema_t; -# else -/** - * @class ACE_sema_t - * - * @brief Semaphore simulation for Windows CE. - */ -class ACE_Export ACE_sema_t -{ -public: - /// Serializes access to @c count_. - ACE_thread_mutex_t lock_; - - /// This event is signaled whenever the count becomes non-zero. - ACE_event_t count_nonzero_; - - /// Current count of the semaphore. - u_int count_; -}; - -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # endif /* defined (ACE_WIN32) */ ACE_END_VERSIONED_NAMESPACE_DECL @@ -448,11 +354,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef pthread_rwlock_t ACE_rwlock_t; ACE_END_VERSIONED_NAMESPACE_DECL -# elif defined (ACE_HAS_STHREADS) -# include /**/ <synch.h> -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef rwlock_t ACE_rwlock_t; -ACE_END_VERSIONED_NAMESPACE_DECL # endif /* ACE_LACKS_RWLOCK_T */ // Define some default thread priorities on all threaded platforms, if @@ -767,23 +668,10 @@ typedef DWORD ACE_id_t; typedef int ACE_pri_t; # define ACE_SELF (0) #else /* !defined (ACE_WIN32) */ -# if defined (ACE_HAS_IDTYPE_T) - typedef idtype_t ACE_idtype_t; -# else typedef int ACE_idtype_t; -# endif /* ACE_HAS_IDTYPE_T */ -# if defined (ACE_HAS_STHREADS) -# if defined (ACE_LACKS_PRI_T) - typedef int pri_t; -# endif /* ACE_LACKS_PRI_T */ - typedef id_t ACE_id_t; -# define ACE_SELF P_MYID - typedef pri_t ACE_pri_t; -# else /* ! ACE_HAS_STHREADS */ typedef long ACE_id_t; # define ACE_SELF (-1) typedef short ACE_pri_t; -# endif /* ! ACE_HAS_STHREADS */ #endif /* !defined (ACE_WIN32) */ # if defined (ACE_HAS_TSS_EMULATION) @@ -1055,10 +943,6 @@ extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args); # define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME, (void *) A); # define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A) # elif defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CLEANUP) -// Though we are defining a extern "C" function to match the prototype of -// pthread_cleanup_push, it is undone by the Solaris header file -// /usr/include/pthread.h. So this macro generates a warning under Solaris -// with SunCC. This is a bug in the Solaris header file. extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args); # define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME, (void *) A); # define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A) @@ -1359,10 +1243,6 @@ namespace ACE_OS { //@} /// Low-level interface to @c priocntl(2). - /** - * Can't call the following priocntl, because that's a macro on - * Solaris. - */ ACE_NAMESPACE_INLINE_FUNCTION long priority_control (ACE_idtype_t, ACE_id_t, int, void *); diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index 0219e6dc1c6..a33b50b076f 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -16,10 +16,6 @@ # include "ace/Handle_Set.h" # endif /* ACE_USES_FIFO_SEM */ -#if defined (ACE_HAS_PRIOCNTL) -# include /**/ <sys/priocntl.h> -#endif /* ACE_HAS_PRIOCNTL */ - #if defined (ACE_HAS_ALLOC_HOOKS) # include "ace/Malloc_Base.h" #endif /* ACE_HAS_ALLOC_HOOKS */ @@ -247,15 +243,10 @@ ACE_OS::cond_broadcast (ACE_cond_t *cv) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_broadcast (cv), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_broadcast (cv), - result), - int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) ::WakeAllConditionVariable (cv); return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_NOTSUP_RETURN (-1); @@ -270,13 +261,10 @@ ACE_OS::cond_destroy (ACE_cond_t *cv) # if defined (ACE_HAS_PTHREADS) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_destroy (cv), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_destroy (cv), result), int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) // Windows doesn't have a destroy return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_NOTSUP_RETURN (-1); @@ -312,17 +300,10 @@ ACE_OS::cond_init (ACE_cond_t *cv, result = -1; // ACE_ADAPT_RETVAL used it for intermediate status return result; -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_init (cv, - attributes.type, - arg), - result), - int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) ::InitializeConditionVariable (cv); return 0; -# endif /* ACE_HAS_PTHREADS vs. ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_UNUSED_ARG (attributes); @@ -360,13 +341,10 @@ ACE_OS::cond_signal (ACE_cond_t *cv) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_signal (cv), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_signal (cv), result), int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) ::WakeConditionVariable (cv); return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (cv); ACE_NOTSUP_RETURN (-1); @@ -383,10 +361,6 @@ ACE_OS::cond_wait (ACE_cond_t *cv, int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_cond_wait (cv, external_mutex), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_wait (cv, external_mutex), result), - int); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SleepConditionVariableCS (cv, &external_mutex->thr_mutex_, INFINITE), result), @@ -420,20 +394,12 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, (ACE_TIMESPEC_PTR) &ts), result), int, result); - // We need to adjust this to make the POSIX and Solaris return - // values consistent. EAGAIN is from Pthreads DRAFT4 (HP-UX 10.20 and down) + // We need to adjust this to make the POSIX return + // values consistent. EAGAIN is from Pthreads DRAFT4 if (result == -1 && (errno == ETIMEDOUT || errno == EAGAIN)) errno = ETIME; -# elif defined (ACE_HAS_STHREADS) - ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0 - ? ::cond_wait (cv, external_mutex) - : ::cond_timedwait (cv, - external_mutex, - (timestruc_t*)&ts), - result), - int, result); # elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE) int msec_timeout = 0; if (timeout != 0) @@ -450,7 +416,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, int, result); return result; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ if (timeout != 0) timeout->set (ts); // Update the time value before returning. @@ -568,18 +534,10 @@ ACE_OS::event_init (ACE_event_t *event, #endif /* ACE_HAS_WCHAR */ ACE_INLINE long -ACE_OS::priority_control (ACE_idtype_t idtype, ACE_id_t identifier, int cmd, void *arg) +ACE_OS::priority_control (ACE_idtype_t /*idtype*/, ACE_id_t /*identifier*/, int /*cmd*/, void */*arg*/) { ACE_OS_TRACE ("ACE_OS::priority_control"); -#if defined (ACE_HAS_PRIOCNTL) - return priocntl (idtype, identifier, cmd, static_cast<caddr_t> (arg)); -#else /* ! ACE_HAS_PRIOCNTL*/ - ACE_UNUSED_ARG (idtype); - ACE_UNUSED_ARG (identifier); - ACE_UNUSED_ARG (cmd); - ACE_UNUSED_ARG (arg); ACE_NOTSUP_RETURN (-1); -#endif /* ! ACE_HAS_PRIOCNTL*/ } // This method is used to prepare the recursive mutex for releasing @@ -609,15 +567,7 @@ ACE_OS::recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, // Windows variants that depend on existing values and limits. state.relock_count_ = 0; - while ( -# if !defined (ACE_HAS_WINCE) - m->LockCount > 0 && m->RecursionCount > 1 -# else - // WinCE doesn't have RecursionCount and the LockCount semantic - // Mobile 5 has it 1-indexed. - m->LockCount > 1 -# endif /* ACE_HAS_WINCE */ - ) + while (m->LockCount > 0 && m->RecursionCount > 1) { // This may fail if the current thread doesn't own the mutex. If it // does fail, it'll be on the first try, so don't worry about resetting @@ -1028,7 +978,7 @@ ACE_OS::rw_rdlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_rdlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_rdlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1079,7 +1029,7 @@ ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_tryrdlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_tryrdlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1122,7 +1072,7 @@ ACE_OS::rw_trywrlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_trywrlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_trywrlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1171,8 +1121,7 @@ ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw) result), int); # elif !defined (ACE_LACKS_RWLOCK_T) - // Some native rwlocks, such as those on Solaris, don't - // support the upgrade feature . . . + // Some native rwlocks ACE_UNUSED_ARG (rw); ACE_NOTSUP_RETURN (-1); # else /* NT, POSIX, and VxWorks don't support this natively. */ @@ -1243,7 +1192,7 @@ ACE_OS::rw_unlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_unlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_unlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1302,7 +1251,7 @@ ACE_OS::rw_wrlock (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_wrlock (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_wrlock (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1355,7 +1304,7 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_destroy (rw), result), int); -# else /* Solaris */ +# else /* ACE_HAS_PTHREADS_UNIX98_EXT */ int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_destroy (rw), result), int); # endif /* ACE_HAS_PTHREADS_UNIX98_EXT */ @@ -1364,7 +1313,7 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) ACE_OS::cond_destroy (&rw->waiting_readers_); ACE_OS::cond_destroy (&rw->waiting_important_writer_); return ACE_OS::cond_destroy (&rw->waiting_writers_); -# endif /* ACE_HAS_STHREADS && !defined (ACE_LACKS_RWLOCK_T) */ +# endif /* !defined (ACE_LACKS_RWLOCK_T) */ #else ACE_UNUSED_ARG (rw); ACE_NOTSUP_RETURN (-1); @@ -1474,28 +1423,18 @@ ACE_OS::sema_destroy (ACE_sema_t *s) int r2 = ACE_OS::close (s->fd_[1]); /* ignore error */ return r0 != 0 || r1 != 0 || r2 != 0 ? -1 : 0; #elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_destroy (s), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int r1 = ACE_OS::mutex_destroy (&s->lock_); int r2 = ACE_OS::cond_destroy (&s->count_nonzero_); return r1 != 0 || r2 != 0 ? -1 : 0; # elif defined (ACE_HAS_WTHREADS) -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*s), ace_result_), int, -1); -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - // Free up underlying objects of the simulated semaphore. - int const r1 = ACE_OS::thread_mutex_destroy (&s->lock_); - int const r2 = ACE_OS::event_destroy (&s->count_nonzero_); - return r1 != 0 || r2 != 0 ? -1 : 0; -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) int result; ACE_OSCALL (::semDelete (s->sema_), int, result); s->sema_ = 0; return result; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -1504,7 +1443,6 @@ ACE_OS::sema_destroy (ACE_sema_t *s) // NOTE: The previous four function definitions must appear before // ACE_OS::sema_init (). - ACE_INLINE int ACE_OS::sema_init (ACE_sema_t *s, u_int count, @@ -1616,23 +1554,6 @@ ACE_OS::sema_init (ACE_sema_t *s, # else if (name) { -# if defined (sun) || defined (HPUX) - // Solaris and HP-UX require the name to start with a slash. Solaris - // further requires that there be no other slashes than the first. - const char *last_slash = ACE_OS::strrchr (name, '/'); - char name2[MAXPATHLEN]; - if (0 == last_slash) - { - ACE_OS::strcpy (name2, "/"); - ACE_OS::strcat (name2, name); - name = name2; - } -# if defined (sun) - else - name = last_slash; // Chop off chars preceding last slash -# endif /* sun */ -# endif /* sun || HPUX */ - ACE_ALLOCATOR_RETURN (s->name_, ACE_OS::strdup (name), -1); @@ -1755,15 +1676,7 @@ ACE_OS::sema_init (ACE_sema_t *s, return 0; #elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (max); - ACE_UNUSED_ARG (sa); - ACE_UNUSED_ARG (attributes); - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_init (s, count, type, arg), result), - int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) ACE_UNUSED_ARG (max); ACE_UNUSED_ARG (sa); int result = -1; @@ -1790,7 +1703,6 @@ ACE_OS::sema_init (ACE_sema_t *s, return result; # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (attributes); -# if ! defined (ACE_USES_WINCE_SEMA_SIMULATION) ACE_UNUSED_ARG (type); ACE_UNUSED_ARG (arg); // Create the semaphore with its value initialized to <count> and @@ -1812,40 +1724,6 @@ ACE_OS::sema_init (ACE_sema_t *s, ACE_OS::set_errno_to_last_error (); return 0; } -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - int result = -1; - - // Initialize internal object for semaphore simulation. - // Grab the lock as soon as possible when we initializing - // the semaphore count. Notice that we initialize the - // event object as "manually reset" so we can amortize the - // cost for singling/reseting the event. - // @@ I changed the mutex type to thread_mutex. Notice that this - // is basically a CriticalSection object and doesn't not has - // any security attribute whatsoever. However, since this - // semaphore implementation only works within a process, there - // shouldn't any security issue at all. - if (ACE_OS::thread_mutex_init (&s->lock_, type, name, (ACE_mutexattr_t *)arg) == 0 - && ACE_OS::event_init (&s->count_nonzero_, 1, - count > 0, type, name, arg, sa) == 0 - && ACE_OS::thread_mutex_lock (&s->lock_) == 0) - { - s->count_ = count; - - if (ACE_OS::thread_mutex_unlock (&s->lock_) == 0) - result = 0; - } - - // Destroy the internal objects if we didn't initialize - // either of them successfully. Don't bother to check - // for errors. - if (result == -1) - { - ACE_OS::thread_mutex_destroy (&s->lock_); - ACE_OS::event_destroy (&s->count_nonzero_); - } - return result; -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) ACE_UNUSED_ARG (attributes); ACE_UNUSED_ARG (name); @@ -1855,7 +1733,7 @@ ACE_OS::sema_init (ACE_sema_t *s, s->name_ = 0; s->sema_ = ::semCCreate (type, count); return s->sema_ ? 0 : -1; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (s); ACE_UNUSED_ARG (count); @@ -1895,7 +1773,6 @@ ACE_OS::sema_init (ACE_sema_t *s, { # if defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (attributes); -# if ! defined (ACE_USES_WINCE_SEMA_SIMULATION) ACE_UNUSED_ARG (type); ACE_UNUSED_ARG (arg); // Create the semaphore with its value initialized to <count> and @@ -1917,40 +1794,6 @@ ACE_OS::sema_init (ACE_sema_t *s, ACE_OS::set_errno_to_last_error (); return 0; } -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - int result = -1; - - // Initialize internal object for semaphore simulation. - // Grab the lock as soon as possible when we initializing - // the semaphore count. Notice that we initialize the - // event object as "manually reset" so we can amortize the - // cost for singling/reseting the event. - // @@ I changed the mutex type to thread_mutex. Notice that this - // is basically a CriticalSection object and doesn't not has - // any security attribute whatsoever. However, since this - // semaphore implementation only works within a process, there - // shouldn't any security issue at all. - if (ACE_OS::thread_mutex_init (&s->lock_, type, name, (ACE_mutexattr_t *)arg) == 0 - && ACE_OS::event_init (&s->count_nonzero_, 1, - count > 0, type, name, arg, sa) == 0 - && ACE_OS::thread_mutex_lock (&s->lock_) == 0) - { - s->count_ = count; - - if (ACE_OS::thread_mutex_unlock (&s->lock_) == 0) - result = 0; - } - - // Destroy the internal objects if we didn't initialize - // either of them successfully. Don't bother to check - // for errors. - if (result == -1) - { - ACE_OS::thread_mutex_destroy (&s->lock_); - ACE_OS::event_destroy (&s->count_nonzero_); - } - return result; -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # else /* ACE_HAS_WTHREADS */ // Just call the normal char version. return ACE_OS::sema_init (s, count, type, attributes, ACE_Wide_To_Ascii (name).char_rep (), arg, max, sa); @@ -2005,10 +1848,7 @@ ACE_OS::sema_post (ACE_sema_t *s) return 0; return -1; # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_post (s), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int result = -1; if (ACE_OS::mutex_lock (&s->lock_) == 0) @@ -2024,32 +1864,12 @@ ACE_OS::sema_post (ACE_sema_t *s) } return result; # elif defined (ACE_HAS_WTHREADS) -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*s, 1, 0), ace_result_), int, -1); -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - int result = -1; - - // Since we are simulating semaphores, we need to update semaphore - // count manually. Grab the lock to prevent race condition first. - if (ACE_OS::thread_mutex_lock (&s->lock_) == 0) - { - // Check the original state of event object. Single the event - // object in transition from semaphore not available to - // semaphore available. - if (s->count_++ <= 0) - result = ACE_OS::event_signal (&s->count_nonzero_); - else - result = 0; - - ACE_OS::thread_mutex_unlock (&s->lock_); - } - return result; -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) return ::semGive (s->sema_); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -2059,16 +1879,16 @@ ACE_OS::sema_post (ACE_sema_t *s) ACE_INLINE int ACE_OS::sema_post (ACE_sema_t *s, u_int release_count) { -#if defined (ACE_WIN32) && !defined (ACE_USES_WINCE_SEMA_SIMULATION) +#if defined (ACE_WIN32) // Win32 supports this natively. ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*s, release_count, 0), ace_result_), int, -1); #else // On POSIX platforms we need to emulate this ourselves. // @@ We can optimize on this implementation. However, - // the semaphore promitive on Win32 doesn't allow one + // the semaphore primitive on Win32 doesn't allow one // to increase a semaphore to more than the count it was - // first initialized. Posix and solaris don't seem to have + // first initialized. Posix doesn't seem to have // this restriction. Should we impose the restriction in // our semaphore simulation? for (size_t i = 0; i < release_count; i++) @@ -2109,14 +1929,7 @@ ACE_OS::sema_trywait (ACE_sema_t *s) return rc == 1 ? 0 : (-1); # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - // STHREADS semaphores set errno to EBUSY if trywait fails. - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_trywait (s), - result), - int); -# elif defined (ACE_HAS_PTHREADS) - +# if defined (ACE_HAS_PTHREADS) int result = -1; if (ACE_OS::mutex_lock (&s->lock_) == 0) @@ -2133,7 +1946,6 @@ ACE_OS::sema_trywait (ACE_sema_t *s) } return result; # elif defined (ACE_HAS_WTHREADS) -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) DWORD result = ::WaitForSingleObject (*s, 0); if (result == WAIT_OBJECT_0) @@ -2147,41 +1959,6 @@ ACE_OS::sema_trywait (ACE_sema_t *s) // This is a hack, we need to find an appropriate mapping... return -1; } -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - // Check the status of semaphore first. Return immediately - // if the semaphore is not available and avoid grabing the - // lock. - DWORD result = ::WaitForSingleObject (s->count_nonzero_, 0); - - if (result == WAIT_OBJECT_0) // Proceed when it is available. - { - ACE_OS::thread_mutex_lock (&s->lock_); - - // Need to double check if the semaphore is still available. - // The double checking scheme will slightly affect the - // efficiency if most of the time semaphores are not blocked. - result = ::WaitForSingleObject (s->count_nonzero_, 0); - if (result == WAIT_OBJECT_0) - { - // Adjust the semaphore count. Only update the event - // object status when the state changed. - s->count_--; - if (s->count_ <= 0) - ACE_OS::event_reset (&s->count_nonzero_); - result = 0; - } - - ACE_OS::thread_mutex_unlock (&s->lock_); - } - - // Translate error message to errno used by ACE. - if (result == WAIT_TIMEOUT) - errno = EBUSY; - else - ACE_OS::set_errno_to_last_error (); - // This is taken from the hack above. ;) - return -1; -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) if (::semTake (s->sema_, NO_WAIT) == ERROR) if (errno == S_objLib_OBJ_UNAVAILABLE) @@ -2196,7 +1973,7 @@ ACE_OS::sema_trywait (ACE_sema_t *s) else // got the semaphore return 0; -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -2215,10 +1992,7 @@ ACE_OS::sema_wait (ACE_sema_t *s) return 0; return -1; # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_wait (s), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int result = 0; ACE_PTHREAD_CLEANUP_PUSH (&s->lock_); @@ -2252,7 +2026,6 @@ ACE_OS::sema_wait (ACE_sema_t *s) return result < 0 ? -1 : result; # elif defined (ACE_HAS_WTHREADS) -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) switch (::WaitForSingleObject (*s, INFINITE)) { case WAIT_OBJECT_0: @@ -2263,49 +2036,9 @@ ACE_OS::sema_wait (ACE_sema_t *s) return -1; } /* NOTREACHED */ -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - // Timed wait. - int result = -1; - for (;;) - // Check if the semaphore is avialable or not and wait forever. - // Don't bother to grab the lock if it is not available (to avoid - // deadlock.) - switch (::WaitForSingleObject (s->count_nonzero_, INFINITE)) - { - case WAIT_OBJECT_0: - ACE_OS::thread_mutex_lock (&s->lock_); - - // Need to double check if the semaphore is still available. - // This time, we shouldn't wait at all. - if (::WaitForSingleObject (s->count_nonzero_, 0) == WAIT_OBJECT_0) - { - // Decrease the internal counter. Only update the event - // object's status when the state changed. - s->count_--; - if (s->count_ <= 0) - ACE_OS::event_reset (&s->count_nonzero_); - result = 0; - } - - ACE_OS::thread_mutex_unlock (&s->lock_); - // if we didn't get a hold on the semaphore, the result won't - // be 0 and thus, we'll start from the beginning again. - if (result == 0) - return 0; - break; - - default: - // Since we wait indefinitely, anything other than - // WAIT_OBJECT_O indicates an error. - ACE_OS::set_errno_to_last_error (); - // This is taken from the hack above. ;) - return -1; - } - /* NOTREACHED */ -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) return ::semTake (s->sema_, WAIT_FOREVER); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_NOTSUP_RETURN (-1); @@ -2410,11 +2143,7 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) return -1; # elif defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (s); - ACE_UNUSED_ARG (tv); - ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) int result = 0; ACE_Errno_Guard error (errno); @@ -2455,7 +2184,6 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) ACE_PTHREAD_CLEANUP_POP (0); return result < 0 ? -1 : result; # elif defined (ACE_HAS_WTHREADS) -# if !defined (ACE_USES_WINCE_SEMA_SIMULATION) int msec_timeout; if (tv == ACE_Time_Value::zero) @@ -2489,78 +2217,6 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) return -1; } /* NOTREACHED */ -# else /* ACE_USES_WINCE_SEMA_SIMULATION */ - // Note that in this mode, the acquire is done in two steps, and - // we may get signaled but cannot grab the semaphore before - // timeout. In that case, we'll need to restart the process with - // updated timeout value. - - // tv is an absolute time, but we need relative to work with the Windows - // API. Also, some users have become accustomed to using a 0 time value - // as a shortcut for "now", which works on non-Windows because 0 is - // always earlier than now. However, the need to convert to relative time - // means we need to watch out for this case. - ACE_Time_Value relative_time (ACE_Time_Value::zero); - if (tv != ACE_Time_Value::zero) - relative_time = tv.to_relative_time (); - int result = -1; - - // While we are not timeout yet. >= 0 will let this go through once - // and if not able to get the object, it should hit WAIT_TIMEOUT - // right away. - while (relative_time >= ACE_Time_Value::zero) - { - // Wait for our turn to get the object. - switch (::WaitForSingleObject (s->count_nonzero_, relative_time.msec ())) - { - case WAIT_OBJECT_0: - ACE_OS::thread_mutex_lock (&s->lock_); - - // Need to double check if the semaphore is still available. - // We can only do a "try lock" styled wait here to avoid - // blocking threads that want to signal the semaphore. - if (::WaitForSingleObject (s->count_nonzero_, 0) == WAIT_OBJECT_0) - { - // As before, only reset the object when the semaphore - // is no longer available. - s->count_--; - if (s->count_ <= 0) - ACE_OS::event_reset (&s->count_nonzero_); - result = 0; - } - - ACE_OS::thread_mutex_unlock (&s->lock_); - - // Only return when we successfully get the semaphore. - if (result == 0) - { - tv = tv.now (); // Update to time acquired - return 0; - } - break; - - // We have timed out. - case WAIT_TIMEOUT: - errno = ETIME; - return -1; - - // What? - default: - ACE_OS::set_errno_to_last_error (); - // This is taken from the hack above. ;) - return -1; - }; - - // Haven't been able to get the semaphore yet, update the - // timeout value to reflect the remaining time we want to wait. - // in case of tv == 0 relative_time will now be < 0 and we will be out of time - relative_time = tv.to_relative_time (); - } - - // We have timed out. - errno = ETIME; - return -1; -# endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # elif defined (ACE_VXWORKS) // Note that we must convert between absolute time (which is // passed as a parameter) and relative time (which is what @@ -2586,7 +2242,7 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv) tv = tv.now (); // Update to time acquired return 0; } -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ # else ACE_UNUSED_ARG (s); ACE_UNUSED_ARG (tv); @@ -2682,14 +2338,6 @@ ACE_OS::sigwait (sigset_t *sset, int *sig) # if (defined (__FreeBSD__) && (__FreeBSD__ < 3)) ACE_UNUSED_ARG (sset); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_HAS_STHREADS) - # if (_POSIX_C_SOURCE - 0 >= 199506L) || defined (_POSIX_PTHREAD_SEMANTICS) - errno = ::sigwait (sset, sig); - return errno == 0 ? *sig : -1; - #else - *sig = ::sigwait (sset); - return *sig; - #endif /* _POSIX_C_SOURCE - 0 >= 199506L || _POSIX_PTHREAD_SEMANTICS */ # elif defined (ACE_HAS_PTHREADS) # if defined (CYGWIN32) // Cygwin has sigwait definition, but it is not implemented @@ -2777,10 +2425,7 @@ ACE_OS::thr_continue (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_continue"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_continue (target_thread), result), int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_HAS_PTHREAD_CONTINUE) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_continue (target_thread), @@ -2808,7 +2453,7 @@ ACE_OS::thr_continue (ACE_hthread_t target_thread) return 0; # elif defined (ACE_HAS_VXTHREADS) return ::taskResume (target_thread); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (target_thread); ACE_NOTSUP_RETURN (-1); @@ -2820,13 +2465,11 @@ ACE_OS::thr_getconcurrency () { ACE_OS_TRACE ("ACE_OS::thr_getconcurrency"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - return ::thr_getconcurrency (); -# elif defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_GETCONCURRENCY) +# if defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_GETCONCURRENCY) return pthread_getconcurrency (); # else ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_THREADS */ @@ -2849,17 +2492,9 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) result); priority = param.sched_priority; return result; -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (ht_id, &priority), result), int); # elif defined (ACE_HAS_WTHREADS) ACE_Errno_Guard error (errno); - -# if defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) - priority = ::CeGetThreadPriority (ht_id); -# else priority = ::GetThreadPriority (ht_id); -# endif /* defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) */ # if defined (ACE_HAS_PHARLAP) # if defined (ACE_PHARLAP_LABVIEW_RT) @@ -2868,14 +2503,12 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) DWORD timeslice = ::EtsGetTimeSlice (); policy = timeslice == 0 ? ACE_SCHED_OTHER : ACE_SCHED_FIFO; # endif /* ACE_PHARLAP_LABVIEW_RT */ -# elif !defined (ACE_HAS_WINCE) - DWORD priority_class = ::GetPriorityClass (::GetCurrentProcess ()); +# else + DWORD const priority_class = ::GetPriorityClass (::GetCurrentProcess ()); if (priority_class == 0 && (error = ::GetLastError ()) != NO_ERROR) ACE_FAIL_RETURN (-1); - policy = - (priority_class == - REALTIME_PRIORITY_CLASS) ? ACE_SCHED_FIFO : ACE_SCHED_OTHER; + policy = (priority_class == REALTIME_PRIORITY_CLASS) ? ACE_SCHED_FIFO : ACE_SCHED_OTHER; # endif /* ACE_HAS_PHARLAP */ return 0; @@ -2885,7 +2518,7 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); @@ -2909,9 +2542,6 @@ ACE_OS::thr_getspecific_native (ACE_OS_thread_key_t key, void **data) # if defined (ACE_HAS_PTHREADS) *data = pthread_getspecific (key); return 0; -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getspecific (key, data), result), int); # elif defined (ACE_HAS_WTHREADS) *data = ::TlsGetValue (key); if (*data == 0 && ::GetLastError () != NO_ERROR) @@ -2967,11 +2597,7 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (thr_handle, 0, status), result), - int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_LACKS_PTHREAD_JOIN) ACE_UNUSED_ARG (thr_handle); ACE_UNUSED_ARG (status); @@ -3016,7 +2642,7 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, ACE_UNUSED_ARG (thr_handle); ACE_UNUSED_ARG (status); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (thr_handle); ACE_UNUSED_ARG (status); @@ -3031,11 +2657,7 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, { ACE_OS_TRACE ("ACE_OS::thr_join"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (waiter_id, thr_id, status), result), - int); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_LACKS_PTHREAD_JOIN) ACE_UNUSED_ARG (waiter_id); ACE_UNUSED_ARG (thr_id); @@ -3055,7 +2677,7 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, // This could be implemented if the DLL-Main function or the // task exit base class some log the threads which have exited ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (waiter_id); ACE_UNUSED_ARG (thr_id); @@ -3081,11 +2703,6 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) result), int); # endif /* ACE_LACKS_PTHREAD_KILL */ -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_kill (thr_id, signum), - result), - int); # elif defined (ACE_HAS_VXTHREADS) //FUZZ: disable check_for_lack_ACE_OS return ::kill (thr_id, signum); @@ -3094,7 +2711,7 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) ACE_UNUSED_ARG (thr_id); ACE_UNUSED_ARG (signum); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (thr_id); ACE_UNUSED_ARG (signum); @@ -3107,14 +2724,7 @@ ACE_OS::thr_min_stack () { ACE_OS_TRACE ("ACE_OS::thr_min_stack"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) -# if defined (ACE_HAS_THR_MINSTACK) - // Tandem did some weirdo mangling of STHREAD names... - return ::thr_minstack (); -# else - return ::thr_min_stack (); -# endif /* !ACE_HAS_THR_MINSTACK */ -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (_SC_THREAD_STACK_MIN) return (size_t) ACE_OS::sysconf (_SC_THREAD_STACK_MIN); # elif defined (PTHREAD_STACK_MIN) @@ -3136,7 +2746,7 @@ ACE_OS::thr_min_stack () return status == OK ? taskDesc.td_stackSize : 0; # else /* Should not happen... */ ACE_NOTSUP_RETURN (0); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_NOTSUP_RETURN (0); #endif /* ACE_HAS_THREADS */ @@ -3192,13 +2802,11 @@ ACE_OS::thr_self () # if defined (ACE_HAS_PTHREADS) // Note, don't use "::" here since the following call is often a macro. return pthread_self (); -# elif defined (ACE_HAS_STHREADS) - return ::thr_self (); # elif defined (ACE_HAS_WTHREADS) return ::GetCurrentThreadId (); # elif defined (ACE_HAS_VXTHREADS) return ::taskIdSelf (); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else return 1; // Might as well make it the first thread ;-) #endif /* ACE_HAS_THREADS */ @@ -3228,13 +2836,11 @@ ACE_OS::thr_self (ACE_hthread_t &self) self = pthread_self (); # elif defined (ACE_HAS_THREAD_SELF) self = ::thread_self (); -# elif defined (ACE_HAS_STHREADS) - self = ::thr_self (); # elif defined (ACE_HAS_WTHREADS) self = ::GetCurrentThread (); # elif defined (ACE_HAS_VXTHREADS) self = ::taskIdSelf (); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else self = 1; // Might as well make it the main thread ;-) #endif /* ACE_HAS_THREADS */ @@ -3276,10 +2882,6 @@ ACE_OS::thr_setcancelstate (int new_state, int *old_state) break; } return result; -# elif defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (new_state); - ACE_UNUSED_ARG (old_state); - ACE_NOTSUP_RETURN (-1); # elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (new_state); ACE_UNUSED_ARG (old_state); @@ -3349,18 +2951,13 @@ ACE_OS::thr_setconcurrency (int hint) { ACE_OS_TRACE ("ACE_OS::thr_setconcurrency"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setconcurrency (hint), - result), - int); -# elif defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_SETCONCURRENCY) +# if defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_SETCONCURRENCY) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_setconcurrency (hint), result), int); # else ACE_UNUSED_ARG (hint); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (hint); ACE_NOTSUP_RETURN (-1); @@ -3397,21 +2994,10 @@ ACE_OS::thr_setprio (ACE_hthread_t ht_id, int priority, int policy) ¶m), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setprio (ht_id, priority), result), int); # elif defined (ACE_HAS_WTHREADS) - -# if defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CeSetThreadPriority (ht_id, priority), - ace_result_), - int, -1); -# else ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetThreadPriority (ht_id, priority), ace_result_), int, -1); -# endif /* defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) */ - # elif defined (ACE_HAS_VXTHREADS) ACE_OSCALL_RETURN (::taskPrioritySet (ht_id, priority), int); # else @@ -3419,7 +3005,7 @@ ACE_OS::thr_setprio (ACE_hthread_t ht_id, int priority, int policy) ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (ht_id); ACE_UNUSED_ARG (priority); @@ -3435,7 +3021,7 @@ ACE_OS::thr_sigsetmask (int how, ACE_OS_TRACE ("ACE_OS::thr_sigsetmask"); #if defined (ACE_HAS_THREADS) # if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK) - // DCE threads and Solaris 2.4 have no such function. + // DCE threads ACE_UNUSED_ARG (osm); ACE_UNUSED_ARG (nsm); ACE_UNUSED_ARG (how); @@ -3444,9 +3030,6 @@ ACE_OS::thr_sigsetmask (int how, # elif defined (ACE_HAS_SIGTHREADMASK) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigthreadmask (how, nsm, osm), result), int); -# elif defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_sigsetmask (how, nsm, osm), result), int); # elif defined (ACE_HAS_PTHREADS) # if !defined (ACE_LACKS_PTHREAD_SIGMASK) int result; @@ -3511,10 +3094,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread) { ACE_OS_TRACE ("ACE_OS::thr_suspend"); #if defined (ACE_HAS_THREADS) -# if defined (ACE_HAS_STHREADS) - int result; - ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_suspend (target_thread), result), int, -1); -# elif defined (ACE_HAS_PTHREADS) +# if defined (ACE_HAS_PTHREADS) # if defined (ACE_HAS_PTHREAD_SUSPEND) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_suspend (target_thread), result), int); @@ -3533,7 +3113,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread) /* NOTREACHED */ # elif defined (ACE_HAS_VXTHREADS) return ::taskSuspend (target_thread); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (target_thread); ACE_NOTSUP_RETURN (-1); @@ -3547,9 +3127,6 @@ ACE_OS::thr_testcancel () #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CANCEL) pthread_testcancel (); -# elif defined (ACE_HAS_STHREADS) -# elif defined (ACE_HAS_WTHREADS) -# elif defined (ACE_HAS_VXTHREADS) # else // no-op: can't use ACE_NOTSUP_RETURN because there is no return value # endif /* ACE_HAS_PTHREADS */ @@ -3564,8 +3141,6 @@ ACE_OS::thr_yield () #if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_PTHREADS) ::sched_yield (); -# elif defined (ACE_HAS_STHREADS) - ::thr_yield (); # elif defined (ACE_HAS_WTHREADS) ::Sleep (0); # elif defined (ACE_HAS_VXTHREADS) @@ -3574,7 +3149,7 @@ ACE_OS::thr_yield () // Now, it does seem to work. The context_switch_time test // works fine with task_delay set to 0. ::taskDelay (0); -# endif /* ACE_HAS_STHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ; #endif /* ACE_HAS_THREADS */ @@ -3622,13 +3197,13 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, } return 0; -# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) +# elif defined (ACE_HAS_PTHREADS) // Force the use of USYNC_THREAD! return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg, 0, lock_type); # elif defined (ACE_HAS_VXTHREADS) return mutex_init (m, lock_type, name, arg); -# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (m); @@ -3665,12 +3240,12 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m, } return 0; -# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) +# elif defined (ACE_HAS_PTHREADS) // Force the use of USYNC_THREAD! return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg, 0, lock_type); # elif defined (ACE_HAS_VXTHREADS) return mutex_init (m, lock_type, name, arg); -# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */ +# endif /* ACE_HAS_PTHREADS */ #else ACE_UNUSED_ARG (m); ACE_UNUSED_ARG (lock_type); @@ -3753,7 +3328,7 @@ ACE_OS::thread_mutex_trylock (ACE_thread_mutex_t *m) ACE_UNUSED_ARG (m); ACE_NOTSUP_RETURN (-1); # endif /* ACE_HAS_WIN32_TRYLOCK */ -# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) || defined (ACE_VXWORKS) +# elif defined (ACE_HAS_PTHREADS) || defined (ACE_VXWORKS) return ACE_OS::mutex_trylock (m); #endif /* Threads variety case */ diff --git a/ACE/ace/OS_NS_dirent.h b/ACE/ace/OS_NS_dirent.h index 98298083e24..5d0a3f5addd 100644 --- a/ACE/ace/OS_NS_dirent.h +++ b/ACE/ace/OS_NS_dirent.h @@ -42,9 +42,6 @@ extern "C" { typedef int (*ACE_SCANDIR_OS_COMPARATOR)(const void *f1, const void *f2); #endif /* ACE_SCANDIR_CMP_USES_VOIDPTR */ typedef int (*ACE_SCANDIR_COMPARATOR)(const ACE_DIRENT **f1, const ACE_DIRENT **f2); -#if defined (ACE_SCANDIR_SEL_LACKS_CONST) - typedef int (*ACE_SCANDIR_OS_SELECTOR)(ACE_DIRENT *filename); -#endif /* ACE_SCANDIR_SEL_LACKS_CONST */ typedef int (*ACE_SCANDIR_SELECTOR)(const ACE_DIRENT *filename); } diff --git a/ACE/ace/OS_NS_dirent.inl b/ACE/ace/OS_NS_dirent.inl index f55ec13406e..88a5154e0a5 100644 --- a/ACE/ace/OS_NS_dirent.inl +++ b/ACE/ace/OS_NS_dirent.inl @@ -37,8 +37,6 @@ opendir (const ACE_TCHAR *filename) return ::ACE_OS::opendir_emulation (filename); # elif defined (ACE_HAS_WOPENDIR) && defined (ACE_USES_WCHAR) return ::wopendir (filename); -# elif defined (ACE_HAS_NONCONST_OPENDIR) - return ::opendir (const_cast<char *> (filename)); # else /* ! ACE_WIN32 && ACE_LACKS_OPENDIR */ return ::opendir (ACE_TEXT_ALWAYS_CHAR (filename)); # endif /* ACE_WIN32 && ACE_LACKS_OPENDIR */ @@ -88,11 +86,7 @@ scandir (const ACE_TCHAR *dirname, #if defined (ACE_HAS_SCANDIR) return ::scandir (ACE_TEXT_ALWAYS_CHAR (dirname), namelist, -# if defined (ACE_SCANDIR_SEL_LACKS_CONST) - reinterpret_cast<ACE_SCANDIR_OS_SELECTOR> (selector), -# else selector, -# endif /* ACE_SCANDIR_SEL_LACKS_CONST */ # if defined (ACE_SCANDIR_CMP_USES_VOIDPTR) || \ defined (ACE_SCANDIR_CMP_USES_CONST_VOIDPTR) reinterpret_cast<ACE_SCANDIR_OS_COMPARATOR> (comparator)); diff --git a/ACE/ace/OS_NS_dlfcn.inl b/ACE/ace/OS_NS_dlfcn.inl index 840ef48e1bb..b9928e2936a 100644 --- a/ACE/ace/OS_NS_dlfcn.inl +++ b/ACE/ace/OS_NS_dlfcn.inl @@ -40,22 +40,6 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle) return ::dlclose (handle); #elif defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::FreeLibrary (handle), ace_result_), int, -1); -#elif defined (__hpux) - // HP-UX 10.x and 32-bit 11.00 do not pay attention to the ref count - // when unloading a dynamic lib. So, if the ref count is more than - // 1, do not unload the lib. This will cause a library loaded more - // than once to not be unloaded until the process runs down, but - // that's life. It's better than unloading a library that's in use. - // So far as I know, there's no way to decrement the refcnt that the - // kernel is looking at - the shl_descriptor is a copy of what the - // kernel has, not the actual struct. On 64-bit HP-UX using dlopen, - // this problem has been fixed. - struct shl_descriptor desc; - if (shl_gethandle_r (handle, &desc) == -1) - return -1; - if (desc.ref_count > 1) - return 0; - return ::shl_unload (handle); #else ACE_UNUSED_ARG (handle); ACE_NOTSUP_RETURN (-1); @@ -79,7 +63,7 @@ ACE_OS::dlerror () # else return const_cast <char *> (err); # endif /* ACE_USES_WCHAR */ -# elif defined (__hpux) || defined (ACE_VXWORKS) +# elif defined (ACE_VXWORKS) //FUZZ: disable check_for_lack_ACE_OS return ::strerror(errno); //FUZZ: enable check_for_lack_ACE_OS @@ -133,8 +117,6 @@ ACE_OS::dlopen (const ACE_TCHAR *fname, ACE_UNUSED_ARG (mode); ACE_WIN32CALL_RETURN (ACE_TEXT_LoadLibrary (fname), ACE_SHLIB_HANDLE, 0); -# elif defined (__hpux) - return ::shl_load(fname, mode, 0L); # elif defined (ACE_VXWORKS) && !defined (__RTP__) ACE_UNUSED_ARG (mode); MODULE* handle = 0; @@ -182,25 +164,14 @@ ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, return nullptr; // Get the correct OS type. -#if defined (ACE_HAS_WINCE) - // CE (at least thru Pocket PC 2003) offers GetProcAddressW, not ...A, so - // we always need a wide-char string. - const wchar_t *symbolname = 0; -# if defined (ACE_USES_WCHAR) - symbolname = sname; -# else - ACE_Ascii_To_Wide sname_xlate (sname); - symbolname = sname_xlate.wchar_rep (); -# endif /* ACE_USES_WCHAR */ -#elif defined (ACE_USES_WCHAR) - // WinCE is WCHAR always; other platforms need a char * symbol name +#if defined (ACE_USES_WCHAR) ACE_Wide_To_Ascii w_sname (sname); char *symbolname = w_sname.char_rep (); #elif defined (ACE_VXWORKS) char *symbolname = const_cast<char *> (sname); #else const char *symbolname = sname; -#endif /* ACE_HAS_WINCE */ +#endif /* ACE_USES_WCHAR */ # if defined (ACE_HAS_SVR4_DYNAMIC_LINKING) @@ -217,21 +188,9 @@ ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, # else return ::dlsym (handle, symbolname); # endif /* ACE_USES_ASM_SYMBOL_IN_DLSYM */ - # elif defined (ACE_WIN32) - ACE_WIN32CALL_RETURN (::GetProcAddress (handle, symbolname), void *, 0); - -# elif defined (__hpux) - - void *value {}; - int status = 0; - shl_t _handle = handle; - ACE_OSCALL (::shl_findsym(&_handle, symbolname, TYPE_UNDEFINED, &value), int, status); - return status == 0 ? value : nullptr; - # elif defined (ACE_VXWORKS) && !defined (__RTP__) - // For now we use the VxWorks global symbol table // which resolves the most recently loaded symbols, which resolve // mostly what we want.. diff --git a/ACE/ace/OS_NS_errno.h b/ACE/ace/OS_NS_errno.h index d953d61552a..eedece4661d 100644 --- a/ACE/ace/OS_NS_errno.h +++ b/ACE/ace/OS_NS_errno.h @@ -50,44 +50,10 @@ namespace ACE_OS { } /* namespace ACE_OS */ -#if defined (ACE_HAS_WINCE_BROKEN_ERRNO) -/** - * @class ACE_CE_Errno - * - * Some versions of CE don't support @c errno and some versions' - * implementations are busted. So we implement our own. - * Our implementation takes up one Tls key, however, it does not - * allocate memory from the heap so there's no problem with cleaning - * up the errno when a thread exit. - */ -class ACE_Export ACE_CE_Errno -{ -public: - ACE_CE_Errno () = default; - static void init (); - static void fini (); - static ACE_CE_Errno *instance (); - - operator int () const; - int operator= (int); - -private: - static ACE_CE_Errno *instance_; - static DWORD errno_key_; -}; - -# define errno (* (ACE_CE_Errno::instance ())) -#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ - -#if defined (ACE_HAS_WINCE_BROKEN_ERRNO) -# define ACE_ERRNO_TYPE ACE_CE_Errno -# define ACE_ERRNO_GET ACE_CE_Errno::instance ()->operator int() -#else -# if !defined (ACE_ERRNO_TYPE) -# define ACE_ERRNO_TYPE int -# endif /* !ACE_ERRNO_TYPE */ -# define ACE_ERRNO_GET errno -#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ +#if !defined (ACE_ERRNO_TYPE) +# define ACE_ERRNO_TYPE int +#endif /* !ACE_ERRNO_TYPE */ +#define ACE_ERRNO_GET errno ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/OS_NS_errno.inl b/ACE/ace/OS_NS_errno.inl index 9dcbe998360..d77546fe3f9 100644 --- a/ACE/ace/OS_NS_errno.inl +++ b/ACE/ace/OS_NS_errno.inl @@ -52,29 +52,4 @@ ACE_OS::set_errno_to_wsa_last_error () # endif /* defined(ACE_WIN32) */ } -#if defined (ACE_HAS_WINCE_BROKEN_ERRNO) - -ACE_INLINE ACE_CE_Errno * -ACE_CE_Errno::instance () -{ - // This should be inlined. - return ACE_CE_Errno::instance_; -} - -ACE_INLINE -ACE_CE_Errno::operator int () const -{ - return (int) TlsGetValue (ACE_CE_Errno::errno_key_); -} - -ACE_INLINE int -ACE_CE_Errno::operator= (int x) -{ - // error checking? - TlsSetValue (ACE_CE_Errno::errno_key_, (void *) x); - return x; -} - -#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/OS_NS_fcntl.cpp b/ACE/ace/OS_NS_fcntl.cpp index f462b0d75dd..ab6bd35fef2 100644 --- a/ACE/ace/OS_NS_fcntl.cpp +++ b/ACE/ace/OS_NS_fcntl.cpp @@ -76,16 +76,6 @@ ACE_OS::open (const char *filename, SECURITY_ATTRIBUTES sa_buffer; SECURITY_DESCRIPTOR sd_buffer; -#if defined (ACE_HAS_WINCE) - ACE_HANDLE h = ::CreateFileW (ACE_Ascii_To_Wide (filename).wchar_rep (), - access, - shared_mode, - ACE_OS::default_win32_security_attributes_r - (sa, &sa_buffer, &sd_buffer), - creation, - flags, - 0); -#else /* ACE_HAS_WINCE */ ACE_HANDLE h = ::CreateFileA (filename, access, shared_mode, @@ -94,7 +84,6 @@ ACE_OS::open (const char *filename, creation, flags, 0); -#endif /* ACE_HAS_WINCE */ if (ACE_BIT_ENABLED (mode, _O_APPEND)) { diff --git a/ACE/ace/OS_NS_macros.h b/ACE/ace/OS_NS_macros.h index e901019ddb0..ac1c5e2f941 100644 --- a/ACE/ace/OS_NS_macros.h +++ b/ACE/ace/OS_NS_macros.h @@ -76,7 +76,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL LONG -inline ACE_High_Part (ACE_OFF_T value) +inline ACE_High_Part (LONGLONG value) { LARGE_INTEGER new_value; new_value.QuadPart = value; @@ -102,6 +102,18 @@ ACE_END_VERSIONED_NAMESPACE_DECL # endif /* _FILE_OFFSET_BITS==64 */ #endif /* ACE_WIN32 */ +// 64-bit quad-word definitions. +#if defined (ACE_WIN32) +# if defined (_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +typedef unsigned __int64 ACE_QWORD; +inline ACE_QWORD ACE_Make_QWORD (DWORD lo, DWORD hi) { return ACE_QWORD (lo) | (ACE_QWORD (hi) << 32); } +inline DWORD ACE_Low_DWORD (ACE_QWORD q) { return (DWORD) q; } +inline DWORD ACE_High_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); } +ACE_END_VERSIONED_NAMESPACE_DECL +# endif /* _FILE_OFFSET_BITS==64 */ +#endif /* ACE_WIN32 */ + # include /**/ "ace/post.h" #endif /* ACE_OS_NS_MACROS_H */ diff --git a/ACE/ace/OS_NS_math.h b/ACE/ace/OS_NS_math.h index de6d2e1516c..ede8de33bd1 100644 --- a/ACE/ace/OS_NS_math.h +++ b/ACE/ace/OS_NS_math.h @@ -91,16 +91,6 @@ namespace ACE_OS return std::floor (x); } -#if defined (ACE_HAS_WINCE) - /// Windows CE has an intrinsic floor for float - template <> - inline - float floor (float x) - { - return std::floorf (x); - } -#endif - /// This method computes the smallest integral value not less than x. template <typename T> inline @@ -109,16 +99,6 @@ namespace ACE_OS return std::ceil (x); } -#if defined (ACE_HAS_WINCE) - /// Windows CE has an intrinsic ceil for float - template <> - inline - float ceil (float x) - { - return std::ceilf (x); - } -#endif - /// This method computes the base-2 logarithm of x. ACE_NAMESPACE_INLINE_FUNCTION double log2 (double x); diff --git a/ACE/ace/OS_NS_netdb.cpp b/ACE/ace/OS_NS_netdb.cpp index e60ac8a418e..6ede9036026 100644 --- a/ACE/ace/OS_NS_netdb.cpp +++ b/ACE/ace/OS_NS_netdb.cpp @@ -34,12 +34,6 @@ # include "ace/Malloc_Base.h" #endif -// Include if_arp so that getmacaddr can use the -// arp structure. -#if defined (sun) -# include /**/ <net/if_arp.h> -#endif - #include <algorithm> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -49,7 +43,7 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) { ACE_OS_TRACE ("ACE_OS::getmacaddress"); -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) # if !defined (ACE_HAS_PHARLAP) /** Define a structure for use with the netbios routine */ struct ADAPTERSTAT @@ -131,58 +125,6 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) ACE_NOTSUP_RETURN (-1); # endif /* ACE_HAS_PHARLAP_RT */ # endif /* ACE_HAS_PHARLAP */ -#elif defined (sun) - - /** obtain the local host name */ - char hostname [MAXHOSTNAMELEN]; - ACE_OS::hostname (hostname, sizeof (hostname)); - - /** Get the hostent to use with ioctl */ - struct hostent *phost = - ACE_OS::gethostbyname (hostname); - - if (phost == 0) - return -1; - - ACE_HANDLE handle = - ACE_OS::socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP); - - if (handle == ACE_INVALID_HANDLE) - return -1; - - char **paddrs = phost->h_addr_list; - - struct arpreq ar; - - struct sockaddr_in *psa = - (struct sockaddr_in *)&(ar.arp_pa); - - ACE_OS::memset (&ar, - 0, - sizeof (struct arpreq)); - - psa->sin_family = AF_INET; - - ACE_OS::memcpy (&(psa->sin_addr), - *paddrs, - sizeof (struct in_addr)); - - if (ACE_OS::ioctl (handle, - SIOCGARP, - &ar) == -1) - { - ACE_OS::close (handle); - return -1; - } - - ACE_OS::close (handle); - - ACE_OS::memcpy (node->node, - ar.arp_ha.sa_data, - 6); - - return 0; - #elif defined (ACE_LINUX) && !defined (ACE_LACKS_NETWORKING) // It's easiest to know the first MAC-using interface. Use the BSD diff --git a/ACE/ace/OS_NS_netdb.inl b/ACE/ace/OS_NS_netdb.inl index b00f6cdff78..0bedbe2a2d0 100644 --- a/ACE/ace/OS_NS_netdb.inl +++ b/ACE/ace/OS_NS_netdb.inl @@ -4,7 +4,7 @@ #include "ace/OS_NS_errno.h" #if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) -# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && !defined (HPUX_11) +# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) # define ACE_NETDBCALL_RETURN(OP,TYPE,FAILVALUE,TARGET,SIZE) \ do \ { \ @@ -22,7 +22,7 @@ return ace_result_; \ } \ } while(0) -# else /* ! (ACE_MT_SAFE && ACE_MT_SAFE != 0 && !HPUX_11) */ +# else /* ! (ACE_MT_SAFE && ACE_MT_SAFE != 0) */ # define ACE_NETDBCALL_RETURN(OP,TYPE,FAILVALUE,TARGET,SIZE) \ do \ { \ @@ -104,20 +104,7 @@ ACE_OS::gethostbyaddr_r (const char *addr, if (0 == addr || '\0' == addr[0]) return 0; -# if defined (AIX) - ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA)); - - //FUZZ: disable check_for_lack_ACE_OS - if (::gethostbyaddr_r ((char *) addr, length, type, result, - (struct hostent_data *) buffer)== 0) - return result; - //FUZZ: enable check_for_lack_ACE_OS - else - { - *h_errnop = h_errno; - return (struct hostent *) 0; - } -# elif defined (__GLIBC__) +# if defined (__GLIBC__) // GNU C library has a different signature ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA)); @@ -199,7 +186,7 @@ ACE_OS::gethostbyaddr_r (const char *addr, struct hostent *, 0); //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ -# endif /* defined (AIX) */ +# endif /* defined (__GLIBC__) */ # elif defined (ACE_HAS_NONCONST_GETBY) ACE_UNUSED_ARG (result); ACE_UNUSED_ARG (buffer); @@ -283,29 +270,7 @@ ACE_OS::gethostbyname_r (const char *name, if (0 == name || '\0' == name[0]) return (struct hostent *)0; -# if (defined (ACE_AIX_MINOR_VERS) && (ACE_AIX_MINOR_VERS > 2)) - ACE_UNUSED_ARG (result); - ACE_UNUSED_ARG (buffer); - ACE_UNUSED_ARG (h_errnop); - - // gethostbyname returns thread-specific storage on Digital Unix and - // AIX 4.3 - //FUZZ: disable check_for_lack_ACE_OS - ACE_SOCKCALL_RETURN (::gethostbyname (name), struct hostent *, 0); - //FUZZ: enable check_for_lack_ACE_OS -# elif defined (AIX) - ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA)); - - //FUZZ: disable check_for_lack_ACE_OS - if (::gethostbyname_r (name, result, (struct hostent_data *) buffer) == 0) - return result; - //FUZZ: enable check_for_lack_ACE_OS - else - { - *h_errnop = h_errno; - return (struct hostent *) 0; - } -# elif defined (__GLIBC__) +# if defined (__GLIBC__) // GNU C library has a different signature ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA)); @@ -386,7 +351,7 @@ ACE_OS::gethostbyname_r (const char *name, 0); //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ -# endif /* defined (AIX) */ +# endif /* defined (__GLIBC__) */ # elif defined (ACE_HAS_NONCONST_GETBY) ACE_UNUSED_ARG (result); ACE_UNUSED_ARG (buffer); @@ -512,14 +477,7 @@ ACE_OS::getprotobyname_r (const char *name, ACE_UNUSED_ARG (buffer); ACE_NOTSUP_RETURN (0); #elif defined (ACE_HAS_REENTRANT_FUNCTIONS) -# if defined (AIX) - //FUZZ: disable check_for_lack_ACE_OS - if (::getprotobyname_r (name, result, (struct protoent_data *) buffer) == 0) - return result; - else - return 0; - //FUZZ: enable check_for_lack_ACE_OS -# elif defined (__GLIBC__) +#if defined (__GLIBC__) // GNU C library has a different signature //FUZZ: disable check_for_lack_ACE_OS if (::getprotobyname_r (name, @@ -548,7 +506,7 @@ ACE_OS::getprotobyname_r (const char *name, struct protoent *, 0); //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ -# endif /* defined (AIX) */ +# endif /* defined (__GLIBC__) */ #elif defined (ACE_HAS_NONCONST_GETBY) ACE_UNUSED_ARG (result); ACE_UNUSED_ARG (buffer); @@ -593,14 +551,7 @@ ACE_OS::getprotobynumber_r (int proto, ACE_UNUSED_ARG (buffer); ACE_NOTSUP_RETURN (0); #elif defined (ACE_HAS_REENTRANT_FUNCTIONS) -# if defined (AIX) - //FUZZ: disable check_for_lack_ACE_OS - if (::getprotobynumber_r (proto, result, (struct protoent_data *) buffer) == 0) - return result; - //FUZZ: enable check_for_lack_ACE_OS - else - return 0; -# elif defined (__GLIBC__) +# if defined (__GLIBC__) // GNU C library has a different signature //FUZZ: disable check_for_lack_ACE_OS if (::getprotobynumber_r (proto, @@ -626,7 +577,7 @@ ACE_OS::getprotobynumber_r (int proto, struct protoent *, 0); //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ -# endif /* defined (AIX) */ +# endif /* defined (__GLIBC__) */ #else ACE_UNUSED_ARG (buffer); ACE_UNUSED_ARG (result); @@ -677,16 +628,7 @@ ACE_OS::getservbyname_r (const char *svc, ACE_UNUSED_ARG (buf); ACE_NOTSUP_RETURN (0); #elif defined (ACE_HAS_REENTRANT_FUNCTIONS) -# if defined (AIX) - ACE_OS::memset (buf, 0, sizeof (ACE_SERVENT_DATA)); - - //FUZZ: disable check_for_lack_ACE_OS - if (::getservbyname_r (svc, proto, result, (struct servent_data *) buf) == 0) - return result; - //FUZZ: enable check_for_lack_ACE_OS - else - return (struct servent *) 0; -# elif defined (__GLIBC__) +# if defined (__GLIBC__) // GNU C library has a different signature ACE_OS::memset (buf, 0, sizeof (ACE_SERVENT_DATA)); @@ -716,7 +658,7 @@ ACE_OS::getservbyname_r (const char *svc, struct servent *, 0); //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ -# endif /* defined (AIX) */ +# endif /* defined (__GLIBC__) */ #elif defined (ACE_HAS_NONCONST_GETBY) ACE_UNUSED_ARG (buf); ACE_UNUSED_ARG (result); @@ -738,7 +680,6 @@ ACE_OS::getservbyname_r (const char *svc, #endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) */ } - ACE_INLINE int ACE_OS::getaddrinfo (const char *name, const char *service, const addrinfo *hints, addrinfo **result) diff --git a/ACE/ace/OS_NS_pwd.inl b/ACE/ace/OS_NS_pwd.inl index 3353f649469..74eae66e517 100644 --- a/ACE/ace/OS_NS_pwd.inl +++ b/ACE/ace/OS_NS_pwd.inl @@ -48,14 +48,6 @@ ACE_OS::getpwnam_r (const char *name, ACE_UNUSED_ARG (bufsize); ACE_UNUSED_ARG (result); ACE_NOTSUP_RETURN (0); -#elif defined (ACE_HAS_STHREADS) - if (::getpwnam_r (name, pwd, buffer, bufsize) != 0) - { - *result = 0; - return -1; - } - *result = pwd; - return 0; #else return ::getpwnam_r (name, pwd, buffer, bufsize, result); #endif /* ACE_LACKS_PWD_FUNCTIONS */ diff --git a/ACE/ace/OS_NS_signal.inl b/ACE/ace/OS_NS_signal.inl index 4f40510368c..5211a0730e2 100644 --- a/ACE/ace/OS_NS_signal.inl +++ b/ACE/ace/OS_NS_signal.inl @@ -56,7 +56,7 @@ sigaction (int signum, const ACE_SIGACTION *nsa, ACE_SIGACTION *osa) ACE_OS_TRACE ("ACE_OS::sigaction"); if (signum == 0) return 0; -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) struct sigaction sa; if (osa == 0) @@ -78,7 +78,7 @@ sigaction (int signum, const ACE_SIGACTION *nsa, ACE_SIGACTION *osa) return ::sigaction (signum, const_cast<ACE_SIGACTION*> (nsa), osa); #else return ::sigaction (signum, nsa, osa); -#endif /* ACE_WIN32 !ACE_HAS_WINCE */ +#endif /* ACE_WIN32 */ } ACE_INLINE int @@ -190,15 +190,14 @@ signal (int signum, ACE_SignalHandler func) return 0; else { -#if (defined ACE_WIN32 && !defined ACE_HAS_WINCE) || \ +#if (defined ACE_WIN32) || \ (!defined ACE_LACKS_UNIX_SIGNALS && !defined ACE_LACKS_SIGNAL) return ::signal (signum, func); #else - // @@ WINCE: Don't know how to implement signal on WinCE (yet.) ACE_UNUSED_ARG (signum); ACE_UNUSED_ARG (func); - ACE_NOTSUP_RETURN (0); // Should return SIG_ERR but it is not defined on WinCE. -#endif /* defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) || !defined (ACE_LACKS_UNIX_SIGNALS) */ + ACE_NOTSUP_RETURN (0); // Should return SIG_ERR but maybe not defined on all platforms +#endif /* defined (ACE_WIN32) || !defined (ACE_LACKS_UNIX_SIGNALS) */ } } diff --git a/ACE/ace/OS_NS_stdio.cpp b/ACE/ace/OS_NS_stdio.cpp index 1b271b703fc..76db871d18d 100644 --- a/ACE/ace/OS_NS_stdio.cpp +++ b/ACE/ace/OS_NS_stdio.cpp @@ -26,7 +26,7 @@ ACE_TEXT_OSVERSIONINFO ACE_OS::win32_versioninfo_; HINSTANCE ACE_OS::win32_resource_module_; ACE_END_VERSIONED_NAMESPACE_DECL -# if defined (ACE_HAS_DLL) && (ACE_HAS_DLL == 1) && !defined (ACE_HAS_WINCE) +# if defined (ACE_HAS_DLL) && (ACE_HAS_DLL == 1) // This function is called by the OS when the ACE DLL is loaded. We // use it to determine the default module containing ACE's resources. extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID) @@ -86,7 +86,7 @@ ace_flock_t::dump () const /*****************************************************************************/ -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) namespace { /// Translate fopen's mode char to open's mode. This helper function diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h index 3a4e6bdf91c..3d592c526f7 100644 --- a/ACE/ace/OS_NS_stdio.h +++ b/ACE/ace/OS_NS_stdio.h @@ -27,12 +27,11 @@ #include "ace/os_include/os_errno.h" #include /**/ "ace/ACE_export.h" -/* OPENVMS needs unistd for cuserid() */ -#if defined (CYGWIN32) || defined (ACE_OPENVMS) +#if defined (CYGWIN32) # include "ace/os_include/os_unistd.h" -#endif /* CYGWIN32 || ACE_OPENVMS */ +#endif /* CYGWIN32 */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) # include "io.h" #endif @@ -135,10 +134,9 @@ inline char *ace_cuserid(char *user) #endif /* !ACE_LACKS_CUSERID && !ACE_HAS_ALT_CUSERID && ... */ # if defined (ACE_LACKS_FILELOCKS) -# if ! defined (ACE_VXWORKS) && ! defined (ACE_HAS_RTEMS) && !defined (INTEGRITY) +# if ! defined (ACE_VXWORKS) && !defined (INTEGRITY) // VxWorks defines struct flock in sys/fcntlcom.h. But it doesn't -// appear to support flock (). RTEMS defines struct flock but -// currently does not support locking. +// appear to support flock (). struct flock { short l_type; @@ -299,7 +297,7 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION ACE_HANDLE fileno (FILE *stream); -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION @@ -307,19 +305,19 @@ namespace ACE_OS { FILE *fopen (const char *filename, const char *mode); #if defined (ACE_HAS_WCHAR) -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* ACE_WIN32 */ FILE *fopen (const char *filename, const wchar_t *mode); -# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +# if defined (ACE_WIN32) extern ACE_Export # else ACE_NAMESPACE_INLINE_FUNCTION # endif /* ACE_WIN32 */ FILE *fopen (const wchar_t *filename, const wchar_t *mode); -# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +# if defined (ACE_WIN32) extern ACE_Export # else ACE_NAMESPACE_INLINE_FUNCTION diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl index b97adfdbbc9..6066165912e 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -364,7 +364,7 @@ ACE_OS::cuserid (char *user, size_t maxlen) ::remCurIdGet (user, 0); return user; } -#elif defined (ACE_HAS_PHARLAP) || defined (ACE_HAS_WINCE) +#elif defined (ACE_HAS_PHARLAP) ACE_UNUSED_ARG (user); ACE_UNUSED_ARG (maxlen); ACE_NOTSUP_RETURN (0); @@ -458,11 +458,7 @@ ACE_OS::cuserid (char *user, size_t maxlen) ACE_INLINE wchar_t * ACE_OS::cuserid (wchar_t *user, size_t maxlen) { -# if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (user); - ACE_UNUSED_ARG (maxlen); - ACE_NOTSUP_RETURN (0); -# elif defined (ACE_WIN32) +# if defined (ACE_WIN32) BOOL const result = GetUserNameW (user, (u_long *) &maxlen); if (result == FALSE) ACE_FAIL_RETURN (0); @@ -499,13 +495,7 @@ ACE_INLINE FILE * ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) { ACE_OS_TRACE ("ACE_OS::fdopen"); -#if defined (ACE_HAS_WINCE) -# if defined (ACE_HAS_NONCONST_WFDOPEN) - return ::_wfdopen ((int)handle, const_cast <ACE_TCHAR*> (ACE_TEXT_ALWAYS_WCHAR (mode))); -# else - return ::_wfdopen (handle, ACE_TEXT_ALWAYS_WCHAR (mode)); -# endif -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) // kernel file handle -> FILE* conversion... // Options: _O_APPEND, _O_RDONLY and _O_TEXT are lost @@ -534,7 +524,7 @@ ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) ACE_NOTSUP_RETURN (0); #else return ::fdopen (handle, ACE_TEXT_ALWAYS_CHAR (mode)); -#endif /* ACE_HAS_WINCE */ +#endif /* ACE_WIN32 */ } ACE_INLINE int @@ -612,7 +602,7 @@ ACE_OS::fileno (FILE *stream) #endif } -#if !(defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#if !defined (ACE_WIN32) // Win32 PC implementation of fopen () is in OS_NS_stdio.cpp. ACE_INLINE FILE * ACE_OS::fopen (const char *filename, const char *mode) @@ -636,28 +626,20 @@ ACE_INLINE FILE * ACE_OS::fopen (const wchar_t *filename, const wchar_t *mode) { ACE_OS_TRACE ("ACE_OS::fopen"); -#if defined (ACE_HAS_WINCE) - return ::_wfopen (filename, mode); -#else // Non-Windows doesn't use wchar_t file systems. ACE_Wide_To_Ascii n_filename (filename); ACE_Wide_To_Ascii n_mode (mode); return ::fopen (n_filename.char_rep (), n_mode.char_rep ()); -#endif /* ACE_HAS_WINCE */ } + // Win32 PC implementation of fopen () is in OS_NS_stdio.cpp. ACE_INLINE FILE * ACE_OS::fopen (const wchar_t *filename, const char *mode) { ACE_OS_TRACE ("ACE_OS::fopen"); -#if defined (ACE_HAS_WINCE) - ACE_Ascii_To_Wide n_mode (mode); - return ::_wfopen (filename, n_mode.wchar_rep ()); -#else // Non-Windows doesn't use wchar_t file systems. ACE_Wide_To_Ascii n_filename (filename); return ::fopen (n_filename.char_rep (), mode); -#endif /* ACE_HAS_WINCE */ } #endif /* ACE_HAS_WCHAR */ @@ -803,7 +785,7 @@ ACE_OS::perror (const char *s) ACE_UNUSED_ARG (s); #else ::perror (s); -#endif /* ACE_HAS_WINCE */ +#endif /* ACE_LACKS_PERROR */ } #if defined (ACE_HAS_WCHAR) @@ -859,13 +841,6 @@ ACE_OS::rename (const char *old_name, ACE_UNUSED_ARG (new_name); ACE_UNUSED_ARG (flags); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_HAS_WINCE) - // Win CE is always wide-char. - ACE_UNUSED_ARG (flags); - if (0 == ::MoveFile (ACE_TEXT_CHAR_TO_TCHAR (old_name), - ACE_TEXT_CHAR_TO_TCHAR (new_name))) - ACE_FAIL_RETURN (-1); - return 0; # 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 @@ -881,7 +856,7 @@ ACE_OS::rename (const char *old_name, # else ACE_UNUSED_ARG (flags); return ::rename (old_name, new_name); -# endif /* ACE_HAS_WINCE */ +# endif /* ACE_LACKS_RENAME */ } #if defined (ACE_HAS_WCHAR) @@ -895,11 +870,6 @@ ACE_OS::rename (const wchar_t *old_name, ACE_UNUSED_ARG (new_name); ACE_UNUSED_ARG (flags); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (flags); - if (::MoveFileW (old_name, new_name) == 0) - ACE_FAIL_RETURN (-1); - return 0; # 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 @@ -917,14 +887,14 @@ ACE_OS::rename (const wchar_t *old_name, ACE_Wide_To_Ascii nold_name (old_name); ACE_Wide_To_Ascii nnew_name (new_name); return ACE_OS::rename (nold_name.char_rep (), nnew_name.char_rep (), flags); -# endif /* ACE_HAS_WINCE */ +# endif /* ACE_LACKS_RENAME */ } #endif /* ACE_HAS_WCHAR */ ACE_INLINE void ACE_OS::rewind (FILE *fp) { -#if !defined (ACE_HAS_WINCE) && !defined (ACE_MQX) +#if !defined (ACE_MQX) ACE_OS_TRACE ("ACE_OS::rewind"); # if defined (ACE_LACKS_REWIND) ACE_UNUSED_ARG (fp); @@ -933,9 +903,9 @@ ACE_OS::rewind (FILE *fp) # endif /* ACE_LACKS_REWIND */ #else // This isn't perfect since it doesn't reset EOF, but it's probably - // the closest we can get on WINCE. + // the closest we can get on MQX. (void) std::fseek (fp, 0L, SEEK_SET); -#endif /* ACE_HAS_WINCE */ +#endif /* !ACE_MQX */ } #if !defined (ACE_DISABLE_TEMPNAM) @@ -1098,9 +1068,8 @@ ACE_INLINE int ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) { # if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) || \ - (defined (sun) && !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION-0==4))) || \ defined (ACE_HAS_VSWPRINTF) || \ - (defined (_MSC_VER) && !defined (ACE_HAS_WINCE)) + (defined (_MSC_VER)) // The XPG4/UNIX98/C99 signature of the wide-char sprintf has a // maxlen argument. Since this method doesn't supply one, pass in @@ -1178,10 +1147,8 @@ ACE_INLINE int ACE_OS::vsnprintf (wchar_t *buffer, size_t maxlen, const wchar_t *format, va_list ap) { # if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) || \ - (defined (sun) && !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION-0==4))) || \ defined (ACE_HAS_VSWPRINTF) || \ defined (ACE_WIN32) - int result; # if defined (ACE_WIN32) && !defined (ACE_HAS_C99_VSNWPRINTF) diff --git a/ACE/ace/OS_NS_stdlib.cpp b/ACE/ace/OS_NS_stdlib.cpp index ad6ed536954..1bef126ab39 100644 --- a/ACE/ace/OS_NS_stdlib.cpp +++ b/ACE/ace/OS_NS_stdlib.cpp @@ -37,13 +37,7 @@ ACE_EXIT_HOOK ACE_OS::exit_hook_ = 0; void * ACE_OS::calloc (size_t elements, size_t sizeof_elements) { -#if !defined (ACE_HAS_WINCE) return ACE_CALLOC_FUNC (elements, sizeof_elements); -#else - // @@ This will probably not work since it doesn't consider - // alignment properly. - return ACE_MALLOC_FUNC (elements * sizeof_elements); -#endif /* ACE_HAS_WINCE */ } void @@ -51,13 +45,13 @@ ACE_OS::exit (int status) { ACE_OS_TRACE ("ACE_OS::exit"); -#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_HAS_WINCE) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER) +#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER) // Shut down the ACE_Object_Manager, if it had registered its exit_hook. // With ACE_HAS_NONSTATIC_OBJECT_MANAGER, the ACE_Object_Manager is // instantiated on the main's stack. ::exit () doesn't destroy it. if (exit_hook_) (*exit_hook_) (); -#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ +#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ #if defined (ACE_WIN32) ::ExitProcess ((UINT) status); @@ -90,9 +84,7 @@ ACE_OS::free (void *ptr) ACE_TCHAR * ACE_OS::getenvstrings () { -#if defined (ACE_LACKS_GETENVSTRINGS) - ACE_NOTSUP_RETURN (0); -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) # if defined (ACE_USES_WCHAR) return ::GetEnvironmentStringsW (); # else /* ACE_USES_WCHAR */ @@ -110,13 +102,6 @@ ACE_OS::getenvstrings () ACE_TCHAR * ACE_OS::strenvdup (const ACE_TCHAR *str) { -#if defined (ACE_HAS_WINCE) - // WinCE doesn't have environment variables so we just skip it. - return ACE_OS::strdup (str); -#elif defined (ACE_LACKS_STRENVDUP) - ACE_UNUSED_ARG (str); - ACE_NOTSUP_RETURN (0); -#else const ACE_TCHAR * start = 0; if ((start = ACE_OS::strchr (str, ACE_TEXT ('$'))) != 0) { @@ -170,7 +155,6 @@ ACE_OS::strenvdup (const ACE_TCHAR *str) } else return ACE_OS::strdup (str); -#endif /* ACE_HAS_WINCE */ } #if !defined (ACE_HAS_ITOA) diff --git a/ACE/ace/OS_NS_stdlib.inl b/ACE/ace/OS_NS_stdlib.inl index b76ee71c5bd..d40c139c860 100644 --- a/ACE/ace/OS_NS_stdlib.inl +++ b/ACE/ace/OS_NS_stdlib.inl @@ -19,8 +19,6 @@ ACE_OS::_exit (int status) ACE_OS_TRACE ("ACE_OS::_exit"); #if defined (ACE_VXWORKS) ::exit (status); -#elif defined (ACE_HAS_WINCE) - ::TerminateProcess (::GetCurrentProcess (), status); #elif defined (ACE_MQX) _mqx_exit (status); #elif !defined (ACE_LACKS__EXIT) @@ -110,12 +108,6 @@ ACE_OS::atop (const char *s) ACE_TRACE ("ACE_OS::atop"); #if defined (ACE_WIN64) intptr_t ip = ::_atoi64 (s); -#elif defined (ACE_OPENVMS) -# if !defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64) - int ip = ::atoi (s); -# else - intptr_t ip = ::atoi (s); -# endif #else intptr_t ip = ::atoi (s); #endif /* ACE_WIN64 */ @@ -129,12 +121,6 @@ ACE_OS::atop (const wchar_t *s) { # if defined (ACE_WIN64) intptr_t ip = ::_wtoi64 (s); -# elif defined (ACE_OPENVMS) -# if !defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64) - int ip = ACE_OS::atoi (s); -# else - intptr_t ip = ACE_OS::atoi (s); -# endif # else intptr_t ip = ACE_OS::atoi (s); # endif /* ACE_WIN64 */ @@ -336,7 +322,7 @@ ACE_OS::putenv (const char *string) ACE_NOTSUP_RETURN (0); #elif defined (ACE_PUTENV_EQUIVALENT) return ACE_PUTENV_EQUIVALENT (const_cast <char *> (string)); -#else /* ! ACE_HAS_WINCE */ +#else return ACE_STD_NAMESPACE::putenv (const_cast <char *> (string)); #endif /* ACE_LACKS_PUTENV && ACE_HAS_SETENV */ } @@ -430,7 +416,7 @@ ACE_OS::rand_r (unsigned int *seed) # endif /* ACE_LACKS_RAND_R */ } -# if !defined (ACE_LACKS_REALPATH) +#if !defined (ACE_LACKS_REALPATH) ACE_INLINE char * ACE_OS::realpath (const char *file_name, char *resolved_name) @@ -462,7 +448,7 @@ ACE_OS::realpath (const wchar_t *file_name, # endif /* ! ACE_WIN32 */ } # endif /* ACE_HAS_WCHAR */ -#endif /* ACE_HAS_WINCE */ +#endif /* !ACE_LACKS_REALPATH */ ACE_INLINE ACE_EXIT_HOOK ACE_OS::set_exit_hook (ACE_EXIT_HOOK exit_hook) diff --git a/ACE/ace/OS_NS_string.inl b/ACE/ace/OS_NS_string.inl index 94f0380ea43..f58a30520bc 100644 --- a/ACE/ace/OS_NS_string.inl +++ b/ACE/ace/OS_NS_string.inl @@ -403,8 +403,6 @@ ACE_OS::strstr (const wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSTR) return ACE_OS::wcsstr_emulation (s, t); -# elif defined (HPUX) - return const_cast <const wchar_t *> (::wcswcs (s, t)); # else /* ACE_LACKS_WCSSTR */ return const_cast <const wchar_t *> (::wcsstr (s, t)); # endif /* ACE_LACKS_WCSSTR */ @@ -423,8 +421,6 @@ ACE_OS::strstr (wchar_t *s, const wchar_t *t) { # if defined (ACE_LACKS_WCSSTR) return ACE_OS::wcsstr_emulation (s, t); -# elif defined (HPUX) - return ::wcswcs (s, t); # else /* ACE_LACKS_WCSSTR */ return ::wcsstr (s, t); # endif /* ACE_LACKS_WCSSTR */ diff --git a/ACE/ace/OS_NS_stropts.inl b/ACE/ace/OS_NS_stropts.inl index 547a80cb3d5..203e090a19d 100644 --- a/ACE/ace/OS_NS_stropts.inl +++ b/ACE/ace/OS_NS_stropts.inl @@ -13,11 +13,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if defined (ACE_LACKS_CONST_STRBUF_PTR) -typedef struct strbuf *ACE_STRBUF_TYPE; -#else typedef const struct strbuf *ACE_STRBUF_TYPE; -#endif /* ACE_LACKS_CONST_STRBUF_PTR */ ACE_INLINE ACE_Str_Buf::ACE_Str_Buf (void *b, int l, int max) diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl index 905b0b5e08a..5ff514997b5 100644 --- a/ACE/ace/OS_NS_sys_mman.inl +++ b/ACE/ace/OS_NS_sys_mman.inl @@ -45,15 +45,6 @@ ACE_OS::mmap (void *addr, #endif /* !defined (ACE_WIN32) || defined (ACE_HAS_PHARLAP) */ #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) - -# if defined(ACE_HAS_WINCE) - ACE_UNUSED_ARG (addr); - if (ACE_BIT_ENABLED (flags, MAP_FIXED)) // not supported - { - errno = EINVAL; - return MAP_FAILED; - } -# else if (!ACE_BIT_ENABLED (flags, MAP_FIXED)) addr = 0; else if (addr == 0) // can not map to address 0 @@ -61,7 +52,6 @@ ACE_OS::mmap (void *addr, errno = EINVAL; return MAP_FAILED; } -# endif int nt_flags = 0; ACE_HANDLE local_handle = ACE_INVALID_HANDLE; @@ -72,14 +62,8 @@ ACE_OS::mmap (void *addr, if (ACE_BIT_ENABLED (flags, MAP_PRIVATE)) { -# if defined(ACE_HAS_WINCE) - // PAGE_WRITECOPY is not avaible on CE, but this should be the same - // as PAGE_READONLY according to MSDN - nt_flags = FILE_MAP_ALL_ACCESS; -# else prot = PAGE_WRITECOPY; nt_flags = FILE_MAP_COPY; -# endif // ACE_HAS_WINCE } else if (ACE_BIT_ENABLED (flags, MAP_SHARED)) { @@ -124,20 +108,12 @@ ACE_OS::mmap (void *addr, DWORD low_off = ACE_LOW_PART (off); DWORD high_off = ACE_HIGH_PART (off); -# if defined (ACE_HAS_WINCE) - void *addr_mapping = ::MapViewOfFile (*file_mapping, - nt_flags, - high_off, - low_off, - len); -# else void *addr_mapping = ::MapViewOfFileEx (*file_mapping, nt_flags, high_off, low_off, len, addr); -# endif /* ACE_HAS_WINCE */ // Only close this down if we used the temporary. if (file_mapping == &local_handle) @@ -154,11 +130,6 @@ ACE_OS::mmap (void *addr, flags |= ACE_OS_EXTRA_MMAP_FLAGS; # endif /* ACE_OS_EXTRA_MMAP_FLAGS */ ACE_UNUSED_ARG (file_mapping); -# if defined (ACE_OPENVMS) - //FUZZ: disable check_for_lack_ACE_OS - ::fsync(file_handle); - //FUZZ: enable check_for_lack_ACE_OS -# endif //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN ((void *) ::mmap ((ACE_MMAP_TYPE) addr, len, @@ -264,10 +235,6 @@ ACE_OS::shm_open (const ACE_TCHAR *filename, filename = buf; #endif return ::shm_open (ACE_TEXT_ALWAYS_CHAR(filename), mode, perms); -#elif defined (ACE_OPENVMS) - //FUZZ: disable check_for_lack_ACE_OS - return ::open (filename, mode, perms, ACE_TEXT("shr=get,put,upd")); - //FUZZ: enable check_for_lack_ACE_OS #else /* ! ACE_HAS_SHM_OPEN */ // Just use ::open. return ACE_OS::open (filename, mode, perms, sa); diff --git a/ACE/ace/OS_NS_sys_resource.inl b/ACE/ace/OS_NS_sys_resource.inl index dad59017602..ede0171928b 100644 --- a/ACE/ace/OS_NS_sys_resource.inl +++ b/ACE/ace/OS_NS_sys_resource.inl @@ -31,11 +31,6 @@ ACE_OS::getrusage (int who, struct rusage *ru) #if defined (ACE_HAS_GETRUSAGE) # if defined (ACE_WIN32) ACE_UNUSED_ARG (who); - -# if defined (ACE_LACKS_GETPROCESSTIMES) - ACE_UNUSED_ARG (ru); - ACE_NOTSUP_RETURN (-1); -# else FILETIME dummy_1; FILETIME dummy_2; ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetProcessTimes (::GetCurrentProcess(), @@ -45,7 +40,6 @@ ACE_OS::getrusage (int who, struct rusage *ru) &ru->ru_utime), ace_result_), int, -1); -# endif /* ACE_LACKS_WIN32_GETPROCESSTIMES */ # else # if defined (ACE_HAS_RUSAGE_WHO_ENUM) return ::getrusage ((ACE_HAS_RUSAGE_WHO_ENUM) who, ru); diff --git a/ACE/ace/OS_NS_sys_sendfile.cpp b/ACE/ace/OS_NS_sys_sendfile.cpp index a47fce717fd..6b744fd8ad1 100644 --- a/ACE/ace/OS_NS_sys_sendfile.cpp +++ b/ACE/ace/OS_NS_sys_sendfile.cpp @@ -1,9 +1,9 @@ #include "ace/OS_NS_sys_sendfile.h" #include "ace/OS_NS_sys_mman.h" -#if defined (ACE_WIN32) || defined (HPUX) +#if defined (ACE_WIN32) # include "ace/OS_NS_sys_socket.h" -#endif /* ACE_WIN32 || HPUX */ +#endif /* ACE_WIN32 */ #include "ace/OS_NS_unistd.h" @@ -50,7 +50,7 @@ ACE_OS::sendfile_emulation (ACE_HANDLE out_fd, else if (buf == MAP_FAILED) return -1; -#if defined (ACE_WIN32) || defined (HPUX) +#if defined (ACE_WIN32) ssize_t const r = ACE_OS::send (out_fd, static_cast<const char *> (buf), count); #else diff --git a/ACE/ace/OS_NS_sys_socket.cpp b/ACE/ace/OS_NS_sys_socket.cpp index e7a6a0647bb..0661b44b2b5 100644 --- a/ACE/ace/OS_NS_sys_socket.cpp +++ b/ACE/ace/OS_NS_sys_socket.cpp @@ -104,19 +104,12 @@ ACE_OS::socket_init (int version_high, int version_low) int error = WSAStartup (version_requested, &wsa_data); if (error != 0) -# if defined (ACE_HAS_WINCE) { - ACE_TCHAR fmt[] = ACE_TEXT ("%s failed, WSAGetLastError returned %d"); - ACE_TCHAR buf[80]; // @@ Eliminate magic number. - ACE_OS::snprintf (buf, 80, fmt, ACE_TEXT ("WSAStartup %d"), error); - ::MessageBox (0, buf, ACE_TEXT ("WSAStartup failed!"), MB_OK); + ACE_OS::fprintf (stderr, + "ACE_OS::socket_init; WSAStartup failed, " + "WSAGetLastError returned %d\n", + error); } -# else - ACE_OS::fprintf (stderr, - "ACE_OS::socket_init; WSAStartup failed, " - "WSAGetLastError returned %d\n", - error); -# endif /* ACE_HAS_WINCE */ ACE_OS::socket_initialized_ = 1; } @@ -136,17 +129,10 @@ ACE_OS::socket_fini () if (WSACleanup () != 0) { int error = ::WSAGetLastError (); -# if defined (ACE_HAS_WINCE) - ACE_TCHAR fmt[] = ACE_TEXT ("%s failed, WSAGetLastError returned %d"); - ACE_TCHAR buf[80]; // @@ Eliminate magic number. - ACE_OS::snprintf (buf, 80, fmt, ACE_TEXT ("WSACleanup %d"), error); - ::MessageBox (0, buf , ACE_TEXT ("WSACleanup failed!"), MB_OK); -# else ACE_OS::fprintf (stderr, "ACE_OS::socket_fini; WSACleanup failed, " "WSAGetLastError returned %d\n", error); -# endif /* ACE_HAS_WINCE */ } ACE_OS::socket_initialized_ = 0; } diff --git a/ACE/ace/OS_NS_sys_stat.h b/ACE/ace/OS_NS_sys_stat.h index 77296ab106b..3891f716b26 100644 --- a/ACE/ace/OS_NS_sys_stat.h +++ b/ACE/ace/OS_NS_sys_stat.h @@ -37,7 +37,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef struct stati64 ACE_stat; # define ACE_STAT_FUNC_NAME ::_stati64 # define ACE_WSTAT_FUNC_NAME ::_wstati64 -# elif !defined (ACE_HAS_WINCE) && defined (_MSC_VER) +# elif defined (_MSC_VER) typedef struct _stat64 ACE_stat; # define ACE_STAT_FUNC_NAME ::_stat64 # define ACE_WSTAT_FUNC_NAME ::_wstat64 @@ -52,7 +52,7 @@ typedef struct stat ACE_stat; # endif /**/ # else // Default file offset case. -# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +# if defined (ACE_WIN32) typedef struct _stat ACE_stat; # define ACE_STAT_FUNC_NAME ::_stat # define ACE_WSTAT_FUNC_NAME ::_wstat diff --git a/ACE/ace/OS_NS_sys_stat.inl b/ACE/ace/OS_NS_sys_stat.inl index b8f7c9fc829..b3a7d38e142 100644 --- a/ACE/ace/OS_NS_sys_stat.inl +++ b/ACE/ace/OS_NS_sys_stat.inl @@ -28,12 +28,7 @@ namespace ACE_OS fstat (ACE_HANDLE handle, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::fstat"); -#if defined (ACE_HAS_X86_STAT_MACROS) - // Solaris for intel uses an macro for fstat(), this is a wrapper - // for _fxstat() use of the macro. - // causes compile and runtime problems. - return ::_fxstat (_STAT_VER, handle, stp); -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) BY_HANDLE_FILE_INFORMATION fdata; if (::GetFileInformationByHandle (handle, &fdata) == FALSE) @@ -64,13 +59,8 @@ namespace ACE_OS #elif defined (ACE_MQX) return MQX_Filesystem::inst ().fstat (handle, stp); #else -# if defined (ACE_OPENVMS) - //FUZZ: disable check_for_lack_ACE_OS - ::fsync(handle); - //FUZZ: enable check_for_lack_ACE_OS -# endif return ::fstat (handle, stp); -#endif /* !ACE_HAS_X86_STAT_MACROS */ +#endif /* !ACE_WIN32 */ } // This function returns the number of bytes in the file referenced by @@ -128,11 +118,7 @@ namespace ACE_OS ACE_OS_TRACE ("ACE_OS::lstat"); # if defined (ACE_LACKS_LSTAT) return ACE_OS::stat (file, stp); -# elif defined (ACE_HAS_X86_STAT_MACROS) - // Solaris for intel uses an macro for lstat(), this macro is a - // wrapper for _lxstat(). - return ::_lxstat (_STAT_VER, file, stp); -# else /* !ACE_HAS_X86_STAT_MACROS */ +# else /* !ACE_LACKS_LSTAT */ return ::lstat (file, stp); # endif /* ACE_LACKS_LSTAT */ } @@ -153,12 +139,7 @@ namespace ACE_OS ACE_INLINE int mkdir (const char *path, mode_t mode) { -#if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (mode); - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CreateDirectory (ACE_TEXT_CHAR_TO_TCHAR (path), 0), - ace_result_), - int, -1); -#elif defined (ACE_MKDIR_LACKS_MODE) +#if defined (ACE_MKDIR_LACKS_MODE) ACE_UNUSED_ARG (mode); # if defined (ACE_MKDIR_EQUIVALENT) return ACE_MKDIR_EQUIVALENT (path); @@ -175,17 +156,12 @@ namespace ACE_OS ACE_INLINE int mkdir (const wchar_t *path, mode_t mode) { -#if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (mode); - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (CreateDirectoryW (path, 0), - ace_result_), - int, -1); -#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR) +#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) ACE_UNUSED_ARG (mode); return ::_wmkdir (path); #else return ACE_OS::mkdir (ACE_Wide_To_Ascii (path).char_rep (), mode); -#endif /* ACE_HAS_WINCE */ +#endif /* ACE_WIN32 && ACE_USES_WCHAR */ } #endif /* ACE_HAS_WCHAR */ @@ -207,45 +183,13 @@ namespace ACE_OS stat (const char *file, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::stat"); -#if defined (ACE_HAS_NONCONST_STAT) - return ::stat (const_cast <char *> (file), stp); -#elif defined (ACE_LACKS_STAT) +#if defined (ACE_LACKS_STAT) ACE_NOTSUP_RETURN (-1); -#elif defined (ACE_HAS_WINCE) - ACE_TEXT_WIN32_FIND_DATA fdata; - - int rc = 0; - HANDLE const fhandle = ::FindFirstFile (ACE_TEXT_CHAR_TO_TCHAR (file), &fdata); - if (fhandle == INVALID_HANDLE_VALUE) - { - ACE_OS::set_errno_to_last_error (); - return -1; - } - else if (fdata.nFileSizeHigh != 0) - { - errno = EINVAL; - rc = -1; - } - else - { - stp->st_mode = static_cast<mode_t>(fdata.dwFileAttributes); - stp->st_size = fdata.nFileSizeLow; - stp->st_atime = ACE_Time_Value (fdata.ftLastAccessTime).sec (); - stp->st_mtime = ACE_Time_Value (fdata.ftLastWriteTime).sec (); - stp->st_ctime = ACE_Time_Value (fdata.ftCreationTime).sec (); - } - - ::FindClose (fhandle); - return rc; -#elif defined (ACE_HAS_X86_STAT_MACROS) - // Solaris for intel uses an macro for stat(), this macro is a - // wrapper for _xstat(). - return ::_xstat (_STAT_VER, file, stp); #elif defined (ACE_MQX) return MQX_Filesystem::inst ().stat (file, stp); #else return ACE_STAT_FUNC_NAME (file, stp); -#endif /* ACE_HAS_NONCONST_STAT */ +#endif /* ACE_LACKS_STAT */ } #if defined (ACE_HAS_WCHAR) @@ -253,40 +197,14 @@ namespace ACE_OS stat (const wchar_t *file, ACE_stat *stp) { ACE_OS_TRACE ("ACE_OS::stat"); -#if defined (ACE_HAS_WINCE) - WIN32_FIND_DATAW fdata; - - int rc = 0; - HANDLE const fhandle = ::FindFirstFileW (file, &fdata); - if (fhandle == INVALID_HANDLE_VALUE) - { - ACE_OS::set_errno_to_last_error (); - return -1; - } - else if (fdata.nFileSizeHigh != 0) - { - errno = EINVAL; - rc = -1; - } - else - { - stp->st_mode = static_cast<mode_t>(fdata.dwFileAttributes); - stp->st_size = fdata.nFileSizeLow; - stp->st_atime = ACE_Time_Value (fdata.ftLastAccessTime).sec (); - stp->st_mtime = ACE_Time_Value (fdata.ftLastWriteTime).sec (); - stp->st_ctime = ACE_Time_Value (fdata.ftCreationTime).sec (); - } - - ::FindClose (fhandle); - return rc; -#elif defined (__BORLANDC__) \ - || defined (_MSC_VER) \ - || (defined (__MINGW32__) && !defined (__MINGW64_VERSION_MAJOR)) +#if defined (__BORLANDC__) \ + || defined (_MSC_VER) \ + || (defined (__MINGW32__) && !defined (__MINGW64_VERSION_MAJOR)) return ACE_WSTAT_FUNC_NAME (file, stp); -#else /* ACE_HAS_WINCE */ +#else ACE_Wide_To_Ascii nfile (file); return ACE_OS::stat (nfile.char_rep (), stp); -#endif /* ACE_HAS_WINCE */ +#endif /* __BORLANDC__ */ } #endif /* ACE_HAS_WCHAR */ diff --git a/ACE/ace/OS_NS_sys_time.inl b/ACE/ace/OS_NS_sys_time.inl index ba9ec109a7b..8ebfb405853 100644 --- a/ACE/ace/OS_NS_sys_time.inl +++ b/ACE/ace/OS_NS_sys_time.inl @@ -26,25 +26,10 @@ ACE_OS::gettimeofday () } return ACE_Time_Value (ts); - -#elif defined (ACE_WIN32) && defined (ACE_LACKS_GETSYSTEMTIMEASFILETIME) - SYSTEMTIME tsys; - FILETIME tfile; - ::GetSystemTime (&tsys); - ::SystemTimeToFileTime (&tsys, &tfile); - return ACE_Time_Value (tfile); #elif defined (ACE_WIN32) FILETIME tfile; ::GetSystemTimeAsFileTime (&tfile); return ACE_Time_Value (tfile); -#elif defined (ACE_HAS_AIX_HI_RES_TIMER) - timebasestruct_t tb; - - ::read_real_time (&tb, TIMEBASE_SZ); - ::time_base_to_time (&tb, TIMEBASE_SZ); - - tv.tv_sec = tb.tb_high; - tv.tv_usec = tb.tb_low / 1000L; #else # if defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) || \ defined (ACE_HAS_VOIDPTR_GETTIMEOFDAY) || \ diff --git a/ACE/ace/OS_NS_sys_utsname.cpp b/ACE/ace/OS_NS_sys_utsname.cpp index b073a641a59..604947b5825 100644 --- a/ACE/ace/OS_NS_sys_utsname.cpp +++ b/ACE/ace/OS_NS_sys_utsname.cpp @@ -164,8 +164,6 @@ ACE_OS::uname (ACE_utsname *name) # endif case PROCESSOR_ARCHITECTURE_UNKNOWN: default: - // @@ We could provide WinCE specific info here. But let's - // defer that to some later point. ACE_OS::strcpy (processor, "Unknown"); break; } diff --git a/ACE/ace/OS_NS_time.cpp b/ACE/ace/OS_NS_time.cpp index 526507eeb1b..3303e0588b4 100644 --- a/ACE/ace/OS_NS_time.cpp +++ b/ACE/ace/OS_NS_time.cpp @@ -11,212 +11,8 @@ #include "ace/OS_NS_Thread.h" #include "ace/Object_Manager_Base.h" -#if defined (ACE_HAS_WINCE) -# include "ace/OS_NS_stdio.h" /* Need ACE_OS::sprintf() */ - -namespace -{ - ACE_TCHAR const * const ACE_OS_day_of_week_name[] = - { - ACE_TEXT ("Sun"), - ACE_TEXT ("Mon"), - ACE_TEXT ("Tue"), - ACE_TEXT ("Wed"), - ACE_TEXT ("Thu"), - ACE_TEXT ("Fri"), - ACE_TEXT ("Sat") - }; - - ACE_TCHAR const * const ACE_OS_month_name[] = - { - ACE_TEXT ("Jan"), - ACE_TEXT ("Feb"), - ACE_TEXT ("Mar"), - ACE_TEXT ("Apr"), - ACE_TEXT ("May"), - ACE_TEXT ("Jun"), - ACE_TEXT ("Jul"), - ACE_TEXT ("Aug"), - ACE_TEXT ("Sep"), - ACE_TEXT ("Oct"), - ACE_TEXT ("Nov"), - ACE_TEXT ("Dec") - }; - - static ACE_TCHAR const ACE_OS_CTIME_R_FMTSTR[] = ACE_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); -} /* end blank namespace */ -#endif /* ACE_HAS_WINCE */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL -# if defined (ACE_HAS_WINCE) -ACE_TCHAR * -ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) -{ - // buflen must be at least 26 wchar_t long. - if (buflen < 26) // Again, 26 is a magic number. - { - errno = ERANGE; - return 0; - } - // This is really stupid, converting FILETIME to timeval back and - // forth. It assumes FILETIME and DWORDLONG are the same structure - // internally. - ULARGE_INTEGER _100ns; - _100ns.QuadPart = (DWORDLONG) *clock * 10000 * 1000 - + ACE_Time_Value::FILETIME_to_timval_skew; - FILETIME file_time; - file_time.dwLowDateTime = _100ns.LowPart; - file_time.dwHighDateTime = _100ns.HighPart; - - FILETIME localtime; - SYSTEMTIME systime; - FileTimeToLocalFileTime (&file_time, &localtime); - FileTimeToSystemTime (&localtime, &systime); - ACE_OS::snprintf (buf, buflen, ACE_OS_CTIME_R_FMTSTR, - ACE_OS_day_of_week_name[systime.wDayOfWeek], - ACE_OS_month_name[systime.wMonth - 1], - systime.wDay, - systime.wHour, - systime.wMinute, - systime.wSecond, - systime.wYear); - return buf; -} -# endif /* ACE_HAS_WINCE */ - -# if defined (ACE_LACKS_DIFFTIME) -double -ACE_OS::difftime (time_t t1, time_t t0) -{ - /* return t1 - t0 in seconds */ - struct tm tms[2], *ptms[2], temp; - double seconds; - int swap = 0; - - /* extract the tm structure from time_t */ - ptms[1] = ::gmtime_r (&t1, &tms[1]); - if (ptms[1] == 0) return 0.0; - - ptms[0] = ::gmtime_r (&t0, &tms[0]); - if (ptms[0] == 0) return 0.0; - - /* make sure t1 is > t0 */ - if (tms[1].tm_year < tms[0].tm_year) - swap = 1; - else if (tms[1].tm_year == tms[0].tm_year) - { - if (tms[1].tm_yday < tms[0].tm_yday) - swap = 1; - else if (tms[1].tm_yday == tms[0].tm_yday) - { - if (tms[1].tm_hour < tms[0].tm_hour) - swap = 1; - else if (tms[1].tm_hour == tms[0].tm_hour) - { - if (tms[1].tm_min < tms[0].tm_min) - swap = 1; - else if (tms[1].tm_min == tms[0].tm_min) - { - if (tms[1].tm_sec < tms[0].tm_sec) - swap = 1; - } - } - } - } - - if (swap) - temp = tms[0], tms[0] = tms[1], tms[1] = temp; - - seconds = 0.0; - if (tms[1].tm_year > tms[0].tm_year) - { - // Accumulate the time until t[0] catches up to t[1]'s year. - seconds = 60 - tms[0].tm_sec; - tms[0].tm_sec = 0; - tms[0].tm_min += 1; - seconds += 60 * (60 - tms[0].tm_min); - tms[0].tm_min = 0; - tms[0].tm_hour += 1; - seconds += 60*60 * (24 - tms[0].tm_hour); - tms[0].tm_hour = 0; - tms[0].tm_yday += 1; - -# define ISLEAPYEAR(y) ((y)&3u?0:(y)%25u?1:(y)/25u&12?0:1) - - if (ISLEAPYEAR(tms[0].tm_year)) - seconds += 60*60*24 * (366 - tms[0].tm_yday); - else - seconds += 60*60*24 * (365 - tms[0].tm_yday); - - tms[0].tm_yday = 0; - tms[0].tm_year += 1; - - while (tms[1].tm_year > tms[0].tm_year) - { - if (ISLEAPYEAR(tms[0].tm_year)) - seconds += 60*60*24 * 366; - else - seconds += 60*60*24 * 365; - - tms[0].tm_year += 1; - } - -# undef ISLEAPYEAR - - } - else - { - // Normalize - if (tms[1].tm_sec < tms[0].tm_sec) - { - if (tms[1].tm_min == 0) - { - if (tms[1].tm_hour == 0) - { - tms[1].tm_yday -= 1; - tms[1].tm_hour += 24; - } - tms[1].tm_hour -= 1; - tms[1].tm_min += 60; - } - tms[1].tm_min -= 1; - tms[1].tm_sec += 60; - } - tms[1].tm_sec -= tms[0].tm_sec; - - if (tms[1].tm_min < tms[0].tm_min) - { - if (tms[1].tm_hour == 0) - { - tms[1].tm_yday -= 1; - tms[1].tm_hour += 24; - } - tms[1].tm_hour -= 1; - tms[1].tm_min += 60; - } - tms[1].tm_min -= tms[0].tm_min; - - if (tms[1].tm_hour < tms[0].tm_hour) - { - tms[1].tm_yday -= 1; - tms[1].tm_hour += 24; - } - tms[1].tm_hour -= tms[0].tm_hour; - - tms[1].tm_yday -= tms[0].tm_yday; - } - - // accumulate the seconds - seconds += tms[1].tm_sec; - seconds += 60 * tms[1].tm_min; - seconds += 60*60 * tms[1].tm_hour; - seconds += 60*60*24 * tms[1].tm_yday; - - return seconds; -} -# endif /* ACE_LACKS_DIFFTIME */ - struct tm * ACE_OS::localtime_r (const time_t *t, struct tm *res) { @@ -224,51 +20,6 @@ ACE_OS::localtime_r (const time_t *t, struct tm *res) #if defined (ACE_HAS_TR24731_2005_CRT) ACE_SECURECRTCALL (localtime_s (res, t), struct tm *, 0, res); return res; -#elif defined (ACE_HAS_WINCE) - // This is really stupid, converting FILETIME to timeval back and - // forth. It assumes FILETIME and DWORDLONG are the same structure - // internally. - - TIME_ZONE_INFORMATION pTz; - - const unsigned short int __mon_yday[2][13] = - { - /* Normal years. */ - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - /* Leap years. */ - { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } - }; - - ULARGE_INTEGER _100ns; - ::GetTimeZoneInformation (&pTz); - - _100ns.QuadPart = (DWORDLONG) *t * 10000 * 1000 + ACE_Time_Value::FILETIME_to_timval_skew; - FILETIME file_time; - file_time.dwLowDateTime = _100ns.LowPart; - file_time.dwHighDateTime = _100ns.HighPart; - - FILETIME localtime; - SYSTEMTIME systime; - FileTimeToLocalFileTime (&file_time, &localtime); - FileTimeToSystemTime (&localtime, &systime); - - res->tm_hour = systime.wHour; - res->tm_isdst = pTz.DaylightBias != 0; - - int iLeap; - iLeap = (res->tm_year % 4 == 0 && (res->tm_year% 100 != 0 || res->tm_year % 400 == 0)); - // based on leap select which group to use - - res->tm_mday = systime.wDay; - res->tm_min = systime.wMinute; - res->tm_mon = systime.wMonth - 1; - res->tm_sec = systime.wSecond; - res->tm_wday = systime.wDayOfWeek; - res->tm_yday = __mon_yday[iLeap][systime.wMonth] + systime.wDay; - res->tm_year = systime.wYear;// this the correct year but bias the value to start at the 1900 - res->tm_year = res->tm_year - 1900; - - return res; #elif defined (ACE_LACKS_LOCALTIME_R) ACE_OS_GUARD @@ -291,28 +42,11 @@ time_t ACE_OS::mktime (struct tm *t) { ACE_OS_TRACE ("ACE_OS::mktime"); -# if defined (ACE_HAS_WINCE) - SYSTEMTIME t_sys; - FILETIME t_file; - t_sys.wSecond = t->tm_sec; - t_sys.wMinute = t->tm_min; - t_sys.wHour = t->tm_hour; - t_sys.wDay = t->tm_mday; - t_sys.wMonth = t->tm_mon + 1; // SYSTEMTIME is 1-indexed, tm is 0-indexed - t_sys.wYear = t->tm_year + 1900; // SYSTEMTIME is real; tm is since 1900 - t_sys.wDayOfWeek = t->tm_wday; // Ignored in below function call. - t_sys.wMilliseconds = 0; - if (SystemTimeToFileTime (&t_sys, &t_file) == 0) - return -1; - ACE_Time_Value tv (t_file); - return tv.sec (); -# else -# if defined (ACE_HAS_THREADS) && !defined (ACE_HAS_MT_SAFE_MKTIME) +#if defined (ACE_HAS_THREADS) && !defined (ACE_HAS_MT_SAFE_MKTIME) ACE_OS_GUARD -# endif /* ACE_HAS_THREADS && ! ACE_HAS_MT_SAFE_MKTIME */ +#endif /* ACE_HAS_THREADS && ! ACE_HAS_MT_SAFE_MKTIME */ return std::mktime (t); -# endif /* ACE_HAS_WINCE */ } #if defined (ACE_LACKS_STRPTIME) diff --git a/ACE/ace/OS_NS_time.h b/ACE/ace/OS_NS_time.h index d155dc3636f..615d591c424 100644 --- a/ACE/ace/OS_NS_time.h +++ b/ACE/ace/OS_NS_time.h @@ -116,17 +116,6 @@ inline struct tm *ace_localtime_r_helper (const time_t *clock, struct tm *res) } #endif /* !ACE_LACKS_LOCALTIME_R */ -#if !defined (ACE_LACKS_DIFFTIME) -# if defined (_WIN32_WCE) && ((_WIN32_WCE >= 0x600) && (_WIN32_WCE <= 0x700)) && !defined (_USE_32BIT_TIME_T) \ - && defined (_MSC_VER) - // The WinCE 6.0/7.0 SDK ships with a diff_time that uses __time32_t as type - // not time_t. This resolves in compilation warnings because time_t - // can be 64bit. Disable at this moment the warning for just this method - // else we get two compile warnings on each source file that includes - // this file. -# pragma warning (push) -# pragma warning (disable: 4244) -# endif /// Helper for the ACE_OS::difftime() function /** * We moved the difftime code that used to be in ACE_OS::difftime() @@ -140,19 +129,9 @@ inline double ace_difftime(time_t t1, time_t t0) { return difftime (t1, t0); } -# if defined (_WIN32_WCE) && ((_WIN32_WCE >= 0x600) && (_WIN32_WCE <= 0x700)) && !defined (_USE_32BIT_TIME_T) \ - && defined (_MSC_VER) -# pragma warning (pop) -# endif -#endif /* !ACE_LACKS_DIFFTIME */ # if defined (ACE_WIN32) -// 64-bit quad-word definitions. -typedef unsigned __int64 ACE_QWORD; typedef unsigned __int64 ACE_hrtime_t; -inline ACE_QWORD ACE_MAKE_QWORD (DWORD lo, DWORD hi) { return ACE_QWORD (lo) | (ACE_QWORD (hi) << 32); } -inline DWORD ACE_LOW_DWORD (ACE_QWORD q) { return (DWORD) q; } -inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); } # elif defined (_TNS_R_TARGET) typedef long long ACE_hrtime_t; # else /* !ACE_WIN32 */ @@ -197,18 +176,10 @@ namespace ACE_OS ACE_NAMESPACE_INLINE_FUNCTION ACE_TCHAR *ctime (const time_t *t); -#if defined (ACE_HAS_WINCE) && !defined (_DEBUG) - extern ACE_EXPORT_MACRO -#else ACE_NAMESPACE_INLINE_FUNCTION -#endif ACE_TCHAR *ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen); -#if !defined (ACE_LACKS_DIFFTIME) ACE_NAMESPACE_INLINE_FUNCTION -#else - extern ACE_Export -#endif /* ! ACE_LACKS_DIFFTIME */ double difftime (time_t t1, time_t t0); diff --git a/ACE/ace/OS_NS_time.inl b/ACE/ace/OS_NS_time.inl index 97be63ace24..a41b805d4d0 100644 --- a/ACE/ace/OS_NS_time.inl +++ b/ACE/ace/OS_NS_time.inl @@ -94,11 +94,6 @@ ACE_OS::ctime (const time_t *t) #if defined (ACE_LACKS_CTIME) ACE_UNUSED_ARG (t); ACE_NOTSUP_RETURN (0); -#elif defined (ACE_HAS_WINCE) - static ACE_TCHAR buf [ctime_buf_size]; - return ACE_OS::ctime_r (t, - buf, - ctime_buf_size); #elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR) return ::_wctime (t); #else @@ -119,10 +114,9 @@ ACE_OS::ctime (const time_t *t) # else return ::ctime (t); # endif /* ACE_USES_WCHAR */ -# endif /* ACE_HAS_WINCE */ +# endif /* ACE_LACKS_CTIME */ } -#if !defined (ACE_HAS_WINCE) /* CE version in OS.cpp */ ACE_INLINE ACE_TCHAR * ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) { @@ -198,7 +192,6 @@ ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen) return buf; #endif /* ACE_HAS_REENTRANT_FUNCTIONS */ } -#endif /* !ACE_HAS_WINCE */ #if defined (ACE_USES_ULONG_FOR_STAT_TIME) ACE_INLINE ACE_TCHAR * @@ -242,13 +235,11 @@ ACE_OS::localtime_r (const unsigned long *clock, #endif -#if !defined (ACE_LACKS_DIFFTIME) ACE_INLINE double ACE_OS::difftime (time_t t1, time_t t0) { return ::ace_difftime (t1, t0); } -#endif /* ! ACE_LACKS_DIFFTIME */ ACE_INLINE ACE_hrtime_t ACE_OS::gethrtime (const ACE_HRTimer_Op op) @@ -257,14 +248,6 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) #if defined (ACE_HAS_HI_RES_TIMER) ACE_UNUSED_ARG (op); return ::gethrtime (); -#elif defined (ACE_HAS_AIX_HI_RES_TIMER) - ACE_UNUSED_ARG (op); - timebasestruct_t tb; - - ::read_real_time(&tb, TIMEBASE_SZ); - ::time_base_to_time(&tb, TIMEBASE_SZ); - - return ACE_hrtime_t(tb.tb_high) * ACE_ONE_SECOND_IN_NSECS + tb.tb_low; #elif defined (ACE_WIN32) ACE_UNUSED_ARG(op); LARGE_INTEGER freq; @@ -398,8 +381,7 @@ ACE_OS::nanosleep (const struct timespec *requested, #if defined (ACE_HAS_CLOCK_GETTIME) // ::nanosleep () is POSIX 1003.1b. So is ::clock_gettime (). So, // if ACE_HAS_CLOCK_GETTIME is defined, then ::nanosleep () should - // be available on the platform. On Solaris 2.x, both functions - // require linking with -lposix4. + // be available on the platform return ::nanosleep ((ACE_TIMESPEC_PTR) requested, remaining); #else ACE_UNUSED_ARG (remaining); diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index edc64725a6f..49b5736f970 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -52,10 +52,6 @@ ACE_OS::argv_to_string (int argc, bool substitute_env_args, bool quote_args) { -#if defined (ACE_LACKS_STRENVDUP) - ACE_UNUSED_ARG (substitute_env_args); -#endif /* ACE_LACKS_STRENVDUP */ - if (argc <= 0 || argv == 0 || argv[0] == 0) return 0; @@ -67,7 +63,6 @@ ACE_OS::argv_to_string (int argc, for (int i = 0; i < argc; ++i) { -#if !defined (ACE_LACKS_STRENVDUP) // Account for environment variables. if (substitute_env_args && ACE_OS::strchr (argv[i], ACE_TEXT ('$')) != 0) @@ -98,7 +93,6 @@ ACE_OS::argv_to_string (int argc, return 0; } } -#endif /* ACE_LACKS_STRENVDUP */ // If must quote, we only do it if the arg contains spaces, or // is empty. Perhaps a check for other c | ord(c) <= 32 is in // order? @@ -261,12 +255,7 @@ ACE_OS::fork (const ACE_TCHAR *program_name) ACE_UNUSED_ARG (program_name); ACE_NOTSUP_RETURN (pid_t (-1)); # else - pid_t const pid = -# if defined (ACE_HAS_STHREADS) - ::fork1 (); -#else - ::fork (); -#endif /* ACE_HAS_STHREADS */ + pid_t const pid = ::fork (); #if !defined (ACE_HAS_MINIMAL_ACE_OS) && !defined (ACE_HAS_THREADS) @@ -308,7 +297,6 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) if (ACE_OS::argv_to_string (argv, buf) != -1) { PROCESS_INFORMATION process_info; -# if !defined (ACE_HAS_WINCE) ACE_TEXT_STARTUPINFO startup_info; ACE_OS::memset ((void *) &startup_info, 0, @@ -325,18 +313,6 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) 0, // No current directory. &startup_info, &process_info)) -# else - if (ACE_TEXT_CreateProcess (0, - buf, - 0, // No process attributes. - 0, // No thread attributes. - FALSE, // Can's inherit handles on CE - 0, // Don't create a new console window. - 0, // No environment. - 0, // No current directory. - 0, // Can't use startup info on CE - &process_info)) -# endif /* ! ACE_HAS_WINCE */ { // Free resources allocated in kernel. ACE_OS::close (process_info.hThread); @@ -422,12 +398,6 @@ ACE_OS::num_processors () return num_processors; else return -1; -#elif defined (__hpux) - struct pst_dynamic psd; - if (::pstat_getdynamic (&psd, sizeof (psd), (size_t) 1, 0) != -1) - return psd.psd_max_proc_cnt; - else - return -1; #else ACE_NOTSUP_RETURN (-1); #endif @@ -476,12 +446,6 @@ ACE_OS::num_processors_online () return num_processors; else return -1; -#elif defined (__hpux) - struct pst_dynamic psd; - if (::pstat_getdynamic (&psd, sizeof (psd), (size_t) 1, 0) != -1) - return psd.psd_proc_cnt; - else - return -1; #else ACE_NOTSUP_RETURN (-1); #endif @@ -792,10 +756,6 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf, ACE_TCHAR **&argv, bool substitute_env_args) { -#if defined (ACE_LACKS_STRENVDUP) - ACE_UNUSED_ARG (substitute_env_args); -#endif /* ACE_LACKS_STRENVDUP */ - // Reset the number of arguments argc = 0; @@ -901,7 +861,6 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf, *cp = ACE_TEXT ('\0'); -#if !defined (ACE_LACKS_STRENVDUP) // Check for environment variable substitution here. if (substitute_env_args) { argv[i] = ACE_OS::strenvdup (argp); @@ -919,7 +878,6 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf, } } else -#endif /* ACE_LACKS_STRENVDUP */ { argv[i] = ACE_OS::strdup (argp); diff --git a/ACE/ace/OS_NS_unistd.h b/ACE/ace/OS_NS_unistd.h index a8a8fc3b979..6d4f270d132 100644 --- a/ACE/ace/OS_NS_unistd.h +++ b/ACE/ace/OS_NS_unistd.h @@ -119,8 +119,8 @@ namespace ACE_OS char *const argv[]); //@{ - /// Forks and exec's a process in a manner that works on Solaris and - /// NT. argv[0] must be the full path name to the executable. + /// Forks and exec's a process in a manner that works Windows. + /// argv[0] must be the full path name to the executable. ACE_NAMESPACE_INLINE_FUNCTION pid_t fork (); diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index 5c249d1fe59..8c5d2834ade 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -16,10 +16,6 @@ # include "ace/OS_NS_stdio.h" #endif /* ACE_LACKS_ACCESS */ -#if defined (ACE_HAS_ACCESS_EMULATION) -# include "ace/os_include/os_unistd.h" -#endif /* ACE_HAS_ACCESS_EMULATION */ - #if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x690) # if defined (__RTP__) # include "ace/os_include/os_strings.h" @@ -39,23 +35,9 @@ ACE_OS::access (const char *path, int amode) { ACE_OS_TRACE ("ACE_OS::access"); #if defined (ACE_LACKS_ACCESS) -# if defined (ACE_HAS_ACCESS_EMULATION) - // @@ WINCE: There should be a Win32 API that can do this. - // Hard coded read access here. - ACE_UNUSED_ARG (amode); - FILE* handle = ACE_OS::fopen (ACE_TEXT_CHAR_TO_TCHAR(path), - ACE_TEXT ("r")); - if (handle != 0) - { - ACE_OS::fclose (handle); - return 0; - } - return -1; -# else ACE_UNUSED_ARG (path); ACE_UNUSED_ARG (amode); ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_ACCESS_EMULATION */ #elif defined(ACE_WIN32) // Windows doesn't support checking X_OK(6) # if defined (ACE_ACCESS_EQUIVALENT) @@ -73,11 +55,11 @@ ACE_OS::access (const char *path, int amode) ACE_INLINE int ACE_OS::access (const wchar_t *path, int amode) { -#if defined (ACE_WIN32) && !defined (ACE_LACKS__WACCESS) +#if defined (ACE_WIN32) return ::_waccess (path, amode); -#else /* ACE_WIN32 && !ACE_HAS_WINCE */ +#else /* ACE_WIN32 */ return ACE_OS::access (ACE_Wide_To_Ascii (path).char_rep (), amode); -#endif /* ACE_WIN32 && !ACE_LACKS__WACCESS */ +#endif /* ACE_WIN32 */ } #endif /* ACE_HAS_WCHAR */ @@ -101,7 +83,7 @@ ACE_OS::getpagesize () SYSTEM_INFO sys_info; ::GetSystemInfo (&sys_info); return (long) sys_info.dwPageSize; -#elif defined (_SC_PAGESIZE) && !defined (ACE_HAS_NOTSUP_SC_PAGESIZE) +#elif defined (_SC_PAGESIZE) return ::sysconf (_SC_PAGESIZE); #elif defined (ACE_HAS_GETPAGESIZE) return ::getpagesize (); @@ -127,26 +109,18 @@ ACE_INLINE int ACE_OS::chdir (const char *path) { ACE_OS_TRACE ("ACE_OS::chdir"); -#if defined (ACE_LACKS_CHDIR) - ACE_UNUSED_ARG (path); - ACE_NOTSUP_RETURN (-1); -#elif defined (ACE_HAS_NONCONST_CHDIR) - return ::chdir (const_cast<char *> (path)); -#elif defined (ACE_CHDIR_EQUIVALENT) +#if defined (ACE_CHDIR_EQUIVALENT) return ACE_CHDIR_EQUIVALENT (path); #else return ::chdir (path); -#endif /* ACE_HAS_NONCONST_CHDIR */ +#endif /* ACE_CHDIR_EQUIVALENT */ } #if defined (ACE_HAS_WCHAR) ACE_INLINE int ACE_OS::chdir (const wchar_t *path) { -#if defined (ACE_LACKS_CHDIR) - ACE_UNUSED_ARG (path); - ACE_NOTSUP_RETURN (-1); -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) return ::_wchdir (path); #else /* ACE_WIN32 */ return ACE_OS::chdir (ACE_Wide_To_Ascii (path).char_rep ()); @@ -157,11 +131,7 @@ ACE_OS::chdir (const wchar_t *path) ACE_INLINE int ACE_OS::rmdir (const char *path) { -#if defined (ACE_HAS_WINCE) - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::RemoveDirectory (ACE_TEXT_CHAR_TO_TCHAR(path)), - ace_result_), - int, -1); -#elif defined (ACE_RMDIR_EQUIVALENT) +#if defined (ACE_RMDIR_EQUIVALENT) return ACE_RMDIR_EQUIVALENT (path); #else return ::rmdir (path); @@ -172,16 +142,12 @@ ACE_OS::rmdir (const char *path) ACE_INLINE int ACE_OS::rmdir (const wchar_t *path) { -#if defined (ACE_HAS_WINCE) - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::RemoveDirectoryW (path), - ace_result_), - int, -1); -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) return ::_wrmdir (path); #else ACE_Wide_To_Ascii n_path (path); return ACE_OS::rmdir (n_path.char_rep ()); -#endif /* ACE_HAS_WINCE */ +#endif /* ACE_WIN32 */ } #endif /* ACE_HAS_WCHAR */ @@ -257,7 +223,7 @@ ACE_OS::dup(ACE_HANDLE handle, pid_t pid) #else ACE_UNUSED_ARG (pid); return ::dup(handle); -#endif /*ACE_WIN32 && !ACE_HAS_WINCE*/ +#endif /* ACE_LACKS_DUP */ } ACE_INLINE int @@ -414,11 +380,7 @@ ACE_INLINE char * ACE_OS::getcwd (char *buf, size_t size) { ACE_OS_TRACE ("ACE_OS::getcwd"); -#if defined (ACE_LACKS_GETCWD) - ACE_UNUSED_ARG (buf); - ACE_UNUSED_ARG (size); - ACE_NOTSUP_RETURN (0); -#elif defined (ACE_GETCWD_EQUIVALENT) +#if defined (ACE_GETCWD_EQUIVALENT) return ACE_GETCWD_EQUIVALENT (buf, static_cast<int> (size)); #elif defined (ACE_WIN32) return ::getcwd (buf, static_cast<int> (size)); @@ -431,11 +393,7 @@ ACE_OS::getcwd (char *buf, size_t size) ACE_INLINE wchar_t * ACE_OS::getcwd (wchar_t *buf, size_t size) { -# if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (buf); - ACE_UNUSED_ARG (size); - ACE_NOTSUP_RETURN (0); -# elif defined (ACE_WIN32) +# if defined (ACE_WIN32) return ::_wgetcwd (buf, static_cast<int> (size)); # else char *narrow_buf = new char[size]; @@ -566,7 +524,7 @@ ACE_OS::hostname (char name[], size_t maxnamelen) ACE_UNUSED_ARG (maxnamelen); ACE_NOTSUP_RETURN (-1); # endif /* ACE_HAS_PHARLAP_RT */ -#elif defined (ACE_VXWORKS) || defined (ACE_HAS_WINCE) +#elif defined (ACE_VXWORKS) return ::gethostname (name, maxnamelen); #elif defined (ACE_WIN32) if (::gethostname (name, ACE_Utils::truncate_cast<int> (maxnamelen)) == 0) @@ -607,11 +565,11 @@ ACE_OS::hostname (char name[], size_t maxnamelen) ACE_INLINE int ACE_OS::hostname (wchar_t name[], size_t maxnamelen) { -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (GetComputerNameW (name, LPDWORD (&maxnamelen)), ace_result_), int, -1); -#else /* ACE_WIN32 && !ACE_HAS_WINCE */ +#else /* ACE_WIN32 */ // Emulate using the char version char *char_name = 0; @@ -622,7 +580,7 @@ ACE_OS::hostname (wchar_t name[], size_t maxnamelen) delete [] char_name; return result; -#endif /* ACE_WIN32 && !ACE_HAS_WINCE */ +#endif /* ACE_WIN32 */ } #endif /* ACE_HAS_WCHAR */ @@ -1097,18 +1055,10 @@ ACE_OS::sysconf (int name) } ACE_INLINE long -ACE_OS::sysinfo (int cmd, char *buf, long count) +ACE_OS::sysinfo (int /*cmd*/, char */*buf*/, long /*count*/) { ACE_OS_TRACE ("ACE_OS::sysinfo"); -#if defined (ACE_HAS_SYSV_SYSINFO) - return ::sysinfo (cmd, buf, count); -#else - ACE_UNUSED_ARG (cmd); - ACE_UNUSED_ARG (buf); - ACE_UNUSED_ARG (count); - ACE_NOTSUP_RETURN (0); -#endif /* ACE_HAS_SYSV_SYSINFO */ } ACE_INLINE int @@ -1214,20 +1164,14 @@ ACE_INLINE int ACE_OS::unlink (const char *path) { ACE_OS_TRACE ("ACE_OS::unlink"); -# if defined (ACE_HAS_NONCONST_UNLINK) - return ::unlink (const_cast<char *> (path)); -# elif defined (ACE_HAS_WINCE) - // @@ The problem is, DeleteFile is not actually equals to unlink. ;( - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFile (ACE_TEXT_CHAR_TO_TCHAR (path)), ace_result_), - int, -1); -# elif defined (ACE_LACKS_UNLINK) +#if defined (ACE_LACKS_UNLINK) ACE_UNUSED_ARG (path); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_UNLINK_EQUIVALENT) +#elif defined (ACE_UNLINK_EQUIVALENT) return ACE_UNLINK_EQUIVALENT (path); -# else +#else return ::unlink (path); -# endif /* ACE_HAS_NONCONST_UNLINK */ +#endif /* ACE_LACKS_UNLINK */ } #if defined (ACE_HAS_WCHAR) @@ -1235,16 +1179,12 @@ ACE_INLINE int ACE_OS::unlink (const wchar_t *path) { ACE_OS_TRACE ("ACE_OS::unlink"); -# if defined (ACE_HAS_WINCE) - // @@ The problem is, DeleteFile is not actually equals to unlink. ;( - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFileW (path), ace_result_), - int, -1); -# elif defined (ACE_WIN32) +# if defined (ACE_WIN32) return ::_wunlink (path); # else ACE_Wide_To_Ascii npath (path); return ACE_OS::unlink (npath.char_rep ()); -# endif /* ACE_HAS_WINCE */ +# endif /* ACE_WIN32 */ } #endif /* ACE_HAS_WCHAR */ diff --git a/ACE/ace/OS_TLI.h b/ACE/ace/OS_TLI.h index 07b8ace2fa2..ab9fb5f3724 100644 --- a/ACE/ace/OS_TLI.h +++ b/ACE/ace/OS_TLI.h @@ -39,20 +39,8 @@ struct t_uderr { }; struct netbuf { }; # else /* !(ACE_HAS_TLI || ACE_HAS_XTI) */ - -# if defined (ACE_HAS_CONFLICTING_XTI_MACROS) - // Make sure tcp.h gets included before sys/xti.h. -# include "ace/os_include/netinet/os_tcp.h" -# undef TCP_NODELAY -# undef TCP_MAXSEG -# endif /* ACE_HAS_CONFLICTING_XTI_MACROS */ - # if defined (ACE_HAS_XTI) -# if defined (ACE_HAS_SYS_XTI_H) /* Nonstandard header placement */ -# define class ace_xti_class -# include /**/ <sys/xti.h> -# undef class -# elif defined (ACE_HAS_FORE_ATM_XTI) +# if defined (ACE_HAS_FORE_ATM_XTI) # include /**/ <fore_xti/xti_user_types.h> # include /**/ <fore_xti/xti.h> # include /**/ <fore_xti/xti_atm.h> @@ -68,7 +56,6 @@ struct netbuf { }; // desired, local or peer, while t_getprotaddr() gets both at once. // t_getname() has values defined for the type, so these aren't defined // for XTI systems. So, define them here for ACE API users to use. - // These values were taken from sys/tiuser.h on Solaris. # if !defined (LOCALNAME) # define LOCALNAME 0 # endif @@ -113,18 +100,6 @@ extern "C" } # endif /* !ACE_HAS_TLI_PROTOTYPES */ -# if defined (ACE_HAS_TIUSER_H) -# include /**/ <tiuser.h> -# else - /* What to do here??? Is there a tli.h? */ -# endif /* ACE_HAS_TIUSER_H */ - -# if defined (ACE_HAS_SVR4_TLI) - // t_getname is a TLI extension added by some platforms before XTI - // was widely available. However, it's not often in the system's - // header files. Sun OS, for example, is like this. - extern "C" int t_getname (int, struct netbuf *, int); -# endif /* ACE_HAS_SVR4_TLI */ # endif /* !ACE_HAS_XTI */ # endif /* ACE_HAS_XTI || ACE_HAS_TLI */ diff --git a/ACE/ace/OS_TLI.inl b/ACE/ace/OS_TLI.inl index e2bc18c830f..48d55ccc646 100644 --- a/ACE/ace/OS_TLI.inl +++ b/ACE/ace/OS_TLI.inl @@ -87,11 +87,7 @@ ACE_INLINE void t_error (const char *errmsg) { #if defined (ACE_HAS_TLI) -#if defined (ACE_HAS_BROKEN_T_ERROR) - ::t_error (const_cast<char *> (errmsg)); -#else ::t_error (errmsg); -#endif /* ACE_HAS_BROKEN_T_ERROR */ #else ACE_UNUSED_ARG (errmsg); #endif /* ACE_HAS_TLI */ @@ -163,16 +159,13 @@ t_getname (ACE_HANDLE handle, struct netbuf *namep, int type) else namep->len = peer.addr.len; return 0; - -#elif defined (ACE_HAS_SVR4_TLI) - return ::t_getname (handle, namep, type); #else ACE_UNUSED_ARG (handle); ACE_UNUSED_ARG (namep); ACE_UNUSED_ARG (type); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ } ACE_INLINE int diff --git a/ACE/ace/OS_Thread_Adapter.cpp b/ACE/ace/OS_Thread_Adapter.cpp index 514cc692a40..bdf52d7fd50 100644 --- a/ACE/ace/OS_Thread_Adapter.cpp +++ b/ACE/ace/OS_Thread_Adapter.cpp @@ -57,23 +57,6 @@ ACE_OS_Thread_Adapter::invoke () // not to access <this> anywhere below this point. delete this; -#if defined (ACE_NEEDS_LWP_PRIO_SET) - // On SunOS, the LWP priority needs to be set in order to get - // preemption when running in the RT class. This is the ACE way to - // do that . . . - ACE_hthread_t thr_handle; - ACE_OS::thr_self (thr_handle); - int prio; - - // thr_getprio () on the current thread should never fail. - ACE_OS::thr_getprio (thr_handle, prio); - - // ACE_OS::thr_setprio () has the special logic to set the LWP priority, - // if running in the RT class. - ACE_OS::thr_setprio (prio); - -#endif /* ACE_NEEDS_LWP_PRIO_SET */ - if (cancel_flags != 0) { // If both flags are set, ignore this. diff --git a/ACE/ace/OS_main.cpp b/ACE/ace/OS_main.cpp index 74b917da9f7..1fbacb1ba93 100644 --- a/ACE/ace/OS_main.cpp +++ b/ACE/ace/OS_main.cpp @@ -51,7 +51,7 @@ ace_os_main_i (int argc, char *argv[]) /* user's entry point, e.g., main */ ACE_END_VERSIONED_NAMESPACE_DECL -# elif !defined (ACE_HAS_WINCE) +# else ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -94,60 +94,9 @@ ace_os_main_i (ACE_Main_Base &mbase, int argc, char *argv[]) /* user's entry poi ACE_END_VERSIONED_NAMESPACE_DECL -# else /* ACE_HAS_WINCE */ +# endif /* !ACE_WIN32 */ -// CE only gets a command line string; no argv. So we need to convert it -// when the main entrypoint expects argc/argv. ACE_ARGV supports this. -# include "ace/OS_NS_string.h" -# include "ace/OS_NS_ctype.h" -# include "ace/ACE.h" -# include "ace/ARGV.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Main_Base::~ACE_Main_Base () -{ -} - -int ACE_Main_Base::run (HINSTANCE, - HINSTANCE, - LPWSTR lpCmdLine, - int) -{ - ACE_TCHAR cmdline[1024]; - ACE_TCHAR msg_file [MAXPATHLEN]; - if (ACE_TEXT_GetModuleFileName (0, msg_file, MAXPATHLEN)) - { - bool quote = false; - for (size_t i(0); !quote && msg_file[i]; ++i) - { - if (ACE_OS::ace_isspace (msg_file[i])) quote = true; - } - ACE_TCHAR *cmd_iter = cmdline; - if (quote) - { - *cmd_iter++ = ACE_TEXT ('"'); - } - ACE_OS::strcpy (cmd_iter, msg_file); - ACE_OS::strcat (cmd_iter, quote ? ACE_TEXT ("\" ") : ACE_TEXT (" ")); - } - else - { - ACE_OS::strcpy (cmdline, ACE_TEXT ("program ")); - } - ACE_OS::strcat (cmdline, ACE_TEXT_WCHAR_TO_TCHAR (lpCmdLine)); - ACE_ARGV ce_argv (cmdline); - ACE::init (); - ACE_MAIN_OBJECT_MANAGER - int const i = this->run_i (ce_argv.argc (), ce_argv.argv ()); - ACE::fini (); - return i; -} -ACE_END_VERSIONED_NAMESPACE_DECL - -# endif /* !ACE_HAS_WINCE */ - -#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ +#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ #endif /* ACE_DOESNT_DEFINE_MAIN */ diff --git a/ACE/ace/OS_main.h b/ACE/ace/OS_main.h index 982875accbb..873e4e0ecb4 100644 --- a/ACE/ace/OS_main.h +++ b/ACE/ace/OS_main.h @@ -27,10 +27,6 @@ # if !defined (ACE_DOESNT_DEFINE_MAIN) -# if defined (ACE_HAS_RTEMS) -extern char* rtems_progname; -# endif /* ACE_HAS_RTEMS */ - #if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x640) && defined (__RTP__) # include <resolvLib.h> #endif @@ -101,25 +97,6 @@ ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., main */ \ int \ ace_main_i -# elif defined (ACE_HAS_RTEMS) - -# define main \ -ACE_MAIN (int, char *[]); /* forward decl to gobble up the 'int' if there is one */ \ -ACE_BEGIN_VERSIONED_NAMESPACE_DECL \ -int ace_os_main_i (int, char *[]); \ -ACE_END_VERSIONED_NAMESPACE_DECL \ -int \ -ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., main */ \ -{ \ - if ((argc > 0) && argv && argv[0]) \ - rtems_progname = argv[0]; \ - else \ - rtems_progname = "RTEMS"; \ - return ace_os_main_i (argc, argv); /* what the user calls "main" */ \ -} \ -int \ -ace_main_i - # elif defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x640) && defined (__RTP__) # define main \ @@ -151,7 +128,7 @@ ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., main */ \ ACE_Proper_Export_Flag int \ ace_main_i -# elif !defined (ACE_HAS_WINCE) +# else # if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) @@ -230,78 +207,8 @@ int \ ace_main_i # endif /* ACE_WIN32 && ACE_USES_WCHAR */ - -# else /* ACE_HAS_WINCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Export ACE_Main_Base -{ -public: - virtual ~ACE_Main_Base (); - int run (HINSTANCE, HINSTANCE, LPWSTR, int); - virtual int run_i (int, ACE_TCHAR *[]) = 0; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# if defined (ACE_TMAIN) // Use WinMain on CE; others give warning/error. -# undef ACE_TMAIN -# endif // ACE_TMAIN - -// Support for ACE_TMAIN, which is a recommended way. It would be nice if -// CE had CommandLineToArgvW()... but it's only on NT3.5 and up. - -# define ACE_TMAIN \ -ace_tmain_i (int, ACE_TCHAR *[]); \ -class ACE_Main : public ACE_Main_Base {int run_i (int argc, ACE_TCHAR *argv[]);}; \ -inline int ACE_Main::run_i (int argc, ACE_TCHAR *argv[]) \ -{ \ - return ace_tmain_i (argc, argv); \ -} \ -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) \ -{ \ - ACE_Main m; \ - return m.run (hInstance, hPrevInstance, lpCmdLine, nCmdShow); \ -} \ -int ace_tmain_i - -// Support for wchar_t but still can't fit to CE because of the command -// line parameters. -# define wmain \ -ace_wmain_i (int, ACE_TCHAR *[]); \ -ACE_Export int ace_os_winwmain_i (ACE_Main_Base&, hInstance, hPrevInstance, lpCmdLine, nCmdShow); /* forward declaration */ \ -class ACE_Main : public ACE_Main_Base {int run_i (int argc, ACE_TCHAR *argv[]);}; \ -inline int ACE_Main::run_i (int argc, ACE_TCHAR *argv[]) \ -{ \ - return ace_wmain_i (argc, argv); \ -} \ -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) \ -{ \ - return ace_os_winwmain_i (hInstance, hPrevInstance, lpCmdLine, nCmdShow); \ -} \ -int ace_wmain_i - -// Supporting legacy 'main' is A LOT easier for users than changing existing -// code on WinCE. Unfortunately, evc 3 can't grok a #include within the macro -// expansion, so it needs to go out here. -# include "ace/Argv_Type_Converter.h" -# define main \ -ace_main_i (int, ACE_TCHAR *[]); \ -ACE_Export int ace_os_winmain_i (ACE_Main_Base&, hInstance, hPrevInstance, lpCmdLine, nCmdShow); /* forward declaration */ \ -class ACE_Main : public ACE_Main_Base {int run_i (int argc, ACE_TCHAR *argv[]);}; \ -inline int ACE_Main::run_i (int argc, ACE_TCHAR *argv[]) \ -{ \ - return ace_main_i (argc, argv); \ -} \ -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) \ -{ \ - return ace_os_winmain_i (hInstance, hPrevInstance, lpCmdLine, nCmdShow); \ -} \ -int ace_main_i - # endif -# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ +# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ # ifdef ACE_MQX # include <iar_dynamic_init.h> diff --git a/ACE/ace/Object_Manager.cpp b/ACE/ace/Object_Manager.cpp index 56edf6ec314..55701947175 100644 --- a/ACE/ace/Object_Manager.cpp +++ b/ACE/ace/Object_Manager.cpp @@ -28,7 +28,7 @@ #include "ace/Null_Mutex.h" #include "ace/Mutex.h" #include "ace/RW_Thread_Mutex.h" -#if defined (ACE_DISABLE_WIN32_ERROR_WINDOWS) && !defined (ACE_HAS_WINCE) +#if defined (ACE_DISABLE_WIN32_ERROR_WINDOWS) # include "ace/OS_NS_stdlib.h" # include /**/ <crtdbg.h> #endif // ACE_DISABLE_WIN32_ERROR_WINDOWS @@ -53,7 +53,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Note the following fix was derived from that proposed by Jochen Kalmbach // http://blog.kalmbachnet.de/?postid=75 -#if defined (ACE_DISABLE_WIN32_ERROR_WINDOWS) && !defined (ACE_HAS_WINCE) +#if defined (ACE_DISABLE_WIN32_ERROR_WINDOWS) LPTOP_LEVEL_EXCEPTION_FILTER WINAPI ACEdisableSetUnhandledExceptionFilter ( LPTOP_LEVEL_EXCEPTION_FILTER /*lpTopLevelExceptionFilter*/) { @@ -257,7 +257,7 @@ ACE_Object_Manager::init () } # endif /* ACE_HAS_TSS_EMULATION */ -#if defined (ACE_DISABLE_WIN32_ERROR_WINDOWS) && !defined (ACE_HAS_WINCE) +#if defined (ACE_DISABLE_WIN32_ERROR_WINDOWS) #if defined (_DEBUG) && (defined (_MSC_VER) || defined (__INTEL_COMPILER) || defined (__MINGW32__)) _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); diff --git a/ACE/ace/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp index 0a1c0767186..3db3504db52 100644 --- a/ACE/ace/Object_Manager_Base.cpp +++ b/ACE/ace/Object_Manager_Base.cpp @@ -216,26 +216,20 @@ ACE_OS_Object_Manager::init () if (this == instance_) { # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -# if defined (ACE_HAS_WINCE_BROKEN_ERRNO) - ACE_CE_Errno::init (); -# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_OS_MONITOR_LOCK) if (ACE_OS::thread_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_OS_MONITOR_LOCK")); ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t, ACE_TSS_CLEANUP_LOCK) if (ACE_OS::recursive_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_CLEANUP_LOCK")); ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_LOG_MSG_INSTANCE_LOCK) if (ACE_OS::thread_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_LOG_MSG_INSTANCE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK")); @@ -243,7 +237,6 @@ ACE_OS_Object_Manager::init () ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t, ACE_TSS_KEY_LOCK) if (ACE_OS::recursive_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK")); @@ -251,7 +244,6 @@ ACE_OS_Object_Manager::init () ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t, ACE_TSS_BASE_LOCK) if (ACE_OS::recursive_mutex_init - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK")); @@ -343,7 +335,6 @@ ACE_OS_Object_Manager::fini () # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::thread_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -355,7 +346,6 @@ ACE_OS_Object_Manager::fini () ACE_OS_MONITOR_LOCK) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::recursive_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -367,7 +357,6 @@ ACE_OS_Object_Manager::fini () ACE_TSS_CLEANUP_LOCK) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::thread_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object [ACE_LOG_MSG_INSTANCE_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -380,7 +369,6 @@ ACE_OS_Object_Manager::fini () # if defined (ACE_HAS_TSS_EMULATION) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::recursive_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK")); @@ -390,7 +378,6 @@ ACE_OS_Object_Manager::fini () # if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) # if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK) if (ACE_OS::recursive_mutex_destroy - // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor. (reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK")); @@ -399,9 +386,6 @@ ACE_OS_Object_Manager::fini () ACE_TSS_BASE_LOCK) # endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */ # endif /* ACE_HAS_TSS_EMULATION */ -# if defined (ACE_HAS_WINCE_BROKEN_ERRNO) - ACE_CE_Errno::fini (); -# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ # endif /* ACE_MT_SAFE */ #endif /* ! ACE_HAS_STATIC_PREALLOCATION */ } @@ -443,39 +427,17 @@ ACE_OS_Object_Manager::print_error_message (unsigned int line_number, const ACE_TCHAR *message) { // To avoid duplication of these const strings in OS.o. -#if !defined (ACE_HAS_WINCE) -# ifndef ACE_LACKS_STDERR +#ifndef ACE_LACKS_STDERR fprintf (stderr, "ace/Object_Manager_Base.cpp, line %u: %s ", line_number, ACE_TEXT_ALWAYS_CHAR (message)); -# else - ACE_UNUSED_ARG (line_number); - ACE_UNUSED_ARG (message); -# endif -# if !defined (ACE_LACKS_PERROR) - perror ("failed"); -# endif /* ACE_LACKS_PERROR */ #else - // @@ Need to use the following information. ACE_UNUSED_ARG (line_number); ACE_UNUSED_ARG (message); - - ACE_TCHAR *lpMsgBuf = 0; - ::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, - 0, - ::GetLastError (), - MAKELANGID (LANG_NEUTRAL, - SUBLANG_DEFAULT), - // Default language - (ACE_TCHAR *) &lpMsgBuf, - 0, - 0); - ::MessageBox (0, - lpMsgBuf, - ACE_TEXT ("ACE_OS error"), - MB_OK); #endif +#if !defined (ACE_LACKS_PERROR) + perror ("failed"); +#endif /* ACE_LACKS_PERROR */ } int diff --git a/ACE/ace/Obstack_T.h b/ACE/ace/Obstack_T.h index 5de08a1669f..27d08d37976 100644 --- a/ACE/ace/Obstack_T.h +++ b/ACE/ace/Obstack_T.h @@ -114,13 +114,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Obstack_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Obstack_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Obstack_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_OBSTACK_T_H */ diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp index 11308f32efd..e720c06dbe7 100644 --- a/ACE/ace/POSIX_Proactor.cpp +++ b/ACE/ace/POSIX_Proactor.cpp @@ -6,10 +6,6 @@ #include "ace/POSIX_Proactor.inl" #endif /* __ACE_INLINE__ */ -# if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ <sys/systeminfo.h> -# endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #include "ace/ACE.h" #include "ace/Flag_Manip.h" #include "ace/Task_T.h" @@ -19,10 +15,6 @@ #include "ace/OS_NS_signal.h" #include "ace/OS_NS_unistd.h" -#if defined (sun) -# include "ace/OS_NS_strings.h" -#endif /* sun */ - // ********************************************************************* ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -59,31 +51,8 @@ public: ACE_POSIX_Proactor::ACE_POSIX_Proactor () : os_id_ (ACE_OS_UNDEFINED) { -#if defined(sun) - - os_id_ = ACE_OS_SUN; // set family - - char Buf [32]; - - ::memset(Buf,0,sizeof(Buf)); - - ACE_OS::sysinfo (SI_RELEASE , Buf, sizeof(Buf)-1); - - if (ACE_OS::strcasecmp (Buf , "5.6") == 0) - os_id_ = ACE_OS_SUN_56; - else if (ACE_OS::strcasecmp (Buf , "5.7") == 0) - os_id_ = ACE_OS_SUN_57; - else if (ACE_OS::strcasecmp (Buf , "5.8") == 0) - os_id_ = ACE_OS_SUN_58; - -#elif defined(HPUX) - - os_id_ = ACE_OS_HPUX; // set family - -#elif defined(__OpenBSD) - +#if defined(__OpenBSD) os_id_ = ACE_OS_OPENBSD; // set family - // do the same //#else defined (LINUX, __FreeBSD__ ...) @@ -935,16 +904,12 @@ void ACE_POSIX_AIOCB_Proactor::check_max_aio_num () aiocb_list_max_size_ = max_os_aio_num; #endif -#if defined (HPUX) || defined (__FreeBSD__) - // Although HPUX 11.00 allows to start 2048 AIO's for all process in - // system it has a limit 256 max elements for aio_suspend () It is a - // pity, but ... - +#if defined (__FreeBSD__) long max_os_listio_num = ACE_OS::sysconf (_SC_AIO_LISTIO_MAX); if (max_os_listio_num > 0 && aiocb_list_max_size_ > (unsigned long) max_os_listio_num) aiocb_list_max_size_ = max_os_listio_num; -#endif /* HPUX || __FreeBSD__ */ +#endif /* __FreeBSD__ */ // check for user-defined value // ACE_AIO_MAX_SIZE if defined in POSIX_Proactor.h @@ -1857,7 +1822,7 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout) int error_status = 0; size_t transfer_count = 0; - if (sig_info.si_code == SI_ASYNCIO || this->os_id_ == ACE_OS_SUN_56) + if (sig_info.si_code == SI_ASYNCIO) { flg_aio = 1; // AIO signal received // define index to start @@ -1867,21 +1832,6 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout) #else index = static_cast<size_t> (sig_info.si_value.sival_int); #endif /* ACE_HAS_SIGVAL_SIGVAL_INT */ - // Assume we have a correctly-functioning implementation, and that - // there is one I/O to process, and it's correctly specified in the - // siginfo received. There are, however, some special situations - // where this isn't true... - if (os_id_ == ACE_OS_SUN_56) // Solaris 6 - { - // 1. Solaris 6 always loses any RT signal, - // if it has more SIGQUEMAX=32 pending signals - // so we should scan the whole aiocb list - // 2. Moreover,it has one more bad habit - // to notify aio completion - // with SI_QUEUE code instead of SI_ASYNCIO, hence the - // OS_SUN_56 addition to the si_code check, above. - count = aiocb_list_max_size_; - } } else if (sig_info.si_code != SI_QUEUE) { diff --git a/ACE/ace/POSIX_Proactor.h b/ACE/ace/POSIX_Proactor.h index a16d6ff76f0..143e16b269b 100644 --- a/ACE/ace/POSIX_Proactor.h +++ b/ACE/ace/POSIX_Proactor.h @@ -64,9 +64,6 @@ public: /// Signals notifications PROACTOR_SIG = 2, - /// SUN specific aiowait() - PROACTOR_SUN = 3, - /// Callback notifications PROACTOR_CB = 4 }; @@ -78,13 +75,6 @@ public: ACE_OS_WIN = 0x0100, // for future ACE_OS_WIN_NT = ACE_OS_WIN | 0x0001, ACE_OS_WIN_2000 = ACE_OS_WIN | 0x0002, - ACE_OS_SUN = 0x0200, // Sun Solaris family - ACE_OS_SUN_55 = ACE_OS_SUN | 0x0001, - ACE_OS_SUN_56 = ACE_OS_SUN | 0x0002, - ACE_OS_SUN_57 = ACE_OS_SUN | 0x0004, - ACE_OS_SUN_58 = ACE_OS_SUN | 0x0008, - ACE_OS_HPUX = 0x0400, // HPUX family - ACE_OS_HPUX_11 = ACE_OS_HPUX | 0x0001, ACE_OS_LINUX = 0x0800, // Linux family ACE_OS_FREEBSD = 0x1000, // FreeBSD family ACE_OS_IRIX = 0x2000, // SGI IRIX family diff --git a/ACE/ace/Pagefile_Memory_Pool.cpp b/ACE/ace/Pagefile_Memory_Pool.cpp index 19516cea601..8af6e554b66 100644 --- a/ACE/ace/Pagefile_Memory_Pool.cpp +++ b/ACE/ace/Pagefile_Memory_Pool.cpp @@ -20,13 +20,8 @@ #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) -#if !defined (ACE_HAS_WINCE) -#define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd)\ +#define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd) \ MapViewOfFileEx (_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd) -#else //if !defined (ACE_HAS_WINCE) -#define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd)\ - MapViewOfFile (_hnd, _access, _offHigh, _offLow, _nBytes) -#endif /* !ACE_HAS_WINCE */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -55,26 +50,22 @@ ACE_Pagefile_Memory_Pool::ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_sto { this->local_cb_.req_base_ = options->base_addr_; this->local_cb_.mapped_base_ = 0; - this->local_cb_.sh_.max_size_ = - options->max_size_; + this->local_cb_.sh_.max_size_ = options->max_size_; this->local_cb_.sh_.mapped_size_ = 0; - this->local_cb_.sh_.free_offset_ = - this->local_cb_.sh_.mapped_size_; + this->local_cb_.sh_.free_offset_ = this->local_cb_.sh_.mapped_size_; this->local_cb_.sh_.free_size_ = 0; } else { this->local_cb_.req_base_ = 0; this->local_cb_.mapped_base_ = 0; - this->local_cb_.sh_.max_size_ = - this->round_to_chunk_size (page_size_) ; + this->local_cb_.sh_.max_size_ = this->round_to_chunk_size (page_size_) ; this->local_cb_.sh_.mapped_size_ = 0; - this->local_cb_.sh_.free_offset_ = - this->local_cb_.sh_.mapped_size_; + this->local_cb_.sh_.free_offset_ = this->local_cb_.sh_.mapped_size_; this->local_cb_.sh_.free_size_ = 0; } - int update_backing_store_name = backing_store_name == 0 ? 0 : 1; + int const update_backing_store_name = backing_store_name == 0 ? 0 : 1; if (backing_store_name == 0) // Only create a new unique filename for the backing store file if diff --git a/ACE/ace/Pair_T.h b/ACE/ace/Pair_T.h index 36c32500e37..ac352ef5d54 100644 --- a/ACE/ace/Pair_T.h +++ b/ACE/ace/Pair_T.h @@ -63,13 +63,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Pair_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Pair_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Pair_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_PAIR_T_H */ diff --git a/ACE/ace/Parse_Node.cpp b/ACE/ace/Parse_Node.cpp index 295d3160a90..76b763da3df 100644 --- a/ACE/ace/Parse_Node.cpp +++ b/ACE/ace/Parse_Node.cpp @@ -700,14 +700,9 @@ ACE_Function_Node::symbol (ACE_Service_Gestalt *, return 0; } -#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) - int const temp_p = reinterpret_cast<int> (func_p); -#else intptr_t const temp_p = reinterpret_cast<intptr_t> (func_p); -#endif - ACE_Service_Factory_Ptr func = - reinterpret_cast<ACE_Service_Factory_Ptr> (temp_p); + ACE_Service_Factory_Ptr func = reinterpret_cast<ACE_Service_Factory_Ptr> (temp_p); // Invoke the factory function and record it's return value. this->symbol_ = (*func) (gobbler); diff --git a/ACE/ace/Pipe.cpp b/ACE/ace/Pipe.cpp index 6946b436619..dc6aa4c7ddf 100644 --- a/ACE/ace/Pipe.cpp +++ b/ACE/ace/Pipe.cpp @@ -228,21 +228,6 @@ ACE_Pipe::open (int buffer_size) return -1; } # endif /* ! ACE_LACKS_SO_SNDBUF */ -# if defined (ACE_OPENVMS) && !defined (ACE_LACKS_TCP_NODELAY) - int one = 1; - // OpenVMS implements socketpair(AF_UNIX...) by returning AF_INET sockets. - // Since these are plagued by Nagle as any other INET socket we need to set - // TCP_NODELAY on the write handle. - if (ACE_OS::setsockopt (this->handles_[1], - ACE_IPPROTO_TCP, - TCP_NODELAY, - reinterpret_cast <const char *> (&one), - sizeof (one)) == -1) - { - this->close (); - return -1; - } -# endif /* ACE_OPENVMS && !ACE_LACKS_TCP_NODELAY */ #endif /* ! ACE_LACKS_SOCKETPAIR && ! ACE_HAS_STREAM_PIPES */ // Point both the read and write HANDLES to the appropriate socket // HANDLEs. diff --git a/ACE/ace/Proactor.cpp b/ACE/ace/Proactor.cpp index 3d4206e0010..f3230148e5c 100644 --- a/ACE/ace/Proactor.cpp +++ b/ACE/ace/Proactor.cpp @@ -9,9 +9,9 @@ #include "ace/Object_Manager.h" #include "ace/Task_T.h" -#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF) +#if !defined (ACE_LACKS_ACE_SVCCONF) # include "ace/Service_Config.h" -#endif /* !ACE_HAS_WINCE && !ACE_LACKS_ACE_SVCCONF */ +#endif /* !ACE_LACKS_ACE_SVCCONF */ #include "ace/Task_T.h" #include "ace/Log_Category.h" @@ -336,7 +336,7 @@ ACE_Proactor::ACE_Proactor (ACE_Proactor_Impl *implementation, # endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ # endif /* !ACE_HAS_BROKEN_SIGEVENT_STRUCT */ # endif /* ACE_POSIX_AIOCB_PROACTOR */ -#elif (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) +#elif defined (ACE_WIN32) // WIN_Proactor. ACE_NEW (implementation, ACE_WIN32_Proactor); @@ -437,13 +437,13 @@ ACE_Proactor::name () int ACE_Proactor::check_reconfiguration (ACE_Proactor *) { -#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF) +#if !defined (ACE_LACKS_ACE_SVCCONF) if (ACE_Service_Config::reconfig_occurred ()) { ACE_Service_Config::reconfigure (); return 1; } -#endif /* ! ACE_HAS_WINCE || ! ACE_LACKS_ACE_SVCCONF */ +#endif /* !ACE_LACKS_ACE_SVCCONF */ return 0; } diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index 3a52b8bb9a4..afa7a0da98d 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -137,31 +137,7 @@ ACE_Process::spawn (ACE_Process_Options &options) } } -#if defined (ACE_HAS_WINCE) - // Note that WinCE does not have process name included in the command line as argv[0] - // like other OS environment. Therefore, it is user's whole responsibility to call - // 'ACE_Process_Options::process_name(const ACE_TCHAR *name)' to set the proper - // process name (the execution file name with path if needed). - BOOL fork_result = - ACE_TEXT_CreateProcess (options.process_name(), - options.command_line_buf(), - options.get_process_attributes(), // must be NULL in CE - options.get_thread_attributes(), // must be NULL in CE - options.handle_inheritance(), // must be false in CE - options.creation_flags(), // must be NULL in CE - options.env_buf(), // environment variables, must be NULL in CE - options.working_directory(), // must be NULL in CE - options.startup_info(), // must be NULL in CE - &this->process_info_); - - if (fork_result) - { - parent (this->getpid ()); - return this->getpid (); - } - return ACE_INVALID_PID; - -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) void* env_buf = options.env_buf (); DWORD flags = options.creation_flags (); # if defined (ACE_HAS_WCHAR) && !defined (ACE_USES_WCHAR) @@ -214,67 +190,6 @@ ACE_Process::spawn (ACE_Process_Options &options) return this->getpid (); } return ACE_INVALID_PID; - -#elif defined(ACE_OPENVMS) - if (ACE_BIT_ENABLED (options.creation_flags (), - ACE_Process_Options::NO_EXEC)) - ACE_NOTSUP_RETURN (ACE_INVALID_PID); - - int saved_stdin = ACE_STDIN; - int saved_stdout = ACE_STDOUT; - int saved_stderr = ACE_STDERR; - // Save STD file descriptors and redirect - if (options.get_stdin () != ACE_INVALID_HANDLE) { - if ((saved_stdin = ACE_OS::dup (ACE_STDIN)) == -1 && errno != EBADF) - ACE_OS::exit (errno); - if (ACE_OS::dup2 (options.get_stdin (), ACE_STDIN) == -1) - ACE_OS::exit (errno); - } - if (options.get_stdout () != ACE_INVALID_HANDLE) { - if ((saved_stdout = ACE_OS::dup (ACE_STDOUT)) == -1 && errno != EBADF) - ACE_OS::exit (errno); - if (ACE_OS::dup2 (options.get_stdout (), ACE_STDOUT) == -1) - ACE_OS::exit (errno); - } - if (options.get_stderr () != ACE_INVALID_HANDLE) { - if ((saved_stderr = ACE_OS::dup (ACE_STDERR)) == -1 && errno != EBADF) - ACE_OS::exit (errno); - if (ACE_OS::dup2 (options.get_stderr (), ACE_STDERR) == -1) - ACE_OS::exit (errno); - } - - if (options.working_directory () != 0) - ACE_NOTSUP_RETURN (ACE_INVALID_PID); - - this->child_id_ = vfork(); - if (this->child_id_ == 0) { - ACE_OS::execvp (options.process_name (), - options.command_line_argv ()); - // something went wrong - this->child_id_ = ACE_INVALID_PID; - } - - // restore STD file descriptors (if necessary) - if (options.get_stdin () != ACE_INVALID_HANDLE) { - if (saved_stdin == -1) - ACE_OS::close (ACE_STDIN); - else - ACE_OS::dup2 (saved_stdin, ACE_STDIN); - } - if (options.get_stdout () != ACE_INVALID_HANDLE) { - if (saved_stdout == -1) - ACE_OS::close (ACE_STDOUT); - else - ACE_OS::dup2 (saved_stdout, ACE_STDOUT); - } - if (options.get_stderr () != ACE_INVALID_HANDLE) { - if (saved_stderr == -1) - ACE_OS::close (ACE_STDERR); - else - ACE_OS::dup2 (saved_stderr, ACE_STDERR); - } - - return this->child_id_; #elif defined (ACE_VXWORKS) && defined (__RTP__) if (ACE_BIT_ENABLED (options.creation_flags (), ACE_Process_Options::NO_EXEC)) @@ -761,8 +676,7 @@ ACE_Process::close_passed_handles () } #if defined (ACE_WIN32) && \ - defined (ACE_HAS_WCHAR) && !defined (ACE_USES_WCHAR) && \ - !defined (ACE_HAS_WINCE) + defined (ACE_HAS_WCHAR) && !defined (ACE_USES_WCHAR) wchar_t* ACE_Process::convert_env_buffer (const char* env) const { @@ -818,12 +732,9 @@ ACE_Process_Options::ACE_Process_Options (bool inherit_environment, size_t max_env_args, size_t max_cmdline_args) : -#if !defined (ACE_HAS_WINCE) inherit_environment_ (inherit_environment), -#endif /* ACE_HAS_WINCE */ creation_flags_ (0), avoid_zombies_ (0), -#if !defined (ACE_HAS_WINCE) #if defined (ACE_WIN32) environment_inherited_ (0), process_attributes_ (0), @@ -847,7 +758,6 @@ ACE_Process_Options::ACE_Process_Options (bool inherit_environment, environment_buf_len_ (env_buf_len), max_environment_args_ (max_env_args), max_environ_argv_index_ (max_env_args - 1), -#endif /* !ACE_HAS_WINCE */ command_line_argv_calculated_ (false), command_line_buf_ (0), command_line_copy_ (0), @@ -867,13 +777,6 @@ ACE_Process_Options::ACE_Process_Options (bool inherit_environment, command_line_buf_[0] = '\0'; process_name_[0] = '\0'; -#if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG(inherit_environment); - ACE_UNUSED_ARG(env_buf_len); - ACE_UNUSED_ARG(max_env_args); -#endif - -#if !defined (ACE_HAS_WINCE) working_directory_[0] = '\0'; #if defined (ACE_HAS_ALLOC_HOOKS) ACE_ALLOCATOR (environment_buf_, @@ -897,7 +800,6 @@ ACE_Process_Options::ACE_Process_Options (bool inherit_environment, sizeof this->startup_info_); this->startup_info_.cb = sizeof this->startup_info_; #endif /* ACE_WIN32 */ -#endif /* !ACE_HAS_WINCE */ #if defined (ACE_HAS_ALLOC_HOOKS) ACE_ALLOCATOR (command_line_argv_, static_cast<ACE_TCHAR**>(ACE_Allocator::instance()->malloc(sizeof(ACE_TCHAR*) * max_cmdline_args))); @@ -907,7 +809,6 @@ ACE_Process_Options::ACE_Process_Options (bool inherit_environment, #endif /* ACE_HAS_ALLOC_HOOKS */ } -#if !defined (ACE_HAS_WINCE) #if defined (ACE_WIN32) void ACE_Process_Options::inherit_environment () @@ -975,7 +876,6 @@ ACE_Process_Options::env_argv () { return environment_argv_; } - #endif /* ACE_WIN32 */ int @@ -1229,12 +1129,9 @@ ACE_Process_Options::release_handles () set_handles_called_ = 0; } } -#endif /* !ACE_HAS_WINCE */ - ACE_Process_Options::~ACE_Process_Options () { -#if !defined (ACE_HAS_WINCE) release_handles(); #if defined (ACE_HAS_ALLOC_HOOKS) ACE_Allocator::instance()->free(environment_buf_); @@ -1243,7 +1140,6 @@ ACE_Process_Options::~ACE_Process_Options () delete [] environment_buf_; delete [] environment_argv_; #endif /* ACE_HAS_ALLOC_HOOKS */ -#endif /* !ACE_HAS_WINCE */ #if defined (ACE_HAS_ALLOC_HOOKS) ACE_Allocator::instance()->free(command_line_buf_); #else @@ -1326,11 +1222,7 @@ ACE_Process_Options::command_line (const ACE_TCHAR *format, ...) return 0; } -#if defined (ACE_HAS_WCHAR) && !defined (ACE_HAS_WINCE) -/** - * @note Not available on Windows CE because it doesn't have a char version of - * vsprintf. - */ +#if defined (ACE_HAS_WCHAR) int ACE_Process_Options::command_line (const ACE_ANTI_TCHAR *format, ...) { @@ -1357,20 +1249,16 @@ ACE_Process_Options::command_line (const ACE_ANTI_TCHAR *format, ...) command_line_argv_calculated_ = false; return 0; } -#endif /* ACE_HAS_WCHAR && !ACE_HAS_WINCE */ +#endif /* ACE_HAS_WCHAR */ #endif // ACE_LACKS_VA_FUNCTIONS ACE_TCHAR * ACE_Process_Options::env_buf () { -#if !defined (ACE_HAS_WINCE) if (environment_buf_[0] == '\0') return 0; else return environment_buf_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_TCHAR * const * @@ -1411,12 +1299,8 @@ ACE_Process_Options::command_line_argv () int ACE_Process_Options::pass_handle (ACE_HANDLE h) { -#if defined (ACE_HAS_WINCE) - ACE_NOTSUP_RETURN (-1); -#else this->handles_passed_.set_bit (h); return 0; -#endif /* ACE_HAS_WINCE */ } // Get a copy of the handles the ACE_Process_Options duplicated diff --git a/ACE/ace/Process.h b/ACE/ace/Process.h index 7e00b3dc975..70aa7c2f0d3 100644 --- a/ACE/ace/Process.h +++ b/ACE/ace/Process.h @@ -35,11 +35,6 @@ class ACE_Time_Value; * * This class controls the options passed to <CreateProcess> (or <fork> * and <exec>). - * Notice that on Windows CE, creating a process merely means - * instantiating a new process. You can't set the handles (since - * there's no stdin, stdout and stderr,) specify process/thread - * options, set environment,... So, basically, this class only - * set the command line and nothing else. * Notice that on UNIX platforms, if the <setenv> is used, the * <spawn> is using the <execve> system call. It means that the * <command_line> should include a full path to the program file @@ -169,10 +164,10 @@ public: #endif /* !ACE_USES_WCHAR */ ; -#if defined (ACE_HAS_WCHAR) && !defined (ACE_HAS_WINCE) +#if defined (ACE_HAS_WCHAR) /// Anti-TChar version of command_line () int command_line (const ACE_ANTI_TCHAR *format, ...); -#endif /* ACE_HAS_WCHAR && !ACE_HAS_WINCE */ +#endif /* ACE_HAS_WCHAR */ #endif // ACE_LACKS_VA_FUNCTIONS /// Same as above in argv format. @a argv must be null terminated. @@ -365,7 +360,6 @@ public: void inherit_environment (bool nv); #endif /* ACE_WIN32 */ protected: -#if !defined (ACE_HAS_WINCE) /// Add @a assignment to environment_buf_ and adjust /// environment_argv_. @a len is the strlen of @a assignment. int setenv_i (ACE_TCHAR *assignment, size_t len); @@ -373,7 +367,6 @@ protected: /// Whether the child process inherits the current process /// environment. bool inherit_environment_; -#endif /* !ACE_HAS_WINCE */ /// Default 0. u_long creation_flags_; @@ -381,7 +374,7 @@ protected: /// Avoid zombies for spawned processes. int avoid_zombies_; -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) /// Helper function to grab win32 environment and stick it in /// environment_buf_ using this->setenv_i. void inherit_environment (); @@ -424,7 +417,6 @@ protected: /// Default true. bool handle_inheritance_; -#if !defined (ACE_HAS_WINCE) /// Is 1 if stdhandles was called. int set_handles_called_; @@ -452,7 +444,6 @@ protected: /// The current working directory. ACE_TCHAR working_directory_[MAXPATHLEN + 1]; -#endif /* !ACE_HAS_WINCE */ /// Ensures command_line_argv is only calculated once. bool command_line_argv_calculated_; @@ -667,9 +658,7 @@ protected: ACE_Handle_Set dup_handles_; private: -#if defined (ACE_WIN32) && \ - defined (ACE_HAS_WCHAR) && !defined (ACE_USES_WCHAR) && \ - !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) && defined (ACE_HAS_WCHAR) && !defined (ACE_USES_WCHAR) wchar_t* convert_env_buffer (const char* env) const; #endif }; diff --git a/ACE/ace/Process.inl b/ACE/ace/Process.inl index b982366b526..4b742af07e4 100644 --- a/ACE/ace/Process.inl +++ b/ACE/ace/Process.inl @@ -115,7 +115,7 @@ ACE_Process::exit_code (ACE_exitcode code) ACE_INLINE u_long ACE_Process_Options::creation_flags () const { -#if defined (ACE_USES_WCHAR) && defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +#if defined (ACE_USES_WCHAR) && defined (ACE_WIN32) return creation_flags_ | CREATE_UNICODE_ENVIRONMENT; #else return creation_flags_; @@ -170,53 +170,33 @@ ACE_Process_Options::avoid_zombies (int avoid_zombies) ACE_INLINE ACE_TEXT_STARTUPINFO * ACE_Process_Options::startup_info () { -#if !defined (ACE_HAS_WINCE) return &startup_info_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_INLINE LPSECURITY_ATTRIBUTES ACE_Process_Options::get_process_attributes () const { -#if !defined (ACE_HAS_WINCE) return process_attributes_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_INLINE LPSECURITY_ATTRIBUTES ACE_Process_Options::set_process_attributes () { -#if !defined (ACE_HAS_WINCE) process_attributes_ = &security_buf1_; return process_attributes_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_INLINE LPSECURITY_ATTRIBUTES ACE_Process_Options::get_thread_attributes () const { -#if !defined (ACE_HAS_WINCE) return thread_attributes_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_INLINE LPSECURITY_ATTRIBUTES ACE_Process_Options::set_thread_attributes () { -#if !defined (ACE_HAS_WINCE) thread_attributes_ = &security_buf2_; return thread_attributes_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_INLINE HANDLE ACE_Process_Options::get_user_token () const @@ -338,35 +318,23 @@ ACE_Process_Options::command_line_buf (size_t *max_lenp) ACE_INLINE ACE_TCHAR * ACE_Process_Options::working_directory () { -#if !defined (ACE_HAS_WINCE) if (working_directory_[0] == '\0') return 0; else return working_directory_; -#else - return 0; -#endif /* !ACE_HAS_WINCE */ } ACE_INLINE void ACE_Process_Options::working_directory (const char *wd) { -#if !defined(ACE_HAS_WINCE) ACE_OS::strcpy (working_directory_, ACE_TEXT_CHAR_TO_TCHAR (wd)); -#else - ACE_UNUSED_ARG (wd); -#endif /* !ACE_HAS_WINCE */ } #if defined (ACE_HAS_WCHAR) ACE_INLINE void ACE_Process_Options::working_directory (const wchar_t *wd) { -#if !defined(ACE_HAS_WINCE) ACE_OS::strcpy (working_directory_, ACE_TEXT_WCHAR_TO_TCHAR (wd)); -#else - ACE_UNUSED_ARG (wd); -#endif /* !ACE_HAS_WINCE */ } #endif /* ACE_HAS_WCHAR */ @@ -385,38 +353,4 @@ ACE_Process_Options::process_name () return this->process_name_; } -#if defined (ACE_HAS_WINCE) -// Here is a collection of inline functions which are defined only -// under CE. They are not empty on most other platforms. - -ACE_INLINE int -ACE_Process_Options::setenv (ACE_TCHAR * /* envp */[]) -{ - return -1; -} - -ACE_INLINE int -ACE_Process_Options::setenv (const ACE_TCHAR * /* format */, ...) -{ - return -1; -} - -ACE_INLINE int -ACE_Process_Options::setenv (const ACE_TCHAR * /* variable_name */, - const ACE_TCHAR * /* format */, - ...) -{ - return -1; -} - -ACE_INLINE int -ACE_Process_Options::set_handles (ACE_HANDLE /* std_in */, - ACE_HANDLE /* std_out */, - ACE_HANDLE /* std_err */) -{ - return -1; -} - -#endif /* ACE_HAS_WINCE */ - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Profile_Timer.cpp b/ACE/ace/Profile_Timer.cpp index 8893443c98a..838e7860b8a 100644 --- a/ACE/ace/Profile_Timer.cpp +++ b/ACE/ace/Profile_Timer.cpp @@ -7,12 +7,7 @@ #include "ace/Log_Category.h" #include "ace/OS_NS_string.h" -#if defined (ACE_HAS_PRUSAGE_T) -#include "ace/OS_NS_fcntl.h" -#include "ace/OS_NS_unistd.h" -#endif - -#if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32) +#if defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) #include "ace/OS_NS_stdio.h" #if defined (ACE_HAS_ALLOC_HOOKS) @@ -40,32 +35,17 @@ ACE_Profile_Timer::ACE_Profile_Timer () ACE_OS::memset (&this->begin_usage_, 0, sizeof this->begin_usage_); ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_); -# if defined (ACE_HAS_PRUSAGE_T) - ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_); - char buf[20]; - ACE_OS::sprintf (buf, 20, "/proc/%d", static_cast<int> (ACE_OS::getpid ())); - - this->proc_handle_ = ACE_OS::open (buf, O_RDONLY, 0); - if (this->proc_handle_ == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - buf)); -# elif defined (ACE_HAS_GETRUSAGE) +# if defined (ACE_HAS_GETRUSAGE) ACE_OS::memset (&this->begin_time_, 0, sizeof this->begin_time_); ACE_OS::memset (&this->end_time_, 0, sizeof this->end_time_); ACE_OS::memset (&this->last_time_, 0, sizeof this->last_time_); -# endif /* ACE_HAS_PRUSAGE_T */ +# endif /* ACE_HAS_GETRUSAGE */ } // Terminate the interval timer. ACE_Profile_Timer::~ACE_Profile_Timer () { ACE_TRACE ("ACE_Profile_Timer::~ACE_Profile_Timer"); -# if defined (ACE_HAS_PRUSAGE_T) - if (ACE_OS::close (this->proc_handle_) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_Profile_Timer::~ACE_Profile_Timer"))); -# endif /* ACE_HAS_PRUSAGE_T */ } // Return the resource utilization. @@ -77,92 +57,7 @@ ACE_Profile_Timer::get_rusage (ACE_Profile_Timer::Rusage &usage) usage = this->end_usage_; } -# if defined (ACE_HAS_PRUSAGE_T) - -// Compute the amount of resource utilization since the start time. - -void -ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &rusage) -{ - ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage"); - rusage.pr_lwpid = - this->end_usage_.pr_lwpid - this->last_usage_.pr_lwpid; - rusage.pr_count = - this->end_usage_.pr_count - this->last_usage_.pr_count; - rusage.pr_minf = - this->end_usage_.pr_minf - this->last_usage_.pr_minf; - rusage.pr_majf = - this->end_usage_.pr_majf - this->last_usage_.pr_majf; - rusage.pr_inblk = - this->end_usage_.pr_inblk - this->last_usage_.pr_inblk; - rusage.pr_oublk = - this->end_usage_.pr_oublk - this->last_usage_.pr_oublk; - rusage.pr_msnd = - this->end_usage_.pr_msnd - this->last_usage_.pr_msnd; - rusage.pr_mrcv = - this->end_usage_.pr_mrcv - this->last_usage_.pr_mrcv; - rusage.pr_sigs = - this->end_usage_.pr_sigs - this->last_usage_.pr_sigs; - this->subtract (rusage.pr_wtime, - this->end_usage_.pr_wtime, - this->last_usage_.pr_wtime); - this->subtract (rusage.pr_ltime, - this->end_usage_.pr_ltime, - this->last_usage_.pr_ltime); - this->subtract (rusage.pr_slptime, - this->end_usage_.pr_slptime, - this->last_usage_.pr_slptime); - rusage.pr_vctx = - this->end_usage_.pr_vctx - this->last_usage_.pr_vctx; - rusage.pr_ictx = - this->end_usage_.pr_ictx - this->last_usage_.pr_ictx; - rusage.pr_sysc = - this->end_usage_.pr_sysc - this->last_usage_.pr_sysc; - rusage.pr_ioch = - this->end_usage_.pr_ioch - this->last_usage_.pr_ioch; -} - -// Compute the elapsed time. - -void -ACE_Profile_Timer::compute_times (ACE_Elapsed_Time &et) -{ - ACE_TRACE ("ACE_Profile_Timer::compute_times"); - timespec_t td; - - ACE_Profile_Timer::Rusage &end = this->end_usage_; - ACE_Profile_Timer::Rusage &begin = this->begin_usage_; - - this->subtract (td, end.pr_tstamp, begin.pr_tstamp); - // Convert nanoseconds into seconds. - et.real_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS; - this->subtract (td, end.pr_utime, begin.pr_utime); - // Convert nanoseconds into seconds. - et.user_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS; - this->subtract (td, end.pr_stime, begin.pr_stime); - // Convert nanoseconds into seconds. - et.system_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS; -} - -// Determine the difference between T1 and T2. - -void -ACE_Profile_Timer::subtract (timespec_t &tdiff, timespec_t &t1, timespec_t &t0) -{ - ACE_TRACE ("ACE_Profile_Timer::subtract"); - tdiff.tv_sec = t1.tv_sec - t0.tv_sec; - tdiff.tv_nsec = t1.tv_nsec - t0.tv_nsec; - - // Normalize the time. - - while (tdiff.tv_nsec < 0) - { - tdiff.tv_sec--; - tdiff.tv_nsec += ACE_ONE_SECOND_IN_NSECS; - } -} - -# elif defined (ACE_HAS_GETRUSAGE) +# if defined (ACE_HAS_GETRUSAGE) // Compute the amount of resource utilization since the start time. void @@ -255,7 +150,7 @@ ACE_Profile_Timer::subtract (timeval &tdiff, timeval &t1, timeval &t0) } } -# endif /* ACE_HAS_PRUSAGE_T */ +# endif /* ACE_HAS_GETRUSAGE */ // Compute the amount of time that has elapsed between start and stop. @@ -269,7 +164,7 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_WIN32) /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ +#elif defined (ACE_WIN32) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -433,5 +328,4 @@ ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage) ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* defined (ACE_HAS_PRUSAGE_T) || - defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) */ +#endif /* defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) */ diff --git a/ACE/ace/Profile_Timer.h b/ACE/ace/Profile_Timer.h index 6d682b72c50..9419f19c505 100644 --- a/ACE/ace/Profile_Timer.h +++ b/ACE/ace/Profile_Timer.h @@ -96,14 +96,7 @@ private: /// Keep track of the last rusage for incremental timing. ACE_Profile_Timer::Rusage last_usage_; -#if defined (ACE_HAS_PRUSAGE_T) - /// Subtract two timestructs and store their difference. - void subtract (timespec_t &tdiff, timespec_t &t0, timespec_t &t1); - - /// I/O handle for /proc file system. - ACE_HANDLE proc_handle_; - -#elif defined (ACE_HAS_GETRUSAGE) +#if defined (ACE_HAS_GETRUSAGE) /// Subtract two timestructs and store their difference. void subtract (timeval &tdiff, timeval &t0, @@ -117,12 +110,12 @@ private: /// Keep track of the last time for incremental timing. timeval last_time_; -#endif /* ACE_HAS_PRUSAGE_T */ +#endif /* ACE_HAS_GETRUSAGE */ -#if defined (ACE_WIN32) || (!defined (ACE_HAS_PRUSAGE_T) && !defined (ACE_HAS_GETRUSAGE)) +#if defined (ACE_WIN32) || !defined (ACE_HAS_GETRUSAGE) /// The high resolution timer ACE_High_Res_Timer timer_; -#endif /* ACE_WIN32 || !ACE_HAS_PRUSAGE_T && !ACE_HAS_GETRUSAGE */ +#endif /* ACE_WIN32 || !ACE_HAS_GETRUSAGE */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Profile_Timer.inl b/ACE/ace/Profile_Timer.inl index d0fd3afc58f..f4be327fac8 100644 --- a/ACE/ace/Profile_Timer.inl +++ b/ACE/ace/Profile_Timer.inl @@ -3,35 +3,8 @@ #include "ace/OS_NS_sys_resource.h" #include "ace/Global_Macros.h" -#if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32) - -# if defined (ACE_HAS_PRUSAGE_T) -# include "ace/OS_NS_stropts.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_Profile_Timer::start () -{ - ACE_TRACE ("ACE_Profile_Timer::start"); - return ACE_OS::ioctl (this->proc_handle_, - PIOCUSAGE, - &this->begin_usage_); -} - -ACE_INLINE int -ACE_Profile_Timer::stop () -{ - ACE_TRACE ("ACE_Profile_Timer::stop"); - this->last_usage_ = this->end_usage_; - return ACE_OS::ioctl (this->proc_handle_, - PIOCUSAGE, - &this->end_usage_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -# elif defined (ACE_HAS_GETRUSAGE) +#if defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) +# if defined (ACE_HAS_GETRUSAGE) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -59,7 +32,7 @@ ACE_Profile_Timer::stop () ACE_END_VERSIONED_NAMESPACE_DECL -# endif /* ACE_HAS_PRUSAGE_T */ +# endif /* ACE_HAS_GETRUSAGE */ #elif defined (ACE_WIN32) @@ -123,4 +96,4 @@ ACE_Profile_Timer::~ACE_Profile_Timer () ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ +#endif /* defined (ACE_HAS_GETRUSAGE) */ diff --git a/ACE/ace/RB_Tree.h b/ACE/ace/RB_Tree.h index 03fb77f2a60..0bf1f40d9a7 100644 --- a/ACE/ace/RB_Tree.h +++ b/ACE/ace/RB_Tree.h @@ -118,11 +118,9 @@ public: /** * @note This method is inlined here rather than in RB_Tree.inl * since that file may be included multiple times when - * inlining is disabled and on platforms where - * @c ACE_TEMPLATES_REQUIRE_SOURCE is defined. In those - * platform/configuration combinations, multiple definitions - * of this method occurred. Placing the definition inline in - * the header avoids such errors. + * inlining is disabled. In those platform/configuration + * combinations, multiple definitions of this method occurred. + * Placing the definition inline in the header avoids such errors. */ ACE_Allocator * allocator () const { return this->allocator_; } @@ -871,13 +869,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/RB_Tree.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/RB_Tree.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("RB_Tree.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ! defined (ACE_RB_TREE_H) */ diff --git a/ACE/ace/README b/ACE/ace/README index d43ec628884..99d94841674 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -20,9 +20,6 @@ ACE_HAS_DUMP Used to enable the dump() out in order to reduce footprint. By default, it is not defined. -ACE_CAST_CONST Used to work around broken - SunCC ANSI casts that require - an extra const. ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES Win32 only. Users want to use a predefined security @@ -79,13 +76,6 @@ ACE_HAS_TRACE Defined when ACE_NTRACE=0 to ACE_PAGE_SIZE Defines the page size of the system (not used on Win32 or with ACE_HAS_GETPAGESIZE). -ACE_TEMPLATES_REQUIRE_PRAGMA Compiler's template mechanism - must use a pragma This is used - for AIX's C++ compiler. -ACE_TEMPLATES_REQUIRE_SOURCE Compiler's template mechanim - must see source code (i.e., - .cpp files). This is used for - GNU G++. ACE_TIMEPROBE_ASSERTS_FIXED_SIZE If enabled then ACE_Timeprobe_Ex<>::timeprobe() will assert if the end of the buffer is reached. If disabled, the @@ -145,7 +135,6 @@ ACE_DEFAULT_LD_SEARCH_PATH Specify the platform default search paths. This macro should only be defined on platforms that don't support environment variables at all - (i.e., Windows CE.) ACE_THREADS_DONT_INHERIT_LOG_MSG Specify this if you don't want threads to inherit parent thread's ACE_Log_Msg @@ -156,7 +145,6 @@ ACE_THREAD_MANAGER_USES_SAFE_SPAWN Disable the "check before lock" feature on platforms with aggressive read/write reordering. ACE_HAS_CPU_SET_T Platform delivers cpu_set_t. -ACE_HAS_PRIOCNTL OS has priocntl (2). ACE_HAS_RECURSIVE_MUTEXES Mutexes are inherently recursive (e.g., Win32) ACE_HAS_NONRECURSIVE_MUTEXES In addition to recursive mutexes, @@ -187,8 +175,6 @@ ACE_SCANDIR_CMP_USES_VOIDPTR The OS's scandir() comparator function ACE_SCANDIR_CMP_USES_CONST_VOIDPTR The OS's scandir() comparator function is int (*compare)(const void*, const void*). -ACE_SCANDIR_SEL_LACKS_CONST The OS's scandir() selector function - is int (*selector)(ACE_DIRENT*) ACE_HAS_STDARG_THR_DEST Platform has void (*)(...) prototype for pthread_key_create() @@ -199,13 +185,6 @@ ACE_HAS_4_4BSD_SENDMSG_RECVMSG Platform has BSD 4.4 sendmsg()/recvmsg() APIs. ACE_HAS_P_READ_WRITE Platform has pread() and pwrite() support -ACE_HAS_AIX_BROKEN_SOCKET_HEADER Platform, such as AIX4, needs - to wrap #include of - sys/socket.h with - #undef/#define of - __cplusplus. -ACE_HAS_AIX_HI_RES_TIMER Platform has AIX4 - ::read_real_time () ACE_HAS_ALLOCA Compiler/platform supports alloca() ACE_HAS_ALLOCA_H Compiler/platform has @@ -232,12 +211,6 @@ ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the ACE_HAS_BROKEN_NESTED_TEMPLATES MSVC has trouble with defining STL containers for nested structs and classes -ACE_HAS_BROKEN_POSIX_TIME Platform defines struct - timespec in <sys/timers.h> -ACE_HAS_BROKEN_T_ERROR Compiler/platform has the wrong - prototype for t_error(), i.e., - t_error(char *) rather than - t_error(const char *). ACE_HAS_BYTESEX_H Platform has <bytesex.h>. ACE_HAS_CANCEL_IO Platform supports the Win32 CancelIO() function (WinNT 4.0 @@ -254,10 +227,6 @@ ACE_HAS_CLOCK_GETTIME_MONOTONIC Platform supports POSIX.1b clock_gettime () with the clock-id CLOCK_MONOTONIC ACE_HAS_CLOCK_SETTIME Platform supports POSIX.1b clock_settime () -ACE_HAS_CONFLICTING_XTI_MACROS OS's XTI header file defines some - TCP-related macros that netinet/tcp.h - also defines, but they conflict - (only seen on HP-UX 11). ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES Prototypes for both signal() and struct sigaction are consistent. @@ -272,7 +241,7 @@ ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT When a base-class is a then this class template must be explicitly exported ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION For the GCC compiler - on AIX, HPUX and VxWorks we have to + on VxWorks we have to explicitly instantiate static template members else we get multiple instances of the same static. @@ -301,8 +270,6 @@ ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT Optimize ACE_HAS_LLSEEK Platform supports llseek. ACE_HAS_HI_RES_TIMER Compiler/platform supports SunOS high resolution timers -ACE_HAS_IDTYPE_T Compiler/platform supports - idtype_t. ACE_HAS_INLINED_OSCALLS Inline all the static class OS methods to remove call overhead @@ -310,8 +277,6 @@ ACE_HAS_INT_SWAB Platform's swab function has length argument of type int, not ssize_t. ACE_HAS_IP_MULTICAST Platform supports IP multicast ACE_HAS_IPV6 Platform supports IPv6. -ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED gethostbyaddr does not handle - IPv6-mapped-IPv4 addresses ACE_USES_IPV4_IPV6_MIGRATION Enable IPv6 support in ACE on platforms that don't have IPv6 turned on by default. @@ -321,9 +286,6 @@ ACE_HAS_NONSTATIC_OBJECT_MANAGER Causes the ACE_Object_Manager a static (global) instance. ACE_HAS_THR_KEYDELETE Platform supports thr_keydelete (e.g,. UNIXWARE) -ACE_HAS_THR_MINSTACK Platform calls thr_minstack() - rather than thr_min_stack() - (e.g., Tandem). ACE_HAS_LIMITED_RUSAGE_T The rusage_t structure has only two fields. ACE_HAS_LINUX_NPTL Linux platform (with kernel >= 2.6.x) @@ -335,8 +297,6 @@ ACE_HAS_LINUX_NPTL Linux platform (with kernel >= 2.6.x) ACE_HAS_LOG_MSG_NT_EVENT_LOG Platform supports Windows NT event log so we can create an ACE_Log_Msg_Backend to log to it. -ACE_HAS_LONG_MAP_FAILED Platform defines MAP_FAILED as - a long constant. ACE_HAS_MALLOC_STATS Enabled malloc statistics collection. ACE_HAS_MEMCHR Use native implementation of memchr. @@ -351,15 +311,9 @@ ACE_HAS_MT_SAFE_MKTIME Platform supports MT safe ACE_HAS_MUTEX_TIMEOUTS Compiler supports timed mutex acquisitions (e.g. pthread_mutex_timedlock()). -ACE_HAS_NONCONST_CHDIR Platform uses non-const char * - in call to chdir ACE_HAS_NONCONST_CLOCK_SETTIME Platform uses non-const struct timespec * in call to clock_settime -ACE_HAS_NONCONST_OPENDIR Platform uses non-const char * - in call to opendir -ACE_HAS_NONCONST_UNLINK Platform uses non-const char * - in call to unlink ACE_HAS_NONCONST_GETBY Platform uses non-const char * in calls to gethostbyaddr, gethostbyname, getservbyname @@ -376,26 +330,15 @@ ACE_HAS_NONCONST_SENDMSG Platform omits const qualifier ACE_HAS_NONCONST_SETRLIMIT Platform omits const qualifier from rlimit parameter in setrlimit() prototype. -ACE_HAS_NONCONST_STAT Platform's stat function has non const - name argument ACE_HAS_NONCONST_SWAB Platform's swab function has non const src argument ACE_HAS_NONCONST_WRITEV Platform omits const qualifier from iovec parameter in writev() prototype. -ACE_HAS_OLD_MALLOC Compiler/platform uses old - malloc()/free() prototypes - (ugh) -ACE_HAS_ONLY_SCHED_FIFO Platform, e.g., HP NonStop OSS, - only supports SCHED_FIFO - POSIX scheduling policy. -ACE_HAS_ONLY_SCHED_OTHER Platform, e.g., Solaris 2.5, - only supports SCHED_OTHER +ACE_HAS_ONLY_SCHED_OTHER Platform, only supports SCHED_OTHER POSIX scheduling policy. ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R Uses ctime_r & asctime_r with only two parameters vs. three. -ACE_HAS_OSF_TIMOD_H Platform supports the OSF TLI - timod STREAMS module ACE_HAS_3_PARAM_WCSTOK Platform has 3-parameter version of wcstok(), which was added in 1994 in the ISO C standard Normative @@ -417,7 +360,7 @@ ACE_HAS_POSIX_REALTIME_SIGNALS Platform supports POSIX RT signals. constant in <unistd.h>. ACE_HAS_POSIX_SEM Platform supports POSIX real-time semaphores (e.g., - VxWorks and Solaris). Corresponds + VxWorks). Corresponds to _POSIX_SEMAPHORES constant in <unistd.h> ACE_HAS_POSIX_SEM_TIMEOUT Platform supports timed wait operation @@ -429,8 +372,6 @@ ACE_HAS_PROC_FS Platform supports the /proc in <sys/procfs.h> ACE_HAS_POWERPC_TIMER Platform supports PowerPC time-base register. -ACE_HAS_PRUSAGE_T Platform supports the - prusage_t struct ACE_HAS_PTHREADS Platform supports POSIX Pthreads, of one form or another. This macro says the @@ -461,7 +402,6 @@ ACE_HAS_QUANTIFY Quantify'ing. Set by wrapper_macros.GNU ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS Platform will recurse infinitely on thread exits from TSS cleanup routines - (e.g., AIX). ACE_HAS_REENTRANT_FUNCTIONS Platform supports reentrant functions (i.e., all the POSIX *_r functions). @@ -481,8 +421,6 @@ ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL For Win32: Use Select_Reactor ACE_HAS_SEMUN Compiler/platform defines a union semun for SysV shared memory -ACE_HAS_SET_T_ERRNO Platform has a function to set - t_errno (e.g., Tandem). ACE_HAS_SIGACTION_CONSTP2 Platform's sigaction() function takes const sigaction* as 2nd parameter. ACE_HAS_SIGINFO_T Platform supports SVR4 @@ -499,9 +437,6 @@ ACE_HAS_SIG_ATOMIC_T Compiler/platform defines the sig_atomic_t typedef ACE_HAS_SIG_C_FUNC Compiler requires extern "C" functions for signals. -ACE_HAS_SIZET_SOCKET_LEN OS/compiler uses size_t * - rather than int * for socket - lengths ACE_HAS_SOCKADDR_IN_SIN_LEN Platform has sin_len member in struct sockaddr_in. ACE_HAS_SOCKADDR_IN6_SIN_LEN Platform has sin6_len member in struct @@ -514,13 +449,8 @@ ACE_HAS_SOCKLEN_T Platform provides socklen_t glibc2. ACE_HAS_SOCK_BUF_SIZE_MAX Platform limits the maximum socket message size. -ACE_HAS_SPARCWORKS_401_SIGNALS Compiler has brain-damaged - SPARCwork SunOS 4.x signal - prototype... ACE_HAS_SSIZE_T Compiler supports the ssize_t typedef -ACE_HAS_STHREADS Platform supports Solaris - threads ACE_HAS_STRBUF_T Compiler/platform supports struct strbuf ACE_HAS_STRDUP_EMULATION Use ACE's strdup() emulation (even @@ -538,26 +468,16 @@ ACE_HAS_STRICT Use the STRICT compilation mode on Win32 ACE_HAS_STRUCT_NETDB_DATA Compiler/platform has strange hostent API for socket *_r() calls -ACE_HAS_SUNOS4_SIGNAL_T Compiler has horrible SunOS - 4.x signal handlers... ACE_HAS_SVR4_DYNAMIC_LINKING Compiler/platform supports SVR4 dynamic linking semantics ACE_HAS_SVR4_GETTIMEOFDAY Compiler/platform supports SVR4 gettimeofday() prototype ACE_HAS_SVR4_SIGNAL_T Compiler/platform supports SVR4 signal typedef -ACE_HAS_SVR4_TLI Compiler/platform supports - SVR4 TLI; that is, TLI with extensions - like t_getname(). This is sometimes - used as a pseudonym for TLI on SunOS4. - This is a modifier to ACE_HAS_TLI and - isn't used if ACE_HAS_XTI is set. ACE_HAS_SYSCALL_GETRUSAGE HP/UX has an undefined syscall for GETRUSAGE... ACE_HAS_SYSENT_H Platform provides <sysent.h> header -ACE_HAS_SYSV_SYSINFO Platform supports system - configuration information ACE_HAS_SYSV_IPC Platform supports System V IPC (most versions of UNIX, but not Win32) @@ -597,7 +517,7 @@ ACE_HAS_THREAD_SAFE_ACCEPT Platform allows multiple the same port (e.g., WinNT). ACE_HAS_THREAD_SELF Platform has thread_self() rather than pthread_self() - (e.g., DCETHREADS and AIX) + (e.g., DCETHREADS) ACE_HAS_THREAD_SPECIFIC_STORAGE Compiler/platform has thread-specific storage ACE_HAS_THR_C_DEST The pthread_keycreate() @@ -611,10 +531,6 @@ ACE_HAS_TIMEZONE Platform/compiler supports ACE_HAS_TIMEZONE_GETTIMEOFDAY Platform/compiler supports timezone * as second parameter to gettimeofday() -ACE_HAS_TIMOD_H Platform supports TLI timod - STREAMS module -ACE_HAS_TIUSER_H Platform provides TLI tiuser.h - header file. ACE_HAS_TLI Platform supports TLI. Also see ACE_TLI_TCP_DEVICE. If the platform supports XTI, set ACE_HAS_XTI @@ -649,8 +565,6 @@ ACE_HAS_VERSIONED_NAMESPACE Wrap all library code within a defining preprocessor symbol ACE_VERSIONED_NAMESPACE_NAME to desired name. -ACE_LACKS_INTMAX_T Platform lacks the intmax_t type -ACE_LACKS_UINTMAX_T Platform lacks the uintmax_t type. ACE_LACKS_INTPTR_T Platform lacks the intptr_t type ACE_LACKS_UINTPTR_T Platform lacks the uintptr_t type. @@ -721,9 +635,6 @@ ACE_HAS_XTI Platform has XTI ACE_INITIALIZE_MEMORY_BEFORE_USE Memory is explicitly initialized before use. Useful when using a profiler like purify or valgrind -ACE_HRTIME_T_IS_BASIC_TYPE ACE_hrtime_t is a basic type that - doesn't require ACE_U64_TO_U32 - conversion ACE_LACKS_ACCESS Platform lacks access() (e.g., VxWorks) ACE_LACKS_ACE_IOSTREAM Platform can not build @@ -745,9 +656,6 @@ ACE_LACKS_READDIR Platform lacks readdir and the readdir ACE_LACKS_COND_TIMEDWAIT_RESET pthread_cond_timedwait does *not* reset the time argument when the lock is acquired. -ACE_LACKS_CONST_STRBUF_PTR Platform uses struct strbuf * - rather than const struct - strbuf * (e.g., HP/UX 10.x) ACE_LACKS_CONST_TIMESPEC_PTR Platform forgot const in cond_timewait (e.g., HP/UX). ACE_LACKS_COND_T Platform lacks condition @@ -758,7 +666,6 @@ ACE_LACKS_CONDATTR_PSHARED Platform has no implementation pthread_condattr_setpshared(), even though it supports pthreads! -ACE_LACKS_DIFFTIME Platform lacks difftime() implementation ACE_LACKS_DUP2 Platform lacks dup2(). ACE_LACKS_FCNTL Platform lacks POSIX-style fcntl (). ACE_LACKS_FSYNC Platform lacks fsync(). @@ -833,8 +740,6 @@ ACE_LACKS_PERFECT_MULTICAST_FILTERING Platform lacks IGMPv3 "perfect" filterin socket, and all future joins on that socket will fail with an error. ACE_LACKS_PRAGMA_ONCE Compiler complains about #pragma once -ACE_LACKS_PRI_T Platform lacks pri_t (e.g., - Tandem NonStop UNIX). ACE_LACKS_PTHREAD_CANCEL Platform lacks pthread_cancel(). ACE_LACKS_PTHREAD_SCOPE_PROCESS Platform lacks support for @@ -858,9 +763,6 @@ ACE_LACKS_RENAME Platform lacks rename(). ACE_LACKS_RLIMIT Platform/compiler lacks {get,set}rlimit() function (e.g., VxWorks) -ACE_LACKS_RLIMIT_PROTOTYPE Platform/compiler lacks - {get,set}rlimit() prototypes - (e.g., Tandem) ACE_LACKS_READDIR_R Platform uses ACE_HAS_DIRENT but does not have readdir_r (). @@ -891,8 +793,6 @@ ACE_LACKS_SETSCHED Platform lacks (e.g. MVS) ACE_LACKS_SIGACTION Platform lacks struct sigaction (e.g., Win32) -ACE_LACKS_SIGNED_CHAR Platform lacks "signed char" - type (broken!) ACE_LACKS_SIGSET Platform lacks signal sets (e.g., Win32) ACE_LACKS_STRPTIME Platform/compiler lacks the strptime() @@ -935,17 +835,6 @@ ACE_LACKS_TELLDIR Platform uses ACE_HAS_DIRENT ACE_LACKS_THREAD_STACK_SIZE Platform lacks pthread_attr_setstacksize() (e.g., Linux pthreads) -ACE_LACKS_THR_CONCURRENCY_FUNCS (ONLY APPLIES TO SOLARIS) - Platform does not support - thr_getconcurrency/thr_setconcurrency - functions, or their implementation - is effectively a "no-op". This - notably applies for Solaris >= 5.9. - Note that if you build on Solaris 8 - and run on Solaris 9+, you can - encounter thread creation errors - unless you rebuild on the target - platform. ACE_LACKS_TIMEDWAIT_PROTOTYPES MIT pthreads platform lacks the timedwait prototypes ACE_LACKS_TIMESPEC_T Platform does not define @@ -953,9 +842,6 @@ ACE_LACKS_TIMESPEC_T Platform does not define struct timespec. ACE_LACKS_TRUNCATE Platform doesn't have truncate() (e.g., vxworks) -ACE_LACKS_UALARM_PROTOTYPE Platform/compiler lacks the - ualarm() prototype (e.g., - Solaris) ACE_LACKS_CHAR_RIGHT_SHIFTS Compiler does not have any istream operator>> for chars, u_chars, or signed chars. @@ -988,16 +874,8 @@ 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 - -ACE_NEEDS_DEV_IO_CONVERSION Necessary with some compilers - to pass ACE_TTY_IO as - parameter to DEV_Connector. ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with small default stacks. -ACE_NEEDS_LWP_PRIO_SET OS has LWPs, and when the - priority of a bound thread is - set, then the LWP priority - must be set also. ACE_NEEDS_SCHED_H Platform needs to #include <sched.h> to get thread scheduling @@ -1088,13 +966,6 @@ A returns. Note: if the allocated block is beyond the current stack limit, the resulting behavior is undefined. - In HPUX: - no equivalent. - - Notes: - in HPUX it has to do new and delete. Affects performance. - - ACE_HAS_AUTOMATIC_INIT_FINI: ---------------------------- @@ -1113,15 +984,6 @@ ACE_HAS_AUTOMATIC_INIT_FINI: _init() and _fini() to be executed as is: dlsym ((char *) handle, "_fini"). - In HPUX: - don't set. - Maybe have to look into shl_load( ), shl_definesym( ), - shl_findsym( ), shl_gethandle( ), shl_getsymbols( ), - shl_unload( ), shl_get( )(3X) - explicit load of shared libraries - Means Service Configurator won't be available. - TBA. - - ACE_HAS_HI_RES_TIMER: --------------------- @@ -1137,10 +999,6 @@ ACE_HAS_HI_RES_TIMER: in the past; it is not correlated in any way to the time of day, and thus is not subject to resetting, drifting, etc. - In HPUX - look into: getclock(), reltimer(), getitimer() - maybe even vtimes structure vm_utime, vm_stime ? - Notes: TBA @@ -1151,9 +1009,6 @@ ACE_LACKS_T_ERRNO: Used In: ace/OS.h - HPUX: - set it. - Notes: if set, adds: extern int t_errno; @@ -1165,9 +1020,6 @@ ACE_HAS_POSIX_NONBLOCK: Used in: ace/OS.h - HPUX: - set it. - Notes: if defined, sets ACE_NONBLOCK and O_NONBLOCK O_NONBLOCK is used in libsrc/Misc/misc.C to do a @@ -1192,13 +1044,6 @@ ACE_HAS_PROC_FS: procfs.h defines things for the prpsinfo structure (basically to do a "ps" from inside a program). - HPUX: - don't set: obviously a different mechanism. - Look into /usr/include/sys/proc.h. The structure is proc. The - pointer to the kernel's proc table may be obtained by - extern struct proc *proc, *procNPROC; - extern int nproc; - ACE_HAS_PRUSAGE_T: ------------------ @@ -1213,10 +1058,6 @@ ACE_HAS_PRUSAGE_T: an interval. This stuff is highly non-portable. - HPUX: - don't set - - ACE_HAS_SEMUN: -------------- @@ -1231,14 +1072,6 @@ ACE_HAS_SEMUN: ushort *array; /* array for GETALL & SETALL */ }; - HPUX: - don't set. - in /usr/include/sem.h: - /* The fourth argument to semctl() varies depending on the value of - its first argument. If desired, "union semun" can be declared - by the user, but this is not necessary since the individual - member can just be passed as the argument. */ - ACE_HAS_SIG_ATOMIC_T: --------------------- @@ -1251,12 +1084,6 @@ ACE_HAS_SIG_ATOMIC_T: typedef int sig_atomic_t; This is used in the Reactor and service configurator. - HPUX: - set it. - in /usr/include/sys/signal.h: - typedef unsigned int sig_atomic_t; - - ACE_HAS_SSIZE_T: ---------------- @@ -1268,11 +1095,6 @@ ACE_HAS_SSIZE_T: typedef int ssize_t; used mostly in IPC_SAP. (don't confuse with size_t). - HPUX: - set it. - in /usr/include/sys/types.h - - ACE_HAS_STRBUF_T: ----------------- @@ -1295,10 +1117,6 @@ ACE_HAS_STRBUF_T: int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags); - HPUX: - don't set. - no SYS V.4 streams. - ACE_HAS_STREAMS: ---------------- @@ -1310,10 +1128,6 @@ ACE_HAS_STREAMS: Notes: if defined, includes <stropts.h> - HPUX: - don't set. - no SYS V.4 streams. - ACE_HAS_STREAM_PIPES: --------------------- @@ -1336,10 +1150,6 @@ ACE_HAS_STREAM_PIPES: if not set, won't be able to use the SPIPE class (IPC_SAP) with rendezvous handles. - HPUX: - don't set. - No sysV.4 streams. - ACE_HAS_SVR4_DYNAMIC_LINKING: ----------------------------- @@ -1352,12 +1162,6 @@ ACE_HAS_SVR4_DYNAMIC_LINKING: if defined, includes <dlfcn.h> with dlopen(), dlsym(), etc.. - HPUX: - don't set. - has its own: - shl_findsym( ), shl_gethandle( ), shl_getsymbols( ), - shl_unload( ), shl_get( )(3X) - explicit load of shared libraries - ACE_HAS_SVR4_GETTIMEOFDAY: -------------------------- @@ -1372,16 +1176,6 @@ ACE_HAS_SVR4_GETTIMEOFDAY: Solaris: gettimeofday (struct timeval *tp) - HPUX: - don't set. - it has gettimeofday (struct timeval *tp, struct timezone *tzp); - most calls do a: - #if defined (ACE_HAS_SVR4_GETTIMEOFDAY) - ::gettimeofday (&cur_time); - #else - ::gettimeofday (&cur_time, 0); - #endif /* ACE_HAS_SVR4_GETTIMEOFDAY */ - ACE_HAS_POLL: ------------ @@ -1402,9 +1196,6 @@ ACE_USE_POLL_IMPLEMENTATION: Notes: Use the poll() event demultiplexor rather than select(). - HPUX: - set it. - ACE_HAS_SVR4_SIGNAL_T: ---------------------- @@ -1424,26 +1215,6 @@ ACE_HAS_SVR4_SIGNAL_T: typedef void (*SignalHandlerV)(...); #endif /* ACE_HAS_SVR4_SIGNAL_T */ - HPUX: - set it. - - -ACE_HAS_SVR4_TLI: ------------------ - - Used in: - libsrc/IPC_SAP/TLI_SAP/TLI.C - libsrc/IPC_SAP/TLI_SAP/TLI.h - libsrc/IPC_SAP/TLI_SAP/TLI_Stream.C - - Notes: - TLI is the transport layer calls as in: t_bind(), t_open(), t_unbind(), - t_optmgmt(), ... in SunOS and Solaris. - - HPUX: - don't set. - Not supported. - ACE_HAS_SYS_FILIO_H: -------------------- @@ -1464,12 +1235,6 @@ ACE_HAS_SYS_FILIO_H: * in the future OS releases. */ - HPUX: - <sys/ioctl.h> defines FIOASYNC and some other ones, - <sgtty.h> defines some like FIOCLEX. - some are never defined. - use #ifdef HP-UX to modify sysincludes.h - ACE_HAS_TEMPLATE_TYPEDEFS: -------------------------- @@ -1512,30 +1277,6 @@ ACE_HAS_THREADS: We use Message_List.h even in a non-threaded environment. our XOMessageList.h does this by #ifdefs around Threaded things. - HPUX: - not until 10.0. - - -ACE_HAS_TIMOD_H: ----------------- - - Used in: - ace/OS.h - - Notes: - if defined, include <sys/timod.h> - - Solaris: - timod is a STREAMS module for use with the Transport Inter- - face (TI) functions of the Network Services library. The - timod module converts a set of ioctl(2) calls into STREAMS - messages that may be consumed by a transport protocol pro- - vider that supports the Transport Interface. This allows a - user to initiate certain TI functions as atomic operations. - - HPUX: - don't set. - ACE_HAS_TIUSER_H: ----------------- @@ -1549,9 +1290,6 @@ ACE_HAS_TIUSER_H: Solaris: in conjunction with t_bind, t_accept, etc.. transport layer. - HPUX: - don't set. - ACE_USE_POLL_IMPLEMENTATION: ---------------------------- diff --git a/ACE/ace/Reactor.cpp b/ACE/ace/Reactor.cpp index e08c9b9d141..d969f84f277 100644 --- a/ACE/ace/Reactor.cpp +++ b/ACE/ace/Reactor.cpp @@ -169,13 +169,13 @@ ACE_Reactor::name () int ACE_Reactor::check_reconfiguration (ACE_Reactor *) { -#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF) +#if !defined (ACE_LACKS_ACE_SVCCONF) if (ACE_Service_Config::reconfig_occurred ()) { ACE_Service_Config::reconfigure (); return 1; } -#endif /* ! ACE_HAS_WINCE || ! ACE_LACKS_ACE_SVCCONF */ +#endif /* !ACE_LACKS_ACE_SVCCONF */ return 0; } diff --git a/ACE/ace/Reactor_Token_T.h b/ACE/ace/Reactor_Token_T.h index 3f9adec8e80..2d7933fb834 100644 --- a/ACE/ace/Reactor_Token_T.h +++ b/ACE/ace/Reactor_Token_T.h @@ -79,13 +79,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Reactor_Token_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Reactor_Token_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_REACTOR_TOKEN_T_H */ diff --git a/ACE/ace/Read_Buffer.cpp b/ACE/ace/Read_Buffer.cpp index e3667a66b07..ba174065181 100644 --- a/ACE/ace/Read_Buffer.cpp +++ b/ACE/ace/Read_Buffer.cpp @@ -41,7 +41,6 @@ ACE_Read_Buffer::ACE_Read_Buffer (FILE *fp, this->allocator_ = ACE_Allocator::instance (); } -#if !defined (ACE_HAS_WINCE) ACE_Read_Buffer::ACE_Read_Buffer (ACE_HANDLE handle, bool close_on_delete, ACE_Allocator *alloc) @@ -56,7 +55,6 @@ ACE_Read_Buffer::ACE_Read_Buffer (ACE_HANDLE handle, if (this->allocator_ == 0) this->allocator_ = ACE_Allocator::instance (); } -#endif // ACE_HAS_WINCE ACE_Read_Buffer::~ACE_Read_Buffer () { diff --git a/ACE/ace/Read_Buffer.h b/ACE/ace/Read_Buffer.h index d91adb95f37..ee3a96133b0 100644 --- a/ACE/ace/Read_Buffer.h +++ b/ACE/ace/Read_Buffer.h @@ -49,14 +49,10 @@ public: bool close_on_delete = false, ACE_Allocator * = 0); -#if !defined (ACE_HAS_WINCE) - // Note that ACE_HANDLE = FILE under CE. - /// Read from an open HANDLE. ACE_Read_Buffer (ACE_HANDLE handle, bool close_on_delete = false, ACE_Allocator * = 0); -#endif // ACE_HAS_WINCE /// Closes the FILE *. ~ACE_Read_Buffer (); diff --git a/ACE/ace/Recursive_Thread_Mutex.cpp b/ACE/ace/Recursive_Thread_Mutex.cpp index 398f56bff1e..1f7b2dc8129 100644 --- a/ACE/ace/Recursive_Thread_Mutex.cpp +++ b/ACE/ace/Recursive_Thread_Mutex.cpp @@ -79,7 +79,7 @@ int ACE_Recursive_Thread_Mutex::get_nesting_level () { // ACE_TRACE ("ACE_Recursive_Thread_Mutex::get_nesting_level"); -#if defined (ACE_HAS_VXTHREADS) || defined (ACE_HAS_PHARLAP) || defined (ACE_HAS_WINCE) +#if defined (ACE_HAS_VXTHREADS) || defined (ACE_HAS_PHARLAP) ACE_NOTSUP_RETURN (-1); #elif defined (ACE_HAS_RECURSIVE_MUTEXES) # if defined (ACE_WIN32) @@ -99,7 +99,7 @@ ACE_Recursive_Thread_Mutex::get_nesting_level () nesting_level = this->lock_.nesting_level_; ACE_OS::mutex_unlock (&this->lock_.nesting_mutex_); return nesting_level; -#endif /* !ACE_HAS_WINCE */ +#endif /* ACE_HAS_VXTHREADS || ACE_HAS_PHARLAP */ } void diff --git a/ACE/ace/Refcountable_T.h b/ACE/ace/Refcountable_T.h index 73b6d04021e..5dab2e6e540 100644 --- a/ACE/ace/Refcountable_T.h +++ b/ACE/ace/Refcountable_T.h @@ -54,13 +54,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Refcountable_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Refcountable_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Refcountable_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /*ACE_REFCOUNTABLE_T_H*/ diff --git a/ACE/ace/Refcounted_Auto_Ptr.h b/ACE/ace/Refcounted_Auto_Ptr.h index f5d18f1f029..e63af3a0481 100644 --- a/ACE/ace/Refcounted_Auto_Ptr.h +++ b/ACE/ace/Refcounted_Auto_Ptr.h @@ -183,13 +183,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Refcounted_Auto_Ptr.inl" -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Refcounted_Auto_Ptr.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Refcounted_Auto_Ptr.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Registry.cpp b/ACE/ace/Registry.cpp index 4e7a2aa78e2..ddd8e77923e 100644 --- a/ACE/ace/Registry.cpp +++ b/ACE/ace/Registry.cpp @@ -1071,12 +1071,6 @@ ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_co HKEY predefined, const ACE_TCHAR *machine_name) { -#if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG(naming_context); - ACE_UNUSED_ARG(predefined); - ACE_UNUSED_ARG(machine_name); - return -1; -#else long result = -1; if (machine_name != 0 && ACE_OS::strcmp (ACE_TEXT ("localhost"), machine_name) == 0) @@ -1101,10 +1095,9 @@ ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_co } ACE_REGISTRY_CALL_RETURN (result); -#endif // ACE_HAS_WINCE } -// Check if <machine_name> is the local host +/// Check if @a machine_name is the local host /* static */ int ACE_Predefined_Naming_Contexts::is_local_host (const ACE_TCHAR *machine_name) diff --git a/ACE/ace/Reverse_Lock_T.h b/ACE/ace/Reverse_Lock_T.h index 3348c837b6f..9f0d2ae659f 100644 --- a/ACE/ace/Reverse_Lock_T.h +++ b/ACE/ace/Reverse_Lock_T.h @@ -122,13 +122,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Reverse_Lock_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Reverse_Lock_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Reverse_Lock_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_REVERSE_LOCK_T_H */ diff --git a/ACE/ace/Rtems_init.c b/ACE/ace/Rtems_init.c deleted file mode 100644 index 389169d7a32..00000000000 --- a/ACE/ace/Rtems_init.c +++ /dev/null @@ -1,216 +0,0 @@ - -#if defined (ACE_HAS_RTEMS) - -#define RTEMS_BSP_NETWORK_DRIVER_NAME "ne1" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_ne_driver_attach -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 256 - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 100 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 300 -#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 300 -#define CONFIGURE_MAXIMUM_POSIX_KEYS 100 -#define CONFIGURE_MAXIMUM_POSIX_TIMERS 100 -#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 10 -#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 300 -#define CONFIGURE_POSIX_INIT_THREAD_TABLE -#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT Init -#define CONFIGURE_MEMORY_FOR_POSIX (10*1024) -#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (10*1024) - -#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 - -#define CONFIGURE_MAXIMUM_SEMAPHORES 100 -#define CONFIGURE_MAXIMUM_TASKS 100 -#define CONFIGURE_INIT_TASK_PRIORITY 120 -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#include <bsp.h> - -char *rtems_progname; - -#define CONFIGURE_INIT - -rtems_task Init (rtems_task_argument argument); - -#include <confdefs.h> - -#include <stdio.h> - -#if !defined (ACE_LACKS_NETWORKING) - -#include <rtems/rtems_bsdnet.h> - -/* - * Network configuration - * - ************************************************************ - * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION * - * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! * - ************************************************************ - */ - -#ifndef _RTEMS_NETWORKCONFIG_H_ -#define _RTEMS_NETWORKCONFIG_H_ - -#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME -#warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined" -#define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1" -#endif - -#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH -#warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0 -#endif - -/* #define RTEMS_USE_BOOTP */ - -#include <bsp.h> - -/* - * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the - * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not - * defined the driver will choose an address. - */ -#define RTEMS_SET_ETHERNET_ADDRESS -#if (defined (RTEMS_SET_ETHERNET_ADDRESS)) -static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 }; - -#endif - -#define RTEMS_USE_LOOPBACK - -#ifdef RTEMS_USE_LOOPBACK -/* - * Loopback interface - */ -int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int); - -#ifdef RTEMS_USE_LOOPBACK_ONLY -static struct rtems_bsdnet_ifconfig netdriver_config = { -#else -static struct rtems_bsdnet_ifconfig loopback_config = { -#endif - "lo0", /* name */ - rtems_bsdnet_loopattach, /* attach function */ - 0, /* link to next interface */ - "127.0.0.1", /* IP address */ - "255.0.0.0", /* IP net mask */ -}; -#endif - -/* - * Default network interface - */ -#ifndef RTEMS_USE_LOOPBACK_ONLY -static struct rtems_bsdnet_ifconfig netdriver_config = { - RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ - RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ - -#ifdef RTEMS_USE_LOOPBACK - &loopback_config, /* link to next interface */ -#else - 0, /* No more interfaces */ -#endif - -#if (defined (RTEMS_USE_BOOTP)) - 0, /* BOOTP supplies IP address */ - 0, /* BOOTP supplies IP net mask */ -#else - "XXX.YYY.ZZZ.XYZ", /* IP address */ - "255.255.255.0", /* IP net mask */ -#endif /* !RTEMS_USE_BOOTP */ - -#if (defined (RTEMS_SET_ETHERNET_ADDRESS)) - ethernet_address, /* Ethernet hardware address */ -#else - 0, /* Driver supplies hardware address */ -#endif - 0 /* Use default driver parameters */ -}; -#endif - -/* - * Network configuration - */ -struct rtems_bsdnet_config rtems_bsdnet_config = { - &netdriver_config, - -#if (defined (RTEMS_USE_BOOTP)) - rtems_bsdnet_do_bootp, -#else - 0, -#endif - - 0, /* Default network task priority */ - 0, /* Default mbuf capacity */ - 0, /* Default mbuf cluster capacity */ - -#if (!defined (RTEMS_USE_BOOTP)) - "rtems_host", /* Host name */ - "nodomain.com", /* Domain name */ - "XXX.YYY.ZZZ.1", /* Gateway */ - "XXX.YYY.ZZZ.1", /* Log host */ - {"XXX.YYY.ZZZ.1" }, /* Name server(s) */ - {"XXX.YYY.ZZZ.1" }, /* NTP server(s) */ - - /* - * A real example -- DO NOT USE THIS YOURSELF!!! - */ - -#if 0 - "dy4", /* Host name */ - "NOT_oarcorp.com", /* Domain name */ - "192.168.1.2", /* Gateway */ - "192.168.1.2", /* Log host */ - {"192.168.1.2" }, /* Name server(s) */ - {"192.168.1.2" }, /* NTP server(s) */ -#endif -#endif /* !RTEMS_USE_BOOTP */ - -}; - -/* - * For TFTP test application - */ -#if (defined (RTEMS_USE_BOOTP)) -#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST" -#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE" -#else -#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" -#define RTEMS_TFTP_TEST_FILE_NAME "tftptest" -#endif - -#endif /* _RTEMS_NETWORKCONFIG_H_ */ - -#endif /* ACE_LACKS_NETWORKING */ - -extern int main (int, char *[]); - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument not_used) -{ - int retval = 0; -#if !defined (ACE_LACKS_NETWORKING) - retval = rtems_bsdnet_initialize_network (); -#endif /* ACE_LACKS_NETWORKING */ - if (retval == 0) - { - retval = main (0, 0); - } -} - -#elif !defined (__GNUC__) && !defined (__INTEL_COMPILER) -/* Make compilers stop complaining about an empty translation unit */ -static int shut_up_compiler = 0; -#endif /* ACE_HAS_RTEMS */ diff --git a/ACE/ace/SOCK_Acceptor.cpp b/ACE/ace/SOCK_Acceptor.cpp index 19af145fa81..b0c62030d7e 100644 --- a/ACE/ace/SOCK_Acceptor.cpp +++ b/ACE/ace/SOCK_Acceptor.cpp @@ -13,9 +13,7 @@ #include "ace/SOCK_Acceptor.inl" #endif /* __ACE_INLINE__ */ -#if !defined (ACE_HAS_WINCE) #include "ace/OS_QoS.h" -#endif // ACE_HAS_WINCE ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -154,7 +152,6 @@ ACE_SOCK_Acceptor::accept (ACE_SOCK_Stream &new_stream, reset_new_handle); } -#if !defined (ACE_HAS_WINCE) int ACE_SOCK_Acceptor::accept (ACE_SOCK_Stream &new_stream, ACE_Accept_QoS_Params qos_params, @@ -206,7 +203,6 @@ ACE_SOCK_Acceptor::accept (ACE_SOCK_Stream &new_stream, in_blocking_mode, reset_new_handle); } -#endif // ACE_HAS_WINCE void ACE_SOCK_Acceptor::dump () const diff --git a/ACE/ace/SOCK_Acceptor.h b/ACE/ace/SOCK_Acceptor.h index 1dc947fb9cf..a4035fcd92d 100644 --- a/ACE/ace/SOCK_Acceptor.h +++ b/ACE/ace/SOCK_Acceptor.h @@ -119,7 +119,6 @@ public: bool restart = true, bool reset_new_handle = false) const; -#if !defined (ACE_HAS_WINCE) /** * Accept a new ACE_SOCK_Stream connection using the QoS * information in @a qos_params. A @a timeout of 0 means block @@ -136,7 +135,6 @@ public: ACE_Time_Value *timeout = 0, bool restart = true, bool reset_new_handle = false) const; -#endif // ACE_HAS_WINCE // = Meta-type info typedef ACE_INET_Addr PEER_ADDR; diff --git a/ACE/ace/SOCK_Connector.cpp b/ACE/ace/SOCK_Connector.cpp index cba9987fa0e..df7cb39adc4 100644 --- a/ACE/ace/SOCK_Connector.cpp +++ b/ACE/ace/SOCK_Connector.cpp @@ -8,9 +8,7 @@ # include "ace/Malloc_Base.h" #endif /* ACE_HAS_ALLOC_HOOKS */ -#if !defined (ACE_HAS_WINCE) #include "ace/OS_QoS.h" -#endif // ACE_HAS_WINCE #if !defined (__ACE_INLINE__) #include "ace/SOCK_Connector.inl" @@ -216,7 +214,6 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream, return this->shared_connect_finish (new_stream, timeout, result); } -#if !defined (ACE_HAS_WINCE) int ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream, const ACE_Addr &remote_sap, @@ -264,10 +261,8 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream, return this->shared_connect_finish (new_stream, timeout, result); } -#endif // ACE_HAS_WINCE // Try to complete a non-blocking connection. - int ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream, ACE_Addr *remote_sap, @@ -344,7 +339,6 @@ ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream, ACE_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector"))); } -#if !defined (ACE_HAS_WINCE) ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream, const ACE_Addr &remote_sap, ACE_QoS_Params qos_params, @@ -374,6 +368,5 @@ ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector"))); } -#endif // ACE_HAS_WINCE ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/SOCK_Connector.h b/ACE/ace/SOCK_Connector.h index 2a7dde20db4..ddf4e324434 100644 --- a/ACE/ace/SOCK_Connector.h +++ b/ACE/ace/SOCK_Connector.h @@ -90,7 +90,6 @@ public: int perms = 0, int protocol = 0); -#if !defined (ACE_HAS_WINCE) /** * Actively connect to a peer, producing a connected @c ACE_SOCK_Stream * object if the connection succeeds. @@ -139,7 +138,6 @@ public: u_long flags = 0, int reuse_addr = 0, int perms = 0); -#endif // ACE_HAS_WINCE /** * Actively connect to a peer, producing a connected @c ACE_SOCK_Stream @@ -191,7 +189,6 @@ public: int perms = 0, int protocol = 0); -#if !defined (ACE_HAS_WINCE) /** * Actively connect to a peer, producing a connected @c ACE_SOCK_Stream * object if the connection succeeds. @@ -244,7 +241,6 @@ public: u_long flags = 0, int reuse_addr = 0, int perms = 0); -#endif // ACE_HAS_WINCE /// Default destructor. ~ACE_SOCK_Connector (); diff --git a/ACE/ace/SOCK_Dgram.cpp b/ACE/ace/SOCK_Dgram.cpp index 8c03e610fb0..d23422f4225 100644 --- a/ACE/ace/SOCK_Dgram.cpp +++ b/ACE/ace/SOCK_Dgram.cpp @@ -419,8 +419,8 @@ ACE_SOCK_Dgram::send (const iovec iov[], // Determine the total length of all the buffers in <iov>. for (i = 0; i < n; i++) -#if ! (defined(ACE_LACKS_IOVEC) || defined(ACE_LINUX) || defined(ACE_HAS_RTEMS)) - // The iov_len is unsigned on Linux, RTEMS and when using the ACE iovec struct. If we go +#if ! (defined(ACE_LACKS_IOVEC) || defined(ACE_LINUX)) + // The iov_len is unsigned on Linux and when using the ACE iovec struct. If we go // ahead and try the if, it will emit a warning. if (iov[i].iov_len < 0) return -1; @@ -480,8 +480,8 @@ ACE_SOCK_Dgram::recv (iovec iov[], ACE_UNUSED_ARG (to_addr); for (i = 0; i < n; i++) -#if ! (defined(ACE_LACKS_IOVEC) || defined(ACE_LINUX) || defined(ACE_HAS_RTEMS)) - // The iov_len is unsigned on Linux, RTEMS and when using the ACE iovec struct. If we go +#if ! (defined(ACE_LACKS_IOVEC) || defined(ACE_LINUX)) + // The iov_len is unsigned on Linux and when using the ACE iovec struct. If we go // ahead and try the if, it will emit a warning. if (iov[i].iov_len < 0) return -1; diff --git a/ACE/ace/SOCK_Dgram_Bcast.cpp b/ACE/ace/SOCK_Dgram_Bcast.cpp index 903bfd742ea..129fcdce25b 100644 --- a/ACE/ace/SOCK_Dgram_Bcast.cpp +++ b/ACE/ace/SOCK_Dgram_Bcast.cpp @@ -162,7 +162,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) } -#if !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__) +#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__) for (int n = ifc.ifc_len / sizeof (struct ifreq) ; n > 0; n--, ifr++) #else @@ -180,7 +180,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) ifr = (struct ifreq *) ((caddr_t) &ifr->ifr_addr + ifr->ifr_addr.sa_len)) : (nbytes -= sizeof (struct ifreq), ifr++))) -#endif /* !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__) */ +#endif /* !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__) */ { #if defined (__QNX__) || defined (ACE_VXWORKS) // Silently skip link interfaces diff --git a/ACE/ace/SOCK_SEQPACK_Association.cpp b/ACE/ace/SOCK_SEQPACK_Association.cpp index 4fa2da226f0..700c046f455 100644 --- a/ACE/ace/SOCK_SEQPACK_Association.cpp +++ b/ACE/ace/SOCK_SEQPACK_Association.cpp @@ -90,11 +90,7 @@ ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &siz int err = 0; size_t len = 0; -#ifndef ACE_HAS_VOID_PTR_SCTP_GETLADDRS err = sctp_getladdrs(this->get_handle(), 0, &laddrs); -#else - err = sctp_getladdrs(this->get_handle(), 0, reinterpret_cast<void**>(&laddrs)); -#endif /* ACE_HAS_VOID_PTR_SCTP_GETPADDRS */ if (err > 0) { len = err; diff --git a/ACE/ace/SPIPE_Connector.cpp b/ACE/ace/SPIPE_Connector.cpp index 2f8e4a96269..c507b47ee92 100644 --- a/ACE/ace/SPIPE_Connector.cpp +++ b/ACE/ace/SPIPE_Connector.cpp @@ -67,8 +67,7 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io, ACE_HANDLE handle; ACE_UNUSED_ARG (pipe_mode); -#if defined (ACE_WIN32) && \ - !defined (ACE_HAS_PHARLAP) && !defined (ACE_HAS_WINCE) +#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) // We need to allow for more than one attempt to connect, // calculate the absolute time at which we give up. ACE_Time_Value absolute_time; @@ -148,7 +147,7 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io, handle = ACE::handle_timed_open (timeout, remote_sap.get_path_name (), flags, perms, sa); -#endif /* !ACE_WIN32 || ACE_HAS_PHARLAP || ACE_HAS_WINCE */ +#endif /* !ACE_WIN32 || ACE_HAS_PHARLAP */ new_io.set_handle (handle); new_io.remote_addr_ = remote_sap; // class copy. diff --git a/ACE/ace/SPIPE_Stream.inl b/ACE/ace/SPIPE_Stream.inl index 08b9071b2fa..6f78a4fe5cd 100644 --- a/ACE/ace/SPIPE_Stream.inl +++ b/ACE/ace/SPIPE_Stream.inl @@ -102,9 +102,7 @@ ACE_SPIPE_Stream::send_handle (ACE_HANDLE handle) const ACE_TRACE ("ACE_SPIPE_Stream::send_handle"); #if defined (ACE_HAS_STREAM_PIPES) return ACE_OS::ioctl (this->get_handle (), I_SENDFD, (void *) handle); -#elif defined (ACE_WIN32) && \ - (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) && \ - !defined (ACE_HAS_WINCE) /* CE4 has WS2 but not WSADuplicateSocket */ +#elif defined (ACE_WIN32) && (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) DWORD procID; WSAPROTOCOL_INFO protInfo; ssize_t res = this->recv(&procID, sizeof(procID)); diff --git a/ACE/ace/SSL/SSL_Asynch_BIO.cpp b/ACE/ace/SSL/SSL_Asynch_BIO.cpp index 64aa14c6ab9..0faa775fc0f 100644 --- a/ACE/ace/SSL/SSL_Asynch_BIO.cpp +++ b/ACE/ace/SSL/SSL_Asynch_BIO.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- #include "SSL_Asynch_BIO.h" -#if OPENSSL_VERSION_NUMBER > 0x0090581fL && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))) +#if OPENSSL_VERSION_NUMBER > 0x0090581fL && (defined (ACE_WIN32) || (defined (ACE_HAS_AIO_CALLS))) #include "SSL_Asynch_Stream.h" #include "ace/OS_NS_string.h" diff --git a/ACE/ace/SSL/SSL_Asynch_BIO.h b/ACE/ace/SSL/SSL_Asynch_BIO.h index 70b1a0fcc00..1d5aec2ff5d 100644 --- a/ACE/ace/SSL/SSL_Asynch_BIO.h +++ b/ACE/ace/SSL/SSL_Asynch_BIO.h @@ -25,7 +25,7 @@ #include <openssl/bio.h> -#if OPENSSL_VERSION_NUMBER > 0x0090581fL && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))) +#if OPENSSL_VERSION_NUMBER > 0x0090581fL && (defined (ACE_WIN32) || (defined (ACE_HAS_AIO_CALLS))) ACE_BEGIN_VERSIONED_NAMESPACE_DECL extern BIO * ACE_SSL_make_BIO (void * ssl_asynch_stream); diff --git a/ACE/ace/SSL/SSL_Asynch_Stream.cpp b/ACE/ace/SSL/SSL_Asynch_Stream.cpp index a673b6f371a..ed5a1e1f440 100644 --- a/ACE/ace/SSL/SSL_Asynch_Stream.cpp +++ b/ACE/ace/SSL/SSL_Asynch_Stream.cpp @@ -1,7 +1,7 @@ #include "SSL_Asynch_Stream.h" // This only works on platforms with Asynchronous IO support. -#if OPENSSL_VERSION_NUMBER > 0x0090581fL && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))) +#if OPENSSL_VERSION_NUMBER > 0x0090581fL && (defined (ACE_WIN32) || (defined (ACE_HAS_AIO_CALLS))) #if defined (ACE_WIN32) # include "ace/WIN32_Proactor.h" diff --git a/ACE/ace/SSL/SSL_Asynch_Stream.h b/ACE/ace/SSL/SSL_Asynch_Stream.h index 39fb2bb46e2..db86bf1f9f8 100644 --- a/ACE/ace/SSL/SSL_Asynch_Stream.h +++ b/ACE/ace/SSL/SSL_Asynch_Stream.h @@ -18,7 +18,7 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if OPENSSL_VERSION_NUMBER > 0x0090581fL && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))) +#if OPENSSL_VERSION_NUMBER > 0x0090581fL && (defined (ACE_WIN32) || (defined (ACE_HAS_AIO_CALLS))) #include "SSL_Asynch_BIO.h" diff --git a/ACE/ace/SSL/SSL_Context.cpp b/ACE/ace/SSL/SSL_Context.cpp index 09020466e73..9313dc5717f 100644 --- a/ACE/ace/SSL/SSL_Context.cpp +++ b/ACE/ace/SSL/SSL_Context.cpp @@ -516,10 +516,10 @@ ACE_SSL_Context::load_trusted_ca (const char* ca_file, } // SSL_add_dir_cert_subjects_to_stack is defined at 0.9.8a (but not - // on OpenVMS or Mac Classic); it may be available earlier. Change + // on Mac Classic); it may be available earlier. Change // this comparison if so. It's still (1.0.1g) broken on windows too. #if defined (OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090801fL) -# if !defined (OPENSSL_SYS_VMS) && !defined (OPENSSL_SYS_MACINTOSH_CLASSIC) +# if !defined (OPENSSL_SYS_MACINTOSH_CLASSIC) # if !defined (OPENSSL_SYS_WIN32) if (ca_dir != 0) @@ -542,7 +542,7 @@ ACE_SSL_Context::load_trusted_ca (const char* ca_file, } } # endif /* !OPENSSL_SYS_WIN32 */ -# endif /* !OPENSSL_SYS_VMS && !OPENSSL_SYS_MACINTOSH_CLASSIC */ +# endif /* !OPENSSL_SYS_MACINTOSH_CLASSIC */ #endif /* OPENSSL_VERSION_NUMBER >= 0.9.8a release */ } diff --git a/ACE/ace/SSL/SSL_Context.h b/ACE/ace/SSL/SSL_Context.h index 97eae945e62..91903f788c3 100644 --- a/ACE/ace/SSL/SSL_Context.h +++ b/ACE/ace/SSL/SSL_Context.h @@ -57,7 +57,7 @@ private: // **************************************************************** -// NOTE: Solaris studio compilers amongst others will issue warnings if the +// NOTE: Some compilers will issue warnings if the // the correct type of function pointer (i.e. extern "C" ) is not stored/used // of the form: // Warning (Anachronism): Formal argument callback of type diff --git a/ACE/ace/SString.inl b/ACE/ace/SString.inl index 75b261a34c2..1757425725c 100644 --- a/ACE/ace/SString.inl +++ b/ACE/ace/SString.inl @@ -1,7 +1,5 @@ // -*- C++ -*- -// Include ACE.h only if it hasn't already been included, e.g., if -// ACE_TEMPLATES_REQUIRE_SOURCE, ACE.h won't have been pulled in by -// String_Base.cpp. +// Include ACE.h only if it hasn't already been included #ifndef ACE_ACE_H # include "ace/ACE.h" #endif /* !ACE_ACE_H */ diff --git a/ACE/ace/SUN_Proactor.cpp b/ACE/ace/SUN_Proactor.cpp deleted file mode 100644 index 6caf2858d67..00000000000 --- a/ACE/ace/SUN_Proactor.cpp +++ /dev/null @@ -1,314 +0,0 @@ -#include "ace/SUN_Proactor.h" - -#if defined (ACE_HAS_AIO_CALLS) && defined (sun) - -#include "ace/Task_T.h" -#include "ace/Log_Category.h" -#include "ace/Object_Manager.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_SUN_Proactor::ACE_SUN_Proactor (size_t max_aio_operations) - : ACE_POSIX_AIOCB_Proactor (max_aio_operations, - ACE_POSIX_Proactor::PROACTOR_SUN), - condition_ (mutex_) -{ - // To provide correct virtual calls. - create_notify_manager (); - - // we should start pseudo-asynchronous accept task - // one per all future acceptors - - this->get_asynch_pseudo_task ().start (); -} - -// Destructor. -ACE_SUN_Proactor::~ACE_SUN_Proactor () -{ - this->close (); -} - -int -ACE_SUN_Proactor::handle_events (ACE_Time_Value &wait_time) -{ - // Decrement <wait_time> with the amount of time spent in the method - ACE_Countdown_Time countdown (&wait_time); - return this->handle_events_i (&wait_time); -} - -int -ACE_SUN_Proactor::handle_events () -{ - return this->handle_events_i (0); -} - -int ACE_SUN_Proactor::wait_for_start (ACE_Time_Value * abstime) -{ -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, mutex_, -1)); - - if (this->num_started_aio_ != 0) // double check - return 0; - - return this->condition_.wait (abstime); - -#else - - return 0; // or -1 ??? - -#endif /* ACE_MT_SAFE */ -} - -int -ACE_SUN_Proactor::handle_events_i (ACE_Time_Value *delta) -{ - int retval = 0; - aio_result_t *result = 0; - - if (0 == delta) - { - if (this->num_started_aio_ == 0) - this->wait_for_start (0); - - result = aiowait (0); - } - else - { - if (this->num_started_aio_ == 0) - { - // Decrement delta with the amount of time spent waiting - ACE_Countdown_Time countdown (delta); - ACE_Time_Value tv (*delta); - tv += ACE_OS::gettimeofday (); - if (this->wait_for_start (&tv) == -1) - return -1; - } - struct timeval delta_tv = *delta; - result = aiowait (&delta_tv); - } - - if (result == 0) - { - // timeout, do nothing, - // we should process "post_completed" queue - } - else if (reinterpret_cast<long> (result) == -1) - { - // Check errno for EINVAL,EAGAIN,EINTR ?? - switch (errno) - { - case EINTR : // aiowait() was interrupted by a signal. - case EINVAL: // there are no outstanding asynchronous I/O requests. - break; // we should process "post_completed" queue - - default: // EFAULT - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT("%N:%l:(%P | %t)::%p \nNumAIO=%d\n"), - ACE_TEXT("ACE_SUN_Proactor::handle_events: aiowait failed"), - num_started_aio_), - -1); - } - } - else - { - int error_status = 0; - size_t transfer_count = 0; - - ACE_POSIX_Asynch_Result *asynch_result = - find_completed_aio (result, - error_status, - transfer_count); - - if (asynch_result != 0) - { - // Call the application code. - this->application_specific_code (asynch_result, - transfer_count, - 0, // No completion key. - error_status); // Error - retval++; - } - } - - // process post_completed results - retval += this->process_result_queue (); - - return retval > 0 ? 1 : 0 ; -} - -int -ACE_SUN_Proactor::get_result_status (ACE_POSIX_Asynch_Result* asynch_result, - int &error_status, - size_t &transfer_count) -{ - // Get the error status of the aio_ operation. - error_status = asynch_result->aio_resultp.aio_errno; - ssize_t op_return = asynch_result->aio_resultp.aio_return; - - // ****** from Sun man pages ********************* - // Upon completion of the operation both aio_return and aio_errno - // are set to reflect the result of the operation. - // AIO_INPROGRESS is not a value used by the system - // so the client may detect a change in state - // by initializing aio_return to this value. - - if (error_status == EINPROGRESS || op_return == AIO_INPROGRESS) - return 0; // not completed - - if (op_return < 0) - transfer_count = 0; // zero bytes transferred - else - transfer_count = static_cast<size_t> (op_return); - - return 1; // completed -} - -ACE_POSIX_Asynch_Result * -ACE_SUN_Proactor::find_completed_aio (aio_result_t *result, - int &error_status, - size_t &transfer_count) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, mutex_, 0)); - - size_t ai; - error_status = -1; - transfer_count = 0; - - // we call find_completed_aio always with result != 0 - - for (ai = 0; ai < aiocb_list_max_size_; ai++) - if (aiocb_list_[ai] != 0 && //check for non zero - result == &aiocb_list_[ai]->aio_resultp) - break; - - if (ai >= aiocb_list_max_size_) // not found - return 0; // means somebody else uses aio directly!!! - - ACE_POSIX_Asynch_Result *asynch_result = result_list_[ai]; - - if (this->get_result_status (asynch_result, - error_status, - transfer_count) == 0) - { // should never be - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT("%N:%l:(%P | %t)::%p\n"), - ACE_TEXT("ACE_SUN_Proactor::find_completed_aio:") - ACE_TEXT("should never be !!!\n"))); - return 0; - } - - aiocb_list_[ai] = 0; - result_list_[ai] = 0; - aiocb_list_cur_size_--; - - num_started_aio_--; - - start_deferred_aio (); - //make attempt to start deferred AIO - //It is safe as we are protected by mutex_ - - return asynch_result; -} - -// start_aio_i has new return codes -// 0 successful start -// 1 try later, OS queue overflow -// -1 invalid request and other errors - -int -ACE_SUN_Proactor::start_aio_i (ACE_POSIX_Asynch_Result *result) -{ - ACE_TRACE ("ACE_SUN_Proactor::start_aio_i"); - - int ret_val; - const ACE_TCHAR *ptype; - - // ****** from Sun man pages ********************* - // Upon completion of the operation both aio_return and aio_errno - // are set to reflect the result of the operation. - // AIO_INPROGRESS is not a value used by the system - // so the client may detect a change in state - // by initializing aio_return to this value. - result->aio_resultp.aio_return = AIO_INPROGRESS; - result->aio_resultp.aio_errno = EINPROGRESS; - - // Start IO - switch (result->aio_lio_opcode) - { - case LIO_READ : - ptype = ACE_TEXT ("read"); - ret_val = aioread (result->aio_fildes, - (char *) result->aio_buf, - result->aio_nbytes, - result->aio_offset, - SEEK_SET, - &result->aio_resultp); - break; - - case LIO_WRITE : - ptype = ACE_TEXT ("write"); - ret_val = aiowrite (result->aio_fildes, - (char *) result->aio_buf, - result->aio_nbytes, - result->aio_offset, - SEEK_SET, - &result->aio_resultp); - break; - - default: - ptype = ACE_TEXT ("?????"); - ret_val = -1; - break; - } - - if (ret_val == 0) - { - this->num_started_aio_++; - if (this->num_started_aio_ == 1) // wake up condition - this->condition_.broadcast (); - } - else // if (ret_val == -1) - { - if (errno == EAGAIN || errno == ENOMEM) // Defer - retry this later. - ret_val = 1; - else - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%N:%l:(%P | %t)::start_aio: aio%s %p\n"), - ptype, - ACE_TEXT ("queueing failed\n"))); - } - - return ret_val; -} - -int -ACE_SUN_Proactor::cancel_aiocb (ACE_POSIX_Asynch_Result *result) -{ - ACE_TRACE ("ACE_SUN_Proactor::cancel_aiocb"); - int rc = ::aiocancel (&result->aio_resultp); - if (rc == 0) // AIO_CANCELED - { - // after aiocancel Sun does not notify us - // so we should send notification - // to save POSIX behavoir. - // Also we should do this for deffered aio's - - result->set_error (ECANCELED); - result->set_bytes_transferred (0); - this->putq_result (result); - return 0; - } - - return 2; -} - -ACE_POSIX_Proactor::Proactor_Type -ACE_SUN_Proactor::get_impl_type () -{ - return PROACTOR_SUN; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_AIO_CALLS && sun */ diff --git a/ACE/ace/SUN_Proactor.h b/ACE/ace/SUN_Proactor.h deleted file mode 100644 index 376a9cdf60a..00000000000 --- a/ACE/ace/SUN_Proactor.h +++ /dev/null @@ -1,123 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file SUN_Proactor.h - * - * @author Alexander Libman <alibman@baltimore.com> - */ -//============================================================================= - -#ifndef ACE_SUN_PROACTOR_H -#define ACE_SUN_PROACTOR_H - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_AIO_CALLS) && defined (sun) - -#include "ace/POSIX_Proactor.h" -#include /**/ <sys/asynch.h> // Sun native aio calls - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_SUN_Proactor - * - * @brief Implementation of the fast and reliable Proactor - * for SunOS 5.6, 5.7, etc. - * - * This proactor, based on ACE_POSIX_AIOCB_Proactor, - * works with Sun native interface for aio calls. - * POSIX_API Native SUN_API - * aio_read aioread - * aio_write aiowrite - * aio_suspend aiowait - * aio_error aio_result_t.errno - * aio_return aio_result_t.return - * On Solaris, the Sun <aio*()> native implementation is more - * reliable and efficient than POSIX <aio_*()> implementation. - * There is a problem of lost RT signals with POSIX, if we start - * more than SIGQUEUEMAX asynchronous operations at the same - * time. - * The Sun <aiocb> it is not the standard POSX <aiocb>, instead, - * it has the following structure: - * typedef struct aiocb - * { - * int aio_fildes; File descriptor - * void *aio_buf; buffer location - * size_t aio_nbytes; length of transfer - * off_t aio_offset; file offset - * int aio_reqprio; request priority offset - * sigevent aio_sigevent; signal number and offset - * int aio_lio_opcode; listio operation - * aio_result_t aio_resultp; results - * int aio_state; state flag for List I/O - * int aio__pad[1]; extension padding - * }; - */ -class ACE_Export ACE_SUN_Proactor : public ACE_POSIX_AIOCB_Proactor -{ -public: - virtual Proactor_Type get_impl_type (); - - /// Destructor. - virtual ~ACE_SUN_Proactor (); - - /// Constructor defines max number asynchronous operations that can - /// be started at the same time. - ACE_SUN_Proactor (size_t max_aio_operations = ACE_AIO_DEFAULT_SIZE); - -protected: - /** - * Dispatch a single set of events. If @a wait_time elapses before - * any events occur, return 0. Return 1 on success i.e., when a - * completion is dispatched, non-zero (-1) on errors and errno is - * set accordingly. - */ - virtual int handle_events (ACE_Time_Value &wait_time); - - /** - * Block indefinitely until at least one event is dispatched. - * Dispatch a single set of events. Return 1 on success i.e., when a - * completion is dispatched, non-zero (-1) on errors and errno is - * set accordingly. - */ - virtual int handle_events (); - - /// Internal completion detection and dispatching. - int handle_events_i (ACE_Time_Value *delta); - - /// Initiate an aio operation. - virtual int start_aio_i (ACE_POSIX_Asynch_Result *result); - - /// Check AIO for completion, error and result status - /// Return: 1 - AIO completed , 0 - not completed yet - virtual int get_result_status (ACE_POSIX_Asynch_Result* asynch_result, - int &error_status, - size_t &transfer_count); - - /// Extract the results of aio. - ACE_POSIX_Asynch_Result *find_completed_aio (aio_result_t *result, - int &error_status, - size_t &transfer_count); - - /// From ACE_POSIX_AIOCB_Proactor. - /// Attempt to cancel running request - virtual int cancel_aiocb (ACE_POSIX_Asynch_Result *result); - - /// Specific Sun aiowait - int wait_for_start (ACE_Time_Value * abstime); - - /// Condition variable . - /// used to wait the first AIO start - ACE_SYNCH_CONDITION condition_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_AIO_CALLS && sun */ -#endif /* ACE_SUN_PROACTOR_H*/ diff --git a/ACE/ace/Sched_Params.cpp b/ACE/ace/Sched_Params.cpp index 8f63c093432..409e7120ac5 100644 --- a/ACE/ace/Sched_Params.cpp +++ b/ACE/ace/Sched_Params.cpp @@ -13,73 +13,13 @@ #include "ace/Sched_Params.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS) -# include "ace/OS_NS_string.h" -# include /**/ <sys/priocntl.h> -#endif /* ACE_HAS_PRIOCNTL && ACE_HAS_THREADS */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_Sched_Params::priority_min (const Policy policy, const int scope) { -#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (scope); - - // Assume that ACE_SCHED_OTHER indicates TS class, and that other - // policies indicate RT class. - - // Call ACE_OS::priority_control only for processes (lightweight - // or otherwise). Calling ACE_OS::priority_control for thread - // priorities gives incorrect results. - if (scope == ACE_SCOPE_PROCESS || scope == ACE_SCOPE_LWP) - { - if (policy == ACE_SCHED_OTHER) - { - // Get the priority class ID and attributes. - pcinfo_t pcinfo; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); - ACE_OS::strcpy (pcinfo.pc_clname, "TS"); - - if (ACE_OS::priority_control (P_ALL /* ignored */, - P_MYID /* ignored */, - PC_GETCID, - (char *) &pcinfo) == -1) - // Just hope that priority range wasn't configured from -1 - // .. 1 - return -1; - - // OK, now we've got the class ID in pcinfo.pc_cid. In - // addition, the maximum configured time-share priority is in - // ((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri. The minimum - // priority is just the negative of that. - - return -((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri; - } - else - return 0; - } - else - { - // Here we handle the case for ACE_SCOPE_THREAD. Calling - // ACE_OS::priority_control for thread scope gives incorrect - // results. - switch (policy) - { - case ACE_SCHED_FIFO: - return ACE_THR_PRI_FIFO_MIN; - case ACE_SCHED_RR: - return ACE_THR_PRI_RR_MIN; - case ACE_SCHED_OTHER: - default: - return ACE_THR_PRI_OTHER_MIN; - } - } -#elif defined(ACE_HAS_PTHREADS) && \ - (!defined(ACE_LACKS_SETSCHED)) +#if defined(ACE_HAS_PTHREADS) && !defined(ACE_LACKS_SETSCHED) switch (scope) { case ACE_SCOPE_THREAD: @@ -108,14 +48,10 @@ ACE_Sched_Params::priority_min (const Policy policy, } } -#elif defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE) +#elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); return THREAD_PRIORITY_IDLE; -#elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (policy); - ACE_UNUSED_ARG (scope); - return 255; #elif defined (ACE_VXWORKS) ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); @@ -128,63 +64,14 @@ ACE_Sched_Params::priority_min (const Policy policy, ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_PRIOCNTL && defined (ACE_HAS_STHREADS) */ +#endif /* ACE_HAS_PTHREADS */ } int ACE_Sched_Params::priority_max (const Policy policy, const int scope) { -#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS) - ACE_UNUSED_ARG (scope); - - // Call ACE_OS::priority_control only for processes (lightweight - // or otherwise). Calling ACE_OS::priority_control for thread - // priorities gives incorrect results. - if (scope == ACE_SCOPE_PROCESS || scope == ACE_SCOPE_LWP) - { - // Assume that ACE_SCHED_OTHER indicates TS class, and that other - // policies indicate RT class. - - // Get the priority class ID and attributes. - pcinfo_t pcinfo; - // The following is just to avoid Purify warnings about unitialized - // memory reads. - ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); - ACE_OS::strcpy (pcinfo.pc_clname, - policy == ACE_SCHED_OTHER ? "TS" : "RT"); - - if (ACE_OS::priority_control (P_ALL /* ignored */, - P_MYID /* ignored */, - PC_GETCID, - (char *) &pcinfo) == -1) - return -1; - - // OK, now we've got the class ID in pcinfo.pc_cid. In addition, - // the maximum configured real-time priority is in ((rtinfo_t *) - // pcinfo.pc_clinfo)->rt_maxpri, or similarly for the TS class. - - return policy == ACE_SCHED_OTHER - ? ((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri - : ((rtinfo_t *) pcinfo.pc_clinfo)->rt_maxpri; - } - else - { - // Here we handle the case for ACE_SCOPE_THREAD. Calling - // ACE_OS::priority_control for thread scope gives incorrect - // results. - switch (policy) - { - case ACE_SCHED_FIFO: - return ACE_THR_PRI_FIFO_MAX; - case ACE_SCHED_RR: - return ACE_THR_PRI_RR_MAX; - case ACE_SCHED_OTHER: - default: - return ACE_THR_PRI_OTHER_MAX; - } - } -#elif defined(ACE_HAS_PTHREADS) && \ +#if defined(ACE_HAS_PTHREADS) && \ (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) @@ -216,14 +103,10 @@ ACE_Sched_Params::priority_max (const Policy policy, } } -#elif defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE) +#elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); return THREAD_PRIORITY_TIME_CRITICAL; -#elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (policy); - ACE_UNUSED_ARG (scope); - return 0; #elif defined (ACE_VXWORKS) ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); @@ -236,7 +119,7 @@ ACE_Sched_Params::priority_max (const Policy policy, ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_PRIOCNTL && defined (ACE_HAS_STHREADS) */ +#endif /* ACE_HAS_PTHREADS */ } int @@ -244,7 +127,7 @@ ACE_Sched_Params::next_priority (const Policy policy, const int priority, const int scope) { -#if defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE) +#if defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); switch (priority) @@ -272,7 +155,7 @@ ACE_Sched_Params::next_priority (const Policy policy, // including STHREADS, and PTHREADS int const max = priority_max (policy, scope); return priority < max ? priority + 1 : max; -#elif defined (ACE_VXWORKS) || defined (ACE_HAS_WINCE) +#elif defined (ACE_VXWORKS) int const max = priority_max (policy, scope); return priority > max ? priority - 1 : max; #else @@ -288,7 +171,7 @@ ACE_Sched_Params::previous_priority (const Policy policy, const int priority, const int scope) { -#if defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE) +#if defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (policy); ACE_UNUSED_ARG (scope); switch (priority) @@ -316,7 +199,7 @@ ACE_Sched_Params::previous_priority (const Policy policy, // including STHREADS and PTHREADS int const min = priority_min (policy, scope); return priority > min ? priority - 1 : min; -#elif defined (ACE_VXWORKS) || defined (ACE_HAS_WINCE) +#elif defined (ACE_VXWORKS) int const min = priority_min (policy, scope); return priority < min ? priority + 1 : min; #else diff --git a/ACE/ace/Sched_Params.h b/ACE/ace/Sched_Params.h index 7ca200bbf46..5058f17e60a 100644 --- a/ACE/ace/Sched_Params.h +++ b/ACE/ace/Sched_Params.h @@ -36,10 +36,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * (ACE_SCHED_OTHER), to which many systems default; priority; * and a time-slice quantum for round-robin scheduling. A * "scope" parameter specifies whether the ACE_Sched_Params - * applies to the current process, current lightweight process - * (LWP) (on Solaris), or current thread. Please see the "NOTE" - * below about not all combinations of parameters being legal on - * a particular platform. + * applies to the current process, or current thread. Please + * see the "NOTE" below about not all combinations of parameters + * being legal on a particular platform. * For the case of thread priorities, it is intended that * <ACE_OS::sched_params> usually be called from <main> before * any threads have been spawned. If spawned threads inherit @@ -57,11 +56,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL */ class ACE_Export ACE_Sched_Params { - // NOTE: Solaris 2.5.x threads in the RT class must set the - // priority of their LWP. The only way to do that through ACE is - // for the RT thread itself to call <ACE_OS::thr_setprio> with - // it's own priority. - // OS Scheduling parameters are complicated and often confusing. // Many thanks to Thilo Kielmann // <kielmann@informatik.uni-siegen.de> for his careful review of @@ -142,8 +136,6 @@ private: * process, and the process priority. On some platforms, * such as Win32, the scheduling policy can _only_ be * set at process scope. - * ACE_SCOPE_LWP: lightweight process scope, only used with - * Solaris threads. * ACE_SCOPE_THREAD: sets the scheduling policy for the thread, * if the OS supports it, such as with Posix threads, and the * thread priority. diff --git a/ACE/ace/Select_Reactor_T.h b/ACE/ace/Select_Reactor_T.h index 2b53af44ea1..e515bc756b0 100644 --- a/ACE/ace/Select_Reactor_T.h +++ b/ACE/ace/Select_Reactor_T.h @@ -696,13 +696,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Select_Reactor_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Select_Reactor_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Select_Reactor_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_SELECT_REACTOR_T_H */ diff --git a/ACE/ace/Semaphore.h b/ACE/ace/Semaphore.h index fc46aac8a64..a0c6f964dd6 100644 --- a/ACE/ace/Semaphore.h +++ b/ACE/ace/Semaphore.h @@ -60,13 +60,6 @@ public: * is assumed to be in "absolute" rather than "relative" time. The * value of @a tv is updated upon return to show the actual * (absolute) acquisition time. - * - * @note Solaris threads do not support timed semaphores. - * Therefore, if you're running on Solaris you might want to - * consider using the ACE POSIX pthreads implementation instead, - * which can be enabled by compiling ACE with - * -DACE_HAS_PTHREADS, rather than -DACE_HAS_STHREADS or - * -DACE_HAS_POSIX_SEM. */ int acquire (ACE_Time_Value &tv); @@ -78,13 +71,7 @@ public: * <*tv> is assumed to be in "absolute" rather than "relative" time. * The value of <*tv> is updated upon return to show the actual * (absolute) acquisition time. - * - * @note Solaris threads do not support timed semaphores. - * Therefore, if you're running on Solaris you might want to - * consider using the ACE POSIX pthreads implementation instead, - * which can be enabled by compiling ACE with - * -DACE_HAS_PTHREADS, rather than -DACE_HAS_STHREADS or - * -DACE_HAS_POSIX_SEM. */ + */ int acquire (ACE_Time_Value *tv); /** diff --git a/ACE/ace/Service_Config.h b/ACE/ace/Service_Config.h index d77fc253625..a3a785bad42 100644 --- a/ACE/ace/Service_Config.h +++ b/ACE/ace/Service_Config.h @@ -542,16 +542,6 @@ private: /// from the ACE_Reactor, and unlinking it if necessary. static int remove (const ACE_TCHAR svc_name[]); -#if defined (ACE_HAS_WINCE) && defined (ACE_USES_WCHAR) - // We must provide these function to bridge the Svc_Conf parser - // with ACE. - static int initialize (const ACE_Service_Type *, ACE_ANTI_TCHAR []); - static int initialize (const char svc_name[], ACE_ANTI_TCHAR parameters[]); - static int resume (const ACE_ANTI_TCHAR svc_name[]); - static int suspend (const ACE_ANTI_TCHAR svc_name[]); - static int remove (const ACE_ANTI_TCHAR svc_name[]); -#endif /* ACE_HAS_WINCE */ - /// Dump the state of an object. void dump () const; diff --git a/ACE/ace/Service_Config.inl b/ACE/ace/Service_Config.inl index 4f187015bcc..eeb2911af6f 100644 --- a/ACE/ace/Service_Config.inl +++ b/ACE/ace/Service_Config.inl @@ -166,40 +166,4 @@ ACE_Service_Config::process_directive (const ACE_Static_Svc_Descriptor &ssd, return ACE_Service_Config::current ()->process_directive (ssd, force_replace); } - -#if defined (ACE_HAS_WINCE) && defined (ACE_USES_WCHAR) -// We must provide these function to bridge Svc_Conf parser with ACE. - -ACE_INLINE int -ACE_Service_Config::initialize (const ACE_Service_Type *sp, ACE_ANTI_TCHAR parameters[]) -{ - return ACE_Service_Config::initialize (sp, ACE_TEXT_ANTI_TO_TCHAR (parameters)); -} - -ACE_INLINE int -ACE_Service_Config::initialize (const ACE_ANTI_TCHAR svc_name[], ACE_ANTI_TCHAR parameters[]) -{ - return ACE_Service_Config::initialize (ACE_TEXT_ANTI_TO_TCHAR (svc_name), - ACE_TEXT_ANTI_TO_TCHAR (parameters)); -} - -ACE_INLINE int -ACE_Service_Config::resume (const ACE_ANTI_TCHAR svc_name[]) -{ - return ACE_Service_Config::resume (ACE_TEXT_ANTI_TO_TCHAR (svc_name)); -} - -ACE_INLINE int -ACE_Service_Config::suspend (const ACE_ANTI_TCHAR svc_name[]) -{ - return ACE_Service_Config::suspend (ACE_TEXT_ANTI_TO_TCHAR (svc_name)); -} - -ACE_INLINE int -ACE_Service_Config::remove (const ACE_ANTI_TCHAR svc_name[]) -{ - return ACE_Service_Config::remove (ACE_TEXT_ANTI_TO_TCHAR (svc_name)); -} -#endif /* ACE_HAS_WINCE && !ACE_USES_WCHAR */ - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp index fe41085324d..bc82751959c 100644 --- a/ACE/ace/Service_Gestalt.cpp +++ b/ACE/ace/Service_Gestalt.cpp @@ -819,14 +819,8 @@ ACE_Service_Gestalt::get_xml_svc_conf (ACE_DLL &xmldll) ACE_TEXT("ACE_Service_Config::get_xml_svc_conf")), 0); - void * foo = - xmldll.symbol (ACE_TEXT ("_ACEXML_create_XML_Svc_Conf_Object")); - -#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) - int const temp_p = reinterpret_cast<int> (foo); -#else + void * foo = xmldll.symbol (ACE_TEXT ("_ACEXML_create_XML_Svc_Conf_Object")); intptr_t const temp_p = reinterpret_cast<intptr_t> (foo); -#endif ACE_XML_Svc_Conf::Factory factory = reinterpret_cast<ACE_XML_Svc_Conf::Factory> (temp_p); diff --git a/ACE/ace/Service_Object.cpp b/ACE/ace/Service_Object.cpp index c7429cfb075..79060626410 100644 --- a/ACE/ace/Service_Object.cpp +++ b/ACE/ace/Service_Object.cpp @@ -14,9 +14,6 @@ #include "ace/DLL.h" #include "ace/ACE.h" #include "ace/Log_Category.h" -#if defined (ACE_OPENVMS) -# include "ace/Lib_Find.h" -#endif ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -177,13 +174,4 @@ ACE_Service_Type::name (const ACE_TCHAR *n) this->name_ = ACE::strnew (n); } -#if defined (ACE_OPENVMS) -ACE_Dynamic_Svc_Registrar::ACE_Dynamic_Svc_Registrar (const ACE_TCHAR* alloc_name, - void* svc_allocator) -{ - // register service allocator function by full name in ACE singleton registry - ACE::ldregister (alloc_name, svc_allocator); -} -#endif - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Service_Object.h b/ACE/ace/Service_Object.h index 4f123319c2e..287391e5202 100644 --- a/ACE/ace/Service_Object.h +++ b/ACE/ace/Service_Object.h @@ -180,20 +180,6 @@ private: ACE_Service_Object *service_object_; }; -#if defined (ACE_OPENVMS) -/** - * @class ACE_Dynamic_Svc_Registrar - * - * @brief Used to register Service allocator function by its full name. - */ -class ACE_Dynamic_Svc_Registrar -{ -public: - ACE_Dynamic_Svc_Registrar (const ACE_TCHAR* alloc_name, - void* svc_allocator); -}; -#endif - ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) diff --git a/ACE/ace/Singleton.h b/ACE/ace/Singleton.h index 41a954dc22a..c8c7f7de56d 100644 --- a/ACE/ace/Singleton.h +++ b/ACE/ace/Singleton.h @@ -324,13 +324,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Singleton.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Singleton.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Singleton.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_SINGLETON_H */ diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp index 6f19185c439..37e8ea1a339 100644 --- a/ACE/ace/Sock_Connect.cpp +++ b/ACE/ace/Sock_Connect.cpp @@ -7,11 +7,6 @@ #include "ace/OS_Memory.h" #include "ace/OS_NS_stdio.h" #include "ace/ACE.h" - -#if defined (sparc) -# include "ace/OS_NS_fcntl.h" -#endif // sparc - #include "ace/OS_NS_stdlib.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_sys_socket.h" @@ -22,9 +17,6 @@ #if defined (ACE_HAS_IPV6) # include "ace/Guard_T.h" # include "ace/Recursive_Thread_Mutex.h" -# if defined (_AIX) -# include /**/ <netinet/in6_var.h> -# endif /* _AIX */ #endif /* ACE_HAS_IPV6 */ #if defined (ACE_HAS_GETIFADDRS) @@ -38,15 +30,6 @@ const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_IN const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT; #endif /* ACE_VXWORKS <= 0x670 && __RTP__ && ACE_HAS_IPV6 */ -#if defined (ACE_HAS_WINCE) -#include /**/ <iphlpapi.h> -# if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && (_WIN32_WCE < 0x600) && defined (ACE_HAS_IPV6) -# include /**/ <ws2tcpip.h> -const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; -const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; -# endif -#endif // ACE_HAS_WINCE - #if defined (ACE_WIN32) && defined (ACE_HAS_PHARLAP) # include "ace/OS_NS_stdio.h" #endif @@ -58,18 +41,6 @@ const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; # if defined (SIOCGLIFCONF) # define SIOCGIFCONF_CMD SIOCGLIFCONF -# if defined (__hpux) -# define IFREQ if_laddrreq -# define IFCONF if_laddrconf -# define IFC_REQ iflc_req -# define IFC_LEN iflc_len -# define IFC_BUF iflc_buf -# define IFR_ADDR iflr_addr -# define IFR_NAME iflr_name -# define IFR_FLAGS iflr_flags -# undef SETFAMILY -# define SA_FAMILY sa_family -# else # define IFREQ lifreq # define IFCONF lifconf # define IFC_REQ lifc_req @@ -82,7 +53,6 @@ const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; # define IFC_FAMILY lifc_family # define IFC_FLAGS lifc_flags # define SA_FAMILY ss_family -# endif # else # define SIOCGIFCONF_CMD SIOCGIFCONF # define IFREQ ifreq @@ -227,7 +197,7 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr, sizeof ip_addr.sin_addr); } -#if !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) +#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) for (int n = ifc.ifc_len / sizeof (struct ifreq) ; n > 0; n--, ifr++) #else @@ -240,7 +210,7 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr, ifr = (struct ifreq *) ((caddr_t) &ifr->ifr_addr + ifr->ifr_addr.sa_len)) : (nbytes -= sizeof (struct ifreq), ifr++))) -#endif /* !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) */ +#endif /* !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) */ { struct sockaddr_in if_addr; @@ -468,105 +438,7 @@ static int get_ip_interfaces_win32 (size_t &count, ACE_INET_Addr *&addrs) { -# if defined (ACE_HAS_WINCE) && defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) - // moved the ACE_HAS_WINCE impl ahaid of ACE_HAS_WINSOCK2 because - // WINCE in fact has winsock2, but doesn't properly support the - // WSAIoctl for obtaining IPv6 address info. - PIP_ADAPTER_ADDRESSES AdapterAddresses = 0; - ULONG OutBufferLength = 0; - ULONG RetVal = 0; - unsigned char *octet_buffer = 0; - - RetVal = - GetAdaptersAddresses(AF_UNSPEC, - 0, - 0, - AdapterAddresses, - &OutBufferLength); - - if (RetVal != ERROR_BUFFER_OVERFLOW) - { - return -1; - } - - ACE_NEW_RETURN (octet_buffer, unsigned char[OutBufferLength],-1); - AdapterAddresses = (IP_ADAPTER_ADDRESSES *)octet_buffer; - - RetVal = - GetAdaptersAddresses(AF_UNSPEC, - 0, - 0, - AdapterAddresses, - &OutBufferLength); - - if (RetVal != NO_ERROR) - { - delete [] octet_buffer; - return -1; - } - - // If successful, output some information from the data we received - PIP_ADAPTER_ADDRESSES AdapterList = AdapterAddresses; - while (AdapterList) - { - if (AdapterList->OperStatus == IfOperStatusUp) - { - if (AdapterList->IfIndex != 0) - ++count; - if (AdapterList->Ipv6IfIndex != 0) - ++count; - } - AdapterList = AdapterList->Next; - } - - AdapterList = AdapterAddresses; - - ACE_NEW_RETURN (addrs, ACE_INET_Addr[count],-1); - count = 0; - for (AdapterList = AdapterAddresses; - AdapterList != 0; - AdapterList = AdapterList->Next) - { - if (AdapterList->OperStatus != IfOperStatusUp) - continue; - - IP_ADAPTER_UNICAST_ADDRESS *uni = 0; - if (AdapterList->IfIndex != 0) - for (uni = AdapterList->FirstUnicastAddress; - uni != 0; - uni = uni->Next) - { - SOCKET_ADDRESS *sa_addr = &uni->Address; - if (sa_addr->lpSockaddr->sa_family == AF_INET) - { - sockaddr_in *sin = (sockaddr_in*)sa_addr->lpSockaddr; - addrs[count].set(sin,sa_addr->iSockaddrLength); - ++count; - break; - } - } - if (AdapterList->Ipv6IfIndex != 0) - { - for (uni = AdapterList->FirstUnicastAddress; - uni != 0; - uni = uni->Next) - { - SOCKET_ADDRESS *sa_addr = &uni->Address; - if (sa_addr->lpSockaddr->sa_family == AF_INET6) - { - sockaddr_in *sin = (sockaddr_in*)sa_addr->lpSockaddr; - addrs[count].set(sin,sa_addr->iSockaddrLength); - ++count; - break; - } - } - } - } - - delete [] octet_buffer; - return 0; - -# elif defined (ACE_HAS_PHARLAP) +# if 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) @@ -766,7 +638,7 @@ get_ip_interfaces_win32 (size_t &count, return 0; -# endif /* ACE_HAS_WINCE */ +# endif /* ACE_HAS_PHARLAP */ } #elif defined (ACE_HAS_GETIFADDRS) @@ -845,258 +717,7 @@ get_ip_interfaces_getifaddrs (size_t &count, return 0; } -#elif defined (__hpux) -static int -get_ip_interfaces_hpux (size_t &count, - ACE_INET_Addr *&addrs) -{ - size_t num_ifs = 0; - size_t num_ifs_found = 0; - - // Call specific routine as necessary. - ACE_HANDLE handle = ACE_OS::socket (PF_INET, SOCK_DGRAM, 0); - ACE_HANDLE handle_ipv6 = ACE_INVALID_HANDLE; - - if (handle == ACE_INVALID_HANDLE) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE::get_ip_interfaces:open")), - -1); - - int result = 0; - int tmp_how_many = 0; - - result = ACE_OS::ioctl (handle, - SIOCGIFNUM, - (caddr_t) &tmp_how_many); - if (result != -1) - num_ifs = (size_t)tmp_how_many; - -# if defined (ACE_HAS_IPV6) - tmp_how_many = 0; - handle_ipv6 = ACE_OS::socket (PF_INET6, SOCK_DGRAM, 0); - result = ACE_OS::ioctl (handle_ipv6, - SIOCGLIFNUM, - (caddr_t) &tmp_how_many); - if (result != -1) - num_ifs += (size_t)tmp_how_many; -# endif - - if (num_ifs == 0) - { - ACE_OS::close (handle); - ACE_OS::close (handle_ipv6); - return -1; - } - - // ioctl likes to have an extra IFREQ structure to mark the end of - // what it returned, so increase the num_ifs by one. - ++num_ifs; - - //HPUX requires two passes, First for IPv4, then for IPv6 - - struct ifreq *ifs = 0; - ACE_NEW_RETURN (ifs, - struct ifreq[num_ifs], - -1); - ACE_OS::memset (ifs, 0, num_ifs * sizeof (struct ifreq)); - - ACE_Auto_Array_Ptr<struct ifreq> p_ifs (ifs); - - if (p_ifs.get() == 0) - { - ACE_OS::close (handle); - ACE_OS::close (handle_ipv6); - errno = ENOMEM; - return -1; - } - - struct ifconf ifcfg; - ACE_OS::memset (&ifcfg, 0, sizeof (struct ifconf)); - - ifcfg.ifc_req = p_ifs.get (); - ifcfg.ifc_len = num_ifs * sizeof (struct ifreq); - - if (ACE_OS::ioctl (handle, - SIOCGIFCONF, - (char *) &ifcfg) == -1) - { - ACE_OS::close (handle); - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE::get_ip_interfaces:") - ACE_TEXT ("ioctl - SIOCGIFCONF failed")), - -1); - } - - ACE_OS::close (handle); - - // Now create and initialize output array. - - ACE_NEW_RETURN (addrs, - ACE_INET_Addr[num_ifs], - -1); // caller must free - - struct ifreq *pcur = p_ifs.get (); - num_ifs_found = ifcfg.ifc_len / sizeof (struct ifreq); // get the number of returned ifs - - for (size_t i = 0; - i < num_ifs_found; - i++) - { - struct sockaddr_in *addr = - reinterpret_cast<sockaddr_in *> (&pcur->ifr_addr); - if (addr->sin_addr.s_addr != 0) - { - addrs[count].set ((u_short) 0, - addr->sin_addr.s_addr, - 0); - ++count; - } - ++pcur; - } - -# if defined (ACE_HAS_IPV6) - - if (handle_ipv6 != ACE_INVALID_HANDLE) - { - struct if_laddrreq *lifs = 0; - ACE_NEW_RETURN (lifs, - struct if_laddrreq[num_ifs], - -1); - ACE_OS::memset (lifs, 0, num_ifs * sizeof (struct if_laddrreq)); - - ACE_Auto_Array_Ptr<struct if_laddrreq> p_lifs (lifs); - - if (p_lifs.get() == 0) - { - ACE_OS::close (handle); - ACE_OS::close (handle_ipv6); - errno = ENOMEM; - return -1; - } - - struct if_laddrconf lifcfg; - ACE_OS::memset (&lifcfg, 0, sizeof (struct if_laddrconf)); - - lifcfg.iflc_req = p_lifs.get (); - lifcfg.iflc_len = num_ifs * sizeof (struct if_laddrreq); - - if (ACE_OS::ioctl (handle_ipv6, - SIOCGLIFCONF, - (char *) &lifcfg) == -1) - { - ACE_OS::close (handle); - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE::get_ip_interfaces:") - ACE_TEXT ("ioctl - SIOCGLIFCONF failed")), - -1); - } - - ACE_OS::close (handle_ipv6); - - struct if_laddrreq *plcur = p_lifs.get (); - num_ifs_found = lifcfg.iflc_len / sizeof (struct if_laddrreq); - - for (size_t i = 0; - i < num_ifs_found; - i++) - { - struct sockaddr_in *addr = - reinterpret_cast<sockaddr_in *> (&plcur->iflr_addr); - if (!IN6_IS_ADDR_UNSPECIFIED(&reinterpret_cast<sockaddr_in6 *>(addr)->sin6_addr)) - { - addrs[count].set(addr, sizeof(struct sockaddr_in6)); - ++count; - } - ++plcur; - } - } -# endif /* ACE_HAS_IPV6 */ - return 0; -} -#elif defined (_AIX) -static int -get_ip_interfaces_aix (size_t &count, - ACE_INET_Addr *&addrs) -{ - ACE_HANDLE handle = ACE::get_handle(); - size_t num_ifs = 0; - struct ifconf ifc; - - if (handle == ACE_INVALID_HANDLE) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE::get_ip_interfaces_aix:")), - -1); - - if (ACE_OS::ioctl (handle, - SIOCGSIZIFCONF, - (caddr_t)&ifc.ifc_len) == -1) - { - ACE_OS::close (handle); - ACELIB_ERROR_RETURN((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("get ifconf size")), - -1); - } - - ACE_NEW_RETURN (ifc.ifc_buf,char [ifc.ifc_len], -1); - - ACE_Auto_Array_Ptr<char> safe_buf (ifc.ifc_buf); - ACE_OS::memset (safe_buf.get(), 0, ifc.ifc_len); - - if (ACE_OS::ioctl(handle, SIOCGIFCONF, (caddr_t)&ifc) == -1) - { - ACE_OS::close (handle); - ACELIB_ERROR_RETURN((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("get ifconf")), - -1); - } - - ACE_OS::close (handle); - - char *buf_start = safe_buf.get(); - char *buf_end = buf_start + ifc.ifc_len; - - num_ifs = 0; - for (char *ptr = buf_start; ptr < buf_end; ) - { - struct ifreq *req = reinterpret_cast<struct ifreq *>(ptr); - ptr += IFNAMSIZ; - ptr += req->ifr_addr.sa_len; - if (req->ifr_addr.sa_family == AF_INET -# if defined (ACE_HAS_IPV6) - || req->ifr_addr.sa_family == AF_INET6 -# endif - ) - ++num_ifs; - } - ACE_NEW_RETURN (addrs,ACE_INET_Addr[num_ifs], -1); - - for (char * ptr = buf_start; ptr < buf_end; ) - { - struct ifreq *req = reinterpret_cast<struct ifreq *>(ptr); - // skip the interface name - ptr += IFNAMSIZ; - if (req->ifr_addr.sa_family == AF_INET -# if defined (ACE_HAS_IPV6) - || req->ifr_addr.sa_family == AF_INET6 -# endif - ) - { - sockaddr_in *addr = (sockaddr_in*)&req->ifr_addr; - addrs[count++].set(addr, addr->sin_len); - } - ptr += req->ifr_addr.sa_len; - } - - return 0; -} - -#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS || __hpux || _AIX +#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS // return an array of all configured IP interfaces on this host, count @@ -1115,11 +736,7 @@ ACE::get_ip_interfaces (size_t &count, ACE_INET_Addr *&addrs) return get_ip_interfaces_win32 (count, addrs); #elif defined (ACE_HAS_GETIFADDRS) return get_ip_interfaces_getifaddrs (count, addrs); -#elif defined (__hpux) - return get_ip_interfaces_hpux (count, addrs); -#elif defined (_AIX) - return get_ip_interfaces_aix (count, addrs); -#elif (defined (__unix) || defined (__unix__) || defined (ACE_OPENVMS) || (defined (ACE_VXWORKS) && !defined (ACE_HAS_GETIFADDRS)) || defined (ACE_HAS_RTEMS)) && !defined (ACE_LACKS_NETWORKING) +#elif (defined (__unix) || defined (__unix__) || (defined (ACE_VXWORKS) && !defined (ACE_HAS_GETIFADDRS))) && !defined (ACE_LACKS_NETWORKING) // COMMON (SVR4 and BSD) UNIX CODE // Call specific routine as necessary. @@ -1231,7 +848,7 @@ ACE::get_ip_interfaces (size_t &count, ACE_INET_Addr *&addrs) } } -#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_HAS_RTEMS) && !defined (__Lynx__) +#if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) ++pcur; #else if (pcur->ifr_addr.sa_len <= sizeof (struct sockaddr)) @@ -1243,7 +860,7 @@ ACE::get_ip_interfaces (size_t &count, ACE_INET_Addr *&addrs) pcur = (struct ifreq *) (pcur->ifr_addr.sa_len + (caddr_t) &pcur->ifr_addr); } -#endif /* !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_HAS_RTEMS) && !defined (__Lynx__) */ +#endif /* !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) */ } # if defined (ACE_HAS_IPV6) && !defined (ACE_LACKS_FSCANF) @@ -1309,7 +926,7 @@ int ACE::count_interfaces (ACE_HANDLE handle, size_t &how_many) { #if defined (SIOCGIFNUM) -# if defined (SIOCGLIFNUM) && !defined (ACE_LACKS_STRUCT_LIFNUM) +# if defined (SIOCGLIFNUM) int cmd = SIOCGLIFNUM; struct lifnum if_num = {AF_UNSPEC,0,0}; # else @@ -1322,16 +939,16 @@ ACE::count_interfaces (ACE_HANDLE handle, size_t &how_many) ACE_TEXT ("ACE::count_interfaces:") ACE_TEXT ("ioctl - SIOCGLIFNUM failed")), -1); -# if defined (SIOCGLIFNUM) && !defined (ACE_LACKS_STRUCT_LIFNUM) +# if defined (SIOCGLIFNUM) how_many = if_num.lifn_count; # else how_many = if_num; # endif /* SIOCGLIFNUM */ return 0; -#elif (defined (__unix) || defined (__unix__) || defined (ACE_OPENVMS) || defined (ACE_HAS_RTEMS) || (defined (ACE_VXWORKS) && !defined (ACE_HAS_GETIFADDRS))) && !defined (ACE_LACKS_NETWORKING) +#elif (defined (__unix) || defined (__unix__) || (defined (ACE_VXWORKS) && !defined (ACE_HAS_GETIFADDRS))) && !defined (ACE_LACKS_NETWORKING) // Note: DEC CXX doesn't define "unix". BSD compatible OS: HP UX, - // AIX, SunOS 4.x perform some ioctls to retrieve ifconf list of + // SunOS 4.x perform some ioctls to retrieve ifconf list of // ifreq structs no SIOCGIFNUM on SunOS 4.x, so use guess and scan // algorithm @@ -1395,7 +1012,7 @@ return 0; break; ++if_count; -# if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_HAS_RTEMS) && !defined (__Lynx__) +# if !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) ++p_ifs; # else if (p_ifs->ifr_addr.sa_len <= sizeof (struct sockaddr)) @@ -1407,7 +1024,7 @@ return 0; p_ifs = (struct ifreq *) (p_ifs->ifr_addr.sa_len + (caddr_t) &p_ifs->ifr_addr); } -# endif /* !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_HAS_RTEMS) && !defined (__Lynx__) */ +# endif /* !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (__Lynx__) */ } #if defined (ACE_HAS_ALLOC_HOOKS) @@ -1440,24 +1057,17 @@ return 0; } // Routine to return a handle from which ioctl() requests can be made. - ACE_HANDLE ACE::get_handle () { - // Solaris 2.x ACE_HANDLE handle = ACE_INVALID_HANDLE; -#if defined (sparc) - handle = ACE_OS::open ("/dev/udp", O_RDONLY); -#elif defined (__unix) || defined (__unix__) || defined (_AIX) || defined (__hpux) || (defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600)) || defined (ACE_OPENVMS) || defined (ACE_HAS_RTEMS) - // Note: DEC CXX doesn't define "unix" BSD compatible OS: HP UX, - // AIX, SunOS 4.x - +#if defined (__unix) || defined (__unix__) || (defined (ACE_VXWORKS) && (ACE_VXWORKS >= 0x600)) + // Note: DEC CXX doesn't define "unix" BSD compatible OS: SunOS 4.x handle = ACE_OS::socket (PF_INET, SOCK_DGRAM, 0); -#endif /* sparc */ +#endif /* __unux */ return handle; } - #if defined (ACE_HAS_IPV6) static int ip_check (int &ipvn_enabled, int pf) diff --git a/ACE/ace/Stack_Trace.cpp b/ACE/ace/Stack_Trace.cpp index 3cf26a354fd..52e994cf471 100644 --- a/ACE/ace/Stack_Trace.cpp +++ b/ACE/ace/Stack_Trace.cpp @@ -10,9 +10,6 @@ * and is adapted from examples shown in relevant documentation * and repeated elsewhere, e.g., * http://www.linuxselfhelp.com/gnu/glibc/html_chapter/libc_33.html - * - the Solaris stack generation is adapted from a 1995 post on - * comp.unix.solaris by Bart Smaalders, - * http://groups.google.com/group/comp.unix.solaris/browse_thread/thread/8b9f3de8be288f1c/31550f93a48231d5?lnk=gst&q=how+to+get+stack+trace+on+solaris+group:comp.unix.solaris#31550f93a48231d5 * - VxWorks kernel-mode stack tracing is adapted from a code example * in the VxWorks FAQ at http://www.xs4all.nl/~borkhuis/vxworks/vxw_pt5.html * although the undocumented functions it uses are also mentioned in @@ -302,157 +299,6 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, pc = prevPc; } } - -#elif defined(sun) -/* - * walks up call stack, printing library:routine+offset for each routine - */ - -# include <dlfcn.h> -# include <setjmp.h> -# include <sys/types.h> -# include <sys/reg.h> -# include <sys/frame.h> -# define ACE_STACK_TRACE_BIAS 0 - -# if defined(sparc) || defined(__sparc) -# define ACE_STACK_TRACE_FLUSHWIN() asm("ta 3"); -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 1 -# define ACE_STACK_TRACE_SKIP_FRAMES 0 -# if defined(__sparcv9) -# undef ACE_STACK_TRACE_BIAS -# define ACE_STACK_TRACE_BIAS 2047 -# endif -# endif - -# if defined(i386) || defined(__i386) -# define ACE_STACK_TRACE_FLUSHWIN() -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 3 -# define ACE_STACK_TRACE_SKIP_FRAMES 0 -# endif - -# if defined(__amd64) || defined(__x86_64) -# define ACE_STACK_TRACE_FLUSHWIN() -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 5 -# define ACE_STACK_TRACE_SKIP_FRAMES 0 -# endif - -# if defined(ppc) || defined(__ppc) -# define ACE_STACK_TRACE_FLUSHWIN() -# define ACE_STACK_TRACE_FRAME_PTR_INDEX 0 -# define ACE_STACK_TRACE_SKIP_FRAMES 2 -# endif - -static frame* -cs_frame_adjust(frame* sp) -{ - unsigned char* sp_byte = (unsigned char*)sp; - sp_byte += ACE_STACK_TRACE_BIAS; - return (frame*) sp_byte; -} - -/* - this function walks up call stack, calling user-supplied - function once for each stack frame, passing the pc and the user-supplied - usrarg as the argument. - */ - -static int -cs_operate(int (*func)(void *, void *), void * usrarg, - size_t starting_frame, size_t num_frames_arg) -{ - ACE_STACK_TRACE_FLUSHWIN(); - - jmp_buf env; - setjmp(env); - frame* sp = cs_frame_adjust((frame*) env[ACE_STACK_TRACE_FRAME_PTR_INDEX]); - - // make a copy of num_frames_arg to eliminate the following warning on some - // solaris platforms: - // Stack_Trace.cpp:318: warning: argument `size_t num_frames' might be clobbered by `longjmp' or `vfork' - size_t num_frames = num_frames_arg; - - // I would like to use ACE_MAX below rather than ?:, but - // I get linker relocation errors such as the following when - // I use it: - // ld: fatal: relocation error: file: .shobj/Stack_Trace.o section: - // .rela.debug_line symbol: : relocation against a discarded symbol, - // symbol is part of discarded section: - // .text%const __type_0&ace_max<unsig\ned>(const __type_0&,const __type_0&) - // - const size_t starting_skip = starting_frame - 1; -#if ACE_STACK_TRACE_SKIP_FRAMES == 0 - size_t skip_frames = starting_skip; -#else - size_t skip_frames = - ACE_STACK_TRACE_SKIP_FRAMES > starting_skip ? - ACE_STACK_TRACE_SKIP_FRAMES : starting_skip; -#endif /* ACE_STACK_TRACE_SKIP_FRAMES == 0 */ - size_t i; - for (i = 0; i < skip_frames && sp; ++i) - { - sp = cs_frame_adjust((frame*) sp->fr_savfp); - } - - i = 0; - - while ( sp - && sp->fr_savpc - && ++i - && --num_frames - && (*func)((void*)sp->fr_savpc, usrarg)) - { - sp = cs_frame_adjust((frame*) sp->fr_savfp); - } - - return(i); -} - -static int -add_frame_to_buf (void* pc, void* usrarg) -{ - char* buf = (char*)usrarg; - Dl_info info; - const char* func = "??"; - const char* lib = "??"; - - if(dladdr(pc, & info) != 0) - { - lib = (const char *) info.dli_fname; - func = (const char *) info.dli_sname; - } - - (void) ACE_OS::snprintf(buf, - ACE_Stack_Trace::SYMBUFSIZ, - "%s%s:%s+0x%x\n", - buf, - lib, - func, - //@@ Should the arithmetic on the following - //line be done with two void* ptrs? The result - //would be ptrdiff_t, and what is the correct - //sprintf() conversion character for that? - (size_t)pc - (size_t)info.dli_saddr); - - return(1); -} - -void -ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, - size_t num_frames) -{ - const size_t MAX_FRAMES = 128; - const ssize_t INITIAL_FRAME = 3; - - if (num_frames == 0) - num_frames = MAX_FRAMES; - - size_t starting_frame = - determine_starting_frame (INITIAL_FRAME, starting_frame_offset); - - cs_operate (&add_frame_to_buf, &this->buf_[0], starting_frame, num_frames); -} - #elif defined(ACE_WIN64) && (_WIN32_WINNT <= _WIN32_WINNT_WIN2K) # if defined(_MSC_VER) # define STRING2(X) #X @@ -470,8 +316,7 @@ ACE_Stack_Trace::generate_trace (ssize_t, size_t) "ACE is built with _WIN32_WINNT set to 0x501 or above>"); } -#elif defined(ACE_WIN32) && !defined(ACE_HAS_WINCE) && !defined (__MINGW32__) \ - && !defined(__BORLANDC__) +#elif defined(ACE_WIN32) && !defined (__MINGW32__) && !defined(__BORLANDC__) # include <windows.h> # include <Dbghelp.h> diff --git a/ACE/ace/Stack_Trace.h b/ACE/ace/Stack_Trace.h index 14cdcc0126b..476319e22cc 100644 --- a/ACE/ace/Stack_Trace.h +++ b/ACE/ace/Stack_Trace.h @@ -52,8 +52,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * - Any platform using glibc as its runtime library, or where ACE_HAS_EXECINFO_H is defined * (this covers Linux and Mac) and gcc version >= 3.3. * - VxWorks, both kernel and RTP - * - Solaris - * - Windows 32 and 64 bit (Visual C++, excluding WinCE/mobile) + * - Windows 32 and 64 bit (Visual C++) * * @note Since stack trace buffer size has limitation(@c ACE_STACK_TRACE_SYMBUFSIZ), you will not * get a complete stack trace if @c ACE_STACK_TRACE_SYMBUFSIZ value is less than actual stack diff --git a/ACE/ace/Strategies_T.cpp b/ACE/ace/Strategies_T.cpp index 1ada5a8543d..3ae02a406eb 100644 --- a/ACE/ace/Strategies_T.cpp +++ b/ACE/ace/Strategies_T.cpp @@ -16,9 +16,6 @@ #include "ace/OS_NS_string.h" #include "ace/OS_Errno.h" #include "ace/Svc_Handler.h" -#if defined (ACE_OPENVMS) -# include "ace/Lib_Find.h" -#endif #if !defined (__ACE_INLINE__) #include "ace/Strategies_T.inl" @@ -118,15 +115,8 @@ ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh) ACE_SHLIB_HANDLE handle = ACE_OS::dlopen (this->dll_name_); // Extract the factory function. -#if defined (ACE_OPENVMS) SVC_HANDLER *(*factory)(void) = - (SVC_HANDLER *(*)(void)) ACE::ldsymbol (handle, - this->factory_function_); -#else - SVC_HANDLER *(*factory)(void) = - (SVC_HANDLER *(*)(void)) ACE_OS::dlsym (handle, - this->factory_function_); -#endif + (SVC_HANDLER *(*)(void)) ACE_OS::dlsym (handle, this->factory_function_); // Call the factory function to obtain the new SVC_Handler (should // use RTTI here when it becomes available...) diff --git a/ACE/ace/Strategies_T.h b/ACE/ace/Strategies_T.h index 7cc0ad7341a..4b7b7f00510 100644 --- a/ACE/ace/Strategies_T.h +++ b/ACE/ace/Strategies_T.h @@ -1032,13 +1032,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Strategies_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Strategies_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Strategies_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Stream.h b/ACE/ace/Stream.h index 3e7998b68cd..09e2f0f3335 100644 --- a/ACE/ace/Stream.h +++ b/ACE/ace/Stream.h @@ -237,13 +237,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Stream.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Stream.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Stream.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Stream_Modules.h b/ACE/ace/Stream_Modules.h index e3b12d8e06c..f3812e0fa86 100644 --- a/ACE/ace/Stream_Modules.h +++ b/ACE/ace/Stream_Modules.h @@ -152,13 +152,7 @@ public: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Stream_Modules.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Stream_Modules.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_STREAM_MODULES */ diff --git a/ACE/ace/String_Base.h b/ACE/ace/String_Base.h index 8a0ca6d57e8..6231151de70 100644 --- a/ACE/ace/String_Base.h +++ b/ACE/ace/String_Base.h @@ -876,13 +876,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/String_Base.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/String_Base.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("String_Base.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/String_Base_Const.cpp b/ACE/ace/String_Base_Const.cpp index 12169d66a39..b16349b7edf 100644 --- a/ACE/ace/String_Base_Const.cpp +++ b/ACE/ace/String_Base_Const.cpp @@ -4,15 +4,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_String_Base_Const::size_type const ACE_String_Base_Const::npos = -#if defined (AIX) //&& (defined (__xlC__) || defined (__IBMCPP__)) - // Under some mixed shared/static linking conditions, this constant - // will not be initialized at run-time if the - // std::numeric_limits<>::max() trait is used on AIX/XLC++. - // Workaround that problem by making it easier for the compiler to - // realize it can set the constant at compile-time. - static_cast<ACE_String_Base_Const::size_type> (-1); -#else ACE_Numeric_Limits<ACE_String_Base_Const::size_type>::max (); -#endif /* AIX */ ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Svc_Handler.h b/ACE/ace/Svc_Handler.h index c17e8223a95..176ab2ba328 100644 --- a/ACE/ace/Svc_Handler.h +++ b/ACE/ace/Svc_Handler.h @@ -337,13 +337,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Svc_Handler.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Svc_Handler.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/TLI.cpp b/ACE/ace/TLI.cpp index cdfa1db8514..d0fbd289f3c 100644 --- a/ACE/ace/TLI.cpp +++ b/ACE/ace/TLI.cpp @@ -30,25 +30,6 @@ ACE_TLI::dump () const ACE_TLI::ACE_TLI () { ACE_TRACE ("ACE_TLI::ACE_TLI"); -#if defined (ACE_HAS_SVR4_TLI) -// Solaris 2.4 ACE_TLI option handling is broken. Thus, we must do -// the memory allocation ourselves... Thanks to John P. Hearn -// (jph@ccrl.nj.nec.com) for the help. - - this->so_opt_req.opt.maxlen = sizeof (opthdr) + sizeof (long); - ACE_NEW (this->so_opt_req.opt.buf, - char[this->so_opt_req.opt.maxlen]); - - this->so_opt_ret.opt.maxlen = sizeof (opthdr) + sizeof (long); - ACE_NEW (this->so_opt_ret.opt.buf, - char[this->so_opt_ret.opt.maxlen]); - - if (this->so_opt_ret.opt.buf == 0) - { - delete [] this->so_opt_req.opt.buf; - this->so_opt_req.opt.buf = 0; - } -#endif /* ACE_HAS_SVR4_TLI */ } ACE_HANDLE @@ -65,15 +46,6 @@ ACE_TLI::open (const char device[], int oflag, struct t_info *info) ACE_TLI::~ACE_TLI () { ACE_TRACE ("ACE_TLI::~ACE_TLI"); -#if defined (ACE_HAS_SVR4_TLI) - if (this->so_opt_req.opt.buf) - { - delete [] this->so_opt_req.opt.buf; - delete [] this->so_opt_ret.opt.buf; - this->so_opt_req.opt.buf = 0; - this->so_opt_ret.opt.buf = 0; - } -#endif /* ACE_HAS_SVR4_TLI */ } ACE_TLI::ACE_TLI (const char device[], int oflag, struct t_info *info) @@ -147,39 +119,13 @@ ACE_TLI::set_option (int level, int option, void *optval, int optlen) opthdr->len = req.opt.len; // We only request one option at a time. ACE_OS::memcpy (&opthdr[1], optval, optlen); return ACE_OS::t_optmgmt (this->get_handle (), &req, &ret); - -#elif defined (ACE_HAS_SVR4_TLI) - struct opthdr *opthdr = 0; /* See <sys/socket.h> for info on this format */ - - this->so_opt_req.flags = T_NEGOTIATE; - this->so_opt_req.opt.len = sizeof *opthdr + OPTLEN (optlen); - - if (this->so_opt_req.opt.len > this->so_opt_req.opt.maxlen) - { -# if !defined (ACE_HAS_SET_T_ERRNO) - t_errno = TBUFOVFLW; -# else - set_t_errno (TBUFOVFLW); -# endif /* ACE_HAS_SET_T_ERRNO */ - return -1; - } - - opthdr = reinterpret_cast<struct opthdr *> (this->so_opt_req.opt.buf); - opthdr->level = level; - opthdr->name = option; - opthdr->len = OPTLEN (optlen); - ACE_OS::memcpy (OPTVAL (opthdr), optval, optlen); - - return ACE_OS::t_optmgmt (this->get_handle (), - &this->so_opt_req, - &this->so_opt_ret); #else ACE_UNUSED_ARG (level); ACE_UNUSED_ARG (option); ACE_UNUSED_ARG (optval); ACE_UNUSED_ARG (optlen); return -1; -#endif /* ACE_HAS_XTI, else ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ } int @@ -226,41 +172,13 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen) return 0; } } - -#elif defined (ACE_HAS_SVR4_TLI) - struct opthdr *opthdr = 0; /* See <sys/socket.h> for details on this format */ - - this->so_opt_req.flags = T_CHECK; - this->so_opt_ret.opt.len = sizeof *opthdr + OPTLEN (optlen); - - if (this->so_opt_ret.opt.len > this->so_opt_ret.opt.maxlen) - { -#if !defined (ACE_HAS_SET_T_ERRNO) - t_errno = TBUFOVFLW; -#else - set_t_errno (TBUFOVFLW); -#endif /* ACE_HAS_SET_T_ERRNO */ - return -1; - } - - opthdr = (struct opthdr *) this->so_opt_req.opt.buf; - opthdr->level = level; - opthdr->name = option; - opthdr->len = OPTLEN (optlen); - if (ACE_OS::t_optmgmt (this->get_handle (), &this->so_opt_req, &this->so_opt_ret) == -1) - return -1; - else - { - ACE_OS::memcpy (optval, OPTVAL (opthdr), optlen); - return 0; - } #else ACE_UNUSED_ARG (level); ACE_UNUSED_ARG (option); ACE_UNUSED_ARG (optval); ACE_UNUSED_ARG (optlen); return -1; -#endif /* ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/TLI.h b/ACE/ace/TLI.h index bfa0e19584c..006b3a95a51 100644 --- a/ACE/ace/TLI.h +++ b/ACE/ace/TLI.h @@ -93,13 +93,6 @@ protected: /// Initialize a TLI endpoint. ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0); - -private: -#if defined (ACE_HAS_SVR4_TLI) - // XTI/TLI option management. - struct t_optmgmt so_opt_req; - struct t_optmgmt so_opt_ret; -#endif /* ACE_HAS_SVR4_TLI */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/TLI_Connector.cpp b/ACE/ace/TLI_Connector.cpp index c8781000a78..5a8fe11bd0c 100644 --- a/ACE/ace/TLI_Connector.cpp +++ b/ACE/ace/TLI_Connector.cpp @@ -221,7 +221,7 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, { if (remote_sap != 0) { -#if defined (ACE_HAS_XTI) || defined (ACE_HAS_SVR4_TLI) +#if defined (ACE_HAS_XTI) struct netbuf name; name.maxlen = remote_sap->get_size (); @@ -230,9 +230,9 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, if (ACE_OS::t_getname (new_stream.get_handle (), &name, REMOTENAME) == -1) -#else /* SunOS4 */ +#else /* ACE_HAS_XTI */ if (0) -#endif /* ACE_HAS_XTI || ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_XTI */ { new_stream.close (); return -1; diff --git a/ACE/ace/TSS_T.cpp b/ACE/ace/TSS_T.cpp index 9d3444c0793..c483d468db3 100644 --- a/ACE/ace/TSS_T.cpp +++ b/ACE/ace/TSS_T.cpp @@ -156,15 +156,10 @@ ACE_TSS<TYPE>::ACE_TSS (TYPE *ts_obj) // Save/restore errno. ACE_Errno_Guard error (errno); // What should we do if this call fails?! -#if defined (ACE_HAS_WINCE) - ::MessageBox (0, - ACE_TEXT ("ACE_Thread::keycreate() failed!"), - ACE_TEXT ("ACE_TSS::ACE_TSS"), - MB_OK); -#elif !defined (ACE_LACKS_VA_FUNCTIONS) +#if !defined (ACE_LACKS_VA_FUNCTIONS) ACE_OS::fprintf (stderr, "ACE_Thread::keycreate() failed!"); -#endif /* ACE_HAS_WINCE */ +#endif /* !ACE_LACKS_VA_FUNCTIONS */ return; } diff --git a/ACE/ace/TSS_T.h b/ACE/ace/TSS_T.h index a0f8ee32451..af13d17b733 100644 --- a/ACE/ace/TSS_T.h +++ b/ACE/ace/TSS_T.h @@ -252,13 +252,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/TSS_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/TSS_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("TSS_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TSS_T_H */ diff --git a/ACE/ace/TTY_IO.cpp b/ACE/ace/TTY_IO.cpp index e18f5e6d107..f94aa9e98c5 100644 --- a/ACE/ace/TTY_IO.cpp +++ b/ACE/ace/TTY_IO.cpp @@ -724,11 +724,4 @@ int ACE_TTY_IO::control (Control_Mode cmd, Serial_Params *arg) const #endif /* ACE_HAS_TERMIOS || ACE_HAS_TERMIO */ } -#if defined (ACE_NEEDS_DEV_IO_CONVERSION) -ACE_TTY_IO::operator ACE_DEV_IO &() -{ - return static_cast<ACE_DEV_IO &>(*this); -} -#endif /* ACE_NEEDS_DEV_IO_CONVERSION */ - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/TTY_IO.h b/ACE/ace/TTY_IO.h index 323e310f78c..45ea6601b2d 100644 --- a/ACE/ace/TTY_IO.h +++ b/ACE/ace/TTY_IO.h @@ -104,11 +104,6 @@ public: /** Interface for reading/writing serial device parameters. */ int control (Control_Mode cmd, Serial_Params *arg) const; - -#if defined (ACE_NEEDS_DEV_IO_CONVERSION) - /** This is necessary to pass ACE_TTY_IO as parameter to DEV_Connector. */ - operator ACE_DEV_IO &(); -#endif /* ACE_NEEDS_DEV_IO_CONVERSION */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Task_Ex_T.h b/ACE/ace/Task_Ex_T.h index 70cd1d7d9e7..744bbff9122 100644 --- a/ACE/ace/Task_Ex_T.h +++ b/ACE/ace/Task_Ex_T.h @@ -180,13 +180,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Task_Ex_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Task_Ex_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Task_Ex_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TASK_EX_H */ diff --git a/ACE/ace/Task_T.h b/ACE/ace/Task_T.h index 013fba49c35..701b96b88e6 100644 --- a/ACE/ace/Task_T.h +++ b/ACE/ace/Task_T.h @@ -183,13 +183,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Task_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Task_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Task_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TASK_T_H */ diff --git a/ACE/ace/Test_and_Set.h b/ACE/ace/Test_and_Set.h index 69a32502bbe..c174ca3d4da 100644 --- a/ACE/ace/Test_and_Set.h +++ b/ACE/ace/Test_and_Set.h @@ -57,13 +57,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Test_and_Set.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Test_and_Set.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TEST_AND_SET_H */ diff --git a/ACE/ace/Thread.h b/ACE/ace/Thread.h index 67a190dcc41..6e79266bb1c 100644 --- a/ACE/ace/Thread.h +++ b/ACE/ace/Thread.h @@ -40,7 +40,7 @@ struct cancel_state * @brief Provides a wrapper for threads. * * This class provides a common interface that is mapped onto - * POSIX Pthreads, Solaris threads, Win32 threads, VxWorks + * POSIX Pthreads, Win32 threads, VxWorks * threads, or pSoS threads. Note, however, that it is * generally a better idea to use the ACE_Thread_Manager * programming API rather than the <ACE_Thread> API since the @@ -152,7 +152,6 @@ public: * If @a thread_id is 0, join() waits for any * undetached thread in the process to terminate * on platforms that support this capability - * (for example, Solaris). * @param departed points to a location that is set to the ID of the * terminated thread if join() returns successfully. * If @a departed is 0, it is ignored. diff --git a/ACE/ace/Thread_Adapter.cpp b/ACE/ace/Thread_Adapter.cpp index ec43c7bc2d9..d72d0d2d010 100644 --- a/ACE/ace/Thread_Adapter.cpp +++ b/ACE/ace/Thread_Adapter.cpp @@ -112,22 +112,6 @@ ACE_Thread_Adapter::invoke_i () // not to access <this> anywhere below this point. delete this; -#if defined (ACE_NEEDS_LWP_PRIO_SET) - // On SunOS, the LWP priority needs to be set in order to get - // preemption when running in the RT class. This is the ACE way to - // do that . . . - ACE_hthread_t thr_handle; - ACE_OS::thr_self (thr_handle); - int prio; - - // thr_getprio () on the current thread should never fail. - ACE_OS::thr_getprio (thr_handle, prio); - - // ACE_OS::thr_setprio () has the special logic to set the LWP priority, - // if running in the RT class. - ACE_OS::thr_setprio (prio); - -#endif /* ACE_NEEDS_LWP_PRIO_SET */ if (cancel_flags != 0) { // If both flags are set, ignore this. diff --git a/ACE/ace/Thread_Manager.cpp b/ACE/ace/Thread_Manager.cpp index 6b58fa5693e..7347fbd1f10 100644 --- a/ACE/ace/Thread_Manager.cpp +++ b/ACE/ace/Thread_Manager.cpp @@ -653,8 +653,6 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func, #if defined (ACE_HAS_WTHREADS) // Have to duplicate handle if client asks for it. - // @@ How are thread handles implemented on AIX? Do they - // also need to be duplicated? if (t_handle != 0) # if defined (ACE_LACKS_DUPLICATEHANDLE) *t_handle = thr_handle; diff --git a/ACE/ace/Thread_Manager.h b/ACE/ace/Thread_Manager.h index 88a89867580..f57405f1fc4 100644 --- a/ACE/ace/Thread_Manager.h +++ b/ACE/ace/Thread_Manager.h @@ -202,7 +202,7 @@ protected: /// Unique thread ID. ACE_thread_t thr_id_; - /// Unique handle to thread (used by Win32 and AIX). + /// Unique handle to thread (used by Win32). ACE_hthread_t thr_handle_; /// Group ID. @@ -240,7 +240,7 @@ public: /// Unique thread id. ACE_thread_t self () const; - /// Unique handle to thread (used by Win32 and AIX). + /// Unique handle to thread (used by Win32). void self (ACE_hthread_t &); /// Dump the state of an object. diff --git a/ACE/ace/Thread_Manager.inl b/ACE/ace/Thread_Manager.inl index c6c93f270ee..386e7f67711 100644 --- a/ACE/ace/Thread_Manager.inl +++ b/ACE/ace/Thread_Manager.inl @@ -162,7 +162,7 @@ ACE_INLINE ACE_Thread_Descriptor * ACE_Thread_Descriptor::get_next () const { ACE_TRACE ("ACE_Thread_Descriptor::get_next"); - return static_cast<ACE_Thread_Descriptor * ACE_CAST_CONST> (this->next_); + return static_cast<ACE_Thread_Descriptor *> (this->next_); } // Reset this thread descriptor diff --git a/ACE/ace/Thread_Mutex.h b/ACE/ace/Thread_Mutex.h index 3793c5654ed..54292b630c2 100644 --- a/ACE/ace/Thread_Mutex.h +++ b/ACE/ace/Thread_Mutex.h @@ -38,7 +38,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * in the same process. It maps to <CRITICAL_SECTION>s on NT * and <ACE_mutex_t> with <type> set to <USYNC_THREAD> on UNIX. * ACE_Thread_Mutex is recursive on some platforms (like - * Win32). However, on most platforms (like Solaris) it is not + * Win32). However, on most platforms it is not * recursive. To be totally safe and portable, developers * should use ACE_Recursive_Thread_Mutex when they need a * recursive mutex. diff --git a/ACE/ace/Time_Policy_T.h b/ACE/ace/Time_Policy_T.h index 85d0dde6aec..de54653af13 100644 --- a/ACE/ace/Time_Policy_T.h +++ b/ACE/ace/Time_Policy_T.h @@ -62,13 +62,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Time_Policy_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Time_Policy_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Time_Policy_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #endif /* ACE_TIME_POLICY_T_H */ diff --git a/ACE/ace/Time_Value_T.h b/ACE/ace/Time_Value_T.h index c6f9a55b87a..32b32df3d41 100644 --- a/ACE/ace/Time_Value_T.h +++ b/ACE/ace/Time_Value_T.h @@ -178,13 +178,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Time_Value_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Time_Value_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Time_Value_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIME_VALUE_T_H */ diff --git a/ACE/ace/Timeprobe_T.h b/ACE/ace/Timeprobe_T.h index 0c0a670841f..883c9e19e0d 100644 --- a/ACE/ace/Timeprobe_T.h +++ b/ACE/ace/Timeprobe_T.h @@ -203,13 +203,7 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timeprobe_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timeprobe_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_COMPILE_TIMEPROBES */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Timer_Hash_T.h b/ACE/ace/Timer_Hash_T.h index 6c59b16d28f..2bbe5fff078 100644 --- a/ACE/ace/Timer_Hash_T.h +++ b/ACE/ace/Timer_Hash_T.h @@ -337,13 +337,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timer_Hash_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timer_Hash_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_HASH_T_H */ diff --git a/ACE/ace/Timer_Heap_T.h b/ACE/ace/Timer_Heap_T.h index 62d57e72b7c..edde952efcd 100644 --- a/ACE/ace/Timer_Heap_T.h +++ b/ACE/ace/Timer_Heap_T.h @@ -332,13 +332,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timer_Heap_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timer_Heap_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_HEAP_T_H */ diff --git a/ACE/ace/Timer_List_T.h b/ACE/ace/Timer_List_T.h index 133d48b21c6..18a05c4fe01 100644 --- a/ACE/ace/Timer_List_T.h +++ b/ACE/ace/Timer_List_T.h @@ -215,13 +215,7 @@ private: void operator= (const ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> &) = delete; }; -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timer_List_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timer_List_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_LIST_T_H */ diff --git a/ACE/ace/Timer_Queue_Adapters.cpp b/ACE/ace/Timer_Queue_Adapters.cpp index d69bfd24f27..f6c3857ca7e 100644 --- a/ACE/ace/Timer_Queue_Adapters.cpp +++ b/ACE/ace/Timer_Queue_Adapters.cpp @@ -233,11 +233,6 @@ ACE_Thread_Timer_Queue_Adapter<TQ, TYPE>::svc () this->thr_id_ = ACE_Thread::self (); // Thread cancellation point, if ACE supports it. - // - // Note: This call generates a warning under Solaris because the header - // file /usr/include/pthread.h redefines the routine argument. This - // is a bug in the Solaris header files and has nothing to do with - // ACE. # if !defined (ACE_LACKS_PTHREAD_CANCEL) ACE_PTHREAD_CLEANUP_PUSH (&this->condition_.mutex ().get_nesting_mutex ()); # endif /* ACE_LACKS_PTHREAD_CANCEL */ diff --git a/ACE/ace/Timer_Queue_Adapters.h b/ACE/ace/Timer_Queue_Adapters.h index 0cd15c970c7..6e731a1caf9 100644 --- a/ACE/ace/Timer_Queue_Adapters.h +++ b/ACE/ace/Timer_Queue_Adapters.h @@ -251,13 +251,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # include "ace/Timer_Queue_Adapters.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) # include "ace/Timer_Queue_Adapters.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -# pragma implementation ("Timer_Queue_Adapters.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_QUEUE_ADAPTERS_H */ diff --git a/ACE/ace/Timer_Queue_Iterator.h b/ACE/ace/Timer_Queue_Iterator.h index ebb30d5dddf..d550397791b 100644 --- a/ACE/ace/Timer_Queue_Iterator.h +++ b/ACE/ace/Timer_Queue_Iterator.h @@ -187,13 +187,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Timer_Queue_Iterator.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timer_Queue_Iterator.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timer_Queue_Iterator.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_QUEUE_ITERATOR_H */ diff --git a/ACE/ace/Timer_Queue_T.cpp b/ACE/ace/Timer_Queue_T.cpp index 923cae1b7b8..52ed9ad9c80 100644 --- a/ACE/ace/Timer_Queue_T.cpp +++ b/ACE/ace/Timer_Queue_T.cpp @@ -21,8 +21,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -// This fudge factor can be overriden for timers that need it, such as on -// Solaris, by defining the ACE_TIMER_SKEW symbol in the appropriate config +// This fudge factor can be overriden for timers that need it +// by defining the ACE_TIMER_SKEW symbol in the appropriate config // header. #if !defined (ACE_TIMER_SKEW) # define ACE_TIMER_SKEW 0 diff --git a/ACE/ace/Timer_Queue_T.h b/ACE/ace/Timer_Queue_T.h index 703625afe42..060285cdf19 100644 --- a/ACE/ace/Timer_Queue_T.h +++ b/ACE/ace/Timer_Queue_T.h @@ -237,13 +237,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Timer_Queue_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timer_Queue_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timer_Queue_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_QUEUE_T_H */ diff --git a/ACE/ace/Timer_Wheel_T.h b/ACE/ace/Timer_Wheel_T.h index 5f0acf957c0..8d16b81400b 100644 --- a/ACE/ace/Timer_Wheel_T.h +++ b/ACE/ace/Timer_Wheel_T.h @@ -213,13 +213,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Timer_Wheel_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Timer_Wheel_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TIMER_WHEEL_T_H */ diff --git a/ACE/ace/Token.h b/ACE/ace/Token.h index 9d024820b24..4c3bcc80b5a 100644 --- a/ACE/ace/Token.h +++ b/ACE/ace/Token.h @@ -27,7 +27,7 @@ #include "ace/Thread_Mutex.h" -#if (defined (ACE_WIN32) && !defined (ACE_USES_WINCE_SEMA_SIMULATION)) || defined (ACE_HAS_VXTHREADS) +#if defined (ACE_WIN32) || defined (ACE_HAS_VXTHREADS) // If platforms support semaphores with timed wait, then we use semaphores instead of c.v. # define ACE_TOKEN_USES_SEMAPHORE #endif /* ACE_WIN32 || ACE_HAS_VXTHREADS */ @@ -56,8 +56,8 @@ class ACE_Time_Value; * <acquire> multiple times, however, it must call <release> an * equal number of times before the token is actually released. * Threads that are blocked awaiting the token are serviced in - * strict FIFO/LIFO order as other threads release the token (Solaris - * and Pthread mutexes don't strictly enforce an acquisition + * strict FIFO/LIFO order as other threads release the token + * (Pthread mutexes don't strictly enforce an acquisition * order). There are two lists within the class. Write * acquires always have higher priority over read acquires. Which * means, if you use both write/read operations, care must be diff --git a/ACE/ace/Tokenizer_T.h b/ACE/ace/Tokenizer_T.h index 6172520f4cf..a9ade225b02 100644 --- a/ACE/ace/Tokenizer_T.h +++ b/ACE/ace/Tokenizer_T.h @@ -226,13 +226,7 @@ typedef ACE_Tokenizer_T <ACE_TCHAR> ACE_Tokenizer; ACE_END_VERSIONED_NAMESPACE_DECL -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Tokenizer_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Tokenizer_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Typed_SV_Message.h b/ACE/ace/Typed_SV_Message.h index d46d5c1e250..a901e1de01c 100644 --- a/ACE/ace/Typed_SV_Message.h +++ b/ACE/ace/Typed_SV_Message.h @@ -91,13 +91,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Typed_SV_Message.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Typed_SV_Message.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Typed_SV_Message.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/Typed_SV_Message_Queue.h b/ACE/ace/Typed_SV_Message_Queue.h index 4d83cea4e9f..7e9fe558bf6 100644 --- a/ACE/ace/Typed_SV_Message_Queue.h +++ b/ACE/ace/Typed_SV_Message_Queue.h @@ -77,13 +77,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Typed_SV_Message_Queue.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Typed_SV_Message_Queue.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Typed_SV_Message_Queue.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_TYPED_MESSAGE_QUEUE_H */ diff --git a/ACE/ace/Unbounded_Queue.h b/ACE/ace/Unbounded_Queue.h index f0773b44ccc..6d20557c0b5 100644 --- a/ACE/ace/Unbounded_Queue.h +++ b/ACE/ace/Unbounded_Queue.h @@ -279,13 +279,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Unbounded_Queue.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Unbounded_Queue.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Unbounded_Queue.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_UNBOUNDED_QUEUE_H */ diff --git a/ACE/ace/Unbounded_Set.h b/ACE/ace/Unbounded_Set.h index 2fc19a24a3e..79fd80c7610 100644 --- a/ACE/ace/Unbounded_Set.h +++ b/ACE/ace/Unbounded_Set.h @@ -86,13 +86,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Unbounded_Set.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Unbounded_Set.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Unbounded_Set.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_UNBOUNDED_SET_H */ diff --git a/ACE/ace/Unbounded_Set_Ex.h b/ACE/ace/Unbounded_Set_Ex.h index 6b289c0a415..e30a8e1a3ba 100644 --- a/ACE/ace/Unbounded_Set_Ex.h +++ b/ACE/ace/Unbounded_Set_Ex.h @@ -356,13 +356,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Unbounded_Set_Ex.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Unbounded_Set_Ex.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Unbounded_Set_Ex.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" #endif /* ACE_UNBOUNDED_SET_H */ diff --git a/ACE/ace/Vector_T.h b/ACE/ace/Vector_T.h index eed72a38973..1674d2856d0 100644 --- a/ACE/ace/Vector_T.h +++ b/ACE/ace/Vector_T.h @@ -157,7 +157,7 @@ public: * This function dumps the content of the vector. TO BE MOVED out * of this class. It needs to be implemented as a global template * function that accepts a const ACE_Vector<T>, in order to - * make instances of this class compile on Linux, AIX. G++ and xlC + * make instances of this class compile on Linux. G++ and xlC * have template instantiation algoriths, which are different from * the one in Visual C++. The algorithms try to instantiate ALL * methods declared in the template class, regardless of whether the @@ -260,13 +260,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Vector_T.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Vector_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Vector_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp index 30f664ba6ab..f5cd8859ebb 100644 --- a/ACE/ace/WFMO_Reactor.cpp +++ b/ACE/ace/WFMO_Reactor.cpp @@ -1758,48 +1758,7 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time, // will not be able to dispatch it // We need to wait for both the <lock_> and <ok_to_wait_> event. - // If not on WinCE, use WaitForMultipleObjects() to wait for both atomically. - // On WinCE, the waitAll arg to WFMO must be false, so wait for the - // ok_to_wait_ event first (since that's likely to take the longest) then - // grab the lock and recheck the ok_to_wait_ event. When we can get them - // both, or there's an error/timeout, return. -#if defined (ACE_HAS_WINCE) - ACE_UNUSED_ARG (alertable); - ACE_Time_Value timeout; - if (max_wait_time != 0) - { - timeout = ACE_OS::gettimeofday (); - timeout += *max_wait_time; - } - while (1) - { - int status; - if (max_wait_time == 0) - status = this->ok_to_wait_.wait (); - else - status = this->ok_to_wait_.wait (&timeout); - if (status == -1) - return -1; - // The event is signaled, so it's ok to wait; grab the lock and - // recheck the event. If something has changed, restart the wait. - if (max_wait_time == 0) - status = this->lock_.acquire (); - else - { - status = this->lock_.acquire (timeout); - } - if (status == -1) - return -1; - - // Have the lock_, now re-check the event. If it's not signaled, - // another thread changed something so go back and wait again. - if (this->ok_to_wait_.wait (&ACE_Time_Value::zero, 0) == 0) - break; - this->lock_.release (); - } - return 1; - -#else + // Use WaitForMultipleObjects() to wait for both atomically. int timeout = max_wait_time == 0 ? INFINITE : max_wait_time->msec (); DWORD result = 0; while (1) @@ -1843,7 +1802,6 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time, // It is ok to enter ::WaitForMultipleObjects return 1; -#endif /* ACE_HAS_WINCE */ } DWORD @@ -1854,7 +1812,7 @@ ACE_WFMO_Reactor::wait_for_multiple_events (int timeout, // If <alertable> is enabled allow asynchronous completion of // ReadFile and WriteFile operations. -#if defined (ACE_HAS_PHARLAP) || defined (ACE_HAS_WINCE) +#if defined (ACE_HAS_PHARLAP) // PharLap doesn't do async I/O and doesn't implement // WaitForMultipleObjectsEx, so use WaitForMultipleObjects. ACE_UNUSED_ARG (alertable); @@ -1920,16 +1878,11 @@ ACE_WFMO_Reactor::dispatch (DWORD wait_status) case WAIT_FAILED: // Failure. ACE_OS::set_errno_to_last_error (); return -1; - case WAIT_TIMEOUT: // Timeout. errno = ETIME; return handlers_dispatched; - -#ifndef ACE_HAS_WINCE case WAIT_IO_COMPLETION: // APC. return handlers_dispatched; -#endif // ACE_HAS_WINCE - default: // Dispatch. // We'll let dispatch worry about abandoned mutes. handlers_dispatched += this->dispatch_handles (wait_status); diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc index 59d06539cc8..97e8b5fec64 100644 --- a/ACE/ace/ace.mpc +++ b/ACE/ace/ace.mpc @@ -24,7 +24,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, ATM_QoS.cpp ATM_Stream.cpp Atomic_Op.cpp - Atomic_Op_Sparc.c Barrier.cpp Base_Thread_Adapter.cpp Based_Pointer_Repository.cpp @@ -206,7 +205,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, Recursive_Thread_Mutex.cpp Recyclable.cpp Registry.cpp - Rtems_init.c RW_Mutex.cpp RW_Process_Mutex.cpp RW_Thread_Mutex.cpp @@ -245,7 +243,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, Stack_Trace.cpp Stats.cpp String_Base_Const.cpp - SUN_Proactor.cpp SV_Message.cpp SV_Message_Queue.cpp SV_Semaphore_Complex.cpp @@ -402,7 +399,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, ACE_export.h Bound_Ptr.h - CE_Screen_Output.h Codeset_Symbols.h CORBA_macros.h Codeset_Symbols.h diff --git a/ACE/ace/ace_for_tao.mpc b/ACE/ace/ace_for_tao.mpc index 6fc36f53daf..acb98a071af 100644 --- a/ACE/ace/ace_for_tao.mpc +++ b/ACE/ace/ace_for_tao.mpc @@ -150,7 +150,6 @@ project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, Reactor_Timer_Interface.cpp Read_Buffer.cpp Recursive_Thread_Mutex.cpp - Rtems_init.c RW_Mutex.cpp RW_Thread_Mutex.cpp Sched_Params.cpp @@ -360,7 +359,6 @@ project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, Version.h ace_wchar.h checked_iterator.h - config-WinCE.h config-all.h config-lite.h config-win32-borland.h diff --git a/ACE/ace/ace_wchar.h b/ACE/ace/ace_wchar.h index 980d03f0728..4488e9d20ec 100644 --- a/ACE/ace/ace_wchar.h +++ b/ACE/ace/ace_wchar.h @@ -35,11 +35,6 @@ # include /**/ <wchar.h> # include /**/ <wctype.h> # endif -# elif defined (ACE_OPENVMS) -# include /**/ <wchar.h> -# include /**/ <wctype.h> -# elif defined (ACE_HAS_WINCE) -# include /**/ <wtypes.h> # else # include /**/ <cwchar> # include /**/ <cwctype> @@ -208,9 +203,9 @@ private: #endif /* ACE_HAS_ICONV */ /// Disallow these operation. - ACE_Ascii_To_Wide (); - ACE_Ascii_To_Wide (ACE_Ascii_To_Wide &); - ACE_Ascii_To_Wide operator= (ACE_Ascii_To_Wide &); + ACE_Ascii_To_Wide () = delete; + ACE_Ascii_To_Wide (ACE_Ascii_To_Wide &) = delete; + ACE_Ascii_To_Wide operator= (ACE_Ascii_To_Wide &) = delete; }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/ace_wchar.inl b/ACE/ace/ace_wchar.inl index 752c177f680..b390b32fc1f 100644 --- a/ACE/ace/ace_wchar.inl +++ b/ACE/ace/ace_wchar.inl @@ -116,8 +116,8 @@ inline wchar_t * ACE_Ascii_To_Wide::convert (const char *str) { // Short circuit null pointer case - if (str == 0) - return 0; + if (!str) + return nullptr; # if defined (ACE_WIN32) UINT const cp = GetACP (); // Codepage diff --git a/ACE/ace/config-WinCE.h b/ACE/ace/config-WinCE.h deleted file mode 100644 index 4435d96575c..00000000000 --- a/ACE/ace/config-WinCE.h +++ /dev/null @@ -1,216 +0,0 @@ -// Note: For WinCE build, simply use: #include "ace/config-win32.h" -// It is same as config.h for Windows NT/2k so that you can -// share same files and directories for both WinCE and NT/2k -// builds, unless you add additional definition(s) for each -// specific build or change the output directory. - -#ifndef ACE_CONFIG_WINCE_H -#define ACE_CONFIG_WINCE_H - -#include /**/ "ace/pre.h" - -#ifndef ACE_CONFIG_WIN32_H -# error Use config-win32.h in config.h instead of this header -#endif // ACE_CONFIG_WIN32_H - -#if !defined (_WIN32_WCE) -# error Define _WIN32_WCE to version (i.e. 500 = 5.0) -#endif // _WIN32_WCE - -#if (_WIN32_WCE < 500) -# error ACE requires Windows CE 5.0 and later. -#endif // _WIN32_WCE - -#if !defined (ACE_HAS_WINCE) -# define ACE_HAS_WINCE 1 -#endif - -// We need these libraries to build: -#if defined (_MSC_VER) -# pragma comment(lib,"corelibc.lib") -# pragma comment(linker, "/nodefaultlib:oldnames.lib") -#endif - -// Only DLL version is supported on CE. -//#if defined (ACE_HAS_DLL) -//# undef ACE_HAS_DLL -//#endif // ACE_HAS_DLL -//#define ACE_HAS_DLL 1 - -// Need to define LD search path explicitly on CE because -// CE doesn't have environment variables and we can't get -// the information using getenv. -#define ACE_DEFAULT_LD_SEARCH_PATH ACE_TEXT (".\\;\\windows") - -#define ACE_LACKS_ABORT -#define ACE_LACKS_FCNTL_H -#define ACE_LACKS_SYS_TYPES_H -#define ACE_LACKS_GETCWD -#define ACE_LACKS_ASCTIME -#define ACE_LACKS_ASCTIME_R -#define ACE_LACKS_GMTIME -#define ACE_LACKS_GMTIME_R -#define ACE_LACKS_LOCALTIME -#define ACE_LACKS_STRTOK_R -#define ACE_LACKS_PERROR -#define ACE_LACKS_STRFTIME -#define ACE_LACKS_WIN32_SETFILEPOINTEREX -#define ACE_LACKS_WIN32_SERVICES -#define ACE_LACKS_WIN32_SECURITY_DESCRIPTORS -#define ACE_LACKS_GETPROCESSTIMES -#define ACE_LACKS_PDH_H -#define ACE_LACKS_PDHMSG_H -#define ACE_LACKS_TIME -#define ACE_LACKS_TZSET -#define ACE_LACKS_RAISE -#define ACE_LACKS_BSEARCH - -#define ACE_LACKS_MSG_WFMO -#define ACE_LACKS_UMASK -#define ACE_HAS_TYPES_H -#define ACE_LACKS_DEV_T - -#define ACE_ISCTYPE_EQUIVALENT ::_isctype - -// WinCE only supports the UNICODE API -#if !defined (ACE_USES_WCHAR) -# define ACE_USES_WCHAR -#endif /* ACE_USES_WCHAR */ - -#if (_WIN32_WCE < 0x600) -# define ACE_USES_WINCE_SEMA_SIMULATION -# define ACE_LACKS_ERRNO_H -# define ACE_LACKS_DUP -# define ACE_LACKS_GETSYSTEMTIMEASFILETIME -#endif /* (_WIN32_WCE < 0x600) */ - -#define ACE_LACKS_REGNOTIFYCHANGEKEYVALUE - -#define ACE_HAS_NONSTATIC_OBJECT_MANAGER 1 - -#if ! defined(ACE_DEFAULT_THREAD_KEYS) -# define ACE_DEFAULT_THREAD_KEYS TLS_MINIMUM_AVAILABLE -#endif // ! defined(ACE_DEFAULT_THREAD_KEYS) - -// FILE stuff isn't always defined in CE -#if !defined (_FILE_DEFINED) - typedef void FILE; -# define _FILE_DEFINED -#endif /* !_FILE_DEFINED */ - -// This was defined in previous versions of CE, but not 2.11 -#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION - -#define ACE_MAIN WINAPI WinMain - -// SH3 cross-compiler can't handle inline functions correctly -// (along with other bugs.) -#if defined (SH3) -# define ACE_LACKS_INLINE_FUNCTIONS -#endif // SH3 && _DEBUG - -#ifndef ACE_DEFAULT_SERVER_HOST -# define ACE_DEFAULT_SERVER_HOST ACE_TEXT("localhost") -#endif // ACE_DEFAULT_SERVER_HOST - -// @@ Need to remap every function that uses any of these flags to -// Win32 API. These are for ANSI styled function and are not -// available on WinCE. - -#define _O_RDONLY 0x0000 // open for reading only -#define _O_WRONLY 0x0001 // open for writing only -#define _O_RDWR 0x0002 // open for reading and writing -#define _O_APPEND 0x0008 // writes done at eof - -#define _O_CREAT 0x0100 // create and open file -#define _O_TRUNC 0x0200 // open and truncate -#define _O_EXCL 0x0400 // open only if file doesn't already exist - -// O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s, -// and <lf> sequences translated to <cr><lf> on write()'s -#define _O_TEXT 0x4000 // file mode is text (translated) -#define _O_BINARY 0x8000 // file mode is binary (untranslated) - -// Temporary file bit - file is deleted when last handle is closed -#define _O_TEMPORARY 0x0040 // temporary file bit - -// Non-ANSI names -#define O_RDONLY _O_RDONLY -#define O_WRONLY _O_WRONLY -#define O_RDWR _O_RDWR -#define O_APPEND _O_APPEND -#define O_CREAT _O_CREAT -#define O_TRUNC _O_TRUNC -#define O_EXCL _O_EXCL -#define O_TEXT _O_TEXT -#define O_BINARY _O_BINARY -#define O_TEMPORARY _O_TEMPORARY - -// @@ NSIG value. This is definitely not correct. -#define NSIG 23 - -#if !defined (FILE_MAP_COPY) -#define FILE_MAP_COPY 0 -#endif - -#define ACE_HAS_INTERLOCKED_EXCHANGEADD -#define ACE_LACKS_ACCESS -#define ACE_LACKS__WACCESS -#define ACE_HAS_ACCESS_EMULATION -#define ACE_LACKS_EXEC -#define ACE_LACKS_MKTEMP -#define ACE_LACKS_ISATTY -#define ACE_LACKS_STRERROR -#define ACE_LACKS_SYSTEM -#define ACE_LACKS_PIPE - -#define ACE_LACKS_CHDIR -#define ACE_LACKS_GETENV -#define ACE_LACKS_SETENV -#define ACE_LACKS_UNSETENV -#define ACE_LACKS_PUTENV -#define ACE_LACKS_GETENVSTRINGS -#define ACE_LACKS_STRENVDUP -#define ACE_LACKS_REALPATH -#define ACE_LACKS_SWAB -#define ACE_LACKS_TEMPNAM - -#if defined (_WIN32_WCE_EMULATION) -// @@ For some reason, qsort isn't defined correctly (_stdcall vs _cdecl) -// under emulation. So for right now, exclude it. -# define ACE_LACKS_QSORT -#endif // _WIN32_WCE_EMULATION - -#if !defined (BUFSIZ) -# define BUFSIZ 1024 -#endif - -#define ACE_HAS_WINCE_BROKEN_ERRNO - -#define ACE_HAS_STRDUP_EMULATION - -#if !defined (MAXSYMLINKS) -# define MAXSYMLINKS 0 -#endif - -// WinCE can't do fixed addresses for memory-mapped files. -#if defined (ACE_DEFAULT_BASE_ADDR) -# undef ACE_DEFAULT_BASE_ADDR -#endif -#define ACE_DEFAULT_BASE_ADDR 0 - -#if (_WIN32_WCE < 0x600) -# define ACE_HAS_TSS_EMULATION -#endif // WinCE version < 6.0 - -// CE doesn't support FILE_SHARE_DELETE like regular windows -#if !defined (ACE_DEFAULT_FILE_PERMS) -# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE) -#endif - -#define ACE_LACKS_SIGNAL_H -#define ACE_LACKS_SYS_STAT_H - -#include /**/ "ace/post.h" - -#endif // ACE_CONFIG_WINCE_H diff --git a/ACE/ace/config-aix-5.x.h b/ACE/ace/config-aix-5.x.h deleted file mode 100644 index e8f610274b6..00000000000 --- a/ACE/ace/config-aix-5.x.h +++ /dev/null @@ -1,320 +0,0 @@ -// -// Config file for AIX 5.1 and higher. - -#ifndef ACE_CONFIG_AIX_5_X_H -#define ACE_CONFIG_AIX_5_X_H - -// This define is needed for building with Visual Age C++ 5 in incremental -// mode. In the batch mode build, platform_aix_ibm.GNU sets it. The incremental -// mode compiler won't be supported after ACE 5.3, so this will also go away -// in that timeframe, so don't worry about future AIX versions. -#if !defined (ACE_AIX_VERS) -# define ACE_AIX_VERS 501 -#endif - -// AIX 5.1 has AIO, but it doesn't have the same API as other POSIX -// systems, and the semantics of operations are a bit different. Will take -// some real work to get this going. -// AIX 5.2, however, has the POSIX API implemented. However, the libc functions -// to implement it aren't exported by default. You need to use smit to enable -// them. So, leave AIO disabled unless the user explicitly enables it. -// config-aix-4.x.h will set ACE_HAS_AIO_CALLS if config-posix.h senses the -// feature-test macros, so set up _ACE_DISABLE_AIO_CALLS_ if the user didn't -// set it. Then check for it after including config-aix-4.x.h and remove -// ACE_HAS_AIO_CALLS if so. -#if !defined (ACE_HAS_AIO_CALLS) -# define _ACE_DISABLE_AIO_CALLS_ -#endif - -// Both IBM and g++ compilers set _THREAD_SAFE if compiler is asked to compile -// threaded code (xlC_r, as opposed to xlC; and g++ -pthread) -#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0) -# if defined (ACE_HAS_THREADS) -# undef ACE_HAS_THREADS -# endif -# if defined (_THREAD_SAFE) -# define ACE_HAS_THREADS 1 -// # else -// # define ACE_HAS_THREADS 0 -# endif /* _THREAD_SAFE */ -#endif /* !ACE_MT_SAFE || (ACE_MT_SAFE != 0) */ - -#if defined (__IBMCPP__) - // AIX xlC, IBM C/C++ compiler - //******************************************************************** - // - - // Compiler does this with a builtin - it's not in libc. - // Although ACE does have alloca() on this compiler/platform combination, - // it is disabled by default since it can be dangerous. Uncomment the - // following line if you ACE to use it. - //# define ACE_HAS_ALLOCA - - // Compiler supports the ssize_t typedef. -# define ACE_HAS_SSIZE_T - - // Keep an eye on this as the compiler and standards converge... -# define ACE_LACKS_LINEBUFFERED_STREAMBUF -# define ACE_LACKS_PRAGMA_ONCE - -# define ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS - // When using -qtempinc, we don't need to see template implementation - // source (though we do need a pragma to find the correct source file). - // However, without -qtempinc (either -qnotempinc or -qtemplateregistry) - // we do need to see the source. -# if defined (__TEMPINC__) -# if !defined ACE_TEMPLATES_REQUIRE_PRAGMA -# define ACE_TEMPLATES_REQUIRE_PRAGMA -# endif -# else -# if !defined (ACE_TEMPLATES_REQUIRE_SOURCE) -# define ACE_TEMPLATES_REQUIRE_SOURCE -# endif -# endif /* __TEMPINC__ */ - -# undef WIFEXITED -# undef WEXITSTATUS - -# define ACE_HAS_CUSTOM_EXPORT_MACROS -# define ACE_Proper_Export_Flag -# define ACE_Proper_Import_Flag - // There's no explicit import/export per-se, but to be sure that declared - // template code is exported, explicitly instantiate the class. -# define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class SINGLETON_TYPE < CLASS, LOCK >; -# define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) extern template class SINGLETON_TYPE < CLASS, LOCK >; - -#elif defined (__GNUG__) - -# include "ace/config-g++-common.h" - -# define ACE_HAS_SSIZE_T - -# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0 - // ACE_MT_SAFE is #defined below, for all compilers. -# if !defined (_REENTRANT) -# define _REENTRANT -# endif /* _REENTRANT */ -# endif /* !ACE_MT_SAFE */ - -#else /* ! __IBMCPP__ && ! __GNUG__ */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler in ace/config-aix-5.x.h -# endif /* __cplusplus */ -#endif /* ! __xlC__ && ! __GNUG__ */ - -// Compiling for AIX. -#ifndef AIX -# define AIX -#endif /* AIX */ - -// Pick up all the detectable settings. -#include "ace/config-posix.h" - -// Regardless of what config-posix.h may indicate, AIX 5.3 is the first -// to support sem_timedwait(). Prior to that, use the emulation. -#if defined (ACE_HAS_POSIX_SEM_TIMEOUT) && \ - (defined (ACE_AIX_VERS) && (ACE_AIX_VERS < 503)) -# undef ACE_HAS_POSIX_SEM_TIMEOUT -#endif /* ACE_HAS_POSIX_SEM_TIMEOUT && ACE_AIX_VERS < 503 */ - -#if defined (ACE_DLL_SUFFIX) -# undef ACE_DLL_SUFFIX -#endif -#define ACE_DLL_SUFFIX ACE_TEXT (".so") - -#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000) - -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R - -#define ACE_HAS_SOCKLEN_T -#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG - -// AIX has AIO, but the functions don't match those of other AIO-enabled -// platforms. If this is to work, it'll require some significant work, -// maybe moving the OS-abstraction stuff to an OS_AIO or some such thing. -//# define ACE_HAS_AIO_CALLS - -#define ACE_HAS_AIX_HI_RES_TIMER - -// Prototypes for both signal() and struct sigaction are consistent. -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// OS has readdir and friends. -#define ACE_HAS_DIRENT - -// OS supports the getrusage() system call -#define ACE_HAS_GETRUSAGE - -#define ACE_HAS_GPERF - -#define ACE_HAS_H_ERRNO - -#define ACE_LACKS_STDINT_H -#define ACE_LACKS_SYS_SYSCTL_H - -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT -#define ACE_HAS_NONCONST_SELECT_TIMEVAL -#define ACE_HAS_ICMP_SUPPORT 1 -#define ACE_HAS_IP_MULTICAST - -// Lacks perfect filtering, must bind group address. -#if !defined ACE_LACKS_PERFECT_MULTICAST_FILTERING -# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING */ - -#define ACE_HAS_MSG - -// Compiler/platform supports poll(). -#define ACE_HAS_POLL - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -#define ACE_HAS_POSIX_TIME -// ... but needs to include another header for it on 4.2+ -# define ACE_HAS_BROKEN_POSIX_TIME -// ... and needs another typedef -#define ACE_LACKS_TIMESPEC_T -#define ACE_HAS_SELECT_H - -#define ACE_HAS_REENTRANT_FUNCTIONS - -#define ACE_HAS_SIOCGIFCONF - -// Compiler/platform defines the sig_atomic_t typedef -#define ACE_HAS_SIG_ATOMIC_T -#define ACE_HAS_SIGINFO_T -#define ACE_LACKS_SIGINFO_H -#define ACE_HAS_P_READ_WRITE - -#define ACE_HAS_SIGWAIT -#define ACE_HAS_SOCKADDR_IN_SIN_LEN -#define ACE_HAS_STRBUF_T - -// Compiler supports stropts.h -#define ACE_HAS_STREAMS -// #define ACE_HAS_STREAM_PIPES - -// AIX bzero() -#define ACE_HAS_STRINGS - -#define ACE_HAS_STRUCT_NETDB_DATA - -// Dynamic linking is in good shape on newer OS/patch levels. If you have -// trouble with the dynamic linking parts of ACE, and can't patch your OS -// up to latest levels, comment this out. -#define ACE_HAS_SVR4_DYNAMIC_LINKING -// This is tightly related to dynamic linking... -#define ACE_HAS_AUTOMATIC_INIT_FINI - -#define ACE_HAS_SVR4_GETTIMEOFDAY - -#define ACE_HAS_SYSV_IPC -#define ACE_HAS_TIMOD_H -#define ACE_HAS_XTI -#define ACE_HAS_BROKEN_T_ERROR -#define ACE_TLI_TCP_DEVICE "/dev/xti/tcp" - -#define ACE_HAS_UALARM - -#define ACE_HAS_UCONTEXT_T - -#define ACE_HAS_CTYPE_T - -// Platform has XPG4 wide character type and functions. However, the size -// of wchar_t changes for 32- vs. 64-bit builds (unsigned short vs. unsigned -// int, respectively). -#define ACE_HAS_XPG4_MULTIBYTE_CHAR -#ifdef __64BIT__ -# define ACE_SIZEOF_WCHAR 4 -#else -# define ACE_SIZEOF_WCHAR 2 -#endif /* __64BIT__ */ - -#define ACE_LACKS_NETINET_TCP_H - -// AIX uses LIBPATH to search for libraries -#define ACE_LD_SEARCH_PATH ACE_TEXT ("LIBPATH") - -// Defines the page size of the system. -#define ACE_PAGE_SIZE 4096 - -//************************************************************** -// -// Threads related definitions. -// -// The threads on AIX are generally POSIX P1003.1c (ACE_HAS_PTHREADS). -// However, there is also a kernel thread ID (tid_t) that is used in -// ACE_Log_Msg (printing the thread ID). The tid_t is not the same as -// pthread_t, and can't derive one from the other - thread_self() gets -// the tid_t (kernel thread ID) if called from a thread. -// Thanks very much to Chris Lahey for straightening this out. - -#if defined (ACE_HAS_THREADS) -# if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -# endif - -# define ACE_HAS_PTHREADS -# define ACE_HAS_PTHREADS_UNIX98_EXT -# define ACE_HAS_PTHREAD_CONTINUE_NP -# define ACE_HAS_PTHREAD_SUSPEND_NP -# define ACE_HAS_RECURSIVE_MUTEXES -# define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS -# define ACE_HAS_SIGTHREADMASK -# define ACE_HAS_THREAD_SPECIFIC_STORAGE - -# define ACE_LACKS_THREAD_PROCESS_SCOPING -#else -# undef ACE_HAS_THREADS -#endif /* ACE_HAS_THREADS != 0 */ - -#define ACE_MALLOC_ALIGN 8 - -#if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) && !defined(_UNIX95) -# define ACE_HAS_3_PARAM_WCSTOK -#endif /* (_XOPEN_SOURCE -0) >= 500 && !_UNIX95 */ - -#if defined (_ACE_DISABLE_AIO_CALLS_) -# if defined (ACE_HAS_AIO_CALLS) -# undef ACE_HAS_AIO_CALLS -# endif -# undef _ACE_DISABLE_AIO_CALLS_ -#endif - -// AIX's /usr/include/unistd.h sets _POSIX_SEMAPHORE to indicate the system -// supplies such a facility, but the headers don't enable it unless -// _XOPEN_SOURCE >= 500. So disable semaphores here if _XOPEN_SOURCE isn't -// up to snuff. -#if defined (ACE_HAS_POSIX_SEM) && \ - (!defined (_XOPEN_SOURCE) || (_XOPEN_SOURCE-0 < 500)) -# undef ACE_HAS_POSIX_SEM -#endif - -// I think this is correct, but needs to be verified... -Steve Huston -#define ACE_HAS_SIGTIMEDWAIT - -// AIX 5.1 has netinet/tcp.h -#undef ACE_LACKS_NETINET_TCP_H - -#define ACE_HAS_SCANDIR -#define ACE_SCANDIR_CMP_USES_VOIDPTR -#define ACE_SCANDIR_SEL_LACKS_CONST -#define ACE_HAS_SIGSUSPEND -#define ACE_HAS_TIMEZONE /* Call tzset() to set timezone */ -#define ACE_LACKS_ISCTYPE -#define ACE_HAS_STRSIGNAL -#define ACE_NEEDS_STRSIGNAL_RANGE_CHECK -#define ACE_HAS_SOCKADDR_IN6_SIN6_LEN - - -#if defined (ACE_AIX_VERS) && (ACE_AIX_VERS < 503) -# define ACE_LACKS_UNSETENV -# define ACE_LACKS_LOG2 -# define ACE_LACKS_PTHREAD_ATTR_SETSTACK -#endif /* ACE_AIX_VERS < 503 */ - -#define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" -#define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" - -#endif /* ACE_CONFIG_AIX_5_X_H */ diff --git a/ACE/ace/config-aix-7.h b/ACE/ace/config-aix-7.h deleted file mode 100644 index 3864490ce40..00000000000 --- a/ACE/ace/config-aix-7.h +++ /dev/null @@ -1,27 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file config-aix-7.h - * - * This is the config file for AIX 7 and higher. - * - * @author Steve Huston <shuston@riverace.com> - */ -//============================================================================= - -#ifndef ACE_CONFIG_AIX_7_H -#define ACE_CONFIG_AIX_7_H - -// Diffs from prior AIX versions are related to scandir() arguments. -#include "ace/config-aix-5.x.h" - -#ifdef ACE_SCANDIR_CMP_USES_VOIDPTR -# undef ACE_SCANDIR_CMP_USES_VOIDPTR -#endif /* ACE_SCANDIR_CMP_USES_VOIDPTR */ - -#ifdef ACE_SCANDIR_SEL_LACKS_CONST -# undef ACE_SCANDIR_SEL_LACKS_CONST -#endif /* ACE_SCANDIR_SEL_LACKS_CONST */ - -#endif /* ACE_CONFIG_AIX_7_H */ diff --git a/ACE/ace/config-all.h b/ACE/ace/config-all.h index 53925b24e02..102923c1941 100644 --- a/ACE/ace/config-all.h +++ b/ACE/ace/config-all.h @@ -70,6 +70,10 @@ # include "ace/Trace.h" #endif /* ACE_OS_NTRACE */ +#if !defined (ACE_TEMPLATES_REQUIRE_SOURCE) +# define ACE_TEMPLATES_REQUIRE_SOURCE +#endif + #if !defined (ACE_HAS_MONITOR_FRAMEWORK) # define ACE_HAS_MONITOR_FRAMEWORK 1 #endif diff --git a/ACE/ace/config-cygwin32.h b/ACE/ace/config-cygwin32.h index 29569a216fe..18544fcd08d 100644 --- a/ACE/ace/config-cygwin32.h +++ b/ACE/ace/config-cygwin32.h @@ -84,7 +84,6 @@ #define ACE_HAS_VOIDPTR_MMAP #define ACE_HAS_POLL #define ACE_HAS_SOCKADDR_MSG_NAME 1 -#define ACE_LACKS_PRI_T 1 // Compiler/platform supports alloca(). // Although ACE does have alloca() on this compiler/platform combination, it is diff --git a/ACE/ace/config-face-safety.h b/ACE/ace/config-face-safety.h index b06fed1e5b0..4ea75367230 100644 --- a/ACE/ace/config-face-safety.h +++ b/ACE/ace/config-face-safety.h @@ -216,8 +216,8 @@ #ifdef ACE_FACE_SAFETY_EXTENDED -# if defined ACE_WIN32 || defined ACE_HAS_WINCE -# error "FACE Safety profile not compatible with win32 or winCE" +# if defined ACE_WIN32 +# error "FACE Safety profile not compatible with win32" # endif # ifndef ACE_EMULATE_POSIX_DEVCTL diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index a6b51e705ad..9ab89245007 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -14,8 +14,6 @@ #define ACE_CC_MINOR_VERSION __GNUC_MINOR__ #define ACE_CC_BETA_VERSION (0) -#define ACE_TEMPLATES_REQUIRE_SOURCE - #if __cplusplus >= 202002L # define ACE_HAS_CPP20 #endif diff --git a/ACE/ace/config-hpux-11.00.h b/ACE/ace/config-hpux-11.00.h deleted file mode 100644 index f3802570a64..00000000000 --- a/ACE/ace/config-hpux-11.00.h +++ /dev/null @@ -1,381 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for HP -// platforms running HP-UX 11.00 using aC++ or gcc (2.95 and up). - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#define ACE_LACKS_STDINT_H -#define ACE_LACKS_SYS_SELECT_H - -#if defined (__GNUG__) -# include "ace/config-g++-common.h" -#else - -// aC++... - -// Precompiler needs extra flags to ignore "invalid #pragma directive" -# define ACE_CC_PREPROCESSOR_ARGS "-E +W 67" - -// Platform lacks streambuf "linebuffered ()". -# define ACE_LACKS_LINEBUFFERED_STREAMBUF 1 - -// Compiler's template mechanism must see source code (i.e., .C files). -# define ACE_TEMPLATES_REQUIRE_SOURCE - -// Compiler doesn't handle 'signed char' correctly (used in ace/IOStream.h) -# define ACE_LACKS_SIGNED_CHAR - -#endif /* __GNUG__, HP */ - -//********************************************************************* -// -// From here down is the compiler-INdependent OS settings. -// -//********************************************************************* - -// Compiling for HPUX. -#if !defined (HPUX) -#define HPUX -#endif /* HPUX */ -#define HPUX_11 - -#ifndef _HPUX_SOURCE -#define _HPUX_SOURCE -#endif - -#include /**/ <sys/stdsyms.h> - -// HP-UX is a POSIX-compliant system - see what's available. -#include "ace/config-posix.h" - -// config-posix.h sets up ACE_HAS_AIO_CALLS if the headers define the -// proper things. In HP-UX 11's case, the AIOCB Proactor works the best -// overall. If the user hasn't overridden it, select AIOCB. -#if defined (ACE_HAS_AIO_CALLS) -# if !defined (ACE_POSIX_AIOCB_PROACTOR) && !defined (ACE_POSIX_SIG_PROACTOR) -# define ACE_POSIX_AIOCB_PROACTOR -# endif /* !ACE_HAS_POSIX_AIOCB_PROACTOR && !ACE_POSIX_SIG_PROACTOR */ -#endif /* ACE_HAS_AIO_CALLS */ - -//////////////////////////////////////////////////////////////////////////// -// General OS information - see README for more details on what they mean -// -/////////////////////////////////////////////////////////////////////////// - -// HP/UX needs to have these addresses in a special range. -// If this is on a 64-bit model, the default is to use 64-bit addressing. -// It can also be set so that the mapped region is shareable with 32-bit -// programs. To enable the 32/64 sharing, comment out the first definition -// of ACE_DEFAULT_BASE_ADDR and uncomment the two lines after it. -#if defined (__LP64__) -# define ACE_DEFAULT_BASE_ADDR ((char *) 0x0000001100000000) -//# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000) -//# define ACE_OS_EXTRA_MMAP_FLAGS MAP_ADDR32 - -# define ACE_DEFAULT_BASE_ADDRL (0x0000001100000000) -//# define ACE_DEFAULT_BASE_ADDRL (0x80000000) -#else -# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000) -#endif /* __LP64__ */ - -// Preprocessor needs some help with data types -#if defined (__LP64__) -# define ACE_SIZEOF_LONG 8 -#else -# define ACE_SIZEOF_LONG 4 -#endif - -// Platform can do async I/O (aio_*) (set up in config-posix.h) -// ... but seems to require this in order to keep from hanging. Needs some -// investigation, maybe with HP. John Mulhern determined this value -// empirically. YMMV. If it does vary, set it up in your own config.h which -// then includes the ACE-supplied config. -#if !defined (ACE_INFINITE) -# define ACE_INFINITE 10000000 -#endif - -/* Compiler/platform correctly calls init()/fini() for shared libraries. */ -#define ACE_HAS_AUTOMATIC_INIT_FINI 1 - -// Manually tweak the malloc control block paddings to properly align -// things. -#define ACE_MALLOC_PADDING 16 -#define ACE_MALLOC_ALIGN 8 -#define ACE_PI_CONTROL_BLOCK_ALIGN_LONGS 3 - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -#define ACE_HAS_SYS_PSTAT_H - -// But doesn't have a prototype for syscall() -#define ACE_LACKS_SYSCALL - -// Platform supports POSIX.1b clock_gettime () -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME - -#define ACE_LACKS_CLOCK_MONOTONIC - -#define ACE_LACKS_PTHREAD_SCOPE_PROCESS - -// Prototypes for both signal() and struct sigaction are consistent. -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Compiler/platform has Dirent iterator functions. -#define ACE_HAS_DIRENT - -#define ACE_HAS_VSWPRINTF - -// Platform supports getpagesize() call -#define ACE_HAS_GETPAGESIZE -// But we define this just to be safe -#define ACE_PAGE_SIZE 4096 - -// Can run gperf on this platform (needed for TAO) -# define ACE_HAS_GPERF - -// Optimize ACE_Handle_Set for select(). -# define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST -// At least for 11iv2, lacks perfect filtering. -#if (HPUX_VERS >= 1123) && !defined (ACE_LACKS_PERFECT_MULTICAST_FILTERING) -# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#endif - -/* Platform defines MAP_FAILED as a long constant. */ -#define ACE_HAS_LONG_MAP_FAILED 1 - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Platform's select() has non-const timeval argument -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -// Compiler/platform supports poll(). -#define ACE_HAS_POLL - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Platform supports the POSIX struct timespec type -#define ACE_HAS_POSIX_TIME - -/* Platform has pread() and pwrite() support. */ -#define ACE_HAS_P_READ_WRITE 1 - -/* Platform will recurse infinitely on thread exits from TSS cleanup routines - (e.g., AIX) */ -#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS 1 - -// Platform supports reentrant functions (all the POSIX *_r functions). -#define ACE_HAS_REENTRANT_FUNCTIONS -// ctime_r and asctime_r conform to POSIX.1c (2 param version) -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R - -// Platform offers scandir(), and requires no adjustments for its API. -#define ACE_HAS_SCANDIR - -// HP-UX 11 has reentrant netdb functions. The catch is that the old -// functions (gethostbyname, etc.) are thread-safe and the _r versions are -// obsolescent. So, define things so the _r versions are not used. -// OS_NS_netdb.inl ensures no funny lock games are played in the -// ACE_NETDBCALL_RETURN macro. -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS - -/* Platform lacks pri_t (e.g., Tandem NonStop UNIX). */ -#define ACE_LACKS_PRI_T 1 - -// Platform has shm_open -#define ACE_HAS_SHM_OPEN - -// Compiler/platform defines the sig_atomic_t typedef -#define ACE_HAS_SIG_ATOMIC_T - -/* Compiler requires extern "C" functions for signals. */ -#define ACE_HAS_SIG_C_FUNC 1 - -// Platform's sigaction() function takes const sigaction* as 2nd parameter. -#define ACE_HAS_SIGACTION_CONSTP2 - -#define ACE_HAS_SSIZE_T - -// Platform supports SVR4 extended signals -#define ACE_HAS_SIGINFO_T - -/* Define to 1 if platform has sigsuspend(). */ -#define ACE_HAS_SIGSUSPEND 1 - -// Platform doesn't detect a signal out of range unless it's way out of range. -#define ACE_HAS_SIGISMEMBER_BUG - -/* Platform provides socklen_t type, such as Linux with glibc2. */ -#define ACE_HAS_SOCKLEN_T 1 - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -#define ACE_HAS_UALARM - -// Platform supports ucontext_t (which is used in the extended signal API). -#define ACE_HAS_UCONTEXT_T - -// Platform/compiler supports void * as second parameter to gettimeofday(). -#define ACE_HAS_VOIDPTR_GETTIMEOFDAY - -/* Platform requires void * for mmap(). */ -#define ACE_HAS_VOIDPTR_MMAP 1 - -/* OS/compiler uses void * arg 4 setsockopt() rather than const char * */ -#define ACE_HAS_VOIDPTR_SOCKOPT 1 - -// Platform supports SVR4 dynamic linking semantics. -// When used, this requires -ldl on the ACE library link line. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Platform supports the getrusage() system call. -#define ACE_HAS_GETRUSAGE - -/* Define to 1 if platform has the declaration of getrusage(). */ -#define ACE_HAS_GETRUSAGE_PROTOTYPE 1 - -// Platform has the sigwait function in a header file -#define ACE_HAS_SIGWAIT -#define ACE_HAS_SIGTIMEDWAIT - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -// accept() is thread-safe -#define ACE_HAS_THREAD_SAFE_ACCEPT - -// Platform lacks a typedef for timespec_t, but has struct timespec -#define ACE_LACKS_TIMESPEC_T - -// dlopen() takes a char* instead of const char* -#define ACE_HAS_CHARPTR_DL - -// lacks setegid and seteuid -#define ACE_LACKS_SETEGID -#define ACE_LACKS_SETEUID - -#define ACE_LACKS_SUSECONDS_T -#define ACE_LACKS_SYS_SYSCTL_H - -#if !(defined(__STDC_EXT__) || defined(_INCLUDE_LONGLONG) || defined(_INCLUDE_STDC__SOURCE_199901)) -# define ACE_LACKS_STRTOLL -# define ACE_LACKS_WCSTOLL -# define ACE_LACKS_STRTOULL -# define ACE_LACKS_WCSTOULL -#endif - -#define ACE_LACKS_ISWASCII - -#define ACE_LACKS_SETENV -#define ACE_LACKS_UNSETENV - -// Shared library name/path components -#if defined (__ia64) -# define ACE_DLL_SUFFIX ACE_TEXT (".so") -#else -# define ACE_DLL_SUFFIX ACE_TEXT (".sl") -#endif /* __ia64 */ -#if defined (__LP64__) -# define ACE_LD_SEARCH_PATH ACE_TEXT ("LD_LIBRARY_PATH") -#else -# define ACE_LD_SEARCH_PATH ACE_TEXT ("SHLIB_PATH") -#endif /* __LP64__ */ - -#if defined (_INCLUDE__STDC_A1_SOURCE) -# define ACE_HAS_3_PARAM_WCSTOK -#endif - -#define ACE_LACKS_STRUCT_LIFNUM - -////////////////////////////////////////////////////////////////////////// -// STREAMS information -// -////////////////////////////////////////////////////////////////////////// - -// Platform supports STREAMS -#define ACE_HAS_STREAMS -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T -// But the putmsg signature doesn't have it as const... -// Well, it really does, but it depends on preprocessor defines. -#define ACE_LACKS_CONST_STRBUF_PTR -/* Platform supports TLI timod STREAMS module */ -#define ACE_HAS_TIMOD_H 1 - -// Platform supports STREAM pipes -// This is possible, but not by default - need to rebuild the kernel to -// get them enabled - see pipe(2) and "STREAMS/UX for the HP 9000" -// #define ACE_HAS_STREAM_PIPES - -///////////////////////////////////////////////////////////////////////// -// TLI/XTI information -// -//////////////////////////////////////////////////////////////////////// - -// Platform supports XTI (includes TLI). -#define ACE_HAS_XTI -// HP-UX 11 conforms to the XPG4 spec, which ACE calls broken for the -// errmsg not being const... -#define ACE_HAS_BROKEN_T_ERROR -// The definitions of TCP_NODELAY and TCP_MAXSEG conflict between -// sys/xti.h and netinet/tcp.h. -#define ACE_HAS_CONFLICTING_XTI_MACROS -/* Platform provides <sys/xti.h> header */ -#define ACE_HAS_SYS_XTI_H 1 - -///////////////////////////////////////////////////////////////////////// -// Threads information. -// -// Use of threads is controlled by the 'threads' argument to make. See -// include/makeinclude/platform_hpux_aCC.GNU for details. If it's not set, -// the default is to enable it, since kernel threads are always available -// on HP-UX 11, as opposed to 10.x where it was optional software. -// -//////////////////////////////////////////////////////////////////////// - -#if defined (ACE_HAS_THREADS) -# if (ACE_HAS_THREADS == 0) -# undef ACE_HAS_THREADS -# endif /* ACE_HAS_THREADS == 0 */ -#else -# define ACE_HAS_THREADS -#endif /* ACE_HAS_THREADS */ - -#if defined (ACE_HAS_THREADS) - -# if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -# endif - -// HP-UX doesn't define _POSIX_THREADS since it doesn't implement all -// features (lacks thread priority inheritance and protection), so -// config-posix.h doesn't get this one... -# define ACE_HAS_PTHREADS -# define ACE_HAS_PTHREADS_UNIX98_EXT -# define ACE_HAS_PTHREAD_CONTINUE -# define ACE_HAS_PTHREAD_RESUME_NP -# define ACE_HAS_PTHREAD_SUSPEND -# define ACE_HAS_RECURSIVE_MUTEXES -# define ACE_HAS_THREAD_SPECIFIC_STORAGE -# define ACE_LACKS_PTHREAD_ATTR_SETSTACK -# define ACE_LACKS_CONDATTR_SETCLOCK -#endif /* ACE_HAS_THREADS */ - -#define ACE_HAS_POSIX_SEM - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// gethostbyaddr does not handle IPv6-mapped-IPv4 addresses -#define ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-hurd.h b/ACE/ace/config-hurd.h index ef78e596b37..95517b69d86 100644 --- a/ACE/ace/config-hurd.h +++ b/ACE/ace/config-hurd.h @@ -59,7 +59,6 @@ #endif /* __GLIBC__ */ #define ACE_HAS_LSEEK64 -//#define ACE_LACKS_LSEEK64_PROTOTYPE #define ACE_HAS_P_READ_WRITE // Use ACE's alternate cuserid() implementation since the use of the diff --git a/ACE/ace/config-icc-common.h b/ACE/ace/config-icc-common.h index ce825d2beed..65a21df7f52 100644 --- a/ACE/ace/config-icc-common.h +++ b/ACE/ace/config-icc-common.h @@ -57,8 +57,6 @@ # define ACE_HAS_INTEL_ASSEMBLY #endif -#define ACE_TEMPLATES_REQUIRE_SOURCE - #if (__INTEL_COMPILER >= 910) # define ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS #endif diff --git a/ACE/ace/config-integritySCA.h b/ACE/ace/config-integritySCA.h index 3628279d01e..92495ed7cd3 100644 --- a/ACE/ace/config-integritySCA.h +++ b/ACE/ace/config-integritySCA.h @@ -24,7 +24,6 @@ #define ACE_LACKS_GETEGID #define ACE_LACKS_GETGID -#define ACE_TEMPLATES_REQUIRE_SOURCE 1 #define TAO_USE_SEQUENCE_TEMPLATES #define _REENTRANT #define ACE_MT_SAFE 1 diff --git a/ACE/ace/config-kfreebsd.h b/ACE/ace/config-kfreebsd.h index bc13d8b428d..db57811bcfe 100644 --- a/ACE/ace/config-kfreebsd.h +++ b/ACE/ace/config-kfreebsd.h @@ -177,8 +177,7 @@ /* Mutexes are inherently recursive (e.g., Win32) */ /* #undef ACE_HAS_RECURSIVE_MUTEXES */ -/* Platform will recurse infinitely on thread exits from TSS cleanup routines - (e.g., AIX) */ +/* Platform will recurse infinitely on thread exits from TSS cleanup routines */ #define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS 1 /* Platform supports reentrant functions (i.e., all the POSIX *_r functions). @@ -360,9 +359,6 @@ /* Compiler complains about use of obsolete "pragma once" */ #define ACE_LACKS_PRAGMA_ONCE 1 -/* Define to 1 if the system lacks the type 'pri_t'. */ -#define ACE_LACKS_PRI_T 1 - /* Define to 1 if platform lacks pthread_thr_sigsetmask(). */ #define ACE_LACKS_PTHREAD_THR_SIGSETMASK 1 diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h index 1d3eba2f27e..1f2234d0b64 100644 --- a/ACE/ace/config-linux-common.h +++ b/ACE/ace/config-linux-common.h @@ -57,8 +57,6 @@ # include "ace/config-icc-common.h" #elif defined (__GNUG__) # include "ace/config-g++-common.h" -#elif defined (__SUNCC_PRO) || defined (__SUNPRO_CC) -# include "ace/config-suncc-common.h" #elif defined (__PGI) // Portable group compiler # define ACE_LACKS_SWAB @@ -71,7 +69,7 @@ * (TAO/orbsvcs/orbsvcs/SSLIOP/params_dup.{h,c}) that may indirectly * include this */ -#else /* ! __GNUG__ && !__DECCXX && !__INTEL_COMPILER && && !__PGI */ +#else /* ! __GNUG__ && !__INTEL_COMPILER && && !__PGI */ # ifdef __cplusplus /* Let it slide for C compilers. */ # error unsupported compiler in ace/config-linux.h # endif /* __cplusplus */ diff --git a/ACE/ace/config-lite.h b/ACE/ace/config-lite.h index 9fcc12c2a6b..87d168f2504 100644 --- a/ACE/ace/config-lite.h +++ b/ACE/ace/config-lite.h @@ -91,57 +91,6 @@ typedef ACE_OS_Thread_Descriptor *(*ACE_THR_DESC_LOG_MSG_HOOK) (); ACE_END_VERSIONED_NAMESPACE_DECL -/** - * @deprecated ACE_DECLARE_STL_REVERSE_ITERATORS is a crutch to be - * used until all C++ compiler supported by ACE support - * the standard reverse_iterator adapters. - * @internal ACE_DECLARE_STL_REVERSE_ITERATORS is not meant for use - * outside of ACE. - */ -// STL reverse_iterator declaration generator -// Make sure you include <iterator> in the file you're using this -// generator, and that the following traits are available: -// -// iterator -// const_iterator -// value_type -// reference -// pointer -// const_reference -// const_pointer -// difference_type -// -// Once all C++ compilers support the standard reverse_iterator -// adapters, we can drop this generator macro or at least drop the -// MSVC++ or Sun Studio preprocessor conditional blocks. -#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x5140 \ - && !defined (_STLPORT_VERSION) - // If we're not using the stlport4 C++ library (which has standard - // iterators), we need to ensure this is included in order to test - // the _RWSTD_NO_CLASS_PARTIAL_SPEC feature test macro below. -# include <Cstd/stdcomp.h> -#endif /* __SUNPRO_CC <= 0x5110 */ -#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x5140 \ - && defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) -# define ACE_DECLARE_STL_REVERSE_ITERATORS \ - typedef std::reverse_iterator<iterator, \ - std::input_iterator_tag, \ - value_type, \ - reference, \ - pointer, \ - difference_type> reverse_iterator; \ - typedef std::reverse_iterator<const_iterator, \ - std::input_iterator_tag, \ - value_type const, \ - const_reference, \ - const_pointer, \ - difference_type> const_reverse_iterator; -#else -# define ACE_DECLARE_STL_REVERSE_ITERATORS \ - typedef std::reverse_iterator<iterator> reverse_iterator; \ - typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -#endif /* _MSC_VER && _WIN64 */ - #include /**/ "ace/post.h" #endif /* ACE_CONFIG_LITE_H */ diff --git a/ACE/ace/config-macosx-jaguar.h b/ACE/ace/config-macosx-jaguar.h index 76a0df0c9dd..fb8dfd775b9 100644 --- a/ACE/ace/config-macosx-jaguar.h +++ b/ACE/ace/config-macosx-jaguar.h @@ -25,8 +25,6 @@ #define ACE_HAS_GPERF #define ACE_HAS_POSIX_SEM -//#define ACE_HAS_SVR4_TLI - #define ACE_LACKS_STROPTS_H #define ACE_LACKS_WCHAR_H diff --git a/ACE/ace/config-macosx-panther.h b/ACE/ace/config-macosx-panther.h index d4ce6f41619..2eb6c3c68fd 100644 --- a/ACE/ace/config-macosx-panther.h +++ b/ACE/ace/config-macosx-panther.h @@ -26,8 +26,6 @@ #define ACE_HAS_GPERF #define ACE_HAS_POSIX_SEM -//#define ACE_HAS_SVR4_TLI - #define ACE_LACKS_STROPTS_H #define ACE_LACKS_WCHAR_H diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index 0ea1e2dc3ad..144e0283d98 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -84,7 +84,7 @@ // Perfect Multicast filtering refers to RFC 3376, where a socket is only // delivered dgrams for groups joined even if it didn't bind the group // address. We turn this option off by default, although most OS's -// except for Windows and Solaris probably lack perfect filtering. +// except for Windows probably lack perfect filtering. // ========================================================================= # if !defined (ACE_LACKS_PERFECT_MULTICAST_FILTERING) @@ -101,14 +101,13 @@ # if !defined (ACE_HAS_PROCESS_SPAWN) # if !defined (ACE_LACKS_FORK) || \ - (defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)) || \ - defined (ACE_WINCE) || defined (ACE_OPENVMS) + (defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)) # define ACE_HAS_PROCESS_SPAWN 1 # endif # endif /* ACE_HAS_PROCESS_SPAWN */ # if !defined (ACE_HAS_DYNAMIC_LINKING) -# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING) || defined (ACE_WIN32) || defined (ACE_VXWORKS) || defined (__hpux) +# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING) || defined (ACE_WIN32) || defined (ACE_VXWORKS) # define ACE_HAS_DYNAMIC_LINKING 1 # endif # endif /* ACE_HAS_DYNAMIC_LINKING */ @@ -234,17 +233,6 @@ # define ACE_sap_any_cast(TYPE) reinterpret_cast<TYPE> (const_cast<ACE_Addr &> (ACE_Addr::sap_any)) -# if !defined (ACE_CAST_CONST) - // Sun CC 4.2, for example, requires const in reinterpret casts of - // data members in const member functions. But, other compilers - // complain about the useless const. This keeps everyone happy. -# if defined (__SUNPRO_CC) -# define ACE_CAST_CONST const -# else /* ! __SUNPRO_CC */ -# define ACE_CAST_CONST -# endif /* ! __SUNPRO_CC */ -# endif /* ! ACE_CAST_CONST */ - // ============================================================================ // Compiler Silencing macros // @@ -255,7 +243,7 @@ #if !defined (ACE_UNUSED_ARG) # if defined (__GNUC__) || defined (__BORLANDC__) # define ACE_UNUSED_ARG(a) (void) (a) -# elif defined (ghs) || defined (__hpux) || defined (__DECCXX) || defined (__rational__) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) +# elif defined (ghs) || defined (__rational__) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) // Some compilers complain about "statement with no effect" with (a). // This eliminates the warnings, and no code is generated for the null // conditional statement. @note that may only be true if -O is enabled, @@ -266,7 +254,7 @@ # endif /* ghs ..... */ #endif /* !ACE_UNUSED_ARG */ -#if defined (_MSC_VER) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || (defined (__HP_aCC) && (__HP_aCC < 39000 || __HP_aCC >= 60500)) || defined (__IAR_SYSTEMS_ICC__) +#if defined (_MSC_VER) || defined (ghs) || defined(__BORLANDC__) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || defined (__IAR_SYSTEMS_ICC__) # define ACE_NOTREACHED(a) #else /* ghs || ..... */ # define ACE_NOTREACHED(a) a diff --git a/ACE/ace/config-mqx.h b/ACE/ace/config-mqx.h index b27de279666..028b9c367af 100644 --- a/ACE/ace/config-mqx.h +++ b/ACE/ace/config-mqx.h @@ -55,7 +55,6 @@ extern "C" { #define ACE_RENAME_EQUIVALENT MQX_Filesystem::inst().rename #define ACE_MQX -#define ACE_TEMPLATES_REQUIRE_SOURCE #define ACE_PAGE_SIZE 4096 #define ACE_SOCKET_LEN uint16_t #define ACE_SOCKOPT_LEN socklen_t diff --git a/ACE/ace/config-netbsd.h b/ACE/ace/config-netbsd.h index 85c0da476d9..5caba73a4a4 100644 --- a/ACE/ace/config-netbsd.h +++ b/ACE/ace/config-netbsd.h @@ -94,7 +94,6 @@ #define ACE_LACKS_MUTEXATTR_PSHARED 1 #define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS 1 #define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#define ACE_LACKS_PRI_T 1 #define ACE_LACKS_PTHREAD_THR_SIGSETMASK 1 #define ACE_LACKS_PTHREAD_YIELD 1 #define ACE_LACKS_RWLOCKATTR_PSHARED 1 diff --git a/ACE/ace/config-openvms.h b/ACE/ace/config-openvms.h deleted file mode 100644 index 5417d250a25..00000000000 --- a/ACE/ace/config-openvms.h +++ /dev/null @@ -1,182 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for OpenVMS 7.3-2 - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H - -#ifdef __cplusplus -#pragma message disable CODCAUUNR -#pragma message disable CODEUNREACHABLE -//#pragma message disable DOLLARID -//#pragma message disable NOSIMPINT -//#pragma message disable NOSTDLONGLONG -#pragma message disable NARROWPTR -//#pragma message disable LONGEXTERN -#pragma message disable UNSCOMZER -#endif - -// Use a signed int to match POSIX -#define __SIGNED_INT_TIME_T - -#define ACE_OPENVMS __VMS_VER - -#define ACE_DLL_SUFFIX ACE_TEXT("") - -#define ACE_HAS_DUMP 1 - -// need this includes to ensure proper sequence of definitions so that -// f.i. HP C/C++ does not '#define ' memcpy, memmove etc. -#include <stdarg.h> -#include <stdio.h> -#include <string.h> -#undef memset -#undef memcpy -#undef memmove - -#if defined(__ia64__) - // on OpenVMS IA64 we need this get the singleton exported since we build - // ACE/TAO with the NOTEMPLATES export option which prohibits exporting - // of any template symbols unless explicitly exported - #define ACE_HAS_CUSTOM_EXPORT_MACROS - #define ACE_Proper_Export_Flag - #define ACE_Proper_Import_Flag - #define ACE_EXPORT_SINGLETON_DECLARATION(T) template class __declspec (dllexport) T - #define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class __declspec (dllexport) SINGLETON_TYPE<CLASS, LOCK>; -#else - #define ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION -#endif - -#define ACE_DEFAULT_BASE_ADDR ((char*)(0x30000000)) - -#define ACE_MAX_UDP_PACKET_SIZE 65535 - -/* missing system headers */ -#define ACE_LACKS_STDINT_H 1 -#define ACE_LACKS_SYS_IPC_H 1 -#define ACE_LACKS_SYS_SEM_H 1 -#define ACE_LACKS_SEMAPHORE_H 1 -#define ACE_LACKS_SYS_SELECT_H 1 -#define ACE_LACKS_TERMIOS_H 1 -#define ACE_LACKS_SYS_SHM_H 1 -#define ACE_LACKS_SYS_MSG_H 1 -#define ACE_LACKS_REGEX_H 1 -#define ACE_LACKS_SEARCH_H 1 -#define ACE_LACKS_SCHED_H 1 -#define ACE_LACKS_SYS_SYSCTL_H 1 -#define ACE_LACKS_SYS_PARAM_H 1 -#define ACE_LACKS_SIGINFO_H 1 -#define ACE_LACKS_UCONTEXT_H 1 - -/* missing rtl functions */ -#define ACE_LACKS_SETPGID 1 -#define ACE_LACKS_SETREUID 1 -#define ACE_LACKS_SETREGID 1 -#define ACE_LACKS_FORK 1 -#define ACE_LACKS_GETPGID 1 -#define ACE_LACKS_SETSID 1 -#define ACE_LACKS_FCNTL 1 -#define ACE_LACKS_SETEGID 1 -#define ACE_LACKS_SETEUID 1 - -#define ACE_LACKS_REALPATH 1 - -#define ACE_LACKS_SYMLINKS 1 - -#define ACE_HAS_P_READ_WRITE -#define ACE_HAS_CHARPTR_DL 1 -#define ACE_HAS_CLOCK_GETTIME 1 -#define ACE_HAS_CLOCK_SETTIME 1 -#define ACE_HAS_VOIDPTR_GETTIMEOFDAY 1 -#define ACE_HAS_DIRENT 1 -#define ACE_HAS_GETPAGESIZE 1 -#define ACE_HAS_MSG -#define ACE_HAS_NONCONST_SELECT_TIMEVAL 1 -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R 1 -#define ACE_HAS_3_PARAM_WCSTOK 1 -#define ACE_HAS_SIGSUSPEND 1 -#define ACE_HAS_SIGWAIT 1 -#define ACE_HAS_SIGTIMEDWAIT 1 - -#define ACE_HAS_SIG_C_FUNC 1 -#define ACE_HAS_SIGISMEMBER_BUG -#define ACE_HAS_STRNLEN 1 -#define ACE_HAS_STREAMS 1 -#define ACE_HAS_UALARM 1 -#define ACE_HAS_VOIDPTR_MMAP 1 -#define ACE_HAS_VOIDPTR_SOCKOPT 1 -#define ACE_LACKS_LSTAT 1 -#define ACE_LACKS_MADVISE 1 -#define ACE_LACKS_MKFIFO 1 -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS 1 -#define ACE_LACKS_READLINK 1 -#define ACE_LACKS_RLIMIT 1 -#define ACE_LACKS_RLIMIT_PROTOTYPE 1 -#define ACE_LACKS_SETSCHED -#define ACE_LACKS_SYSCALL 1 -#define ACE_LACKS_WCSTOULL 1 -#define ACE_LACKS_WCSTOLL - -/* (missing) standard data types */ -#define ACE_LACKS_CONST_TIMESPEC_PTR 1 -#define ACE_LACKS_SUSECONDS_T 1 -#define ACE_HAS_IDTYPE_T 1 -#define ACE_HAS_SIGINFO_T 1 -#define ACE_HAS_XPG4_MULTIBYTE_CHAR 1 -#define ACE_HAS_SIZET_SOCKET_LEN 1 -#define ACE_HAS_SSIZE_T 1 -#define ACE_LACKS_PRI_T 1 -#define ACE_LACKS_SEMBUF_T 1 -#define ACE_LACKS_STRRECVFD 1 -#define ACE_LACKS_T_ERRNO 1 - -/* POSIX threads compatibilities */ -#define ACE_LACKS_RWLOCK_T 1 -#define ACE_LACKS_PTHREAD_KILL 1 -#define ACE_LACKS_THREAD_PROCESS_SCOPING 1 - -#define ACE_HAS_PTHREADS 1 -#define ACE_HAS_PTHREAD_PROCESS_ENUM 1 -#define ACE_LACKS_UNNAMED_SEMAPHORE 1 -#define ACE_MT_SAFE 1 -#define ACE_HAS_THREADS 1 -#define ACE_HAS_THREAD_SPECIFIC_STORAGE 1 -#define ACE_HAS_THR_C_DEST 1 -#define ACE_HAS_THR_C_FUNC 1 -#define ACE_LACKS_PTHREAD_SIGMASK 1 -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK 1 -#define ACE_NEEDS_HUGE_THREAD_STACKSIZE (64U*1024) -#define ACE_HAS_PTHREAD_SETCONCURRENCY 1 -#define ACE_HAS_PTHREAD_GETCONCURRENCY 1 -#define ACE_HAS_PTHREAD_SCHEDPARAM 1 - -/* language/platform conformance */ -#define ACE_TEMPLATES_REQUIRE_SOURCE 1 -#define ACE_HAS_AUTOMATIC_INIT_FINI 1 -#define ACE_LACKS_UNIX_SIGNALS 1 - -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES 1 -#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1 - -#define ACE_HAS_GPERF 1 -#define ACE_HAS_IP_MULTICAST 1 -#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#define ACE_HAS_POSIX_NONBLOCK 1 -#define ACE_HAS_POSIX_TIME 1 -#define ACE_HAS_BROKEN_POSIX_TIME 1 -#define ACE_HAS_SVR4_DYNAMIC_LINKING 1 - -#define ACE_LACKS_NAMED_POSIX_SEM 1 -#define ACE_LACKS_SYSV_SHMEM 1 -#define ACE_LACKS_UNIX_DOMAIN_SOCKETS 1 -#define ACE_LACKS_UNIX_SYSLOG 1 -#define ACE_LACKS_ALPHASORT 1 -#define ACE_LACKS_ISCTYPE -#define ACE_LACKS_ISBLANK - -#define ACE_LACKS_SETENV -#define ACE_LACKS_UNSETENV - -#define ACE_HAS_SOCK_BUF_SIZE_MAX -#define ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE 65535 - -#endif diff --git a/ACE/ace/config-rtems.h b/ACE/ace/config-rtems.h deleted file mode 100644 index e74a3faa463..00000000000 --- a/ACE/ace/config-rtems.h +++ /dev/null @@ -1,155 +0,0 @@ -/* -*- C -*- */ -/* The following configuration file is designed to work for RTEMS - platforms using GNU C. -*/ - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H - -#if ! defined (__ACE_INLINE__) -#define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -// Needed to make some prototypes visible. -// #if ! defined (_GNU_SOURCE) -// #define _GNU_SOURCE -// #endif /* ! _GNU_SOURCE */ - -// First the machine specific part -// There are no known port specific issues with the RTEMS port of ACE. -// XXX Pentium and PowerPC have high res timer support in ACE. - -// Then the compiler specific parts -#if defined (__GNUG__) -# include "ace/config-g++-common.h" -#else /* ! __GNUG__ */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler in ace/config-rtems.h -# endif /* __cplusplus */ -#endif /* ! __GNUG__ */ - -#include "ace/config-posix.h" - -// Completely common part :-) - -#define ACE_HAS_NONSTATIC_OBJECT_MANAGER - -#define ACE_LACKS_ALPHASORT -#define ACE_LACKS_REGEX_H -#define ACE_LACKS_STROPTS_H -#define ACE_LACKS_DLFCN_H -#define ACE_LACKS_SIGINFO_H -#define ACE_LACKS_SYS_IPC_H -#define ACE_LACKS_SYS_SEM_H -#define ACE_LACKS_STRINGS_H -#define ACE_LACKS_SYS_SHM_H -#define ACE_LACKS_SETEGID -#define ACE_LACKS_SETEUID -#define ACE_LACKS_POLL_H -#define ACE_HAS_NONCONST_SELECT_TIMEVAL -#define ACE_LACKS_STRCASECMP -#define ACE_LACKS_MKSTEMP -#define ACE_LACKS_STRDUP -#define ACE_LACKS_STRTOK_R -#define ACE_LACKS_REALPATH -#define ACE_LACKS_TEMPNAM -#define ACE_LACKS_TZSET - -// Temporarily, enabling this results in compile errors with -// rtems 4.6.6. -#define ACE_LACKS_WCHAR_H - -#if !defined (ACE_MT_SAFE) -#define ACE_MT_SAFE 1 -#endif - -#if ACE_MT_SAFE -# define ACE_HAS_THREADS -# define ACE_HAS_PTHREADS -# define ACE_HAS_THREAD_SPECIFIC_STORAGE -# define ACE_HAS_PTHREAD_SCHEDPARAM -# define ACE_LACKS_THREAD_PROCESS_SCOPING -#else -# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -#endif - -#define ACE_HAS_ALT_CUSERID -#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME -#define ACE_HAS_DIRENT -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT -#define ACE_HAS_MSG -#define ACE_HAS_MT_SAFE_MKTIME -#define ACE_HAS_NONCONST_READV -#define ACE_HAS_GETPAGESIZE -#define ACE_HAS_POSIX_SEM -#define ACE_HAS_POSIX_TIME -#define ACE_HAS_REENTRANT_FUNCTIONS -#define ACE_HAS_SIGACTION_CONSTP2 -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_SIGSUSPEND -#define ACE_HAS_SSIZE_T -#define ACE_HAS_VOIDPTR_GETTIMEOFDAY -#define ACE_HAS_SYS_FILIO_H -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY -#define ACE_LACKS_EXEC -#define ACE_LACKS_FILELOCKS -#define ACE_LACKS_FORK -#define ACE_LACKS_GETPGID -#define ACE_LACKS_TIMESPEC_T -#define ACE_LACKS_MADVISE -#define ACE_LACKS_MMAP -#define ACE_LACKS_MPROTECT -#define ACE_LACKS_MSYNC -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK -#define ACE_LACKS_READLINK -#define ACE_LACKS_READV -#define ACE_LACKS_RLIMIT -#define ACE_LACKS_RLIMIT_PROTOTYPE -#define ACE_LACKS_RWLOCK_T -#define ACE_LACKS_SBRK -#define ACE_LACKS_SEMBUF_T -#define ACE_LACKS_SETREUID -#define ACE_LACKS_SETREUID_PROTOTYPE -#define ACE_LACKS_SETREGID -#define ACE_LACKS_SETREGID_PROTOTYPE -#define ACE_LACKS_STRPTIME -#define ACE_LACKS_STRRECVFD -#define ACE_LACKS_SI_ADDR -#define ACE_LACKS_SOCKETPAIR -#define ACE_LACKS_SYS_MSG_H -#define ACE_LACKS_SYSV_SHMEM -#define ACE_LACKS_SYSCALL -#define ACE_LACKS_UCONTEXT_H -#define ACE_HAS_NONCONST_WRITEV -#define ACE_LACKS_WRITEV -#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536 -#define ACE_NEEDS_SCHED_H -#define ACE_HAS_POSIX_NONBLOCK -#define ACE_HAS_TERMIOS - -// rtems 4.7 or higher -#if (__RTEMS_MAJOR__ > 4) || (__RTEMS_MAJOR__ == 4 && __RTEMS_MINOR__ > 6) -# define ACE_HAS_UALARM -#else -# define ACE_HAS_NOTSUP_SC_PAGESIZE -# define ACE_LACKS_SUSECONDS_T -# define ACE_LACKS_INTPTR_T -# undef ACE_HAS_SHM_OPEN -# undef ACE_HAS_AIO_CALLS -#endif - -// __RTEMS_REVISION__ could also be used but this is broken according -// to the rtems people - -#if !defined (_POSIX_REALTIME_SIGNALS) -# define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -#endif - -#if defined (ACE_LACKS_NETWORKING) -# include "ace/config-posix-nonetworking.h" -#endif - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-suncc-common.h b/ACE/ace/config-suncc-common.h index 908aef297c9..75fafb245d4 100644 --- a/ACE/ace/config-suncc-common.h +++ b/ACE/ace/config-suncc-common.h @@ -38,7 +38,5 @@ # define ACE_LACKS_PRAGMA_ONCE #endif /* ! ACE_LACKS_PRAGMA_ONCE */ -#define ACE_TEMPLATES_REQUIRE_SOURCE - #include /**/ "ace/post.h" #endif /* ACE_SUNCC_COMMON_H */ diff --git a/ACE/ace/config-sunos5.10.h b/ACE/ace/config-sunos5.10.h deleted file mode 100644 index 94d87715332..00000000000 --- a/ACE/ace/config-sunos5.10.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.10 -// (Solaris 10) platforms using the SunC++ 5.x (Sun Studio 8-10), or g++ -// compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.9 config, then add any SunOS 5.10 updates below. -#include "ace/config-sunos5.9.h" - -// Solaris 10 can do sem_timedwait() (see ACE_OS::sema_wait). -#define ACE_HAS_POSIX_SEM_TIMEOUT - -#define ACE_HAS_SCANDIR - -// Solaris 10 offers a useable alphasort() unlike previous Solaris versions. -#if defined (ACE_LACKS_ALPHASORT) -# undef ACE_LACKS_ALPHASORT -#endif - -#undef ACE_LACKS_GETADDRINFO -#undef ACE_LACKS_GETNAMEINFO - -// Solaris 10 offers a useable log2() unlike previous Solaris versions. -#if defined (ACE_LACKS_LOG2) -# undef ACE_LACKS_LOG2 -#endif - -// Solaris 10 offers a useable isblank() unlike previous Solaris versions. -#if defined (ACE_LACKS_ISBLANK) -# undef ACE_LACKS_ISBLANK -#endif - -// Solaris 10 delivers pthread_attr_setstack -#if defined (ACE_LACKS_PTHREAD_ATTR_SETSTACK) -# undef ACE_LACKS_PTHREAD_ATTR_SETSTACK -#endif - -// Solaris 10 introduced printf() modifiers for [s]size_t types. -#undef ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII -#define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%zd" -#undef ACE_SIZE_T_FORMAT_SPECIFIER_ASCII -#define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%zu" - -// Solaris 10 offers wcstoll() and wcstoull() -#if defined (ACE_LACKS_WCSTOLL) -# undef ACE_LACKS_WCSTOLL -#endif /* ACE_LACKS_WCSTOLL */ -#if defined (ACE_LACKS_WCSTOULL) -# undef ACE_LACKS_WCSTOULL -#endif /* ACE_LACKS_WCSTOULL */ - -#if defined (ACE_HAS_SCTP) && defined (ACE_HAS_LKSCTP) -# define ACE_HAS_VOID_PTR_SCTP_GETLADDRS -# define ACE_HAS_VOID_PTR_SCTP_GETPADDRS -#endif - -#define ACE_HAS_SOLARIS_ATOMIC_LIB - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.11.h b/ACE/ace/config-sunos5.11.h deleted file mode 100644 index 07f8b679f3b..00000000000 --- a/ACE/ace/config-sunos5.11.h +++ /dev/null @@ -1,13 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.11 -// (Solaris 11) platforms using the SunC++ 5.x (Sun Studio 10-12), or g++ -// compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.10 config, then add any SunOS 5.11 updates below. -#include "ace/config-sunos5.10.h" - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.4-g++.h b/ACE/ace/config-sunos5.4-g++.h deleted file mode 100644 index 74be0d51147..00000000000 --- a/ACE/ace/config-sunos5.4-g++.h +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.4 -// platforms using the GNU g++ compiler. - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#if ! defined (__ACE_INLINE__) -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -#include "ace/config-g++-common.h" - -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform supports pread() and pwrite() -#define ACE_HAS_P_READ_WRITE - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -// Sun has the wrong prototype for sendmsg. -#define ACE_HAS_NONCONST_SENDMSG - -// Platform supports system configuration information. -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -// Platform supports the POSIX regular expression library -#define ACE_HAS_REGEX - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Compiler/platform supports SunOS high resolution timers. -#define ACE_HAS_HI_RES_TIMER - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -// Platform contains <poll.h>. -#define ACE_HAS_POLL - -// Platform supports POSIX timers via timestruc_t. -#define ACE_HAS_POSIX_TIME - -// Platform supports the /proc file system. -#define ACE_HAS_PROC_FS - -// Platform supports the prusage_t struct. -#define ACE_HAS_PRUSAGE_T - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Platform supports SVR4 extended signals. -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_UCONTEXT_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Platform supports STREAMS. -#define ACE_HAS_STREAMS - -// Platform supports STREAM pipes. -#define ACE_HAS_STREAM_PIPES - -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T - -// Compiler/platform supports SVR4 dynamic linking semantics. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Compiler/platform supports SVR4 gettimeofday() prototype. -#define ACE_HAS_SVR4_GETTIMEOFDAY - -// Platform lacks pthread_sigaction -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK - -// Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -#define ACE_HAS_STRSIGNAL - -/* Turn off the following defines if you want to disable threading. */ -// Compile using multi-thread libraries. -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -# if !defined (_REENTRANT) -# define _REENTRANT -# endif /* _REENTRANT */ -#endif /* !ACE_MT_SAFE */ - -// Platform supports Solaris threads. -#define ACE_HAS_STHREADS - -// Platform supports threads. -#define ACE_HAS_THREADS - -// Compiler/platform has thread-specific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -// Platform supports reentrant functions (i.e., all the POSIX *_r functions). -#define ACE_HAS_REENTRANT_FUNCTIONS - -/* end threading defines */ - -#define ACE_HAS_PRIOCNTL -#define ACE_NEEDS_LWP_PRIO_SET - -// Platform supports TLI timod STREAMS module. -#define ACE_HAS_TIMOD_H - -// Platform supports TLI tiuser header. -#define ACE_HAS_TIUSER_H - -// Platform provides TLI function prototypes. -#define ACE_HAS_TLI_PROTOTYPES - -// Platform supports TLI. -#define ACE_HAS_TLI - -// Use the poll() event demultiplexor rather than select(). -//#define ACE_USE_POLL - -// Defines the page size of the system. -#define ACE_PAGE_SIZE 4096 -#define ACE_HAS_IDTYPE_T -#define ACE_HAS_GPERF -#define ACE_HAS_DIRENT - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.4-sunc++-4.x.h b/ACE/ace/config-sunos5.4-sunc++-4.x.h deleted file mode 100644 index 4bcec509c33..00000000000 --- a/ACE/ace/config-sunos5.4-sunc++-4.x.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.4 -// platforms using the SunC++ 4.0.x compiler. - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#if ! defined (__ACE_INLINE__) -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform supports pread() and pwrite() -#define ACE_HAS_P_READ_WRITE - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -// Sun has the wrong prototype for sendmsg. -#define ACE_HAS_NONCONST_SENDMSG - -// Platform supports system configuration information. -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -// Platform supports the POSIX regular expression library. -#define ACE_HAS_REGEX - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Compiler/platform supports SunOS high resolution timers. -#define ACE_HAS_HI_RES_TIMER - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -// Platform contains <poll.h>. -#define ACE_HAS_POLL - -// Platform supports POSIX timers via timestruc_t. -#define ACE_HAS_POSIX_TIME - -// Platform supports the /proc file system. -#define ACE_HAS_PROC_FS - -// Platform supports the prusage_t struct. -#define ACE_HAS_PRUSAGE_T - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Platform supports SVR4 extended signals. -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_UCONTEXT_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Platform supports STREAMS. -#define ACE_HAS_STREAMS - -// Platform supports STREAM pipes. -#define ACE_HAS_STREAM_PIPES - -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T - -// Compiler/platform supports SVR4 dynamic linking semantics. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Compiler/platform supports SVR4 gettimeofday() prototype. -#define ACE_HAS_SVR4_GETTIMEOFDAY - -// Compiler/platform supports SVR4 signal typedef. -#define ACE_HAS_SVR4_SIGNAL_T - -// Platform lacks pthread_sigaction -#define ACE_LACKS_PTHREAD_THR_SIGSETMASK - -// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -#define ACE_HAS_STRSIGNAL - -/* Turn off the following defines if you want to disable threading. */ -// Compile using multi-thread libraries. -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -#endif - -// Platform supports Solaris threads. -#define ACE_HAS_STHREADS - -// Platform supports threads. -#define ACE_HAS_THREADS - -// Compiler/platform has thread-specific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -// Platform supports reentrant functions (i.e., all the POSIX *_r functions). -#define ACE_HAS_REENTRANT_FUNCTIONS - -/* end threading defines */ - -#define ACE_HAS_PRIOCNTL -#define ACE_NEEDS_LWP_PRIO_SET - -// Reactor detects deadlock -// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION - -// Platform supports ACE_TLI timod STREAMS module. -#define ACE_HAS_TIMOD_H - -// Platform supports ACE_TLI tiuser header. -#define ACE_HAS_TIUSER_H - -// Platform provides ACE_TLI function prototypes. -#define ACE_HAS_TLI_PROTOTYPES - -// Platform supports ACE_TLI. -#define ACE_HAS_TLI - -#define ACE_LACKS_LINEBUFFERED_STREAMBUF -#define ACE_LACKS_SIGNED_CHAR - -// Use the poll() event demultiplexor rather than select(). -//#define ACE_USE_POLL - -#define ACE_NEEDS_DEV_IO_CONVERSION - -// Defines the page size of the system. -#define ACE_PAGE_SIZE 4096 -#define ACE_HAS_IDTYPE_T - -#define ACE_HAS_GPERF -#define ACE_HAS_DIRENT - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.5.h b/ACE/ace/config-sunos5.5.h deleted file mode 100644 index 7fc73ca2e75..00000000000 --- a/ACE/ace/config-sunos5.5.h +++ /dev/null @@ -1,336 +0,0 @@ -/* -*- C++ -*- */ -// This configuration file is designed to work for SunOS 5.5 platforms -// using the following compilers: -// * Sun C++ 4.2 and later (including 5.x), patched as noted below -// * g++ -// * Green Hills 1.8.8 and later - -#ifndef ACE_CONFIG_H -#define ACE_CONFIG_H -#include /**/ "ace/pre.h" - -#define ACE_LACKS_STDINT_H - -// alphasort() is present on earlier Solaris versions but is marked as not for -// use on non-BSD systems and not supported for use in applications that use -// system libraries or with multiple threads. So it's mostly useless. -#define ACE_LACKS_ALPHASORT - -// Solaris doesn't support log2() -#define ACE_LACKS_LOG2 - -// SunOS 5.5 does not provide getloadavg() -#define ACE_LACKS_GETLOADAVG - -// Before we do anything, we should include <sys/feature_tests.h> to -// ensure that things are set up properly. -#include <sys/feature_tests.h> - -// Sun has the posix defines so let this file sort out what Sun delivers -#include "ace/config-posix.h" - -// Compiler version-specific settings: -#if defined (__SUNPRO_CC) -# if (__SUNPRO_CC < 0x410) - // The following might not be necessary, but I can't tell: my build - // with Sun C++ 4.0.1 never completes. -# define ACE_NEEDS_DEV_IO_CONVERSION -# elif (__SUNPRO_CC >= 0x420) -# if (__SUNPRO_CC >= 0x500) - // If -compat=4 is turned on, the old 4.2 settings for iostreams are used, - // but the newer, explicit instantiation is used (above) -# if (__SUNPRO_CC_COMPAT >= 5) -# define ACE_HAS_THR_C_DEST -# endif /* __SUNPRO_CC_COMPAT >= 5 */ -# endif /* __SUNPRO_CC >= 0x500 */ -# endif /* __SUNPRO_CC >= 0x420 */ - -# define ACE_CAST_CONST const -# define ACE_HAS_HI_RES_TIMER -# define ACE_HAS_SIG_C_FUNC /* Sun CC 5.0 needs this, 4.2 doesn't mind. */ -# define ACE_HAS_XPG4_MULTIBYTE_CHAR -# define ACE_LACKS_LINEBUFFERED_STREAMBUF -# define ACE_LACKS_SIGNED_CHAR - - /* If you want to disable threading with Sun CC, remove -mt - from your CFLAGS, e.g., using make threads=0. */ - - -// Take advantage of Sun Studio 8 (Sun C++ 5.5) or better symbol -// visibility to generate improved shared library binaries. -# if (__SUNPRO_CC > 0x540) - -# if defined (ACE_HAS_CUSTOM_EXPORT_MACROS) && ACE_HAS_CUSTOM_EXPORT_MACROS == 0 -# undef ACE_HAS_CUSTOM_EXPORT_MACROS -# else -# ifndef ACE_HAS_CUSTOM_EXPORT_MACROS -# define ACE_HAS_CUSTOM_EXPORT_MACROS -# endif /* !ACE_HAS_CUSTOM_EXPORT_MACROS */ -# define ACE_Proper_Export_Flag __symbolic -# define ACE_Proper_Import_Flag __global - -# define ACE_EXPORT_SINGLETON_DECLARATION(T) template class ACE_Proper_Export_Flag T -# define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class ACE_Proper_Export_Flag SINGLETON_TYPE <CLASS, LOCK>; - -// # define ACE_IMPORT_SINGLETON_DECLARATION(T) extern template class T -// # define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) extern template class SINGLETON_TYPE<CLASS, LOCK>; - -# endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */ -# endif /* __SUNPRO_CC > 0x540 (> Sun C++ 5.4) */ - -#elif defined (__GNUG__) -# include "ace/config-g++-common.h" - -# define ACE_HAS_HI_RES_TIMER -# define ACE_HAS_XPG4_MULTIBYTE_CHAR - -# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0 - // ACE_MT_SAFE is #defined below, for all compilers. -# if !defined (_REENTRANT) - /* If you want to disable threading, comment out the following - line. Or, add -DACE_MT_SAFE=0 to your CFLAGS, e.g., using - make threads=0. */ -# define _REENTRANT -# endif /* _REENTRANT */ -# endif /* !ACE_MT_SAFE */ - -#else /* ! __SUNPRO_CC && ! __GNUG__ */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler in ace/config-sunos5.5.h -# endif /* __cplusplus */ -#endif /* ! __SUNPRO_CC && ! __GNUG__ */ - -#if !defined (__ACE_INLINE__) -// @note If you have link problems with undefined inline template -// functions with Sun C++, be sure that the #define of __ACE_INLINE__ -// below is not commented out. -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -// Platform supports the POSIX regular expression library. -// @note Please comment out the ACE_HAS_REGEX #define if you -// have link problems with g++ or egcs on SunOS 5.5. -#define ACE_HAS_REGEX - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// select()'s timeval arg is not declared as const and may be modified -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -// Platform supports pread() and pwrite() -#define ACE_HAS_P_READ_WRITE -#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS -#define ACE_HAS_UALARM -#define ACE_LACKS_UALARM_PROTOTYPE - -// Platform supports System V IPC (most versions of UNIX, but not Win32) -#define ACE_HAS_SYSV_IPC - -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Platform supports system configuration information. -#define ACE_HAS_SYS_SYSTEMINFO_H -#define ACE_HAS_SYSV_SYSINFO - -// Platform supports recvmsg and sendmsg. -#define ACE_HAS_MSG - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Platform supports POSIX O_NONBLOCK semantics. -#define ACE_HAS_POSIX_NONBLOCK - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// This setting was determined by running the autoconf tests. If it doesn't -// work uniformly, will need some tweaking, possibly based on other -// XPG feature-test macros. -#define ACE_HAS_CONST_CHAR_SWAB - -// Compiler/platform supports alloca() -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H - -// Platform contains <poll.h>. -#define ACE_HAS_POLL - -// Platform supports POSIX timers via timestruc_t. -#define ACE_HAS_POSIX_TIME - -// ACE_HAS_CLOCK_GETTIME requires linking with -lposix4. -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME - -// Platform supports the /proc file system. -#define ACE_HAS_PROC_FS - -// Platform supports the prusage_t struct. -#define ACE_HAS_PRUSAGE_T -#define ACE_HAS_GETRUSAGE - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Platform supports SVR4 extended signals. -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_UCONTEXT_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Platform supports STREAMS. -#define ACE_HAS_STREAMS - -// Platform supports STREAM pipes. -#define ACE_HAS_STREAM_PIPES - -// Compiler/platform supports struct strbuf. -#define ACE_HAS_STRBUF_T - -// Compiler/platform supports SVR4 dynamic linking semantics. -#define ACE_HAS_SVR4_DYNAMIC_LINKING - -// Compiler/platform supports SVR4 gettimeofday() prototype. -#define ACE_HAS_SVR4_GETTIMEOFDAY - -// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)... -#define ACE_HAS_SVR4_TLI - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -#define ACE_HAS_STRSIGNAL - -// SunOS 5.5.x does not support mkstemp -#define ACE_LACKS_MKSTEMP -#define ACE_LACKS_SYS_SYSCTL_H - -#if !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)) -# define ACE_HAS_CHARPTR_SHMDT -#endif - -#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE == 1) -#if defined (_REENTRANT) || \ - (defined (_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) || \ - defined (_POSIX_PTHREAD_SEMANTICS) - // Compile using multi-thread libraries. -# define ACE_HAS_THREADS - -# if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -# endif /* ACE_MT_SAFE */ - - // Platform supports POSIX pthreads *and* Solaris threads, by - // default! If you only want to use POSIX pthreads, add - // -D_POSIX_PTHREAD_SEMANTICS to your CFLAGS. Or, #define it right - // here. See the Intro (3) man page for information on - // -D_POSIX_PTHREAD_SEMANTICS. -# if defined (_POSIX_PTHREAD_SEMANTICS) -# define ACE_LACKS_RWLOCK_T -# else -# define ACE_HAS_STHREADS -# endif /* ! _POSIX_PTHREAD_SEMANTICS */ - -# define ACE_HAS_PTHREADS - // . . . but only supports SCHED_OTHER scheduling policy -# define ACE_HAS_ONLY_SCHED_OTHER -# define ACE_HAS_SIGWAIT -# define ACE_HAS_SIGTIMEDWAIT -# define ACE_HAS_SIGSUSPEND -# define ACE_LACKS_PTHREAD_ATTR_SETSTACK - - // Compiler/platform has thread-specific storage -# define ACE_HAS_THREAD_SPECIFIC_STORAGE - - // Platform supports reentrant functions (i.e., all the POSIX *_r functions). -# define ACE_HAS_REENTRANT_FUNCTIONS - -# define ACE_NEEDS_LWP_PRIO_SET -# define ACE_HAS_THR_YIELD -# define ACE_LACKS_PTHREAD_YIELD -#endif /* _REENTRANT || _POSIX_C_SOURCE >= 199506L || \ - _POSIX_PTHREAD_SEMANTICS */ -#endif /* !ACE_MT_SAFE || ACE_MT_SAFE == 1 */ - -#define ACE_HAS_PRIOCNTL - -// Platform supports ACE_TLI timod STREAMS module. -#define ACE_HAS_TIMOD_H - -// Platform supports ACE_TLI tiuser header. -#define ACE_HAS_TIUSER_H - -// Platform provides ACE_TLI function prototypes. -#define ACE_HAS_TLI_PROTOTYPES - -// Platform has broken t_error() prototype. -#define ACE_HAS_BROKEN_T_ERROR - -// Platform supports ACE_TLI. -#define ACE_HAS_TLI - -#define ACE_HAS_GETPAGESIZE 1 - -#define ACE_HAS_IDTYPE_T - -#define ACE_HAS_GPERF -#define ACE_HAS_DIRENT - -#define ACE_LACKS_ISCTYPE -#define ACE_LACKS_ISBLANK - -#if defined (__SUNPRO_CC) -# define ACE_CC_NAME ACE_TEXT ("SunPro C++") -# define ACE_CC_MAJOR_VERSION (__SUNPRO_CC >> 8) -# define ACE_CC_MINOR_VERSION (__SUNPRO_CC & 0x00ff) -# define ACE_CC_BETA_VERSION (0) -#endif /* __SUNPRO_CC */ - -#if defined (i386) && (_FILE_OFFSET_BITS==32) -# define ACE_HAS_X86_STAT_MACROS -#endif /* i386 && _FILE_OFFSET_BITS==32 */ - -#define ACE_MALLOC_ALIGN ((size_t)8) -#define ACE_LACKS_SETREUID_PROTOTYPE -#define ACE_LACKS_SETREGID_PROTOTYPE - -// Solaris does indeed implement the inet_aton() function, but it is -// found in `libresolv.*'. It doesn't seem worth it to link another -// library just for that function. Just use the emulation in ACE that -// has been used for years. -#define ACE_LACKS_INET_ATON - -// Solaris doesn't have wcstoull -#define ACE_LACKS_WCSTOLL -#define ACE_LACKS_WCSTOULL - -#if defined (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64) -#undef ACE_HAS_PROC_FS -#undef ACE_HAS_PRUSAGE_T -#endif /* (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64) */ - -// Sum of the iov_len values can't be larger then SSIZE_MAX -#define ACE_HAS_SOCK_BUF_SIZE_MAX - -#define ACE_LACKS_SETENV -#define ACE_LACKS_UNSETENV - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.6.h b/ACE/ace/config-sunos5.6.h deleted file mode 100644 index 2e2ef3b9d03..00000000000 --- a/ACE/ace/config-sunos5.6.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.6 -// platforms using the SunC++ 4.x or g++ compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.5 config file, then add SunOS 5.6 updates below. - -#include "ace/config-sunos5.5.h" - -#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || \ - defined (__EXTENSIONS__) -// The asctime_r/ctime_r parameters change at POSIX.1c-1995 -# if (defined (_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L) -# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -# endif /* POSIX_C_SOURCE >= 199506L */ -# define ACE_HAS_SIGWAIT -// Hack 'cuz _POSIX_C_SOURCE > 2 and -DEXTENSIONS hides this. -# define ACE_LACKS_MADVISE_PROTOTYPE -#endif /* _POSIX_C_SOURCE > 2 || __EXTENSIONS__ */ - -// Support for the SunC++ 5.2 compiler. -// Do not undefine for compat mode < 5 -#if defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510 -#if defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT >= 5) -#ifdef ACE_LACKS_ACE_IOSTREAM -#undef ACE_LACKS_ACE_IOSTREAM -#endif /* ACE_LACKS_ACE_IOSTREAM */ -#endif /* defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT >= 5) */ - -#ifndef ACE_LACKS_UNBUFFERED_STREAMBUF -#define ACE_LACKS_UNBUFFERED_STREAMBUF 1 -#endif /* ACE_LACKS_UNBUFFERED_STREAMBUF */ -#ifndef ACE_TEMPLATES_REQUIRE_SOURCE -#define ACE_TEMPLATES_REQUIRE_SOURCE 1 -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ -// Forte 7 seems to botch this one... -#ifndef ACE_HAS_THR_C_DEST -#define ACE_HAS_THR_C_DEST 1 -#endif /* ACE_HAS_THR_C_DEST */ -#ifndef ACE_HAS_THR_C_FUNC -#define ACE_HAS_THR_C_FUNC 1 -#endif /* ACE_HAS_THR_C_FUNC */ -#ifndef ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES 1 -#endif /* ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES */ -#ifndef ACE_HAS_SIG_C_FUNC -#define ACE_HAS_SIG_C_FUNC 1 -#endif /* ACE_HAS_SIG_C_FUNC */ -#ifndef ACE_LACKS_IOSTREAM_FX -#define ACE_LACKS_IOSTREAM_FX 1 -#endif /* ACE_LACKS_IOSTREAM_FX */ -#ifndef ACE_LACKS_LINEBUFFERED_STREAMBUF -#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1 -#endif /* ACE_LACKS_LINEBUFFERED_STREAMBUF */ - -#endif /* defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510 */ - -// SunOS 5.6 and above support mkstemp -#undef ACE_LACKS_MKSTEMP - -// SunOS 5.6 has AIO calls. -#if !defined (ACE_HAS_AIO_CALLS) -#define ACE_HAS_AIO_CALLS -#endif /* ACE_HAS_AIO_CALLS */ - -#if !defined (ACE_HAS_POSIX_REALTIME_SIGNALS) -#define ACE_HAS_POSIX_REALTIME_SIGNALS -#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ - -#if !defined (ACE_HAS_POSIX_MESSAGE_PASSING) -#define ACE_HAS_POSIX_MESSAGE_PASSING -#endif /* ACE_HAS_POSIX_MESSAGE_PASSING */ - -#if !defined (ACE_HAS_POSIX_SEM) -#define ACE_HAS_POSIX_SEM -#endif /* ACE_HAS_POSIX_SEM */ - -// Sunos 5.6's aio_* with RT signals is broken. -#if !defined (ACE_POSIX_AIOCB_PROACTOR) -#define ACE_POSIX_AIOCB_PROACTOR -#endif /* ACE_POSIX_AIOCB_PROACTOR */ - -// SunOS 5.6 introduced shm_open, but need to turn on POSIX.1b or higher -// to pick it up. -#if defined (_POSIX_C_SOURCE) && (_POSIX_C_SOURCE > 2) -# define ACE_HAS_SHM_OPEN -#else -# undef ACE_HAS_SHM_OPEN -#endif /* _POSIX_C_SOURCE > 2 */ - -// The struct msghdr is conditional on SunOS 5.6 based on _XPG4_2 -#if defined(_XPG4_2) -# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -#endif /* _XPG4_2 */ - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.7.h b/ACE/ace/config-sunos5.7.h deleted file mode 100644 index d21859e5d19..00000000000 --- a/ACE/ace/config-sunos5.7.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.7 -// (Solaris 7) platforms using the SunC++ 4.x, 5.x, or g++ compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.6 config file, then add SunOS 5.7 updates below. - -#include "ace/config-sunos5.6.h" - -// This may be true for earlier Solaris versions, but I can only verify -// it for Solaris 7 and later. -#define ACE_HAS_VFWPRINTF -#if defined (ACE_HAS_SHM_OPEN) -# define ACE_SHM_OPEN_REQUIRES_ONE_SLASH -#endif - -// Sun began distributing <sys/loadavg.h> with SunOS 5.7 -#define ACE_HAS_SYS_LOADAVG_H - -// SunOS 5.7 has getloadavg() -#undef ACE_LACKS_GETLOADAVG - -#if defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) - // Wide character methods are in std:: when using SunCC 5.3 -# define ACE_WCHAR_IN_STD_NAMESPACE -#endif - -// SunOS 5.7 supports SCHED_FIFO and SCHED_RR, as well as SCHED_OTHER. -#undef ACE_HAS_ONLY_SCHED_OTHER - -// SunOS 5.7 gets this right . . . -#undef ACE_HAS_BROKEN_T_ERROR - -// And doesn't need to set LWP priorities, as shown by -// performance-tests/Misc/preempt. -#undef ACE_NEEDS_LWP_PRIO_SET - -// SunOS 5.7 can support Real-Time Signals and POSIX4 AIO operations -// are supported. - -#if !defined (ACE_HAS_AIO_CALLS) -#define ACE_HAS_AIO_CALLS -#endif /* !ACE_HAS_AIO_CALLS */ - -// SunOS 5.7 has socklen_t -#define ACE_HAS_SOCKLEN_T - -#if defined (__sparcv9) -#if !defined (_LP64) -# define _LP64 -#endif /* _LP64 */ -#define ACE_SIZEOF_LONG 8 /* Needed to circumvent compiler bug #4294969 */ -#endif /* __sparcv9 */ - -#if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) /* XPG4 or XPG4v2 */ -// 2 parameter wcstok() -#else /* XPG4 or XPG4v2 */ -# define ACE_HAS_3_PARAM_WCSTOK -#endif - -// Solaris 7 started to support /dev/poll -#define ACE_HAS_DEV_POLL - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.8.h b/ACE/ace/config-sunos5.8.h deleted file mode 100644 index b78ee27a187..00000000000 --- a/ACE/ace/config-sunos5.8.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.8 -// (Solaris 8) platforms using the SunC++ 4.x, 5.x, 6.x, or g++ compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.7 config, then add any SunOS 5.8 updates below. -#include "ace/config-sunos5.7.h" - -#undef ACE_WCHAR_IN_STD_NAMESPACE - -// This may be true for versions prior to Solaris 8 as well, but I don't -// have any to try it on. -#if !defined (ACE_HAS_TIMEZONE) -# define ACE_HAS_TIMEZONE -#endif - -// The range of thread priorities for 5.8 differs from 5.7 in the -// minimum priority for the SCHED_OTHER policy (i.e., -// ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) -20 - -# if defined (_POSIX_PTHREAD_SEMANTICS) -# ifdef ACE_LACKS_RWLOCK_T -# undef ACE_LACKS_RWLOCK_T -# endif /* ACE_LACKS_RWLOCK_T */ -# endif /* _POSIX_PTHREAD_SEMANTICS */ - -// This is no longer the case for Sun 5.9 onwards -# undef ACE_HAS_X86_STAT_MACROS - -// gethostbyaddr does not handle IPv6-mapped-IPv4 addresses -#define ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-sunos5.9.h b/ACE/ace/config-sunos5.9.h deleted file mode 100644 index 53cb350fbd4..00000000000 --- a/ACE/ace/config-sunos5.9.h +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- C++ -*- */ -// The following configuration file is designed to work for SunOS 5.9 -// (Solaris 9) platforms using the SunC++ 5.x (Forte 6 and 7), or g++ -// compilers. - -#ifndef ACE_CONFIG_H - -// ACE_CONFIG_H is defined by one of the following #included headers. - -// #include the SunOS 5.8 config, then add any SunOS 5.9 updates below. -#include "ace/config-sunos5.8.h" - -#define ACE_HAS_SENDFILE 1 -#define ACE_LACKS_GETADDRINFO -#define ACE_LACKS_GETNAMEINFO -#define ACE_LACKS_THR_CONCURRENCY_FUNCS - -#endif /* ACE_CONFIG_H */ diff --git a/ACE/ace/config-vxworks6.4.h b/ACE/ace/config-vxworks6.4.h index 430923a9c7e..91983c3f2d6 100644 --- a/ACE/ace/config-vxworks6.4.h +++ b/ACE/ace/config-vxworks6.4.h @@ -42,9 +42,6 @@ # define _C99 # endif # endif - -#elif defined (__DCC__) -# define ACE_TEMPLATES_REQUIRE_SOURCE #else /* ! __GNUG__ && !__DCC__ */ # ifdef __cplusplus /* Let it slide for C compilers. */ # error unsupported compiler on VxWorks diff --git a/ACE/ace/config-win32-borland.h b/ACE/ace/config-win32-borland.h index 096feb0eb43..1ffc9968e98 100644 --- a/ACE/ace/config-win32-borland.h +++ b/ACE/ace/config-win32-borland.h @@ -114,7 +114,6 @@ #define ACE_HAS_USER_MODE_MASKS 1 #define ACE_LACKS_ACE_IOSTREAM 1 #define ACE_LACKS_LINEBUFFERED_STREAMBUF 1 -#define ACE_TEMPLATES_REQUIRE_SOURCE 1 #if defined (ACE_HAS_BCC32) # define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%Lu" # define ACE_INT64_FORMAT_SPECIFIER_ASCII "%Ld" diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h index a22eb51989a..f22fbb0f063 100644 --- a/ACE/ace/config-win32-common.h +++ b/ACE/ace/config-win32-common.h @@ -8,13 +8,6 @@ #error Use config-win32.h in config.h instead of this header #endif /* ACE_CONFIG_WIN32_H */ -// Windows Mobile (CE) stuff is primarily further restrictions to what's -// in the rest of this file. Also, it defined ACE_HAS_WINCE, which is used -// in this file. -#if defined (_WIN32_WCE) -# include "ace/config-WinCE.h" -#endif /* _WIN32_WCE */ - #if defined(__MINGW32__) // When using the --std=c++0x option with MinGW the compiler omits defining // the following required macros (at least with the GCC 4.6.2 version) @@ -31,7 +24,7 @@ #endif // Complain if WIN32 is not already defined. -#if !defined (WIN32) && !defined (ACE_HAS_WINCE) +#if !defined (WIN32) # error Please define WIN32 in your project settings. #endif @@ -106,8 +99,6 @@ # define ACE_MT_SAFE 1 #endif -// On winCE these classes do not exist. If they are -// introduced in the future, no changes need to be made #if defined (ABOVE_NORMAL_PRIORITY_CLASS) && \ defined (BELOW_NORMAL_PRIORITY_CLASS) && \ defined (HIGH_PRIORITY_CLASS) && \ @@ -210,18 +201,14 @@ # define ACE_IOV_MAX 64 #endif /* ACE_IOV_MAX */ -#if !defined (ACE_HAS_WINCE) // Platform supports pread() and pwrite() -# define ACE_HAS_WTOF -#endif /* ! ACE_HAS_WINCE */ +#define ACE_HAS_WTOF #define ACE_HAS_P_READ_WRITE -#if !defined (ACE_HAS_WINCE) -# define ACE_HAS_DIRECT_H -# define ACE_HAS_PROCESS_H -# define ACE_HAS_IO_H -#endif /* ! ACE_HAS_WINCE */ +#define ACE_HAS_DIRECT_H +#define ACE_HAS_PROCESS_H +#define ACE_HAS_IO_H #define ACE_DEFAULT_THREAD_PRIORITY 0 @@ -417,8 +404,6 @@ # include /**/ <afxwin.h> /* He is doing MFC */ // Windows.h will be included via afxwin.h->afx.h->afx_ver_.h->afxv_w32.h // #define _INC_WINDOWS // Prevent winsock.h from including windows.h -#elif defined (ACE_HAS_WINCE) -# include /**/ <windows.h> #endif #if !defined (_INC_WINDOWS) /* Already include windows.h ? */ @@ -448,68 +433,22 @@ # if !defined (_WINSOCK2API_) // will also include windows.h, if not present # include /**/ <winsock2.h> -// WinCE 4 doesn't define the Exxx values without the WSA prefix, so do that -// here. This is all lifted from the #if 0'd out part of winsock2.h. -# if defined (_WIN32_WCE) && (_WIN32_WCE < 0x600) -# define EWOULDBLOCK WSAEWOULDBLOCK -# define EINPROGRESS WSAEINPROGRESS -# define EALREADY WSAEALREADY -# define ENOTSOCK WSAENOTSOCK -# define EDESTADDRREQ WSAEDESTADDRREQ -# define EMSGSIZE WSAEMSGSIZE -# define EPROTOTYPE WSAEPROTOTYPE -# define ENOPROTOOPT WSAENOPROTOOPT -# define EPROTONOSUPPORT WSAEPROTONOSUPPORT -# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -# define EOPNOTSUPP WSAEOPNOTSUPP -# define EPFNOSUPPORT WSAEPFNOSUPPORT -# define EAFNOSUPPORT WSAEAFNOSUPPORT -# define EADDRINUSE WSAEADDRINUSE -# define EADDRNOTAVAIL WSAEADDRNOTAVAIL -# define ENETDOWN WSAENETDOWN -# define ENETUNREACH WSAENETUNREACH -# define ENETRESET WSAENETRESET -# define ECONNABORTED WSAECONNABORTED -# define ECONNRESET WSAECONNRESET -# define ENOBUFS WSAENOBUFS -# define EISCONN WSAEISCONN -# define ENOTCONN WSAENOTCONN -# define ESHUTDOWN WSAESHUTDOWN -# define ETOOMANYREFS WSAETOOMANYREFS -# define ETIMEDOUT WSAETIMEDOUT -# define ECONNREFUSED WSAECONNREFUSED -# define ELOOP WSAELOOP -# define ENAMETOOLONG WSAENAMETOOLONG -# define EHOSTDOWN WSAEHOSTDOWN -# define EHOSTUNREACH WSAEHOSTUNREACH -# define ENOTEMPTY WSAENOTEMPTY -# define EPROCLIM WSAEPROCLIM -# define EUSERS WSAEUSERS -# define EDQUOT WSAEDQUOT -# define ESTALE WSAESTALE -# define EREMOTE WSAEREMOTE -# endif /* (_WIN32_WCE) && (_WIN32_WCE < 0x600) */ # endif /* _WINSOCK2API */ # if defined (ACE_HAS_FORE_ATM_WS2) # include /**/ <ws2atm.h> # endif /*ACE_HAS_FORE_ATM_WS2 */ -// CE doesn't have Microsoft Winsock 2 extensions -# if !defined _MSWSOCK_ && !defined (ACE_HAS_WINCE) +# if !defined _MSWSOCK_ # include /**/ <mswsock.h> # endif /* _MSWSOCK_ */ # if defined (_MSC_VER) -# if defined (ACE_HAS_WINCE) -# pragma comment(lib, "ws2.lib") -# else -# pragma comment(lib, "ws2_32.lib") -# pragma comment(lib, "mswsock.lib") -# if defined (ACE_HAS_IPV6) -# pragma comment(lib, "iphlpapi.lib") -# endif -# endif /* ACE_HAS_WINCE */ +# pragma comment(lib, "ws2_32.lib") +# pragma comment(lib, "mswsock.lib") +# if defined (ACE_HAS_IPV6) +# pragma comment(lib, "iphlpapi.lib") +# endif # endif /* _MSC_VER */ # define ACE_WSOCK_VERSION 2, 0 @@ -521,7 +460,7 @@ // PharLap ETS has its own winsock lib, so don't grab the one // supplied with the OS. -# if defined (_MSC_VER) && !defined (_WIN32_WCE) && !defined (ACE_HAS_PHARLAP) +# if defined (_MSC_VER) && !defined (ACE_HAS_PHARLAP) # pragma comment(lib, "wsock32.lib") # endif /* _MSC_VER */ @@ -549,11 +488,9 @@ # define ACE_HAS_IP_MULTICAST #endif /* ACE_HAS_WINSOCK2 */ -#if !defined (ACE_HAS_WINCE) -# define ACE_HAS_INTERLOCKED_EXCHANGEADD -#endif +#define ACE_HAS_INTERLOCKED_EXCHANGEADD -#if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) +#if !defined (ACE_HAS_PHARLAP) # if _WIN32_WINNT >= 0x400 # define ACE_HAS_SIGNAL_OBJECT_AND_WAIT @@ -563,7 +500,7 @@ # define ACE_HAS_CANCEL_IO # define ACE_HAS_WIN32_OVERLAPPED_IO # define ACE_HAS_WIN32_NAMED_PIPES -#endif /* !defined (ACE_HAS_WINCE) && !ACE_HAS_PHARLAP */ +#endif /* !ACE_HAS_PHARLAP */ #if !defined (ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION) # define ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION EXCEPTION_CONTINUE_SEARCH @@ -596,9 +533,6 @@ #define ACE_HAS_NONCONST_SWAB #define ACE_HAS_INT_SWAB -// gethostbyaddr does not handle IPv6-mapped-IPv4 addresses -#define ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED - #if defined (ACE_WIN64) // Data must be aligned on 8-byte boundaries, at a minimum. # define ACE_MALLOC_ALIGN 8 @@ -610,23 +544,17 @@ # define ACE_DISABLES_THREAD_LIBRARY_CALLS 0 #endif /* ACE_DISABLES_THREAD_LIBRARY_CALLS */ -#if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) +#if !defined (ACE_HAS_PHARLAP) # define ACE_HAS_LOG_MSG_NT_EVENT_LOG -#endif /* !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */ +#endif /* !ACE_HAS_PHARLAP */ -#if !defined (ACE_HAS_WINCE) -# define ACE_HAS_LLSEEK -#endif /* !ACE_HAS_WINCE */ +#define ACE_HAS_LLSEEK // Needed for obtaining the MAC address -// I dont believe this will work under CE, notice the -// check for ACE_HAS_WINCE. -# if !defined (ACE_HAS_WINCE) -# include <nb30.h> -# if defined (_MSC_VER) -# pragma comment(lib, "netapi32.lib") // needed for obtaing MACaddress -# endif -# endif /* !ACE_HAS_WINCE */ +#include <nb30.h> +#if defined (_MSC_VER) +# pragma comment(lib, "netapi32.lib") // needed for obtaing MACaddress +#endif #if !defined (WINVER) # define WINVER 0x0400 // pretend it's at least WinNT 4.0 diff --git a/ACE/ace/config-win32-msvc-14.h b/ACE/ace/config-win32-msvc-14.h index 866c45f6dd2..18fea9a9a5e 100644 --- a/ACE/ace/config-win32-msvc-14.h +++ b/ACE/ace/config-win32-msvc-14.h @@ -37,33 +37,19 @@ #define ACE_STRCASECMP_EQUIVALENT ::_stricmp #define ACE_STRNCASECMP_EQUIVALENT ::_strnicmp #define ACE_WCSDUP_EQUIVALENT ::_wcsdup -#if defined (ACE_HAS_WINCE) -# define ACE_FILENO_EQUIVALENT ::_fileno -#else -# define ACE_FILENO_EQUIVALENT(X) (_get_osfhandle (::_fileno (X))) -#endif +#define ACE_FILENO_EQUIVALENT(X) (_get_osfhandle (::_fileno (X))) -// Windows Mobile 6 doesn't do sig_atomic_t, but maybe future versions will. -# if !defined (_WIN32_WCE) || (_WIN32_WCE > 0x601) -# define ACE_HAS_SIG_ATOMIC_T -# endif /* !Win CE 6.0 or less */ +#define ACE_HAS_SIG_ATOMIC_T #define ACE_LACKS_STRPTIME -// Evaluate this with a WinCE build; maybe things have improved since VC8. -//#if !defined (ACE_HAS_WINCE) -# define ACE_HAS_INTRIN_H -# define ACE_HAS_INTRINSIC_INTERLOCKED -//#endif +#define ACE_HAS_INTRIN_H +#define ACE_HAS_INTRINSIC_INTERLOCKED -#if !defined (_WIN32_WCE) || (_WIN32_WCE >= 0x501) -# define ACE_HAS_INTRINSIC_BYTESWAP -#endif +#define ACE_HAS_INTRINSIC_BYTESWAP #define ACE_LACKS_STRRECVFD -#define ACE_TEMPLATES_REQUIRE_SOURCE - // Platform provides ACE_TLI function prototypes. // For Win32, this is not really true, but saves a lot of hassle! #define ACE_HAS_TLI_PROTOTYPES @@ -85,17 +71,10 @@ // 'class1' : inherits 'class2::member' via dominance #pragma warning(disable:4250) -// CE (at least thru Windows Mobile 5) doesn't have the new, secure CRT. -#if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_TR24731_2005_CRT) +#if !defined (ACE_HAS_TR24731_2005_CRT) # define ACE_HAS_TR24731_2005_CRT #endif -// On CE w/o MFC config-WinCE.h needs to declare a placement new. This -// triggers a warning that there's no placement delete, which can be ignored. -#if defined (ACE_HAS_WINCE) && !defined (ACE_HAS_MFC) -# pragma warning(disable:4291) -#endif - // A template can not be exported. Only an instantiation may be exported. #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT diff --git a/ACE/ace/config-win32-msvc.h b/ACE/ace/config-win32-msvc.h index c1cdeb85277..1e1b063d420 100644 --- a/ACE/ace/config-win32-msvc.h +++ b/ACE/ace/config-win32-msvc.h @@ -30,12 +30,7 @@ #define ACE_LACKS_NATIVE_WCHAR_T #endif -// Win Mobile still does thread exits differently than PC Windows. -#if defined (_WIN32_WCE) -# define ACE_ENDTHREADEX(STATUS) ExitThread ((DWORD) STATUS) -#else # define ACE_ENDTHREADEX(STATUS) ::_endthreadex ((DWORD) STATUS) -#endif /* _WIN32_WCE */ //FUZZ: disable check_for_msc_ver #if (_MSC_VER >= 1930) @@ -54,13 +49,13 @@ #if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0) // must have _MT defined to include multithreading // features from win32 headers -# if !defined(_MT) && !defined (ACE_HAS_WINCE) +# if !defined(_MT) // *** DO NOT *** defeat this error message by defining _MT yourself. // On MSVC, this is changed by selecting the Multithreaded // DLL or Debug Multithreaded DLL in the Project Settings // under C++ Code Generation. # error You must link against multi-threaded libraries when using ACE (check your project settings) -# endif /* !_MT && !ACE_HAS_WINCE */ +# endif /* !_MT */ #endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */ #include <malloc.h> diff --git a/ACE/ace/os_include/net/os_if.h b/ACE/ace/os_include/net/os_if.h index be467aa2b24..eeb640e76e8 100644 --- a/ACE/ace/os_include/net/os_if.h +++ b/ACE/ace/os_include/net/os_if.h @@ -30,12 +30,6 @@ # if defined (ACE_HAS_NET_IF_DL_H) # include /**/ <net/if_dl.h> # endif /* ACE_HAS_NET_IF_DL_H */ -# if defined (HPUX) && defined (IOR) - /* HP-UX 11.11 defines IOR in /usr/include/pa/inline.h - and we don't want that definition. See IOP_IORC.h. - Thanks to Torsten Kopper <tkue_0931@fastmail.fm> for this patch.*/ -# undef IOR -# endif /* HPUX && IOR */ #endif /* !ACE_LACKS_NET_IF_H */ #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) diff --git a/ACE/ace/os_include/os_dlfcn.h b/ACE/ace/os_include/os_dlfcn.h index d13d5ca5ce7..76b75cc082d 100644 --- a/ACE/ace/os_include/os_dlfcn.h +++ b/ACE/ace/os_include/os_dlfcn.h @@ -26,10 +26,6 @@ # include /**/ <dlfcn.h> #endif /* !ACE_LACKS_DLFCN_H */ -#if defined (__hpux) -# include /**/ <dl.h> -#endif /* __hpux */ - #if defined (ACE_VXWORKS) && !defined (__RTP__) # include /**/ <loadLib.h> /* for module load */ # include /**/ <unldLib.h> /* for module unload */ @@ -66,15 +62,7 @@ extern "C" # if !defined (ACE_DEFAULT_SHLIB_MODE) # define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GLOBAL # endif -#elif defined (__hpux) - typedef shl_t ACE_SHLIB_HANDLE; -# if !defined (ACE_SHLIB_INVALID_HANDLE) -# define ACE_SHLIB_INVALID_HANDLE 0 -# endif /* ACE_SHLIB_INVALID_HANDLE */ -# if !defined (ACE_DEFAULT_SHLIB_MODE) -# define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED | DYNAMIC_PATH -# endif /* ACE_DEFAULT_SHLIB_MODE */ -#else /* !ACE_WIN32 && !ACE_HAS_SVR4_DYNAMIC_LINKING && !__hpux */ +#else /* !ACE_WIN32 && !ACE_HAS_SVR4_DYNAMIC_LINKING */ typedef void *ACE_SHLIB_HANDLE; # if !defined (ACE_SHLIB_INVALID_HANDLE) # define ACE_SHLIB_INVALID_HANDLE 0 diff --git a/ACE/ace/os_include/os_errno.h b/ACE/ace/os_include/os_errno.h index d132d73882c..dac78b9bf8f 100644 --- a/ACE/ace/os_include/os_errno.h +++ b/ACE/ace/os_include/os_errno.h @@ -22,9 +22,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if !defined (ACE_LACKS_ERRNO_H) -# include /**/ <errno.h> -#endif /* !ACE_LACKS_ERRNO_H */ +#include /**/ <errno.h> #if defined (ACE_VXWORKS) // Needed for VxWorks to pickup errnoSet() @@ -285,7 +283,7 @@ extern "C" void herror (const char *str); #endif /* ACE_HAS_H_ERRNO */ -#if defined (ACE_LACKS_ERRNO_H) || defined (ACE_DEFINE_MISSING_ERRNOS) +#if defined (ACE_DEFINE_MISSING_ERRNOS) # if !defined (EPERM) # define EPERM 1 # endif /* EPERM */ diff --git a/ACE/ace/os_include/os_kstat.h b/ACE/ace/os_include/os_kstat.h deleted file mode 100644 index 957b608bd88..00000000000 --- a/ACE/ace/os_include/os_kstat.h +++ /dev/null @@ -1,31 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file os_kstat.h - * - * @author Johnny Willemsen <jwillemsen@remedy.nl> - */ -//============================================================================= - -#ifndef ACE_OS_INCLUDE_OS_KSTAT_H -#define ACE_OS_INCLUDE_OS_KSTAT_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_KSTAT) -# define ACE_HAS_KSTAT_H -#endif /* ACE_HAS_KSTAT */ - -#if defined (ACE_HAS_KSTAT_H) -# include <kstat.h> -#endif /* ACE_HAS_KSTAT_H */ - -#include /**/ "ace/post.h" -#endif /* ACE_OS_INCLUDE_OS_KSTAT_H */ diff --git a/ACE/ace/os_include/os_pthread.h b/ACE/ace/os_include/os_pthread.h index 50c483ba9d7..a789d117314 100644 --- a/ACE/ace/os_include/os_pthread.h +++ b/ACE/ace/os_include/os_pthread.h @@ -22,22 +22,9 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_HAS_PRIOCNTL) - // Need to #include thread.h before #defining THR_BOUND, etc., - // when building without threads on SunOS 5.x. -# if defined (sun) -# include /**/ <thread.h> -# endif /* sun */ - - // Need to #include these before #defining USYNC_PROCESS on SunOS 5.x. -# include /**/ <sys/rtpriocntl.h> -# include /**/ <sys/tspriocntl.h> -#endif /* ACE_HAS_PRIOCNTL */ - #include "ace/os_include/sys/os_types.h" #include "ace/os_include/os_stdint.h" -// This needs to go here *first* to avoid problems with AIX. # if defined (ACE_HAS_PTHREADS) # define ACE_DONT_INCLUDE_ACE_SIGNAL_H # include "ace/os_include/os_signal.h" @@ -70,17 +57,7 @@ # if defined (_POSIX_PRIORITY_SCHEDULING) # define ACE_PROC_PRI_FIFO_MIN (sched_get_priority_min(SCHED_FIFO)) # define ACE_PROC_PRI_RR_MIN (sched_get_priority_min(SCHED_RR)) -# if defined (HPUX) - // HP-UX's other is the SCHED_HPUX class, which uses historical - // values that have reverse semantics from POSIX (low value is - // more important priority). To use these in pthreads calls, - // the values need to be converted. The other scheduling classes - // don't need this special treatment. -# define ACE_PROC_PRI_OTHER_MIN \ - (sched_get_priority_min(SCHED_OTHER)) -# else -# define ACE_PROC_PRI_OTHER_MIN (sched_get_priority_min(SCHED_OTHER)) -# endif /* HPUX */ +# define ACE_PROC_PRI_OTHER_MIN (sched_get_priority_min(SCHED_OTHER)) # else /* UNICOS is missing a sched_get_priority_min() implementation */ # define ACE_PROC_PRI_FIFO_MIN 0 # define ACE_PROC_PRI_RR_MIN 0 @@ -90,12 +67,7 @@ # if defined (_POSIX_PRIORITY_SCHEDULING) # define ACE_PROC_PRI_FIFO_MAX (sched_get_priority_max(SCHED_FIFO)) # define ACE_PROC_PRI_RR_MAX (sched_get_priority_max(SCHED_RR)) -# if defined (HPUX) -# define ACE_PROC_PRI_OTHER_MAX \ - (sched_get_priority_max(SCHED_OTHER)) -# else -# define ACE_PROC_PRI_OTHER_MAX (sched_get_priority_max(SCHED_OTHER)) -# endif /* HPUX */ +# define ACE_PROC_PRI_OTHER_MAX (sched_get_priority_max(SCHED_OTHER)) # else # define ACE_PROC_PRI_FIFO_MAX 59 # define ACE_PROC_PRI_RR_MAX 59 @@ -132,49 +104,6 @@ # if !defined (ACE_THR_PRI_OTHER_MAX) # define ACE_THR_PRI_OTHER_MAX (long) PRI_OTHER_MAX # endif /* !ACE_THR_PRI_OTHER_MAX */ -# elif defined (AIX) - // AIX's priority range is 1 (low) to 127 (high). There aren't - // any preprocessor macros I can find. PRIORITY_MIN is for - // process priorities, as far as I can see, and does not apply - // to thread priority. The 1 to 127 range is from the - // pthread_attr_setschedparam man page (Steve Huston, 18-May-2001). -# if !defined (ACE_THR_PRI_FIFO_MIN) -# define ACE_THR_PRI_FIFO_MIN (long) 1 -# endif /* !ACE_THR_PRI_FIFO_MIN */ -# if !defined (ACE_THR_PRI_FIFO_MAX) -# define ACE_THR_PRI_FIFO_MAX (long) 127 -# endif /* !ACE_THR_PRI_FIFO_MAX */ -# if !defined (ACE_THR_PRI_RR_MIN) -# define ACE_THR_PRI_RR_MIN (long) 1 -# endif /* !ACE_THR_PRI_RR_MIN */ -# if !defined (ACE_THR_PRI_RR_MAX) -# define ACE_THR_PRI_RR_MAX (long) 127 -# endif /* !ACE_THR_PRI_RR_MAX */ -# if !defined (ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) 1 -# endif /* !ACE_THR_PRI_OTHER_MIN */ -# if !defined (ACE_THR_PRI_OTHER_MAX) -# define ACE_THR_PRI_OTHER_MAX (long) 127 -# endif /* !ACE_THR_PRI_OTHER_MAX */ -# elif defined (sun) -# if !defined (ACE_THR_PRI_FIFO_MIN) -# define ACE_THR_PRI_FIFO_MIN (long) 0 -# endif /* !ACE_THR_PRI_FIFO_MIN */ -# if !defined (ACE_THR_PRI_FIFO_MAX) -# define ACE_THR_PRI_FIFO_MAX (long) 59 -# endif /* !ACE_THR_PRI_FIFO_MAX */ -# if !defined (ACE_THR_PRI_RR_MIN) -# define ACE_THR_PRI_RR_MIN (long) 0 -# endif /* !ACE_THR_PRI_RR_MIN */ -# if !defined (ACE_THR_PRI_RR_MAX) -# define ACE_THR_PRI_RR_MAX (long) 59 -# endif /* !ACE_THR_PRI_RR_MAX */ -# if !defined (ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) 0 -# endif /* !ACE_THR_PRI_OTHER_MIN */ -# if !defined (ACE_THR_PRI_OTHER_MAX) -# define ACE_THR_PRI_OTHER_MAX (long) 127 -# endif /* !ACE_THR_PRI_OTHER_MAX */ # else # if !defined (ACE_THR_PRI_FIFO_MIN) # define ACE_THR_PRI_FIFO_MIN (long) ACE_PROC_PRI_FIFO_MIN @@ -258,14 +187,12 @@ # endif /* PTHREAD_MUTEXTYPE_FAST */ # endif /* PTHREAD_PROCESS_SHARED */ -# if !defined (ACE_HAS_STHREADS) -# if !defined (USYNC_THREAD) -# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE -# endif /* ! USYNC_THREAD */ -# if !defined (USYNC_PROCESS) -# define USYNC_PROCESS PTHREAD_PROCESS_SHARED -# endif /* ! USYNC_PROCESS */ -# endif /* ACE_HAS_STHREADS */ +# if !defined (USYNC_THREAD) +# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE +# endif /* ! USYNC_THREAD */ +# if !defined (USYNC_PROCESS) +# define USYNC_PROCESS PTHREAD_PROCESS_SHARED +# endif /* ! USYNC_PROCESS */ /* MM-Graz: prevent warnings */ # undef THR_BOUND @@ -292,7 +219,7 @@ # define THR_EXPLICIT_SCHED 0x00800000 # define THR_SCHED_IO 0x01000000 -# if !defined (ACE_HAS_STHREADS) && !defined (ACE_MQX) +# if !defined (ACE_MQX) # if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_USES_FIFO_SEM) // This needs to be moved out of here. @@ -322,8 +249,6 @@ public: # endif /* !ACE_HAS_POSIX_SEM */ # if defined (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD) - // If we are on Solaris we can just reuse the existing - // implementations of these synchronization types. # if !defined (ACE_LACKS_RWLOCK_T) && !defined (ACE_HAS_PTHREADS_UNIX98_EXT) # include /**/ <synch.h> typedef rwlock_t ACE_rwlock_t; @@ -335,7 +260,7 @@ public: # if !defined (ACE_HAS_POSIX_SEM) typedef sema_t ACE_sema_t; # endif /* !ACE_HAS_POSIX_SEM */ -# endif /* !ACE_HAS_STHREADS */ +# endif /* !ACE_MQX */ # if defined (ACE_HAS_PTHREADS_UNIX98_EXT) && !defined (ACE_LACKS_RWLOCK_T) typedef pthread_rwlock_t ACE_rwlock_t; @@ -362,26 +287,6 @@ public: # endif /* _XOPEN_SOURCE && _XOPEN_SOURCE < 600 */ # endif /* ACE_LINUX && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) */ - -#elif defined (ACE_HAS_STHREADS) -# if !defined (ACE_THR_PRI_FIFO_MIN) -# define ACE_THR_PRI_FIFO_MIN (long) 0 -# endif /* !ACE_THR_PRI_FIFO_MIN */ -# if !defined (ACE_THR_PRI_FIFO_MAX) -# define ACE_THR_PRI_FIFO_MAX (long) 59 -# endif /* !ACE_THR_PRI_FIFO_MAX */ -# if !defined (ACE_THR_PRI_RR_MIN) -# define ACE_THR_PRI_RR_MIN (long) 0 -# endif /* !ACE_THR_PRI_RR_MIN */ -# if !defined (ACE_THR_PRI_RR_MAX) -# define ACE_THR_PRI_RR_MAX (long) 59 -# endif /* !ACE_THR_PRI_RR_MAX */ -# if !defined (ACE_THR_PRI_OTHER_MIN) -# define ACE_THR_PRI_OTHER_MIN (long) 0 -# endif /* !ACE_THR_PRI_OTHER_MIN */ -# if !defined (ACE_THR_PRI_OTHER_MAX) -# define ACE_THR_PRI_OTHER_MAX (long) 127 -# endif /* !ACE_THR_PRI_OTHER_MAX */ #endif /* ACE_HAS_PTHREADS */ #include /**/ "ace/post.h" diff --git a/ACE/ace/os_include/os_signal.h b/ACE/ace/os_include/os_signal.h index 6ab5f76fbe2..679a1944aab 100644 --- a/ACE/ace/os_include/os_signal.h +++ b/ACE/ace/os_include/os_signal.h @@ -24,11 +24,9 @@ #include "ace/os_include/sys/os_types.h" -#if !defined (ACE_LACKS_SIGNAL_H) - extern "C" { +extern "C" { # include /**/ <signal.h> - } -#endif /* !ACE_LACKS_SIGNAL_H */ +} #if defined (ACE_HAS_SIGINFO_T) # if !defined (ACE_LACKS_SIGINFO_H) @@ -137,7 +135,7 @@ extern "C" #if defined (ACE_VXWORKS) # define ACE_NSIG (_NSIGS + 1) -#elif defined (__Lynx__) || defined (ACE_HAS_RTEMS) +#elif defined (__Lynx__) # define ACE_NSIG (NSIG + 1) #else // All other platforms set NSIG to one greater than the @@ -145,10 +143,6 @@ extern "C" # define ACE_NSIG NSIG #endif /* ACE_VXWORKS */ -#if defined (ACE_HAS_WINCE) - typedef void (__cdecl * __sighandler_t)(int); -#endif - #if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES) // Prototypes for both signal() and struct sigaction are consistent.. using ACE_SignalHandler = void (*)(int); @@ -163,9 +157,6 @@ extern "C" #elif defined (INTEGRITY) using ACE_SignalHandler = void (*)(); using ACE_SignalHandlerV = void (*)(int); -#elif defined (ACE_HAS_RTEMS) - using ACE_SignalHandler = void (*)(); - using ACE_SignalHandlerV = void (*)(); #else /* This is necessary for some older broken version of cfront */ # if defined (SIG_PF) # define ACE_SignalHandler SIG_PF diff --git a/ACE/ace/os_include/os_stropts.h b/ACE/ace/os_include/os_stropts.h index 4ed4c4b44da..7b641bee9da 100644 --- a/ACE/ace/os_include/os_stropts.h +++ b/ACE/ace/os_include/os_stropts.h @@ -24,12 +24,6 @@ #include "ace/os_include/os_unistd.h" -#if defined (ACE_HAS_TIMOD_H) -# include /**/ <sys/timod.h> -#elif defined (ACE_HAS_OSF_TIMOD_H) -# include /**/ <tli/timod.h> -#endif /* ACE_HAS_TIMOD_H */ - #if !defined (ACE_LACKS_SYS_IOCTL_H) # include /**/ <sys/ioctl.h> #endif /* !ACE_LACKS_SYS_IOCTL_H */ @@ -42,28 +36,10 @@ # include /**/ <sys/sockio.h> #endif /* ACE_HAS_SOCKIO_H */ -// This is sorta counter intuitive, but this is how it was done in OS.h -// @todo: fix this... dhinton -#if defined (ACE_HAS_STREAMS) -# if defined (AIX) -# if !defined (_XOPEN_EXTENDED_SOURCE) -# define _XOPEN_EXTENDED_SOURCE -# endif /* !_XOPEN_EXTENDED_SOURCE */ -# endif /* AIX */ -#endif /* ACE_HAS_STREAMS */ - #if !defined (ACE_LACKS_STROPTS_H) # include /**/ <stropts.h> #endif /* !ACE_LACKS_STROPTS_H */ -// This is sorta counter intuitive, but this is how it was done in OS.h -// @todo: fix this... dhinton -#if defined (ACE_HAS_STREAMS) -# if defined (AIX) -# undef _XOPEN_EXTENDED_SOURCE -# endif /* AIX */ -#endif /* ACE_HAS_STREAMS */ - #if defined (ACE_VXWORKS) // for ioctl() # include /**/ <ioLib.h> diff --git a/ACE/ace/os_include/os_termios.h b/ACE/ace/os_include/os_termios.h index 59392d90214..d16476497ae 100644 --- a/ACE/ace/os_include/os_termios.h +++ b/ACE/ace/os_include/os_termios.h @@ -26,9 +26,5 @@ # include /**/ <termios.h> #endif /* !ACE_LACKS_TERMIOS_H */ -#if defined (HPUX) -# include /**/ <sys/modem.h> -#endif /* HPUX */ - #include /**/ "ace/post.h" #endif /* ACE_OS_INCLUDE_OS_TERMIOS_H */ diff --git a/ACE/ace/os_include/os_time.h b/ACE/ace/os_include/os_time.h index 5970afb2d65..eb716ff27ec 100644 --- a/ACE/ace/os_include/os_time.h +++ b/ACE/ace/os_include/os_time.h @@ -25,11 +25,8 @@ // @todo should we include anything from signal.h? #include "ace/os_include/sys/os_types.h" -// To get the proper select() signature, this is required for HP-UX, and -// maybe other platforms that offer both int and fdset forms of select(). -// For HP-UX, sys/time.h must be included before time.h, or -// _XOPEN_SOURCE_EXTENDED must be defined. It's not nice to require -// the preprocessor macro, so we force our select() preference this way. +// To get the proper select() signature, this is required for maybe other platforms +// that offer both int and fdset forms of select(). #if !defined (ACE_LACKS_SYS_TIME_H) # include /**/ <sys/time.h> #endif /* !ACE_LACKS_SYS_TIME_H */ @@ -56,13 +53,6 @@ typedef struct timespec /// Nanoseconds long tv_nsec; } timespec_t; -# elif defined (ACE_HAS_BROKEN_POSIX_TIME) -# if defined (ACE_OPENVMS) -# include /**/ <timers.h> -# else -// OSF/1 defines struct timespec in <sys/timers.h> - Tom Marrs -# include /**/ <sys/timers.h> -# endif # endif /* !ACE_HAS_POSIX_TIME */ # if defined(ACE_LACKS_TIMESPEC_T) @@ -82,8 +72,7 @@ extern "C" // straightening them out. #if defined (ACE_HAS_PTHREADS) /* POSIX.1c threads (pthreads) */ // ... and 2-parameter asctime_r and ctime_r -# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \ - !defined (ACE_HAS_STHREADS) && !defined (ACE_VXWORKS) +# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && !defined (ACE_VXWORKS) # define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R # endif #endif /* ACE_HAS_PTHREADS */ diff --git a/ACE/ace/os_include/os_unistd.h b/ACE/ace/os_include/os_unistd.h index db6275d0026..14d1621d3ba 100644 --- a/ACE/ace/os_include/os_unistd.h +++ b/ACE/ace/os_include/os_unistd.h @@ -33,10 +33,6 @@ # include /**/ <io.h> #endif /* ACE_HAS_IO_H */ -#if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ <sys/systeminfo.h> -#endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #if !defined (ACE_LACKS_UNISTD_H) # include /**/ <unistd.h> #endif /* !ACE_LACKS_UNISTD_H */ @@ -72,15 +68,9 @@ extern "C" #if defined (ACE_WIN32) // The following are #defines and #includes that are specific to // WIN32. -# if defined (ACE_HAS_WINCE) -# define ACE_STDIN _fileno (stdin) -# define ACE_STDOUT _fileno (stdout) -# define ACE_STDERR _fileno (stderr) -# else # define ACE_STDIN GetStdHandle (STD_INPUT_HANDLE) # define ACE_STDOUT GetStdHandle (STD_OUTPUT_HANDLE) # define ACE_STDERR GetStdHandle (STD_ERROR_HANDLE) -# endif // ACE_HAS_WINCE // The following are #defines and #includes that are specific to UNIX. #else /* !ACE_WIN32 */ # if defined (STDIN_FILENO) @@ -100,20 +90,6 @@ extern "C" # endif #endif /* ACE_WIN32 */ -#if (!defined (_BSD_SOURCE) && \ - !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)) \ - || (defined (_XOPEN_SOURCE) && defined (__GNUC__)) - -# if defined (ACE_LACKS_SETREUID_PROTOTYPE) - extern int setreuid (uid_t ruid, uid_t euid); -# endif /* ACE_LACKS_SETREUID_PROTOTYPE */ - -# if defined (ACE_LACKS_SETREGID_PROTOTYPE) - extern int setregid (gid_t rgid, gid_t egid); -# endif /* ACE_LACKS_SETREGID_PROTOTYPE */ -#endif /* !_BSD_SOURCE && !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED - || _XOPEN_SOURCE && __GNUC__ */ - // for use by access() # if !defined (R_OK) # define R_OK 04 /* Test for Read permission. */ @@ -136,27 +112,12 @@ extern "C" # define F_OK 0 /* Test for existence of File. */ # endif /* F_OK */ -#if defined (ACE_LACKS_UALARM_PROTOTYPE) - u_int ualarm (u_int usecs, u_int interval); -#endif /* ACE_LACKS_UALARM_PROTOTYPE */ - #if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \ !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED) pid_t getpgid (pid_t pid); #endif /* ACE_LACKS_GETPGID_PROTOTYPE && !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */ -#if !defined (_LARGEFILE64_SOURCE) -# if defined (ACE_LACKS_LSEEK64_PROTOTYPE) && \ - defined (ACE_LACKS_LLSEEK_PROTOTYPE) -# error Define either ACE_LACKS_LSEEK64_PROTOTYPE or ACE_LACKS_LLSEEK_PROTOTYPE, not both! -# elif defined (ACE_LACKS_LSEEK64_PROTOTYPE) - ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence); -# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE) - ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence); -# endif -#endif /* _LARGEFILE64_SOURCE */ - #if defined (__BORLANDC__) # define _isatty isatty #endif /* __BORLANDC__ */ diff --git a/ACE/ace/os_include/sys/os_mman.h b/ACE/ace/os_include/sys/os_mman.h index 2f98bf4b798..6671ffd1c86 100644 --- a/ACE/ace/os_include/sys/os_mman.h +++ b/ACE/ace/os_include/sys/os_mman.h @@ -81,9 +81,6 @@ PAGE_NOCACHE */ # if !defined (MAP_FAILED) # define MAP_FAILED ((void *) -1) -# elif defined (ACE_HAS_LONG_MAP_FAILED) -# undef MAP_FAILED -# define MAP_FAILED ((void *) -1L) # endif /* !MAP_FAILED */ #if !defined (PROT_RDWR) @@ -100,10 +97,6 @@ PAGE_NOCACHE */ # define MS_SYNC 0x0 # endif /* !MS_SYNC */ -#if !defined (ACE_LACKS_MADVISE) && defined (ACE_LACKS_MADVISE_PROTOTYPE) - extern "C" int madvise(caddr_t, size_t, int); -#endif /* !ACE_LACKS_MADVISE && ACE_LACKS_MADVISE_PROTOTYPE */ - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/ACE/ace/os_include/sys/os_resource.h b/ACE/ace/os_include/sys/os_resource.h index 437e2d6e49d..a014351617a 100644 --- a/ACE/ace/os_include/sys/os_resource.h +++ b/ACE/ace/os_include/sys/os_resource.h @@ -29,10 +29,6 @@ # include /**/ <sys/resource.h> #endif /* !ACE_LACKS_SYS_RESOURCE_H */ -#if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ <sys/systeminfo.h> -#endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #if defined (ACE_HAS_SYS_SYSCALL_H) # include /**/ <sys/syscall.h> #endif /* ACE_HAS_SYS_SYSCALL_H */ @@ -59,14 +55,7 @@ extern "C" }; #endif /* ACE_WIN32 */ -#if defined (ACE_LACKS_RLIMIT_PROTOTYPE) - int getrlimit (int resource, struct rlimit *rlp); - int setrlimit (int resource, const struct rlimit *rlp); -#endif /* ACE_LACKS_RLIMIT_PROTOTYPE */ - -#if defined (ACE_HAS_PRUSAGE_T) - typedef prusage_t ACE_Rusage; -#elif defined (ACE_HAS_GETRUSAGE) +#if defined (ACE_HAS_GETRUSAGE) typedef rusage ACE_Rusage; #else typedef int ACE_Rusage; diff --git a/ACE/ace/os_include/sys/os_socket.h b/ACE/ace/os_include/sys/os_socket.h index 8c8ce66f9ab..e3bd900fe15 100644 --- a/ACE/ace/os_include/sys/os_socket.h +++ b/ACE/ace/os_include/sys/os_socket.h @@ -255,36 +255,14 @@ extern "C" # define ACE_PROTOCOL_FAMILY_INET PF_INET #endif /* ACE_HAS_IPV6 */ -#if !defined (ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE) #define ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE SSIZE_MAX -#endif /* ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE */ #if !defined (ACE_SOCKET_LEN) #if defined (ACE_HAS_SOCKLEN_T) -# if defined (__hpux) - /* - ** HP-UX supplies the socklen_t type unless some feature set less than - ** _XOPEN_SOURCE_EXTENDED is specifically requested. However, it only - ** actually uses the socklen_t type in supplied socket functions if - ** _XOPEN_SOURCE_EXTENDED is specifically requested. So, for example, - ** the compile options ACE usually uses (includes -mt) cause _HPUX_SOURCE - ** to be set, which sets _INCLUDE_XOPEN_SOURCE_EXTENDED (causing socklen_t - ** to be defined) but _not_ _XOPEN_SOURCE_EXTENDED (causing socket functions - ** to use int, not socklen_t). React to this situation here... - */ -# if defined (_XOPEN_SOURCE_EXTENDED) typedef socklen_t ACE_SOCKET_LEN; -# else -typedef int ACE_SOCKET_LEN; -# endif /* _XOPEN_SOURCE_EXTENDED */ -# else -typedef socklen_t ACE_SOCKET_LEN; -# endif /* __hpux */ -#elif defined (ACE_HAS_SIZET_SOCKET_LEN) -typedef size_t ACE_SOCKET_LEN; #else typedef int ACE_SOCKET_LEN; -#endif /* ACE_HAS_SIZET_SOCKET_LEN */ +#endif /* ACE_HAS_SOCKLEN_T */ #endif /* ACE_SOCKET_LEN */ #if defined (ACE_HAS_NETLINK) diff --git a/ACE/ace/os_include/sys/os_stat.h b/ACE/ace/os_include/sys/os_stat.h index d179d5f95c0..7e6db7b9cae 100644 --- a/ACE/ace/os_include/sys/os_stat.h +++ b/ACE/ace/os_include/sys/os_stat.h @@ -82,12 +82,9 @@ extern "C" # if !defined (S_IXOTH) # define S_IXOTH 00001 # endif /* S_IXOTH */ - -// WinCE's S_IFLNK is defined with the other bits, below. -#if !defined (S_IFLNK) && !defined (ACE_HAS_WINCE) -#define S_IFLNK 0200000 -#endif /* S_IFLNK && !ACE_HAS_WINCE */ - +# if !defined (S_IFLNK) +# define S_IFLNK 0200000 +# endif /* S_IFLNK */ #endif /* ACE_LACKS_MODE_MASKS */ // Some systems (VxWorks) don't define S_ISLNK @@ -104,55 +101,6 @@ extern "C" # define S_ISDIR(mode) ((mode&S_IFMT) == S_IFDIR) #endif -#if defined (ACE_HAS_WINCE) - -// Translate the WinCE bits into names expected by our callers. -// The dwFileAttributes parameter doesn't have protection info, so -// S_IFMT is the whole thing. Since there are no symbolic links, S_IFLNK is 0. -# define S_IFMT 0xFFFF -# define S_IFDIR FILE_ATTRIBUTE_DIRECTORY -# define S_IFREG FILE_ATTRIBUTE_NORMAL -# define S_IFLNK 0 -# define S_IFCHR 0 - -# if !defined (__MINGW32__) - // Since CE does not have _stat by default as NT/2000 does, the 'stat' - // struct defined here will be used. Also note that CE file system - // struct is only for the CE 3.0 or later. - // Refer to the WCHAR.H from Visual C++ and WIBASE.H from eVC 3.0. - struct stat - { - /// always 0 on Windows platforms - dev_t st_dev; - - /// always 0 on Windows platforms - dev_t st_rdev; - - /// file attribute - mode_t st_mode; - - /// number of hard links - nlink_t st_nlink; - - /// time of last access - time_t st_atime; - - /// time of last data modification - time_t st_mtime; - - /// time of creation - time_t st_ctime; - - /// file size, in bytes - ACE_OFF_T st_size; - - // Following members do not have direct conversion in Window platforms. - //u_long st_blksize; // optimal blocksize for I/O - //u_long st_flags; // user defined flags for file - }; - #endif -#endif /* ACE_HAS_WINCE */ - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/ACE/ace/os_include/sys/os_types.h b/ACE/ace/os_include/sys/os_types.h index 822c8a93d97..b179c7051ad 100644 --- a/ACE/ace/os_include/sys/os_types.h +++ b/ACE/ace/os_include/sys/os_types.h @@ -28,10 +28,6 @@ # include /**/ <sys/types.h> #endif /* !ACE_LACKS_SYS_TYPES_H */ -#if defined (ACE_HAS_TYPES_H) -# include /**/ <types.h> -#endif /* ACE_HAS_TYPES_H */ - # if defined (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB) && \ (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB != 0) using std::time_t; @@ -49,14 +45,6 @@ typedef double ACE_timer_t; typedef int clockid_t; #endif /* ACE_LACKS_CLOCKID_T */ -#if defined (ACE_LACKS_DEV_T) - typedef unsigned int dev_t; -#endif /* ACE_LACKS_DEV_T */ - -#if defined (ACE_HAS_WINCE) - typedef long off_t; -#endif - #if defined(ACE_WIN32) && defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS==64) typedef __int64 ACE_OFF_T; #else @@ -65,18 +53,13 @@ typedef double ACE_timer_t; #if defined (ACE_SIZEOF_LONG) && ACE_SIZEOF_LONG == 8 typedef off_t ACE_LOFF_T; -#elif defined (ACE_HAS_RTEMS) || defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__APPLE__) || \ - (defined (ACE_OPENVMS) && defined (_LARGEFILE)) +#elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__APPLE__) typedef off_t ACE_LOFF_T; -#elif defined (AIX) || defined (HPUX) || defined (__QNX__) +#elif defined (__QNX__) typedef off64_t ACE_LOFF_T; -#elif defined (__sun) - typedef offset_t ACE_LOFF_T; #elif defined (WIN32) typedef __int64 ACE_LOFF_T; -#elif (defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x700)) || \ - defined (ACE_LYNXOS_MAJOR) || \ - (defined (ACE_OPENVMS) && !defined (_LARGEFILE)) +#elif (defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x700)) || defined (ACE_LYNXOS_MAJOR) typedef long long ACE_LOFF_T; #else typedef loff_t ACE_LOFF_T; |