diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-23 13:05:24 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-23 13:05:24 +0000 |
commit | df052df931ff7a0382b901b8fb7e3cf6918a334b (patch) | |
tree | 51f1069af000c2f1719d809c37101fd38fe40d54 | |
parent | 9dd610f67ec6be93959d4b89a8a2b9353c68aec9 (diff) |
sync with glibc to get rid of warnings
-rw-r--r-- | libc/sysdeps/linux/x86_64/sigaction.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/x86_64/sigaction.c b/libc/sysdeps/linux/x86_64/sigaction.c index 75eb46784..f701d5047 100644 --- a/libc/sysdeps/linux/x86_64/sigaction.c +++ b/libc/sysdeps/linux/x86_64/sigaction.c @@ -17,23 +17,35 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ + #include <errno.h> +#include <stddef.h> #include <signal.h> #include <string.h> + + #include <sys/syscall.h> + + + +/* The difference here is that the sigaction structure used in the + kernel is not the same as we use in the libc. Therefore we must + translate it here. */ #include <bits/kernel_sigaction.h> +/* We do not globally define the SA_RESTORER flag so do it here. */ #define SA_RESTORER 0x04000000 - #if defined __NR_rt_sigaction -#warning Yes there are two warnings here. Don't worry about it. -static void restore_rt (void) asm ("__restore_rt"); -static void restore (void) asm ("__restore"); +/* Using the hidden attribute here does not change the code but it + helps to avoid warnings. */ +extern void restore_rt (void) asm ("__restore_rt") attribute_hidden; +extern void restore (void) asm ("__restore") attribute_hidden; /* If ACT is not NULL, change the action for SIG to *ACT. If OACT is not NULL, put the old action for SIG in *OACT. */ -int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) +int +__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { int result; struct kernel_sigaction kact, koact; @@ -61,12 +73,12 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa } #else -#warning "Yes there is a warning here. Don't worry about it." -static void restore (void) asm ("__restore"); +extern void restore (void) asm ("__restore") attribute_hidden; /* If ACT is not NULL, change the action for SIG to *ACT. If OACT is not NULL, put the old action for SIG in *OACT. */ -int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) +int +__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { int result; struct old_kernel_sigaction kact, koact; |