rbb 01/02/21 12:49:28
Modified: . acconfig.h
threadproc/unix signals.c
Log:
Add apr_sigwait to the apr_private.h file. This allows us to remove
a couple of #ifdefs, and standardize some code. This macro comes directly
from the Apache code.
Revision Changes Path
1.38 +6 -0 apr/acconfig.h
Index: acconfig.h
===================================================================
RCS file: /home/cvs/apr/acconfig.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -b -w -u -r1.37 -r1.38
--- acconfig.h 2001/01/04 22:02:24 1.37
+++ acconfig.h 2001/02/21 20:49:28 1.38
@@ -53,4 +53,10 @@
#define BEOS_BONE 1
#endif
+#ifdef SIGWAIT_TAKES_ONE_ARG
+#define apr_sigwait(a,b) ((*(b)=sigwait((a)))<0?-1:0)
+#else
+#define apr_sigwait(a,b) sigwait((a),(b))
+#endif
+
#endif /* APR_PRIVATE_H */
1.22 +1 -6 apr/threadproc/unix/signals.c
Index: signals.c
===================================================================
RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -b -w -u -r1.21 -r1.22
--- signals.c 2001/02/21 13:21:47 1.21
+++ signals.c 2001/02/21 20:49:28 1.22
@@ -278,12 +278,7 @@
while (1) {
int signal_received;
-#ifdef SIGWAIT_TAKES_ONE_ARG
- signal_received = sigwait(&sig_mask);
- if (signal_received == -1)
-#else
- if (sigwait(&sig_mask, &signal_received) == -1)
-#endif
+ if (apr_sigwait(&sig_mask, &signal_received) != 0)
{
/* handle sigwait() error here */
}