diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-29 16:34:57 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-29 16:34:57 +0000 |
commit | 8b4f1598232f1572d778e0e558aaad273c38356b (patch) | |
tree | 94a72dbc5c9429d0148833da08dc380780d67fe0 | |
parent | 02f15bca29eff0a845db00d539928a749ea6ee50 (diff) | |
download | glibc-8b4f1598232f1572d778e0e558aaad273c38356b.zip glibc-8b4f1598232f1572d778e0e558aaad273c38356b.tar.gz glibc-8b4f1598232f1572d778e0e558aaad273c38356b.tar.bz2 |
* sysdeps/unix/sysv/linux/sigaction.c: If WRAPPER_INCLUDE is defined,
include the named file.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | nptl/ChangeLog | 6 | ||||
-rw-r--r-- | nptl/sigaction.c | 47 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/Makefile | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sigaction.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/sigaction.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sigaction.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/sigaction.c | 6 |
11 files changed, 103 insertions, 8 deletions
@@ -1,3 +1,14 @@ +2005-12-29 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/sigaction.c: If WRAPPER_INCLUDE is defined, + include the named file. + * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. + 2005-12-29 Roland McGrath <roland@frob.com> * sysdeps/mach/hurd/errno.c: New file. diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 0d83539..f7a70a6 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,9 @@ +2005-12-29 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/pthread/sigaction.c: Removed. + * sigaction.c: New file. + * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c. + 2005-12-28 Ulrich Drepper <drepper@redhat.com> * Makefile (tests): Add tst-signal7. diff --git a/nptl/sigaction.c b/nptl/sigaction.c new file mode 100644 index 0000000..60e1f1d --- /dev/null +++ b/nptl/sigaction.c @@ -0,0 +1,47 @@ +/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + +/* This is no complete implementation. The file is meant to be + included in the real implementation to provide the wrapper around + __libc_sigaction. */ + +#include <nptl/pthreadP.h> + +/* We use the libc implementation but we tell it to not allow + SIGCANCEL or SIGTIMER to be handled. */ +#define LIBC_SIGACTION 1 + + +int +__sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ + if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0)) + { + __set_errno (EINVAL); + return -1; + } + + return __libc_sigaction (sig, act, oact); +} +libc_hidden_weak (__sigaction) +weak_alias (__sigaction, sigaction) diff --git a/nptl/sysdeps/unix/sysv/linux/Makefile b/nptl/sysdeps/unix/sysv/linux/Makefile index 9913982..14f513c 100644 --- a/nptl/sysdeps/unix/sysv/linux/Makefile +++ b/nptl/sysdeps/unix/sysv/linux/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -32,3 +32,6 @@ CFLAGS-fork.c = -D_IO_MTSAFE_IO CFLAGS-getpid.o = -fomit-frame-pointer CFLAGS-getpid.os = -fomit-frame-pointer endif + +# Needed in both the signal and nptl subdir. +CFLAGS-sigaction.c = -DWRAPPER_INCLUDE='<nptl/sigaction.c>' diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index 9cb5b6e..299574d 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -1,5 +1,5 @@ /* POSIX.1 `sigaction' call for Linux/i386. - Copyright (C) 1991,1995-2000,02,03, 2004 Free Software Foundation, Inc. + Copyright (C) 1991,1995-2000,2002-2004,2005 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 @@ -154,6 +154,10 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) diff --git a/sysdeps/unix/sysv/linux/ia64/sigaction.c b/sysdeps/unix/sysv/linux/ia64/sigaction.c index 6ec3cb1..fdbc93f 100644 --- a/sysdeps/unix/sysv/linux/ia64/sigaction.c +++ b/sysdeps/unix/sysv/linux/ia64/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Linux/IA64 specific sigaction Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. @@ -48,6 +48,10 @@ __libc_sigaction (sig, act, oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_def (__sigaction) diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c b/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c index 480ebd4..eff4f17 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 2005 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 @@ -44,6 +44,10 @@ __libc_sigaction (sig, act, oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c index 91c3782..a9ad6b1 100644 --- a/sysdeps/unix/sysv/linux/sigaction.c +++ b/sysdeps/unix/sysv/linux/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997-2000,2002,2003,2005 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 @@ -129,6 +129,10 @@ __libc_sigaction (sig, act, oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c index 7fb6459..3be801a 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c @@ -1,5 +1,5 @@ /* POSIX.1 sigaction call for Linux/SPARC. - Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx), 1997. @@ -132,6 +132,10 @@ __libc_sigaction (int sig, __const struct sigaction *act, } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction); libc_hidden_weak (__sigaction) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c index 0a2d2c3..b5e35f4 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c @@ -1,5 +1,5 @@ /* POSIX.1 sigaction call for Linux/SPARC64. - Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx) and Jakub Jelinek (jj@ultra.linux.cz). @@ -65,6 +65,10 @@ __libc_sigaction (int sig, __const struct sigaction *act, } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction); libc_hidden_weak (__sigaction) diff --git a/sysdeps/unix/sysv/linux/x86_64/sigaction.c b/sysdeps/unix/sysv/linux/x86_64/sigaction.c index 9123047..d6f4558 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sigaction.c +++ b/sysdeps/unix/sysv/linux/x86_64/sigaction.c @@ -1,5 +1,5 @@ /* POSIX.1 `sigaction' call for Linux/x86-64. - Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2005 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 @@ -79,6 +79,10 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) } libc_hidden_def (__libc_sigaction) +#ifdef WRAPPER_INCLUDE +# include WRAPPER_INCLUDE +#endif + #ifndef LIBC_SIGACTION weak_alias (__libc_sigaction, __sigaction) libc_hidden_weak (__sigaction) |