]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - sail/machdep.h
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
[bsdgames-darwin.git] / sail / machdep.h
index a67210370923469130b3329b1e0b70c446ea5f4b..087d56369ef764fb45eb62df72eabb8942fcaaeb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.h,v 1.3 1995/04/22 10:37:00 cgd Exp $  */
+/*     $NetBSD: machdep.h,v 1.4 1995/04/28 21:30:16 mycroft Exp $      */
 
 /*
  * Copyright (c) 1983, 1993
 
 #define TIMEOUT 300                            /* Sync() timeout in seconds */
 
-/* for 4.2bsd machines */
-#define blockalarm()   ((void) sigblock(1 << SIGALRM-1))
-#define unblockalarm() ((void) sigsetmask(sigblock(0) & ~(1 << SIGALRM-1)))
-
-/* for 2.9bsd machines (onyx)
-typedef int void;
-#define blockalarm()   ((void) sighold(SIGALRM))
-#define unblockalarm() ((void) sigrelse(SIGALRM))
-*/
+/* for POSIX systems */
+#define        blockalarm() \
+       do {                                                            \
+               sigset_t sigset;                                        \
+               sigemptyset(&sigset);                                   \
+               sigaddset(&sigset, SIGALRM);                            \
+               sigprocmask(SIG_BLOCK, &sigset, (sigset_t *)0);         \
+       } while (0)
+#define        unblockalarm() \
+       do {                                                            \
+               sigset_t sigset;                                        \
+               sigemptyset(&sigset);                                   \
+               sigaddset(&sigset, SIGALRM);                            \
+               sigprocmask(SIG_UNBLOCK, &sigset, (sigset_t *)0);       \
+       } while (0)