diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-19 19:42:42 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:29 +0200 |
commit | 7883b1fa2e105ad784bad545c2432f10dbe172a9 (patch) | |
tree | 33b3b810ffe1e1cdd0b1c109c6eddf0359403d98 /include | |
parent | 0849f6008742424ff64d36d01c096de958dc1964 (diff) |
signal.h: sync with glibc, mainly proper guards
psiginfo() is disabled for now.
Take care syncing this file, there are 3 bugs in glibc
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/signal.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/include/signal.h b/include/signal.h index f775a5755..c137c3bdb 100644 --- a/include/signal.h +++ b/include/signal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1991-2003, 2004, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -87,15 +87,27 @@ typedef __sigset_t sigset_t; typedef __pid_t pid_t; # define __pid_t_defined # endif +#endif +#ifdef __USE_XOPEN # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif #endif /* Unix98 */ +#if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__ +/* We need `struct timespec' later on. */ +# define __need_timespec +# include <time.h> + +/* Get the `siginfo_t' type plus the needed symbols. */ +# include <bits/siginfo.h> +#endif + /* Type of a signal handler. */ typedef void (*__sighandler_t) (int); + #if defined __UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL__ /* The X/Open definition of `signal' specifies the SVID semantic. Use the additional function `sysv_signal' when X/Open compatibility is @@ -163,10 +175,16 @@ extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) extern int gsignal (int __sig) __THROW; #endif /* Use SVID. */ -#ifdef __USE_MISC +/* glibc guards the next two wrong with __USE_XOPEN2K */ +#if defined __USE_MISC || defined __USE_XOPEN2K8 /* Print a message describing the meaning of the given signal number. */ extern void psignal (int __sig, __const char *__s); -#endif /* Use misc. */ +#endif /* Use misc or POSIX 2008. */ + +#if 0 /*def __USE_XOPEN2K8*/ +/* Print a message describing the meaning of the given signal information. */ +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +#endif /* POSIX 2008. */ #ifdef __UCLIBC_SUSV4_LEGACY__ /* The `sigpause' function has two different interfaces. The original @@ -203,14 +221,22 @@ extern int sigpause (int __mask) __THROW __attribute_deprecated__; # define sigmask(sig) __sigmask(sig) /* Block signals in MASK, returning the old mask. */ +# ifdef _LIBC extern int sigblock (int __mask) __THROW; /* collides with libc_hidden_proto: __attribute_deprecated__; */ libc_hidden_proto(sigblock) +# else +extern int sigblock (int __mask) __THROW __attribute_deprecated__; +# endif /* Set the mask of blocked signals to MASK, returning the old mask. */ +# ifdef _LIBC extern int sigsetmask (int __mask) __THROW; /* collides with libc_hidden_proto: __attribute_deprecated__; */ libc_hidden_proto(sigsetmask) +# else +extern int sigsetmask (int __mask) __THROW __attribute_deprecated__; +# endif /* Return currently selected signal mask. */ extern int siggetmask (void) __THROW __attribute_deprecated__; @@ -228,15 +254,6 @@ typedef __sighandler_t sig_t; #ifdef __USE_POSIX -# ifdef __USE_POSIX199309 -/* We need `struct timespec' later on. */ -# define __need_timespec -# include <time.h> - -/* Get the `siginfo_t' type plus the needed symbols. */ -# include <bits/siginfo.h> -# endif - /* Clear all signals from SET. */ extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1)); libc_hidden_proto(sigemptyset) |