patch-2.1.72 linux/include/asm-i386/signal.h

Next file: linux/include/asm-i386/system.h
Previous file: linux/include/asm-i386/posix_types.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.71/linux/include/asm-i386/signal.h linux/include/asm-i386/signal.h
@@ -6,6 +6,7 @@
 /* Avoid too many header ordering problems.  */
 struct siginfo;
 
+#ifdef __KERNEL__
 /* Most things should be clean enough to redefine this at will, if care
    is taken to make libc match.  */
 
@@ -19,6 +20,14 @@
 	unsigned long sig[_NSIG_WORDS];
 } sigset_t;
 
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+#define NSIG		32
+typedef unsigned long sigset_t;
+
+#endif /* __KERNEL__ */
+
 #define SIGHUP		 1
 #define SIGINT		 2
 #define SIGQUIT		 3
@@ -113,6 +122,7 @@
 #define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
 #define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
 
+#ifdef __KERNEL__
 struct old_sigaction {
 	__sighandler_t sa_handler;
 	old_sigset_t sa_mask;
@@ -130,6 +140,16 @@
 struct k_sigaction {
 	struct sigaction sa;
 };
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+struct sigaction {
+	__sighandler_t sa_handler;
+	sigset_t sa_mask;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+};
+#endif /* __KERNEL__ */
 
 typedef struct sigaltstack {
 	void *ss_sp;
@@ -179,6 +199,6 @@
 	return word;
 }
 
-#endif
+#endif /* __KERNEL__ */
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov