summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-05 21:48:44 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-05 21:48:44 +0000
commitb05b4e73df567d4ab29204bfda5c1d798a4742b9 (patch)
tree0b57111dffbb251b05ea4a2f717221d7730a9635
parentb942fc14d3e327d10dc85d5284bb4956d1e06fc4 (diff)
downloadATCD-b05b4e73df567d4ab29204bfda5c1d798a4742b9.tar.gz
fixed sigwait on DEC CXX 6.0/later versions of DEC UNIX 4.0
-rw-r--r--ace/OS.h20
-rw-r--r--ace/OS.i25
-rw-r--r--ace/config-osf1-4.0.h4
3 files changed, 24 insertions, 25 deletions
diff --git a/ace/OS.h b/ace/OS.h
index 1ef73e62b5a..478ed04d791 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -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>
diff --git a/ace/OS.i b/ace/OS.i
index bfd572f3d10..76a0c35ea1e 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -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