]> granicus.if.org Git - sudo/commitdiff
Move compat definition of NSIG to compat.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 9 Jun 2010 17:57:07 +0000 (13:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 9 Jun 2010 17:57:07 +0000 (13:57 -0400)
compat/mksiglist.c
compat/strsignal.c
include/compat.h
src/exec.c
src/exec_pty.c
src/tgetpass.c

index 84d2ead4bca73366fef90ac01b1b4766eb501fd4..d9ba3707366728693f2dc01de126f2bbc11daf86 100644 (file)
 
 #include <compat.h>
 
-#if !defined(NSIG)
-# if defined(_NSIG)
-#  define NSIG _NSIG
-# elif defined(__NSIG)
-#  define NSIG __NSIG
-# else
-#  error one of NSIG, _NSIG, or __NSIG must be defined
-# endif
-#endif
-
 int
 main(int argc, char *argv[])
 {
index 5817f1f0f884d5e732947c6f2de4f6e041ac6321..a2c7a88759796b2add80ac61e9dc7968693ac3f3 100644 (file)
 #include <config.h>
 #include <compat.h>
 
-#if !defined(NSIG)
-# if defined(_NSIG)
-#  define NSIG _NSIG
-# elif defined(__NSIG)
-#  define NSIG __NSIG
-# else
-#  error one of NSIG, _NSIG, or __NSIG must be defined
-# endif
-#endif
-
 #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1
 # define my_sys_siglist        sys_siglist
 #elif defined(HAVE_DECL__SYS_SIGLIST) && HAVE_DECL__SYS_SIGLIST == 1
index c686270c85751d9769ebf99872ed250eda56d29e..4004845666a9d36b86312a47b41c3859eca5a036 100644 (file)
@@ -287,6 +287,17 @@ void setprogname(const char *);
     } while (0)
 #endif
 
+/* Not all systems define NSIG in signal.h */
+#if !defined(NSIG)
+# if defined(_NSIG)
+#  define NSIG _NSIG
+# elif defined(__NSIG)
+#  define NSIG __NSIG
+# else
+#  define NSIG 64
+# endif
+#endif
+
 #ifndef WCOREDUMP
 # define WCOREDUMP(x)  ((x) & 0x80)
 #endif
index c46db05bbd5c94c731f5cd015bd2b7c04c12ac8c..5791eb42765bae382936b3f76a846249be2d3809 100644 (file)
 #include <signal.h>
 #include <termios.h>
 
-/* XXX - move to compat */
-#if !defined(NSIG)
-# if defined(_NSIG)
-#  define NSIG _NSIG
-# elif defined(__NSIG)
-#  define NSIG __NSIG
-# else
-#  define NSIG 64
-# endif
-#endif
-
-#include "sudo.h" /* XXX? */
+#include "sudo.h"
 #include "sudo_plugin.h"
 #include "sudo_plugin_int.h"
 
index 87082e360ad2acb0ff96d0c5c994b9031dba5a5f..aeb68a25e067f743ea334a6f04fdbe1c7826b4b8 100644 (file)
 #include <signal.h>
 #include <termios.h>
 
-/* XXX - move to compat.h */
-#if !defined(NSIG)
-# if defined(_NSIG)
-#  define NSIG _NSIG
-# elif defined(__NSIG)
-#  define NSIG __NSIG
-# else
-#  define NSIG 64
-# endif
-#endif
-
-#include "sudo.h" /* XXX? */
+#include "sudo.h"
 #include "sudo_plugin.h"
 #include "sudo_plugin_int.h"
 
index 48e8f0f235afb11a711121eb2b7ca8acd414ab3a..7020c4b46d4675e326333af69f09f77f0d64668b 100644 (file)
 
 #include "sudo.h"
 
-#if !defined(NSIG)
-# if defined(_NSIG)
-#  define NSIG _NSIG
-# elif defined(__NSIG)
-#  define NSIG __NSIG
-# else
-#  define NSIG 64
-# endif
-#endif
-
 static volatile sig_atomic_t signo[NSIG];
 
 static void handler(int);