From e5391a0076f5e370f929b111a8a6ed52ee4cb5da Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 17 Jan 2023 12:32:56 +0100 Subject: More Sun OS/compiler cleanup --- ACE/ace/Array_Base.h | 4 +- ACE/ace/Array_Map.h | 3 +- ACE/ace/IOStream.h | 5 - ACE/ace/OS_NS_Thread.cpp | 49 +------ ACE/ace/OS_NS_Thread.h | 4 - ACE/ace/OS_NS_netdb.cpp | 58 --------- ACE/ace/OS_NS_stdio.inl | 3 - ACE/ace/OS_NS_unistd.inl | 10 +- ACE/ace/OS_TLI.h | 6 - ACE/ace/OS_TLI.inl | 4 - ACE/ace/OS_Thread_Adapter.cpp | 17 --- ACE/ace/Object_Manager_Base.cpp | 10 -- ACE/ace/POSIX_Proactor.cpp | 4 - ACE/ace/POSIX_Proactor.h | 3 - ACE/ace/Profile_Timer.cpp | 120 +----------------- ACE/ace/Profile_Timer.h | 15 +-- ACE/ace/Profile_Timer.inl | 35 +---- ACE/ace/README | 47 ------- ACE/ace/SOCK_SEQPACK_Association.cpp | 4 - ACE/ace/Stack_Trace.cpp | 141 --------------------- ACE/ace/TTY_IO.cpp | 7 - ACE/ace/TTY_IO.h | 5 - ACE/ace/Thread_Adapter.cpp | 16 --- ACE/ace/config-linux-common.h | 2 - ACE/ace/config-lite.h | 51 -------- ACE/ace/config-sunos5.4-g++.h | 1 - ACE/ace/config-sunos5.4-sunc++-4.x.h | 1 - ACE/ace/config-sunos5.5.h | 1 - ACE/ace/config-win32-common.h | 3 - ACE/ace/os_include/os_pthread.h | 19 --- ACE/ace/os_include/os_stropts.h | 4 - ACE/ace/os_include/os_unistd.h | 22 ---- ACE/ace/os_include/sys/os_resource.h | 8 +- ACE/ace/os_include/sys/os_socket.h | 2 - ACE/ace/os_include/sys/os_types.h | 2 - ACE/apps/JAWS/clients/WebSTONE/src/get.c | 3 - ACE/examples/Reactor/Proactor/test_proactor3.cpp | 13 -- .../IPC-tests/server/Handle_Broadcast.cpp | 24 ---- .../IPC-tests/server/Handle_L_FIFO.cpp | 25 ---- .../IPC-tests/server/Handle_R_Dgram.cpp | 24 ---- .../IPC-tests/server/Handle_R_Stream.cpp | 25 ---- .../IPC-tests/server/Handle_Timeout.cpp | 24 ---- ACE/examples/Threads/tss1.cpp | 2 - ACE/include/makeinclude/platform_linux_suncc.GNU | 74 ----------- ACE/include/makeinclude/rules.local.GNU | 17 +-- ACE/include/makeinclude/wrapper_macros.GNU | 1 - ACE/protocols/ace/RMCast/Acknowledge.h | 5 +- ACE/tests/Array_Map_Test.cpp | 2 +- ACE/tests/Cached_Accept_Conn_Test.cpp | 9 -- ACE/tests/Proactor_Test.cpp | 26 +--- ACE/tests/Proactor_Test_IPV6.cpp | 26 +--- ACE/tests/Proactor_UDP_Test.cpp | 26 +--- ACE/tests/Unload_libACE.cpp | 4 - TAO/DevGuideExamples/AMH_AMI/AMH_AMI.mpc | 6 - TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp | 4 - .../LoadBalancing/LB_CPU_Load_Average_Monitor.cpp | 6 +- .../LoadBalancing/LB_CPU_Utilization_Monitor.cpp | 4 +- TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp | 18 +-- TAO/orbsvcs/tests/ImplRepo/ImplRepo.mpc | 12 -- .../ImplRepo/RestartServer/MessengerClient.cpp | 2 +- TAO/orbsvcs/tests/Notify/XML_Persistence/main.cpp | 6 +- 61 files changed, 46 insertions(+), 1028 deletions(-) delete mode 100644 ACE/include/makeinclude/platform_linux_suncc.GNU diff --git a/ACE/ace/Array_Base.h b/ACE/ace/Array_Base.h index f16aa65ed69..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 reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; /// Dynamically create an uninitialized array. ACE_Array_Base (size_type size = 0, diff --git a/ACE/ace/Array_Map.h b/ACE/ace/Array_Map.h index 9dfd6f32225..d3c8877eb76 100644 --- a/ACE/ace/Array_Map.h +++ b/ACE/ace/Array_Map.h @@ -104,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 reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; /// Default Constructor. /** diff --git a/ACE/ace/IOStream.h b/ACE/ace/IOStream.h index 810d4c6dda5..38ebe090593 100644 --- a/ACE/ace/IOStream.h +++ b/ACE/ace/IOStream.h @@ -420,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) \ @@ -433,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/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index ebfa188593d..b1b23e534a2 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -3559,20 +3559,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; } } } @@ -4311,36 +4303,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) diff --git a/ACE/ace/OS_NS_Thread.h b/ACE/ace/OS_NS_Thread.h index 793869f379e..18d38698efa 100644 --- a/ACE/ace/OS_NS_Thread.h +++ b/ACE/ace/OS_NS_Thread.h @@ -668,11 +668,7 @@ 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 */ typedef long ACE_id_t; # define ACE_SELF (-1) typedef short ACE_pri_t; diff --git a/ACE/ace/OS_NS_netdb.cpp b/ACE/ace/OS_NS_netdb.cpp index 2af9006fb5f..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 /**/ -#endif - #include ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -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_stdio.inl b/ACE/ace/OS_NS_stdio.inl index ac5f568abdf..6066165912e 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -1068,7 +1068,6 @@ 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)) @@ -1148,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_unistd.inl b/ACE/ace/OS_NS_unistd.inl index 67de5e58951..8c5d2834ade 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -1055,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 diff --git a/ACE/ace/OS_TLI.h b/ACE/ace/OS_TLI.h index 7af75c9cf6f..ab9fb5f3724 100644 --- a/ACE/ace/OS_TLI.h +++ b/ACE/ace/OS_TLI.h @@ -100,12 +100,6 @@ extern "C" } # endif /* !ACE_HAS_TLI_PROTOTYPES */ -# if defined (ACE_HAS_TIUSER_H) -# include /**/ -# else - /* What to do here??? Is there a tli.h? */ -# endif /* ACE_HAS_TIUSER_H */ - # 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 fe69f57c699..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 (errmsg)); -#else ::t_error (errmsg); -#endif /* ACE_HAS_BROKEN_T_ERROR */ #else ACE_UNUSED_ARG (errmsg); #endif /* ACE_HAS_TLI */ 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 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/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp index ecb44654087..3db3504db52 100644 --- a/ACE/ace/Object_Manager_Base.cpp +++ b/ACE/ace/Object_Manager_Base.cpp @@ -218,21 +218,18 @@ ACE_OS_Object_Manager::init () # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) 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_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_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_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")); @@ -240,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_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK")); @@ -248,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_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK")); @@ -340,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_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -352,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_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -364,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_OS_Object_Manager::preallocated_object [ACE_LOG_MSG_INSTANCE_LOCK])) != 0) # ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY if (errno != ENOTSUP) @@ -377,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_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK")); @@ -387,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_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0) ACE_OS_Object_Manager::print_error_message ( __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK")); diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp index 8fe1729cddd..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 /**/ -# endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #include "ace/ACE.h" #include "ace/Flag_Manip.h" #include "ace/Task_T.h" diff --git a/ACE/ace/POSIX_Proactor.h b/ACE/ace/POSIX_Proactor.h index 71e75e54d53..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 }; 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 (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/README b/ACE/ace/README index 03d5d46cba3..78a9205bde4 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -211,10 +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_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 . ACE_HAS_CANCEL_IO Platform supports the Win32 CancelIO() function (WinNT 4.0 @@ -274,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 @@ -283,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. @@ -383,8 +375,6 @@ ACE_HAS_PROC_FS Platform supports the /proc in 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 @@ -491,8 +481,6 @@ ACE_HAS_SYSCALL_GETRUSAGE HP/UX has an undefined syscall for GETRUSAGE... ACE_HAS_SYSENT_H Platform provides 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) @@ -546,10 +534,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 @@ -814,8 +798,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() @@ -865,9 +847,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. @@ -900,16 +879,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 to get thread scheduling @@ -1312,24 +1283,6 @@ ACE_HAS_THREADS: our XOMessageList.h does this by #ifdefs around Threaded things. -ACE_HAS_TIMOD_H: ----------------- - - Used in: - ace/OS.h - - Notes: - if defined, include - - 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. - - ACE_HAS_TIUSER_H: ----------------- 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(&laddrs)); -#endif /* ACE_HAS_VOID_PTR_SCTP_GETPADDRS */ if (err > 0) { len = err; diff --git a/ACE/ace/Stack_Trace.cpp b/ACE/ace/Stack_Trace.cpp index 880575137b6..52e994cf471 100644 --- a/ACE/ace/Stack_Trace.cpp +++ b/ACE/ace/Stack_Trace.cpp @@ -299,147 +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 -# include -# include -# include -# include -# define ACE_STACK_TRACE_BIAS 0 - -# 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(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 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(*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/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 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/config-linux-common.h b/ACE/ace/config-linux-common.h index 2e22623bd76..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 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 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 -#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 reverse_iterator; \ - typedef std::reverse_iterator const_reverse_iterator; -#else -# define ACE_DECLARE_STL_REVERSE_ITERATORS \ - typedef std::reverse_iterator reverse_iterator; \ - typedef std::reverse_iterator const_reverse_iterator; -#endif /* _MSC_VER && _WIN64 */ - #include /**/ "ace/post.h" #endif /* ACE_CONFIG_LITE_H */ diff --git a/ACE/ace/config-sunos5.4-g++.h b/ACE/ace/config-sunos5.4-g++.h index 714e8dcf3a3..a05a5a749ec 100644 --- a/ACE/ace/config-sunos5.4-g++.h +++ b/ACE/ace/config-sunos5.4-g++.h @@ -29,7 +29,6 @@ #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 diff --git a/ACE/ace/config-sunos5.4-sunc++-4.x.h b/ACE/ace/config-sunos5.4-sunc++-4.x.h index c9114bcd20b..981e0f7477b 100644 --- a/ACE/ace/config-sunos5.4-sunc++-4.x.h +++ b/ACE/ace/config-sunos5.4-sunc++-4.x.h @@ -25,7 +25,6 @@ #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. diff --git a/ACE/ace/config-sunos5.5.h b/ACE/ace/config-sunos5.5.h index 1188e47240b..213d8855626 100644 --- a/ACE/ace/config-sunos5.5.h +++ b/ACE/ace/config-sunos5.5.h @@ -129,7 +129,6 @@ #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. diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h index bca5a046873..f22fbb0f063 100644 --- a/ACE/ace/config-win32-common.h +++ b/ACE/ace/config-win32-common.h @@ -533,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 diff --git a/ACE/ace/os_include/os_pthread.h b/ACE/ace/os_include/os_pthread.h index 74a9e2c8ba7..a789d117314 100644 --- a/ACE/ace/os_include/os_pthread.h +++ b/ACE/ace/os_include/os_pthread.h @@ -104,25 +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 (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 diff --git a/ACE/ace/os_include/os_stropts.h b/ACE/ace/os_include/os_stropts.h index 1f9c841c968..7b641bee9da 100644 --- a/ACE/ace/os_include/os_stropts.h +++ b/ACE/ace/os_include/os_stropts.h @@ -24,10 +24,6 @@ #include "ace/os_include/os_unistd.h" -#if defined (ACE_HAS_TIMOD_H) -# include /**/ -#endif /* ACE_HAS_TIMOD_H */ - #if !defined (ACE_LACKS_SYS_IOCTL_H) # include /**/ #endif /* !ACE_LACKS_SYS_IOCTL_H */ diff --git a/ACE/ace/os_include/os_unistd.h b/ACE/ace/os_include/os_unistd.h index 50db68f0abd..e973f964741 100644 --- a/ACE/ace/os_include/os_unistd.h +++ b/ACE/ace/os_include/os_unistd.h @@ -33,10 +33,6 @@ # include /**/ #endif /* ACE_HAS_IO_H */ -#if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ -#endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #if !defined (ACE_LACKS_UNISTD_H) # include /**/ #endif /* !ACE_LACKS_UNISTD_H */ @@ -94,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. */ @@ -130,10 +112,6 @@ 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); diff --git a/ACE/ace/os_include/sys/os_resource.h b/ACE/ace/os_include/sys/os_resource.h index 18b86d6809a..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 /**/ #endif /* !ACE_LACKS_SYS_RESOURCE_H */ -#if defined (ACE_HAS_SYS_SYSTEMINFO_H) -# include /**/ -#endif /* ACE_HAS_SYS_SYSTEMINFO_H */ - #if defined (ACE_HAS_SYS_SYSCALL_H) # include /**/ #endif /* ACE_HAS_SYS_SYSCALL_H */ @@ -59,9 +55,7 @@ extern "C" }; #endif /* ACE_WIN32 */ -#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 3ffee2e03b6..e3bd900fe15 100644 --- a/ACE/ace/os_include/sys/os_socket.h +++ b/ACE/ace/os_include/sys/os_socket.h @@ -255,9 +255,7 @@ 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) diff --git a/ACE/ace/os_include/sys/os_types.h b/ACE/ace/os_include/sys/os_types.h index 6d43d51e49d..b179c7051ad 100644 --- a/ACE/ace/os_include/sys/os_types.h +++ b/ACE/ace/os_include/sys/os_types.h @@ -57,8 +57,6 @@ typedef double ACE_timer_t; typedef off_t ACE_LOFF_T; #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) diff --git a/ACE/apps/JAWS/clients/WebSTONE/src/get.c b/ACE/apps/JAWS/clients/WebSTONE/src/get.c index 87fc678a7af..d800e5678b7 100644 --- a/ACE/apps/JAWS/clients/WebSTONE/src/get.c +++ b/ACE/apps/JAWS/clients/WebSTONE/src/get.c @@ -27,9 +27,6 @@ #include #include #include -#ifdef SUNOS -#include -#endif #include #ifdef WIN32 diff --git a/ACE/examples/Reactor/Proactor/test_proactor3.cpp b/ACE/examples/Reactor/Proactor/test_proactor3.cpp index 369d3699737..68542f46080 100644 --- a/ACE/examples/Reactor/Proactor/test_proactor3.cpp +++ b/ACE/examples/Reactor/Proactor/test_proactor3.cpp @@ -44,7 +44,6 @@ #elif defined (ACE_HAS_AIO_CALLS) #include "ace/POSIX_Proactor.h" -#include "ace/SUN_Proactor.h" #endif /* ACE_HAS_WIN32_OVERLAPPED_IO */ @@ -128,12 +127,6 @@ MyTask::create_proactor () proactor = new ACE_POSIX_SIG_Proactor; ACE_DEBUG ((LM_DEBUG,"(%t) Create Proactor Type=SIG\n")); break; -# if defined (sun) - case 3: - proactor = new ACE_SUN_Proactor (max_aio_operations); - ACE_DEBUG ((LM_DEBUG,"(%t) Create Proactor Type=SUN\n")); - break; -# endif /* sun */ default: proactor = new ACE_POSIX_SIG_Proactor; ACE_DEBUG ((LM_DEBUG,"(%t) Create Proactor Type=SIG\n")); @@ -671,9 +664,6 @@ set_proactor_type (const char *ptype) case 'D' : proactor_type = 0; return true; case 'A' : proactor_type = 1; return true; case 'I' : proactor_type = 2; return true; -#if defined (sun) - case 'S' : proactor_type = 3; return true; -#endif /* sun */ } return false; } @@ -737,9 +727,6 @@ parse_args (int argc, ACE_TCHAR *argv[]) int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { -#if defined (sun) - ACE_DEBUG ((LM_DEBUG, "\nSUN defined!\n")); -#endif if (parse_args (argc, argv) == -1) return -1; diff --git a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp index 9bd499624d4..249ee30fa74 100644 --- a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp +++ b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp @@ -1,29 +1,5 @@ #include "Handle_Broadcast.h" -#if defined (SunOS4) -extern "C" -{ - int init (); - int fini (); - void __sti__Handle_Broadcast_C_init_(); - void __std__Handle_Broadcast_C_init_(); -} - -int -init () -{ - __sti__Handle_Broadcast_C_init_(); - return 0; -} - -int -fini () -{ - __std__Handle_Broadcast_C_init_(); - return 0; -} -#endif /* SunOS4 */ - unsigned short Handle_Broadcast::DEFAULT_PORT = ACE_DEFAULT_BROADCAST_PORT; #if !defined (__ACE_INLINE__) diff --git a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp index 7eff9d9db0c..cdf7eb650c0 100644 --- a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp +++ b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp @@ -1,30 +1,5 @@ #include "Handle_L_FIFO.h" - -#if defined (SunOS4) -extern "C" -{ - int init (); - int fini (); - void __sti__Handle_L_FIFO_C_init_(); - void __std__Handle_L_FIFO_C_init_(); -} - -int -init () -{ - __sti__Handle_L_FIFO_C_init_(); - return 0; -} - -int -fini () -{ - __std__Handle_L_FIFO_C_init_(); - return 0; -} -#endif /* SunOS4 */ - const ACE_TCHAR *Handle_L_FIFO::DEFAULT_RENDEZVOUS = ACE_TEXT("/tmp/foo_fifo"); #if !defined (__ACE_INLINE__) diff --git a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp index a21a39e6fe1..89c0e227e5a 100644 --- a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp +++ b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp @@ -1,29 +1,5 @@ #include "Handle_R_Dgram.h" -#if defined (SunOS4) -extern "C" -{ - int init (); - int fini (); - void __sti__Handle_R_Dgram_C_init_(); - void __std__Handle_R_Dgram_C_init_(); -} - -int -init () -{ - __sti__Handle_R_Dgram_C_init_(); - return 0; -} - -int -fini () -{ - __std__Handle_R_Dgram_C_init_(); - return 0; -} -#endif /* SunOS4 */ - unsigned short Handle_R_Dgram::DEFAULT_PORT = ACE_DEFAULT_SERVER_PORT; #if !defined (__ACE_INLINE__) diff --git a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp index 8ce2a3214a2..240cb2980ae 100644 --- a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp +++ b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp @@ -1,31 +1,6 @@ #include "Handle_R_Stream.h" -#if defined (SunOS4) -extern "C" -{ - int init (); - int fini (); - void __sti__Handle_R_Stream_C_recv_n_(); - void __std__Handle_R_Stream_C_recv_n_(); -} - -int -init () -{ - __sti__Handle_R_Stream_C_recv_n_(); - return 0; -} - -int -fini () -{ - __std__Handle_R_Stream_C_recv_n_(); - return 0; -} -#endif /* SunOS4 */ - // Static variables. - u_short Handle_R_Stream::DEFAULT_PORT = ACE_DEFAULT_SERVER_PORT; char *Handle_R_Stream::login_name = 0; char Handle_R_Stream::login[ACE_MAX_USERID]; diff --git a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp index 445dc1c05dd..b605faab14f 100644 --- a/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp +++ b/ACE/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp @@ -1,29 +1,5 @@ #include "Handle_Timeout.h" -#if defined (SunOS4) -extern "C" -{ - int init (); - int fini (); - void __sti__Handle_Timeout_C_init_(); - void __std__Handle_Timeout_C_init_(); -} - -int -init () -{ - __sti__Handle_Timeout_C_init_(); - return 0; -} - -int -fini () -{ - __std__Handle_Timeout_C_init_(); - return 0; -} -#endif /* SunOS4 */ - #if !defined (__ACE_INLINE__) #include "Handle_Timeout.inl" #endif /* __ACE_INLINE__ */ diff --git a/ACE/examples/Threads/tss1.cpp b/ACE/examples/Threads/tss1.cpp index 74ab7782476..201aee8885e 100644 --- a/ACE/examples/Threads/tss1.cpp +++ b/ACE/examples/Threads/tss1.cpp @@ -24,7 +24,6 @@ #include "thread_specific.h" -// (Sun C++ 4.2 with -O3 won't link if the following is not const.) static const int iterations = 100; // Static variables. @@ -32,7 +31,6 @@ ACE_MT (ACE_Thread_Mutex Errno::lock_); int Errno::flags_; // This is our thread-specific error handler... -// (Sun C++ 4.2 with -O3 won't link if the following is static.) ACE_TSS TSS_Error; // Keeps track of whether Tester::close () has started. diff --git a/ACE/include/makeinclude/platform_linux_suncc.GNU b/ACE/include/makeinclude/platform_linux_suncc.GNU deleted file mode 100644 index 3489fc423e9..00000000000 --- a/ACE/include/makeinclude/platform_linux_suncc.GNU +++ /dev/null @@ -1,74 +0,0 @@ - -# This file should allow ACE to be built on Linux, using the Sun compiler. -# The Sun compiler on linux is still in the Alpha stage, so no guarantees -# given at this point - -include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU - -no_hidden_visibility ?= 1 - -ifeq ($(insure),0) - CC = CC - CXX = CC -endif - -GNU_LIBPTHREAD_VERSION := $(shell getconf GNU_LIBPTHREAD_VERSION) -ifeq (NPTL, $(word 1,$(GNU_LIBPTHREAD_VERSION))) - CPPFLAGS += -DACE_HAS_LINUX_NPTL -endif - -DCCFLAGS += -g -DCFLAGS += -g -DLD = $(CXX) -LD = $(CXX) -LIBS += -ldl -OCCFLAGS = -O3 -OCFLAGS = -O3 -PRELIB = @true -SOFLAGS += -shared -PIC = -PIC - -SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \ - $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o - -ifeq ($(threads),1) - CPPFLAGS += -D_REENTRANT - LIBS += -lpthread -lrt -endif - -ifeq ($(optimize),0) - # Disable all optimizing in code - CPPFLAGS += -O0 -endif - - -ifeq ($(shared_libs), 1) - ifneq ($static_libs_only), 1) - ifneq ($(no_hidden_visibility),1) - CCFLAGS += -fvisibility=hidden - else - CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0 - endif # no_hidden_visibility - endif -endif - -ifeq ($(buildbits),32) - CFLAGS += -m32 - LDFLAGS += -m32 -endif -ifeq ($(buildbits),64) - CFLAGS += -m64 -endif - -# Enable GNU extensions -CPPFLAGS+= -D_GNU_SOURCE - -# Added line below to support "Executable Shared Object" files (as -# needed by the service configurator). -# Marius Kjeldahl -ifeq ($(threads),1) - ESOBUILD = $(COMPILEESO.cc) $(PIC) -shared -o $(VSHDIR)$*.so $< - ifndef PRELIB - PRELIB = @true - endif # ! PRELIB -endif diff --git a/ACE/include/makeinclude/rules.local.GNU b/ACE/include/makeinclude/rules.local.GNU index 11283525473..d2da721b3f1 100644 --- a/ACE/include/makeinclude/rules.local.GNU +++ b/ACE/include/makeinclude/rules.local.GNU @@ -1,6 +1,6 @@ # -*- Makefile -*- #---------------------------------------------------------------------------- -# +# # # Local targets # GNU version @@ -27,20 +27,9 @@ ifdef TEMPINCDIR CLEANUP_DIRS += $(TEMPINCDIR) endif -ifdef sun - CLEANUP_DIRS += SunWS_cache -endif - vxworks_ntbuild ?= 0 lacks_touch ?= 0 -#### TEMPLATE_REPOSITORY can be set in individual platform files -#### to create template repository directories. See -#### platform_sunos5_sunc++.GNU for an example. -ifdef TEMPLATE_REPOSITORY -CLEANUP_DIRS += $(TEMPLATE_REPOSITORY) -endif - ifeq ($(use_pwd_call),) ifneq ($(mingw32),1) use_pwd_call := 0 @@ -369,7 +358,7 @@ ifneq ($(SHLIB_UNCHECKED),) -$(RM) $(SHLIB_UNCHECKED) ifeq ($(versioned_so),1) -$(RM) $(SHLIB_UNCHECKED)$(SOVERSION) -else +else ifeq ($(versioned_so),2) -$(RM) $(SHLIB_UNCHECKED:.$(SOEXT)=$(SOVERSION).$(SOEXT)) endif @@ -510,7 +499,7 @@ depend.local: $(MAKEFILE) idl_stubs.local @$(RM) $(DEPENDENCY_FILE).old @cp $(DEPENDENCY_FILE) $(DEPENDENCY_FILE).old $(DEPGEN_ENV) $(DEPGEN) -A $(DEPEND_CMD_ARGS) -f $(DEPENDENCY_FILE) \ - $(CPPFLAGS) -t gnu -DMAKEDEPEND $(CCFLAGS) $(LSRC) $(SRC) $(PSRC) + $(CPPFLAGS) -t gnu -DMAKEDEPEND $(CCFLAGS) $(LSRC) $(SRC) $(PSRC) @if cmp -s $(DEPENDENCY_FILE) $(DEPENDENCY_FILE).old ;\ then echo "GNUmakefile dependencies unchanged." ;\ else \ diff --git a/ACE/include/makeinclude/wrapper_macros.GNU b/ACE/include/makeinclude/wrapper_macros.GNU index 9daae9c7640..d815f614662 100644 --- a/ACE/include/makeinclude/wrapper_macros.GNU +++ b/ACE/include/makeinclude/wrapper_macros.GNU @@ -26,7 +26,6 @@ # to CPPFLAGS, PLATFORM_DMALLOC_LDFLAGS to LDFLAGS, and # PLATFORM_DMALLOC_LIBS to LIBS. For more information on # dmalloc, see http://dmalloc.com. -# fast Enable -fast option, e.g., with Sun C++. # inline Enable ACE inlining. Some platforms enable inlining by # default, others do not. If platform_macros.GNU does not # set this, inline is enabled. diff --git a/ACE/protocols/ace/RMCast/Acknowledge.h b/ACE/protocols/ace/RMCast/Acknowledge.h index 67487e4a85f..1c3f968a789 100644 --- a/ACE/protocols/ace/RMCast/Acknowledge.h +++ b/ACE/protocols/ace/RMCast/Acknowledge.h @@ -42,10 +42,7 @@ namespace ACE_RMCast virtual void send (Message_ptr m); - // Sun C++ 5.4 can't handle private here. - // - // private: - public: + private: struct Descr { //@@ There should be no default c-tor. diff --git a/ACE/tests/Array_Map_Test.cpp b/ACE/tests/Array_Map_Test.cpp index ad972a8eb43..725814d7f33 100644 --- a/ACE/tests/Array_Map_Test.cpp +++ b/ACE/tests/Array_Map_Test.cpp @@ -296,7 +296,7 @@ index_operator_test () const_reverse_iterator const rlast = const_phonetic.rend (); for (const_reverse_iterator r = const_phonetic.rbegin (); - !(r == rlast); // Sun C++ Forte doesn't support operator!= + (r != rlast); ++r, --letter, --word) { if ((*r).first != *letter || (*r).second != *word) diff --git a/ACE/tests/Cached_Accept_Conn_Test.cpp b/ACE/tests/Cached_Accept_Conn_Test.cpp index 5338c38ddc0..71c07ca733c 100644 --- a/ACE/tests/Cached_Accept_Conn_Test.cpp +++ b/ACE/tests/Cached_Accept_Conn_Test.cpp @@ -30,16 +30,7 @@ #pragma warning(disable:4503) #endif /* _MSC_VER */ -// Note: To keep both sunCC5.0 without debugging symbols and gcc2.7.3 -// happy, it was necessary to have the definitions of the methods of -// the Accept_Strategy before the instantiations. - -// For some strange reason this must *not* be static since otherwise -// certain versions of SunC++ will not link properly. int connection_accepted = 0; - -// For some strange reason this must *not* be static since otherwise -// certain versions of SunC++ will not link properly. int debug = 0; template diff --git a/ACE/tests/Proactor_Test.cpp b/ACE/tests/Proactor_Test.cpp index e82b054b90c..6657c096a15 100644 --- a/ACE/tests/Proactor_Test.cpp +++ b/ACE/tests/Proactor_Test.cpp @@ -50,7 +50,6 @@ # include "ace/POSIX_Proactor.h" # include "ace/POSIX_CB_Proactor.h" -# include "ace/SUN_Proactor.h" #endif /* ACE_WIN32 */ @@ -58,7 +57,7 @@ // Proactor Type (UNIX only, Win32 ignored) -using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; +using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, CB }; static ProactorType proactor_type = DEFAULT; // POSIX : > 0 max number aio operations proactor, @@ -238,16 +237,6 @@ MyTask::create_proactor (ProactorType type_proactor, size_t max_op) break; #endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ -# if defined (sun) - case SUN: - ACE_NEW_RETURN (proactor_impl, - ACE_SUN_Proactor (max_op), - -1); - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT("(%t) Create Proactor Type = SUN\n"))); - break; -# endif /* sun */ - # if !defined(ACE_HAS_BROKEN_SIGEVENT_STRUCT) case CB: ACE_NEW_RETURN (proactor_impl, @@ -1722,7 +1711,6 @@ print_usage (int /* argc */, ACE_TCHAR *argv[]) ACE_TEXT ("\n a AIOCB") ACE_TEXT ("\n i SIG") ACE_TEXT ("\n c CB") - ACE_TEXT ("\n s SUN") ACE_TEXT ("\n d default") ACE_TEXT ("\n-d ") ACE_TEXT ("\n-h for Client mode") @@ -1761,11 +1749,6 @@ set_proactor_type (const ACE_TCHAR *ptype) case 'I': proactor_type = SIG; return 1; -#if defined (sun) - case 'S': - proactor_type = SUN; - return 1; -#endif /* sun */ #if !defined (ACE_HAS_BROKEN_SIGEVENT_STRUCT) case 'C': proactor_type = CB; @@ -1849,13 +1832,6 @@ parse_args (int argc, ACE_TCHAR *argv[]) } // switch } // while - if (proactor_type == SUN && threads > 1) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sun aiowait is not thread-safe; ") - ACE_TEXT ("changing to 1 thread\n"))); - threads = 1; - } - return 0; } diff --git a/ACE/tests/Proactor_Test_IPV6.cpp b/ACE/tests/Proactor_Test_IPV6.cpp index 376e7b415c6..0a4e4e84c18 100644 --- a/ACE/tests/Proactor_Test_IPV6.cpp +++ b/ACE/tests/Proactor_Test_IPV6.cpp @@ -51,14 +51,13 @@ # include "ace/POSIX_Proactor.h" # include "ace/POSIX_CB_Proactor.h" -# include "ace/SUN_Proactor.h" #endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */ #include "Proactor_Test.h" // Proactor Type (UNIX only, Win32 ignored) -using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; +using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, CB }; static ProactorType proactor_type = DEFAULT; // POSIX : > 0 max number aio operations proactor, @@ -238,16 +237,6 @@ MyTask::create_proactor (ProactorType type_proactor, size_t max_op) break; #endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ -# if defined (sun) - case SUN: - ACE_NEW_RETURN (proactor_impl, - ACE_SUN_Proactor (max_op), - -1); - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT("(%t) Create Proactor Type = SUN\n"))); - break; -# endif /* sun */ - # if !defined(ACE_HAS_BROKEN_SIGEVENT_STRUCT) case CB: ACE_NEW_RETURN (proactor_impl, @@ -1759,7 +1748,6 @@ print_usage (int /* argc */, ACE_TCHAR *argv[]) ACE_TEXT ("\n a AIOCB") ACE_TEXT ("\n i SIG") ACE_TEXT ("\n c CB") - ACE_TEXT ("\n s SUN") ACE_TEXT ("\n d default") ACE_TEXT ("\n-d ") ACE_TEXT ("\n-h for Client mode") @@ -1798,11 +1786,6 @@ set_proactor_type (const ACE_TCHAR *ptype) case 'I': proactor_type = SIG; return 1; -#if defined (sun) - case 'S': - proactor_type = SUN; - return 1; -#endif /* sun */ #if !defined (ACE_HAS_BROKEN_SIGEVENT_STRUCT) case 'C': proactor_type = CB; @@ -1890,13 +1873,6 @@ parse_args (int argc, ACE_TCHAR *argv[]) } // switch } // while - if (proactor_type == SUN && threads > 1) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sun aiowait is not thread-safe; ") - ACE_TEXT ("changing to 1 thread\n"))); - threads = 1; - } - return 0; } diff --git a/ACE/tests/Proactor_UDP_Test.cpp b/ACE/tests/Proactor_UDP_Test.cpp index 6de098e6430..30457b30ac3 100644 --- a/ACE/tests/Proactor_UDP_Test.cpp +++ b/ACE/tests/Proactor_UDP_Test.cpp @@ -47,12 +47,11 @@ # include "ace/POSIX_Proactor.h" # include "ace/POSIX_CB_Proactor.h" -# include "ace/SUN_Proactor.h" #endif /* ACE_WIN32 */ // Proactor Type (UNIX only, Win32 ignored) -using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; +using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, CB }; static ProactorType proactor_type = DEFAULT; // POSIX : > 0 max number aio operations proactor, @@ -233,16 +232,6 @@ MyTask::create_proactor (ProactorType type_proactor, size_t max_op) break; #endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ -# if defined (sun) - case SUN: - ACE_NEW_RETURN (proactor_impl, - ACE_SUN_Proactor (max_op), - -1); - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT("(%t) Create Proactor Type = SUN\n"))); - break; -# endif /* sun */ - # if !defined(ACE_HAS_BROKEN_SIGEVENT_STRUCT) case CB: ACE_NEW_RETURN (proactor_impl, @@ -1988,7 +1977,6 @@ print_usage (int /* argc */, ACE_TCHAR *argv[]) ACE_TEXT ("\n a AIOCB") ACE_TEXT ("\n i SIG") ACE_TEXT ("\n c CB") - ACE_TEXT ("\n s SUN") ACE_TEXT ("\n d default") ACE_TEXT ("\n-d ") ACE_TEXT ("\n-h for Client mode") @@ -2027,11 +2015,6 @@ set_proactor_type (const ACE_TCHAR *ptype) case 'I': proactor_type = SIG; return 1; -#if defined (sun) - case 'S': - proactor_type = SUN; - return 1; -#endif /* sun */ #if !defined (ACE_HAS_BROKEN_SIGEVENT_STRUCT) case 'C': proactor_type = CB; @@ -2115,13 +2098,6 @@ parse_args (int argc, ACE_TCHAR *argv[]) } // switch } // while - if (proactor_type == SUN && threads > 1) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sun aiowait is not thread-safe; ") - ACE_TEXT ("changing to 1 thread\n"))); - threads = 1; - } - return 0; } diff --git a/ACE/tests/Unload_libACE.cpp b/ACE/tests/Unload_libACE.cpp index 42270fa0b6d..17088486a32 100644 --- a/ACE/tests/Unload_libACE.cpp +++ b/ACE/tests/Unload_libACE.cpp @@ -26,10 +26,6 @@ #endif /* !ACE_VXWORKS && !__MINGW32__ && !CYGWIN32 */ #endif /* __GNUC__ */ -#if defined (__SUNPRO_CC) -#define UNLOAD_LIBACE_TEST 1 -#endif /* (__SUNPRO_CC) */ - #if defined (ACE_AS_STATIC_LIBS) #undef UNLOAD_LIBACE_TEST #endif /* ACE_AS_STATIC_LIBS */ diff --git a/TAO/DevGuideExamples/AMH_AMI/AMH_AMI.mpc b/TAO/DevGuideExamples/AMH_AMI/AMH_AMI.mpc index 256f03cbbdb..f577e2fc217 100644 --- a/TAO/DevGuideExamples/AMH_AMI/AMH_AMI.mpc +++ b/TAO/DevGuideExamples/AMH_AMI/AMH_AMI.mpc @@ -16,12 +16,6 @@ project(*Client): taoclient, messaging { middleC.cpp client.cpp } - // To avoid link errors with SunCC 5.[34], put this project's - // object files (and resulting SunWS_cache directory) in a different - // location than the default. - verbatim(gnuace, macros) { - VDIR = $(if $(ARCH),$(ARCH)/).obj/AMH_AMI_Client/ - } } project(*Middle_Server): messaging, taoserver, amh { diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp index 5409f0b4406..b5f8d353c3d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp @@ -158,10 +158,6 @@ TAO_EC_Basic_Factory::destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy* x TAO_EC_ProxyPushConsumer_Collection* TAO_EC_Basic_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *) { -#if defined (__SUNPRO_CC) - // This typedef is a workaround for a SunCC 4.2 bug - typedef TAO_ESF_Proxy_List::Iterator TAO_EC_Consumer_List_Iterator; -#endif return new TAO_ESF_Delayed_Changes, TAO_ESF_Proxy_List::Iterator, diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp index 62b3afe1ddc..05a518b049c 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp @@ -107,7 +107,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads () load = ((system_ll - idle_ll) * 100 / system_ll) / sys_info.dwNumberOfProcessors; } -#elif defined (ACE_LINUX) || defined (sun) +#elif defined (ACE_LINUX) // Only bother getting the load average over the last minute. // @@ -198,7 +198,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads () throw CORBA::TRANSIENT (); // Correct exception? #endif -#if defined (ACE_LINUX) || defined (sun) || defined(__NetBSD__) || defined (__APPLE__) +#if defined (ACE_LINUX) || defined(__NetBSD__) || defined (__APPLE__) CosLoadBalancing::LoadList * tmp = 0; ACE_NEW_THROW_EX (tmp, CosLoadBalancing::LoadList (1), @@ -222,7 +222,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads () ACE_UNUSED_ARG (load); throw CORBA::NO_IMPLEMENT (); -#endif /* linux || sun || __NetBSD__ || __APPLE__ */ +#endif /* linux || __NetBSD__ || __APPLE__ */ } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp index 4dc1ecb2214..d991ba35514 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp @@ -124,7 +124,7 @@ TAO_LB_CPU_Utilization_Monitor::loads () { CORBA::Float load = 0; -#if defined (ACE_LINUX) || defined (sun) +#if defined (ACE_LINUX) double load_double = calc_cpu_loading (); load = load_double; @@ -153,7 +153,7 @@ TAO_LB_CPU_Utilization_Monitor::loads () ACE_UNUSED_ARG (load); throw CORBA::NO_IMPLEMENT (); -#endif /* linux || sun */ +#endif /* linux */ } diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index 4894a456b24..e9481bcd951 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -21,10 +21,6 @@ #include "ace/OS_NS_strings.h" #include -#if defined (sun) -# include /* for _lwp_self */ -#endif /* sun */ - Test_ECG::Test_ECG () : lcl_name_ ("Test_ECG"), rmt_name_ (""), @@ -60,22 +56,13 @@ Test_ECG::Test_ECG () void print_priority_info (const char *const name) { -#if defined (ACE_HAS_PTHREADS) || defined (sun) +#if defined (ACE_HAS_PTHREADS) #if defined (ACE_HAS_PTHREADS) struct sched_param param; int policy, status; if ((status = pthread_getschedparam (pthread_self (), &policy, ¶m)) == 0) { -# ifdef sun - ACE_DEBUG ((LM_DEBUG, - "%C (%lu|%u); policy is %d, priority is %d\n", - name, - ACE_OS::getpid (), - _lwp_self (), - pthread_self (), - policy, param.sched_priority)); -# else /* ! sun */ ACE_DEBUG ((LM_DEBUG, "%C (%lu|%u); policy is %d, priority is %d\n", name, @@ -83,7 +70,6 @@ print_priority_info (const char *const name) 0, pthread_self (), policy, param.sched_priority )); -# endif /* ! sun */ } else { ACE_DEBUG ((LM_DEBUG,"pthread_getschedparam failed: %d\n", status)); } @@ -119,7 +105,7 @@ print_priority_info (const char *const name) #endif /* sun */ #else ACE_UNUSED_ARG (name); -#endif /* ACE_HAS_PTHREADS || sun */ +#endif /* ACE_HAS_PTHREADS */ } int diff --git a/TAO/orbsvcs/tests/ImplRepo/ImplRepo.mpc b/TAO/orbsvcs/tests/ImplRepo/ImplRepo.mpc index a8fa7f3af1e..5769b24876a 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ImplRepo.mpc +++ b/TAO/orbsvcs/tests/ImplRepo/ImplRepo.mpc @@ -57,12 +57,6 @@ project(nestea server) : portableserver, orbsvcsexe, avoids_minimum_corba, iorta nestea_server_i.cpp nestea_server.cpp } - // To avoid link errors with SunCC 5.[34], put this project's - // object files (and resulting SunWS_cache directory) in a different - // location than the default. - verbatim(gnuace, macros) { - VDIR = $(if $(ARCH),$(ARCH)/).obj/nestea_server/ - } } project(nestea client) : portableserver, orbsvcsexe, avoids_minimum_corba, iortable { @@ -77,11 +71,5 @@ project(nestea client) : portableserver, orbsvcsexe, avoids_minimum_corba, iorta nestea_client_i.cpp nestea_client.cpp } - // To avoid link errors with SunCC 5.[34], put this project's - // object files (and resulting SunWS_cache directory) in a different - // location than the default. - verbatim(gnuace, macros) { - VDIR = $(if $(ARCH),$(ARCH)/).obj/nestea_client/ - } } diff --git a/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp b/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp index 3901ea0491d..3d1bbe2684d 100644 --- a/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/RestartServer/MessengerClient.cpp @@ -55,7 +55,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Detection of closed on read currently not working certain platforms. -#if defined (sun) || defined (__FreeBSD_version) +#if defined (__FreeBSD_version) return 2; #endif diff --git a/TAO/orbsvcs/tests/Notify/XML_Persistence/main.cpp b/TAO/orbsvcs/tests/Notify/XML_Persistence/main.cpp index be12aa0b2b0..3df1a5da8d2 100644 --- a/TAO/orbsvcs/tests/Notify/XML_Persistence/main.cpp +++ b/TAO/orbsvcs/tests/Notify/XML_Persistence/main.cpp @@ -3,12 +3,12 @@ #include "orbsvcs/NotifyExtC.h" #include "orbsvcs/Notify/Notify_EventChannelFactory_i.h" -// On SunOS 5.8 and MacOS X, the static initialization trick used +// On MacOS X, the static initialization trick used // in the CosNotification_Serv library does not work. Including the // initializer class here works around the problem. -#if defined (sun) || defined (__APPLE__) +#if defined (__APPLE__) #include "orbsvcs/Notify/CosNotify_Initializer.h" -#endif /* sun || __APPLE__ */ +#endif /* __APPLE__ */ #include "tao/TimeBaseC.h" #include "tao/corba.h" -- cgit v1.2.1