diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-05 21:48:44 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-05 21:48:44 +0000 |
commit | b05b4e73df567d4ab29204bfda5c1d798a4742b9 (patch) | |
tree | 0b57111dffbb251b05ea4a2f717221d7730a9635 | |
parent | b942fc14d3e327d10dc85d5284bb4956d1e06fc4 (diff) | |
download | ATCD-b05b4e73df567d4ab29204bfda5c1d798a4742b9.tar.gz |
fixed sigwait on DEC CXX 6.0/later versions of DEC UNIX 4.0
-rw-r--r-- | ace/OS.h | 20 | ||||
-rw-r--r-- | ace/OS.i | 25 | ||||
-rw-r--r-- | ace/config-osf1-4.0.h | 4 |
3 files changed, 24 insertions, 25 deletions
@@ -1721,14 +1721,6 @@ typedef u_int ACE_thread_key_t; #undef sigfillset #endif /* linux && __OPTIMIZE__ */ -// sigwait is yet another macro on Digital UNIX 4.0, with cxx prior to 6.0, -// just causing trouble when introducing member functions with the same name. -// Thanks to Thilo Kielmann" <kielmann@informatik.uni-siegen.de> for this fix. -// I added the version discriminator: David L. Levine <levine@cs.wustl -#if defined (DIGITAL_UNIX) && __DECCXX_VER < 60090006 -# undef sigwait -#endif /* DIGITAL_UNIX && __DECCXX_VER < 60090006 */ - #if defined (ACE_HAS_BROKEN_SENDMSG) typedef struct msghdr ACE_SENDMSG_TYPE; #else @@ -2477,9 +2469,17 @@ typedef void (*__sighandler_t)(int); // keep Signal compilation happy extern int t_errno; #endif /* ACE_LACKS_T_ERRNO */ -#if !defined (ACE_HAS_SIGWAIT) +// sigwait is yet another macro on Digital UNIX 4.0, just causing +// trouble when introducing member functions with the same name. +// Thanks to Thilo Kielmann" <kielmann@informatik.uni-siegen.de> for +// this fix. +# undef sigwait + +#if defined (DIGITAL_UNIX) && __DECCXX_VER >= 60090006 +extern "C" int __P_C(sigwait) __((const sigset_t *set, int *sig)); +#elif !defined (ACE_HAS_SIGWAIT) extern "C" int sigwait (sigset_t *set); -#endif /* ACE_HAS_SIGWAIT */ +#endif /* ! ACE_HAS_SIGWAIT */ #if defined (ACE_HAS_SELECT_H) #include /**/ <sys/select.h> @@ -4661,17 +4661,20 @@ ACE_OS::sigwait (sigset_t *set, int *sig) *sig = ::sigwait (set); return *sig; #else /* ACE_HAS_ONEARG_SETWAIT */ -#if defined (DIGITAL_UNIX) - // Only use if __DECCXX_VER < 60090006, otherwise use ACE_HAS_ONEARG_SIGWAIT. - errno = ::__sigwaitd10 (set, sig); -#elif defined (__Lynx__) - // Second arg is a void **, which we don't need (the selected - // signal number is returned). - *sig = ::sigwait (set, 0); - return *sig; -#else - errno = ::sigwait (set, sig); -#endif /* DIGITAL_UNIX */ +# if defined (DIGITAL_UNIX) +# if __DECCXX_VER < 60090006 + errno = ::__sigwaitd10 (set, sig); +# else + errno = sigwait (set, sig); +# endif /* __DECCXX_VER < 60090006 */ +# elif defined (__Lynx__) + // Second arg is a void **, which we don't need (the selected + // signal number is returned). + *sig = ::sigwait (set, 0); + return *sig; +# else + errno = ::sigwait (set, sig); +# endif /* DIGITAL_UNIX */ if (errno == -1) return -1; else diff --git a/ace/config-osf1-4.0.h b/ace/config-osf1-4.0.h index 9b0f05b3881..1b45f7c4211 100644 --- a/ace/config-osf1-4.0.h +++ b/ace/config-osf1-4.0.h @@ -153,10 +153,6 @@ // Compiler/platform supports SVR4 signal typedef. #define ACE_HAS_SVR4_SIGNAL_T -#if __DECCXX_VER >= 60090006 -# define ACE_HAS_SIGWAIT -# define ACE_HAS_ONEARG_SIGWAIT -#endif /* __DECCXX_VER >= 60090006 */ // Compiler/platform has strerror(). #define ACE_HAS_STRERROR |