From f675792ad48fd536b21e22599f1409a0bb502c54 Mon Sep 17 00:00:00 2001 From: schmidt Date: Mon, 7 Jun 1999 04:53:24 +0000 Subject: . --- ChangeLog-99b | 8 ++++++++ ace/OS.i | 4 ++++ ace/README | 4 ++++ ace/SPIPE_Acceptor.cpp | 13 ++++++++----- ace/config-sunos5.5.h | 3 +++ ace/config-sunos5.7.h | 9 ++++++--- 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/ChangeLog-99b b/ChangeLog-99b index fc0239c53a7..d98aa5bec34 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,5 +1,13 @@ Sun Jun 6 22:02:43 1999 Douglas C. Schmidt + * ace/OS.i (t_error): Fixed the broken t_error() usage on SunOS + 5.5 and 5.6... + + * ace/README: Added a new macro called ACE_HAS_BROKEN_T_ERROR to + workaround the frigging broken prototype for t_error() on + Solaris 2.5. Note that this macro is required for SunOS 2.5 and + 2.6, but not SunOS 2.7 (thank goodness). + * Fixed gazillions of incorrect usages of char * (which should have been const char *) throughout ACE. diff --git a/ace/OS.i b/ace/OS.i index f9997bbe0a2..5bd1756d4c3 100644 --- a/ace/OS.i +++ b/ace/OS.i @@ -6548,7 +6548,11 @@ ACE_OS::t_error (const char *errmsg) { ACE_TRACE ("ACE_OS::t_error"); #if defined (ACE_HAS_TLI) +#if defined (ACE_HAS_BROKEN_T_ERROR) + ::t_error ((char *) errmsg); +#else ::t_error (errmsg); +#endif /* ACE_HAS_BROKEN_T_ERROR */ #else ACE_UNUSED_ARG (errmsg); #endif /* ACE_HAS_TLI */ diff --git a/ace/README b/ace/README index ab9ed44e8c7..bacb522154d 100644 --- a/ace/README +++ b/ace/README @@ -215,6 +215,10 @@ ACE_HAS_BROKEN_SENDMSG OS/compiler omits the const ACE_HAS_BROKEN_SETRLIMIT OS/compiler omits the const from the rlimit parameter in the setrlimit() prototype. +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_BROKEN_TIMESPEC_MEMBERS platform define struct timespec members as ts_sec and ts_nsec instead of tv_sec and diff --git a/ace/SPIPE_Acceptor.cpp b/ace/SPIPE_Acceptor.cpp index 0fd8e02a048..9612f2fa504 100644 --- a/ace/SPIPE_Acceptor.cpp +++ b/ace/SPIPE_Acceptor.cpp @@ -54,20 +54,23 @@ int ACE_SPIPE_Acceptor::create_new_instance (int perms) { #if defined (ACE_HAS_STREAM_PIPES) - ACE_HANDLE handle; ACE_HANDLE spipe[2]; - - handle = ACE_OS::creat (this->local_addr_.get_path_name (), perms); + char module[] = "connld"; + ACE_HANDLE handle = ACE_OS::creat (this->local_addr_.get_path_name (), + perms); if (handle == ACE_INVALID_HANDLE) return -1; else if (ACE_OS::close (handle) == -1) return -1; else if (ACE_OS::pipe (spipe) == -1) return -1; - else if (ACE_OS::ioctl (spipe[0], I_PUSH, "connld") == -1) + else if (ACE_OS::ioctl (spipe[0], + I_PUSH, + module) == -1) return -1; - else if (ACE_OS::fattach (spipe[0], this->local_addr_.get_path_name ()) == -1) + else if (ACE_OS::fattach (spipe[0], + this->local_addr_.get_path_name ()) == -1) return -1; this->set_handle (spipe[1]); diff --git a/ace/config-sunos5.5.h b/ace/config-sunos5.5.h index 6f4202e675e..f6d7acdf9f5 100644 --- a/ace/config-sunos5.5.h +++ b/ace/config-sunos5.5.h @@ -285,6 +285,9 @@ // 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 diff --git a/ace/config-sunos5.7.h b/ace/config-sunos5.7.h index a0061773c53..362f5291195 100644 --- a/ace/config-sunos5.7.h +++ b/ace/config-sunos5.7.h @@ -2,7 +2,7 @@ // $Id$ // The following configuration file is designed to work for SunOS 5.7 -// (Solaris 7) platforms using the SunC++ 4.x or g++ compilers. +// (Solaris 7) platforms using the SunC++ 4.x, 5.x, or g++ compilers. #ifndef ACE_CONFIG_H @@ -35,8 +35,11 @@ typedef unsigned long long uint64_t; // Solaris 5.7 supports SCHED_FIFO and SCHED_RR, as well as SCHED_OTHER. #undef ACE_HAS_ONLY_SCHED_OTHER -// Solaris 2.7 can support Real-Time Signals and POSIX4 AIO operations -// are supported. +// Solaris 5.7 gets this right... +#undef ACE_HAS_BROKEN_T_ERROR + +// Solaris 2.7 can support Real-Time Signals and POSIX4 AIO operations +// are supported. #if !defined (ACE_HAS_AIO_CALLS) #define ACE_HAS_AIO_CALLS -- cgit v1.2.1