aboutsummaryrefslogtreecommitdiff
path: root/signal
diff options
context:
space:
mode:
Diffstat (limited to 'signal')
-rw-r--r--signal/Makefile57
-rw-r--r--signal/Versions54
-rw-r--r--signal/allocrtsig.c78
-rw-r--r--signal/bits/types/sig_atomic_t.h10
-rw-r--r--signal/bits/types/sigset_t.h9
-rw-r--r--signal/bits/types/sigval_t.h13
-rw-r--r--signal/bits/types/struct_sigstack.h29
-rw-r--r--signal/kill.c33
-rw-r--r--signal/killpg.c32
-rw-r--r--signal/raise.c31
-rw-r--r--signal/sigaction.c39
-rw-r--r--signal/sigaddset.c35
-rw-r--r--signal/sigaltstack.c30
-rw-r--r--signal/sigandset.c34
-rw-r--r--signal/sigblock.c30
-rw-r--r--signal/sigdelset.c35
-rw-r--r--signal/sigempty.c36
-rw-r--r--signal/sigfillset.c45
-rw-r--r--signal/siggetmask.c28
-rw-r--r--signal/sighold.c39
-rw-r--r--signal/sigignore.c30
-rw-r--r--signal/sigintr.c31
-rw-r--r--signal/sigisempty.c33
-rw-r--r--signal/sigismem.c34
-rw-r--r--signal/signal.c34
-rw-r--r--signal/signal.h364
-rw-r--r--signal/sigorset.c34
-rw-r--r--signal/sigpause.c49
-rw-r--r--signal/sigpending.c37
-rw-r--r--signal/sigprocmask.c47
-rw-r--r--signal/sigqueue.c31
-rw-r--r--signal/sigrelse.c39
-rw-r--r--signal/sigreturn.c29
-rw-r--r--signal/sigset.c30
-rw-r--r--signal/sigsetmask.c29
-rw-r--r--signal/sigsetops.c53
-rw-r--r--signal/sigstack.c30
-rw-r--r--signal/sigsuspend.c34
-rw-r--r--signal/sigtimedwait.c32
-rw-r--r--signal/sigvec.c202
-rw-r--r--signal/sigwait.c30
-rw-r--r--signal/sigwaitinfo.c31
-rw-r--r--signal/sys/signal.h1
-rw-r--r--signal/sysv_signal.c39
-rw-r--r--signal/tst-raise.c61
-rw-r--r--signal/tst-signal.c44
-rw-r--r--signal/tst-sigset.c43
-rw-r--r--signal/tst-sigset2.c184
-rw-r--r--signal/tst-sigsimple.c56
49 files changed, 0 insertions, 2388 deletions
diff --git a/signal/Makefile b/signal/Makefile
deleted file mode 100644
index 9ce8232d43..0000000000
--- a/signal/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (C) 1991-2017 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
-# 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, see
-# <http://www.gnu.org/licenses/>.
-
-#
-# Makefile for signal routines.
-#
-subdir := signal
-
-include ../Makeconfig
-
-headers := signal.h sys/signal.h \
- bits/signum.h bits/sigcontext.h bits/sigaction.h \
- bits/sigevent-consts.h bits/siginfo-consts.h \
- bits/sigstack.h bits/sigthread.h bits/ss_flags.h \
- bits/types/__sigset_t.h bits/types/sig_atomic_t.h \
- bits/types/sigevent_t.h bits/types/siginfo_t.h \
- bits/types/sigset_t.h bits/types/sigval_t.h \
- bits/types/stack_t.h bits/types/struct_sigstack.h
-
-routines := signal raise killpg \
- sigaction sigprocmask kill \
- sigpending sigsuspend sigwait \
- sigblock sigsetmask sigpause sigvec \
- sigstack sigaltstack sigintr \
- sigsetops sigempty sigfillset sigaddset sigdelset sigismem \
- sigreturn \
- siggetmask sysv_signal \
- sigisempty sigandset sigorset \
- allocrtsig sigtimedwait sigwaitinfo sigqueue \
- sighold sigrelse sigignore sigset
-
-tests := tst-signal tst-sigset tst-sigsimple tst-raise tst-sigset2
-
-
-include ../Rules
-
-CFLAGS-sigpause.c = -fexceptions
-CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-sigtimedwait.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-sigwaitinfo.c = -fexceptions -fasynchronous-unwind-tables
-
-CFLAGS-sigreturn.c = $(no-stack-protector)
diff --git a/signal/Versions b/signal/Versions
deleted file mode 100644
index a915ef400f..0000000000
--- a/signal/Versions
+++ /dev/null
@@ -1,54 +0,0 @@
-libc {
- GLIBC_2.0 {
- # functions with special/multiple interfaces
- __sigpause; __sysv_signal;
-
- # functions formerly used in inline functions or macros
- __sigaddset; __sigdelset; __sigismember;
-
- # functions used in other libraries
- __sigaction;
-
- # b*
- bsd_signal;
-
- # g*
- gsignal;
-
- # k*
- kill; killpg;
-
- # p*
- psignal;
-
- # r*
- raise;
-
- # s*
- sigaction; sigaddset; sigaltstack; sigandset; sigblock; sigdelset;
- sigemptyset; sigfillset; siggetmask; siginterrupt; sigisemptyset;
- sigismember; siglongjmp; signal; sigorset; sigpause; sigpending;
- sigprocmask; sigreturn; sigsetmask; sigstack; sigsuspend; sigvec;
- sigwait; ssignal;
- }
- GLIBC_2.1 {
- # helper functions
- __libc_current_sigrtmin; __libc_current_sigrtmax; __libc_allocate_rtsig;
-
- # s*
- sighold; sigrelse; sigignore; sigset; sysv_signal;
-
- # New RT signal functions.
- sigqueue; sigtimedwait; sigwaitinfo;
- }
- GLIBC_2.1.3 {
- # LinuxThreads needs this entry point.
- __sigsuspend;
- }
- GLIBC_2.2 {
- # Needed to provide a pointer to the XPG sigpause function.
- __xpg_sigpause;
- }
- GLIBC_2.21 {
- }
-}
diff --git a/signal/allocrtsig.c b/signal/allocrtsig.c
deleted file mode 100644
index d2a4687d68..0000000000
--- a/signal/allocrtsig.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Handle real-time signal allocation. Generic version.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <signal.h>
-
-/* Another sysdeps file can #define this and then #include this file. */
-#ifndef RESERVED_SIGRT
-# define RESERVED_SIGRT 0
-#endif
-
-/* In these variables we keep track of the used variables. If the
- platform does not support any real-time signals we will define the
- values to some unreasonable value which will signal failing of all
- the functions below. */
-#ifdef __SIGRTMIN
-static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT;
-static int current_rtmax = __SIGRTMAX;
-#endif
-
-/* Return number of available real-time signal with highest priority. */
-int
-__libc_current_sigrtmin (void)
-{
-#ifdef __SIGRTMIN
- return current_rtmin;
-#else
- return -1;
-#endif
-}
-libc_hidden_def (__libc_current_sigrtmin)
-strong_alias (__libc_current_sigrtmin, __libc_current_sigrtmin_private)
-
-/* Return number of available real-time signal with lowest priority. */
-int
-__libc_current_sigrtmax (void)
-{
-#ifdef __SIGRTMIN
- return current_rtmax;
-#else
- return -1;
-#endif
-}
-libc_hidden_def (__libc_current_sigrtmax)
-strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private)
-
-/* Allocate real-time signal with highest/lowest available
- priority. Please note that we don't use a lock since we assume
- this function to be called at program start. */
-int
-__libc_allocate_rtsig (int high)
-{
-#ifndef __SIGRTMIN
- return -1;
-#else
- if (current_rtmin == -1 || current_rtmin > current_rtmax)
- /* We don't have any more signals available. */
- return -1;
-
- return high ? current_rtmin++ : current_rtmax--;
-#endif
-}
-strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private)
diff --git a/signal/bits/types/sig_atomic_t.h b/signal/bits/types/sig_atomic_t.h
deleted file mode 100644
index 47eaa28311..0000000000
--- a/signal/bits/types/sig_atomic_t.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __sig_atomic_t_defined
-#define __sig_atomic_t_defined 1
-
-#include <bits/types.h>
-
-/* An integral type that can be modified atomically, without the
- possibility of a signal arriving in the middle of the operation. */
-typedef __sig_atomic_t sig_atomic_t;
-
-#endif
diff --git a/signal/bits/types/sigset_t.h b/signal/bits/types/sigset_t.h
deleted file mode 100644
index 8b27e9112d..0000000000
--- a/signal/bits/types/sigset_t.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __sigset_t_defined
-#define __sigset_t_defined 1
-
-#include <bits/types/__sigset_t.h>
-
-/* A set of signals to be blocked, unblocked, or waited for. */
-typedef __sigset_t sigset_t;
-
-#endif
diff --git a/signal/bits/types/sigval_t.h b/signal/bits/types/sigval_t.h
deleted file mode 100644
index 666598f0ca..0000000000
--- a/signal/bits/types/sigval_t.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __sigval_t_defined
-#define __sigval_t_defined
-
-/* Type for data associated with a signal. */
-union sigval
-{
- int sival_int;
- void *sival_ptr;
-};
-
-typedef union sigval sigval_t;
-
-#endif
diff --git a/signal/bits/types/struct_sigstack.h b/signal/bits/types/struct_sigstack.h
deleted file mode 100644
index 5e93ce0091..0000000000
--- a/signal/bits/types/struct_sigstack.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Define struct sigstack.
- Copyright (C) 1998-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef __sigstack_defined
-#define __sigstack_defined 1
-
-/* Structure describing a signal stack (obsolete). */
-struct sigstack
- {
- void *ss_sp; /* Signal stack pointer. */
- int ss_onstack; /* Nonzero if executing on this stack. */
- };
-
-#endif
diff --git a/signal/kill.c b/signal/kill.c
deleted file mode 100644
index c7591b10c1..0000000000
--- a/signal/kill.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* Send signal SIG to process number PID. If PID is zero,
- send SIG to all processes in the current process's process group.
- If PID is < -1, send SIG to all processes in process group - PID. */
-int
-__kill (int pid, int sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (kill)
-
-weak_alias (__kill, kill)
diff --git a/signal/killpg.c b/signal/killpg.c
deleted file mode 100644
index 866f5f6715..0000000000
--- a/signal/killpg.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* Send SIG to all processes in process group PGRP.
- If PGRP is zero, send SIG to all processes in
- the current process's process group. */
-int
-killpg (__pid_t pgrp, int sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (killpg)
diff --git a/signal/raise.c b/signal/raise.c
deleted file mode 100644
index 837957aeaf..0000000000
--- a/signal/raise.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <signal.h>
-#include <errno.h>
-
-/* Raise the signal SIG. */
-int
-raise (int sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-weak_alias (raise, gsignal)
-
-stub_warning (raise)
-stub_warning (gsignal)
diff --git a/signal/sigaction.c b/signal/sigaction.c
deleted file mode 100644
index 8a6220ced3..0000000000
--- a/signal/sigaction.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* 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
-__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
-{
- if (sig <= 0 || sig >= NSIG)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __set_errno (ENOSYS);
- return -1;
-}
-libc_hidden_def (__sigaction)
-stub_warning (sigaction)
-
-weak_alias (__sigaction, sigaction)
diff --git a/signal/sigaddset.c b/signal/sigaddset.c
deleted file mode 100644
index 161be7b352..0000000000
--- a/signal/sigaddset.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sigsetops.h>
-
-/* Add SIGNO to SET. */
-int
-sigaddset (sigset_t *set, int signo)
-{
- if (set == NULL || signo <= 0 || signo >= NSIG)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __sigaddset (set, signo);
- return 0;
-}
-libc_hidden_def (sigaddset)
diff --git a/signal/sigaltstack.c b/signal/sigaltstack.c
deleted file mode 100644
index b70afa7127..0000000000
--- a/signal/sigaltstack.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1992-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-/* Run signals handlers on the stack specified by SS (if not NULL).
- If OSS is not NULL, it is filled in with the old signal stack status. */
-int
-sigaltstack (const stack_t *ss, stack_t *oss)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (sigaltstack)
diff --git a/signal/sigandset.c b/signal/sigandset.c
deleted file mode 100644
index ffea141c63..0000000000
--- a/signal/sigandset.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sigsetops.h>
-
-/* Combine sets LEFT and RIGHT by logical AND and place result in DEST. */
-int
-sigandset (sigset_t *dest, const sigset_t *left, const sigset_t *right)
-{
- if (!dest || !left || !right)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __sigandset (dest, left, right);
- return 0;
-}
diff --git a/signal/sigblock.c b/signal/sigblock.c
deleted file mode 100644
index a8be9dbde9..0000000000
--- a/signal/sigblock.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-/* Block signals in MASK, returning the old mask. */
-int
-__sigblock (int mask)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (sigblock)
-
-weak_alias (__sigblock, sigblock)
diff --git a/signal/sigdelset.c b/signal/sigdelset.c
deleted file mode 100644
index 2aaa536937..0000000000
--- a/signal/sigdelset.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sigsetops.h>
-
-/* Add SIGNO to SET. */
-int
-sigdelset (sigset_t *set, int signo)
-{
- if (set == NULL || signo <= 0 || signo >= NSIG)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __sigdelset (set, signo);
- return 0;
-}
-libc_hidden_def (sigdelset)
diff --git a/signal/sigempty.c b/signal/sigempty.c
deleted file mode 100644
index 1e4b8ca380..0000000000
--- a/signal/sigempty.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-
-/* Clear all signals from SET. */
-int
-sigemptyset (sigset_t *set)
-{
- if (set == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- memset (set, 0, sizeof (sigset_t));
-
- return 0;
-}
-libc_hidden_def (sigemptyset)
diff --git a/signal/sigfillset.c b/signal/sigfillset.c
deleted file mode 100644
index 0fcc24a705..0000000000
--- a/signal/sigfillset.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-
-/* Set all signals in SET. */
-int
-sigfillset (sigset_t *set)
-{
- if (set == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- memset (set, 0xff, sizeof (sigset_t));
-
- /* If the implementation uses a cancellation signal don't set the bit. */
-#ifdef SIGCANCEL
- __sigdelset (set, SIGCANCEL);
-#endif
- /* Likewise for the signal to implement setxid. */
-#ifdef SIGSETXID
- __sigdelset (set, SIGSETXID);
-#endif
-
- return 0;
-}
-libc_hidden_def (sigfillset)
diff --git a/signal/siggetmask.c b/signal/siggetmask.c
deleted file mode 100644
index 6a76df6387..0000000000
--- a/signal/siggetmask.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* siggetmask -- useless alias for `sigblock (0)' for old Linux compatibility.
- Copyright (C) 1996-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <signal.h>
-
-int
-siggetmask (void)
-{
- return __sigblock (0);
-}
-
-link_warning (siggetmask,
- "warning: `siggetmask' is obsolete; `sigprocmask' is best")
diff --git a/signal/sighold.c b/signal/sighold.c
deleted file mode 100644
index 2e32e4718a..0000000000
--- a/signal/sighold.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Add SIG to the calling process' signal mask.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#define __need_NULL
-#include <stddef.h>
-#include <signal.h>
-
-int
-sighold (int sig)
-{
- sigset_t set;
-
- /* Retrieve current signal set. */
- if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0)
- return -1;
-
- /* Add the specified signal. */
- if (sigaddset (&set, sig) < 0)
- return -1;
-
- /* Set the new mask. */
- return __sigprocmask (SIG_SETMASK, &set, NULL);
-}
diff --git a/signal/sigignore.c b/signal/sigignore.c
deleted file mode 100644
index e9e9d054f0..0000000000
--- a/signal/sigignore.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1998-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* Set the disposition for SIG to SIG_IGN. */
-int
-sigignore (int sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (sigignore)
diff --git a/signal/sigintr.c b/signal/sigintr.c
deleted file mode 100644
index 39b1100097..0000000000
--- a/signal/sigintr.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1992-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
- (causing them to fail with EINTR); if INTERRUPT is zero, make system
- calls be restarted after signal SIG. */
-int
-siginterrupt (int sig, int interrupt)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (siginterrupt)
diff --git a/signal/sigisempty.c b/signal/sigisempty.c
deleted file mode 100644
index bea03f1216..0000000000
--- a/signal/sigisempty.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sigsetops.h>
-
-/* Test whether SET is empty. */
-int
-sigisemptyset (const sigset_t *set)
-{
- if (!set)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- return __sigisemptyset (set);
-}
diff --git a/signal/sigismem.c b/signal/sigismem.c
deleted file mode 100644
index 6ef4a4d19d..0000000000
--- a/signal/sigismem.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sigsetops.h>
-
-/* Return 1 if SIGNO is in SET, 0 if not. */
-int
-sigismember (const sigset_t *set, int signo)
-{
- if (set == NULL || signo <= 0 || signo >= NSIG)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- return __sigismember (set, signo);
-}
-libc_hidden_def (sigismember)
diff --git a/signal/signal.c b/signal/signal.c
deleted file mode 100644
index 9e541e3030..0000000000
--- a/signal/signal.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* Set the handler for the signal SIG to HANDLER,
- returning the old handler, or SIG_ERR on error. */
-__sighandler_t
-signal (int sig, __sighandler_t handler)
-{
- __set_errno (ENOSYS);
- return SIG_ERR;
-}
-
-weak_alias (signal, ssignal)
-
-stub_warning (signal)
-stub_warning (ssignal)
diff --git a/signal/signal.h b/signal/signal.h
deleted file mode 100644
index b3114736a5..0000000000
--- a/signal/signal.h
+++ /dev/null
@@ -1,364 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-/*
- * ISO C99 Standard: 7.14 Signal handling <signal.h>
- */
-
-#ifndef _SIGNAL_H
-#define _SIGNAL_H
-
-#include <features.h>
-
-__BEGIN_DECLS
-
-#include <bits/types.h>
-#include <bits/signum.h>
-
-#include <bits/types/sig_atomic_t.h>
-
-#if defined __USE_POSIX
-#include <bits/types/sigset_t.h>
-#endif
-
-#if defined __USE_XOPEN || defined __USE_XOPEN2K
-# ifndef __pid_t_defined
-typedef __pid_t pid_t;
-# define __pid_t_defined
-#endif
-#ifdef __USE_XOPEN
-# endif
-# ifndef __uid_t_defined
-typedef __uid_t uid_t;
-# define __uid_t_defined
-# endif
-#endif /* Unix98 */
-
-#ifdef __USE_POSIX199309
-/* We need `struct timespec' later on. */
-# include <bits/types/struct_timespec.h>
-#endif
-
-#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
-# include <bits/types/siginfo_t.h>
-# include <bits/siginfo-consts.h>
-#endif
-
-#ifdef __USE_POSIX199309
-# include <bits/types/sigevent_t.h>
-# include <bits/sigevent-consts.h>
-#endif
-
-
-/* Type of a signal handler. */
-typedef void (*__sighandler_t) (int);
-
-/* The X/Open definition of `signal' specifies the SVID semantic. Use
- the additional function `sysv_signal' when X/Open compatibility is
- requested. */
-extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
- __THROW;
-#ifdef __USE_GNU
-extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
- __THROW;
-#endif
-
-/* Set the handler for the signal SIG to HANDLER, returning the old
- handler, or SIG_ERR on error.
- By default `signal' has the BSD semantic. */
-#ifdef __USE_MISC
-extern __sighandler_t signal (int __sig, __sighandler_t __handler)
- __THROW;
-#else
-/* Make sure the used `signal' implementation is the SVID version. */
-# ifdef __REDIRECT_NTH
-extern __sighandler_t __REDIRECT_NTH (signal,
- (int __sig, __sighandler_t __handler),
- __sysv_signal);
-# else
-# define signal __sysv_signal
-# endif
-#endif
-
-#if defined __USE_XOPEN && !defined __USE_XOPEN2K8
-/* The X/Open definition of `signal' conflicts with the BSD version.
- So they defined another function `bsd_signal'. */
-extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
- __THROW;
-#endif
-
-/* Send signal SIG to process number PID. If PID is zero,
- send SIG to all processes in the current process's process group.
- If PID is < -1, send SIG to all processes in process group - PID. */
-#ifdef __USE_POSIX
-extern int kill (__pid_t __pid, int __sig) __THROW;
-#endif /* Use POSIX. */
-
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-/* Send SIG to all processes in process group PGRP.
- If PGRP is zero, send SIG to all processes in
- the current process's process group. */
-extern int killpg (__pid_t __pgrp, int __sig) __THROW;
-#endif /* Use misc || X/Open Unix. */
-
-/* Raise signal SIG, i.e., send SIG to yourself. */
-extern int raise (int __sig) __THROW;
-
-#ifdef __USE_MISC
-/* SVID names for the same things. */
-extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
- __THROW;
-extern int gsignal (int __sig) __THROW;
-#endif /* Use misc. */
-
-#ifdef __USE_XOPEN2K8
-/* Print a message describing the meaning of the given signal number. */
-extern void psignal (int __sig, const char *__s);
-
-/* Print a message describing the meaning of the given signal information. */
-extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
-#endif /* POSIX 2008. */
-
-
-
-/* The `sigpause' function in X/Open defines the argument as the
- signal number. This requires redirecting to another function
- because the default version in glibc uses an old BSD interface.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-
-#ifdef __USE_XOPEN
-# ifdef __GNUC__
-extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
-# else
-extern int __sigpause (int __sig_or_mask, int __is_sig);
-/* Remove a signal from the signal mask and suspend the process. */
-# define sigpause(sig) __sigpause ((sig), 1)
-# endif
-#endif
-
-
-#ifdef __USE_MISC
-/* None of the following functions should be used anymore. They are here
- only for compatibility. A single word (`int') is not guaranteed to be
- enough to hold a complete signal mask and therefore these functions
- simply do not work in many situations. Use `sigprocmask' instead. */
-
-/* Compute mask for signal SIG. */
-# define sigmask(sig) ((int)(1u << ((sig) - 1)))
-
-/* Block signals in MASK, returning the old mask. */
-extern int sigblock (int __mask) __THROW __attribute_deprecated__;
-
-/* Set the mask of blocked signals to MASK, returning the old mask. */
-extern int sigsetmask (int __mask) __THROW __attribute_deprecated__;
-
-/* Return currently selected signal mask. */
-extern int siggetmask (void) __THROW __attribute_deprecated__;
-#endif /* Use misc. */
-
-
-#ifdef __USE_MISC
-# define NSIG _NSIG
-#endif
-
-#ifdef __USE_GNU
-typedef __sighandler_t sighandler_t;
-#endif
-
-/* 4.4 BSD uses the name `sig_t' for this. */
-#ifdef __USE_MISC
-typedef __sighandler_t sig_t;
-#endif
-
-#ifdef __USE_POSIX
-
-/* Clear all signals from SET. */
-extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
-
-/* Set all signals in SET. */
-extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
-
-/* Add SIGNO to SET. */
-extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
-
-/* Remove SIGNO from SET. */
-extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
-
-/* Return 1 if SIGNO is in SET, 0 if not. */
-extern int sigismember (const sigset_t *__set, int __signo)
- __THROW __nonnull ((1));
-
-# ifdef __USE_GNU
-/* Return non-empty value is SET is not empty. */
-extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1));
-
-/* Build new signal set by combining the two inputs set using logical AND. */
-extern int sigandset (sigset_t *__set, const sigset_t *__left,
- const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
-
-/* Build new signal set by combining the two inputs set using logical OR. */
-extern int sigorset (sigset_t *__set, const sigset_t *__left,
- const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
-# endif /* GNU */
-
-/* Get the system-specific definitions of `struct sigaction'
- and the `SA_*' and `SIG_*'. constants. */
-# include <bits/sigaction.h>
-
-/* Get and/or change the set of blocked signals. */
-extern int sigprocmask (int __how, const sigset_t *__restrict __set,
- sigset_t *__restrict __oset) __THROW;
-
-/* Change the set of blocked signals to SET,
- wait until a signal arrives, and restore the set of blocked signals.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int sigsuspend (const sigset_t *__set) __nonnull ((1));
-
-/* Get and/or set the action for signal SIG. */
-extern int sigaction (int __sig, const struct sigaction *__restrict __act,
- struct sigaction *__restrict __oact) __THROW;
-
-/* Put in SET all signals that are blocked and waiting to be delivered. */
-extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
-
-
-/* Select any of pending signals from SET or wait for any to arrive.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
- __nonnull ((1, 2));
-
-# ifdef __USE_POSIX199309
-/* Select any of pending signals from SET and place information in INFO.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int sigwaitinfo (const sigset_t *__restrict __set,
- siginfo_t *__restrict __info) __nonnull ((1));
-
-/* Select any of pending signals from SET and place information in INFO.
- Wait the time specified by TIMEOUT if no signal is pending.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int sigtimedwait (const sigset_t *__restrict __set,
- siginfo_t *__restrict __info,
- const struct timespec *__restrict __timeout)
- __nonnull ((1));
-
-/* Send signal SIG to the process PID. Associate data in VAL with the
- signal. */
-extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
- __THROW;
-# endif /* Use POSIX 199306. */
-
-#endif /* Use POSIX. */
-
-#ifdef __USE_MISC
-
-/* Names of the signals. This variable exists only for compatibility.
- Use `strsignal' instead (see <string.h>). */
-extern const char *const _sys_siglist[_NSIG];
-extern const char *const sys_siglist[_NSIG];
-
-
-/* Get machine-dependent `struct sigcontext' and signal subcodes. */
-# include <bits/sigcontext.h>
-
-/* Restore the state saved in SCP. */
-extern int sigreturn (struct sigcontext *__scp) __THROW;
-
-#endif /* Use misc. */
-
-
-#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
-# define __need_size_t
-# include <stddef.h>
-
-/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
- (causing them to fail with EINTR); if INTERRUPT is zero, make system
- calls be restarted after signal SIG. */
-extern int siginterrupt (int __sig, int __interrupt) __THROW;
-
-# include <bits/sigstack.h>
-# include <bits/types/stack_t.h>
-# include <bits/ss_flags.h>
-# if defined __USE_XOPEN || defined __USE_XOPEN2K8
-/* This will define `ucontext_t' and `mcontext_t'. */
-# include <sys/ucontext.h>
-# endif
-
-/* Alternate signal handler stack interface.
- This interface should always be preferred over `sigstack'. */
-extern int sigaltstack (const stack_t *__restrict __ss,
- stack_t *__restrict __oss) __THROW;
-
-#endif /* Use POSIX.1-2008 or X/Open Unix. */
-
-#if ((defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
- || defined __USE_MISC)
-# include <bits/types/struct_sigstack.h>
-#endif
-
-#if ((defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
- || defined __USE_MISC)
-/* Run signals handlers on the stack specified by SS (if not NULL).
- If OSS is not NULL, it is filled in with the old signal stack status.
- This interface is obsolete and on many platform not implemented. */
-extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
- __THROW __attribute_deprecated__;
-#endif
-
-#ifdef __USE_XOPEN_EXTENDED
-/* Simplified interface for signal management. */
-
-/* Add SIG to the calling process' signal mask. */
-extern int sighold (int __sig) __THROW;
-
-/* Remove SIG from the calling process' signal mask. */
-extern int sigrelse (int __sig) __THROW;
-
-/* Set the disposition of SIG to SIG_IGN. */
-extern int sigignore (int __sig) __THROW;
-
-/* Set the disposition of SIG. */
-extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
-#endif
-
-#if defined __USE_POSIX199506 || defined __USE_UNIX98
-/* Some of the functions for handling signals in threaded programs must
- be defined here. */
-# include <bits/pthreadtypes.h>
-# include <bits/sigthread.h>
-#endif /* use Unix98 */
-
-/* The following functions are used internally in the C library and in
- other code which need deep insights. */
-
-/* Return number of available real-time signal with highest priority. */
-extern int __libc_current_sigrtmin (void) __THROW;
-/* Return number of available real-time signal with lowest priority. */
-extern int __libc_current_sigrtmax (void) __THROW;
-
-__END_DECLS
-
-#endif /* not signal.h */
diff --git a/signal/sigorset.c b/signal/sigorset.c
deleted file mode 100644
index 8a586db6b5..0000000000
--- a/signal/sigorset.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sigsetops.h>
-
-/* Combine sets LEFT and RIGHT by logical OR and place result in DEST. */
-int
-sigorset (sigset_t *dest, const sigset_t *left, const sigset_t *right)
-{
- if (!dest || !left || !right)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __sigorset (dest, left, right);
- return 0;
-}
diff --git a/signal/sigpause.c b/signal/sigpause.c
deleted file mode 100644
index b3b155f57e..0000000000
--- a/signal/sigpause.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#define sigpause __rename_sigpause
-#include <errno.h>
-#include <signal.h>
-#undef sigpause
-
-int
-__sigpause (int sig_or_mask, int is_sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (__sigpause)
-libc_hidden_def (__sigpause)
-
-int
-__attribute__ ((weak))
-__default_sigpause (int mask)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-weak_alias (__default_sigpause, sigpause)
-stub_warning (sigpause)
-
-
-int
-__attribute ((weak))
-__xpg___sigpause (int sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
diff --git a/signal/sigpending.c b/signal/sigpending.c
deleted file mode 100644
index 1814175a2c..0000000000
--- a/signal/sigpending.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <signal.h>
-
-
-/* Store in SET all signals that are blocked and pending. */
-int
-sigpending (sigset_t *set)
-{
- if (set == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (sigpending)
diff --git a/signal/sigprocmask.c b/signal/sigprocmask.c
deleted file mode 100644
index afcf5a116e..0000000000
--- a/signal/sigprocmask.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* If SET is not NULL, modify the current set of blocked signals
- according to HOW, which may be SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK.
- If OSET is not NULL, store the old set of blocked signals in *OSET. */
-int
-__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
-{
- switch (how)
- {
- case SIG_BLOCK:
- case SIG_UNBLOCK:
- case SIG_SETMASK:
- break;
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- __set_errno (ENOSYS);
- return -1;
-}
-
-/* No stub warning because abort calls __sigprocmask,
- and we don't want warnings for every use of abort on
- a system without safe signals. */
-
-weak_alias (__sigprocmask, sigprocmask)
diff --git a/signal/sigqueue.c b/signal/sigqueue.c
deleted file mode 100644
index 0487acecd7..0000000000
--- a/signal/sigqueue.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Implementation of sigqueue function from POSIX.1b.
- Copyright (C) 1997-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-
-int
-__sigqueue (pid_t pid, int sig, const union sigval val)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-weak_alias (__sigqueue, sigqueue)
-
-stub_warning (sigqueue)
diff --git a/signal/sigrelse.c b/signal/sigrelse.c
deleted file mode 100644
index e41c2bd261..0000000000
--- a/signal/sigrelse.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Remove SIG from the calling process' signal mask.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#define __need_NULL
-#include <stddef.h>
-#include <signal.h>
-
-int
-sigrelse (int sig)
-{
- sigset_t set;
-
- /* Retrieve current signal set. */
- if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0)
- return -1;
-
- /* Remove the specified signal. */
- if (sigdelset (&set, sig) < 0)
- return -1;
-
- /* Set the new mask. */
- return __sigprocmask (SIG_SETMASK, &set, NULL);
-}
diff --git a/signal/sigreturn.c b/signal/sigreturn.c
deleted file mode 100644
index 3acad4a81f..0000000000
--- a/signal/sigreturn.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1992-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <signal.h>
-#include <errno.h>
-
-int
-__sigreturn (struct sigcontext *context)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (sigreturn)
-
-weak_alias (__sigreturn, sigreturn)
diff --git a/signal/sigset.c b/signal/sigset.c
deleted file mode 100644
index 6ad2cc1fa2..0000000000
--- a/signal/sigset.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1998-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* Set the disposition for SIG. */
-__sighandler_t
-sigset (int sig, __sighandler_t disp)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (sigset)
diff --git a/signal/sigsetmask.c b/signal/sigsetmask.c
deleted file mode 100644
index 18321438b7..0000000000
--- a/signal/sigsetmask.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-int
-__sigsetmask (int mask)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (sigsetmask)
-
-weak_alias (__sigsetmask, sigsetmask)
diff --git a/signal/sigsetops.c b/signal/sigsetops.c
deleted file mode 100644
index d56412f94b..0000000000
--- a/signal/sigsetops.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Compatibility symbols for old versions of signal.h.
- Copyright (C) 2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <signal.h>
-#include <sigsetops.h>
-#include <shlib-compat.h>
-
-/* These were formerly defined by <signal.h> as inline functions,
- so they require out-of-line compatibility definitions. */
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_26)
-
-int
-attribute_compat_text_section
-(__sigismember) (const __sigset_t *set, int sig)
-{
- return __sigismember (set, sig);
-}
-compat_symbol (libc, __sigismember, __sigismember, GLIBC_2_0);
-
-int
-attribute_compat_text_section
-(__sigaddset) (__sigset_t *set, int sig)
-{
- __sigaddset (set, sig);
- return 0;
-}
-compat_symbol (libc, __sigaddset, __sigaddset, GLIBC_2_0);
-
-int
-attribute_compat_text_section
-(__sigdelset) (__sigset_t *set, int sig)
-{
- __sigdelset (set, sig);
- return 0;
-}
-compat_symbol (libc, __sigdelset, __sigdelset, GLIBC_2_0);
-
-#endif
diff --git a/signal/sigstack.c b/signal/sigstack.c
deleted file mode 100644
index ca5046bff7..0000000000
--- a/signal/sigstack.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-/* Run signals handlers on the stack specified by SS (if not NULL).
- If OSS is not NULL, it is filled in with the old signal stack status. */
-int
-sigstack (struct sigstack *ss, struct sigstack *oss)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (sigstack)
diff --git a/signal/sigsuspend.c b/signal/sigsuspend.c
deleted file mode 100644
index f80d7998a1..0000000000
--- a/signal/sigsuspend.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-
-/* Change the set of blocked signals to SET,
- wait until a signal arrives, and restore the set of blocked signals. */
-int
-__sigsuspend (const sigset_t *set)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-libc_hidden_def (__sigsuspend)
-weak_alias (__sigsuspend, sigsuspend)
-
-stub_warning (sigsuspend)
-stub_warning (__sigsuspend)
diff --git a/signal/sigtimedwait.c b/signal/sigtimedwait.c
deleted file mode 100644
index 3b42003e26..0000000000
--- a/signal/sigtimedwait.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Implementation of sigtimedwait function from POSIX.1b.
- Copyright (C) 1997-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-int
-__sigtimedwait (const sigset_t *set, siginfo_t *info,
- const struct timespec *timeout)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-libc_hidden_def (__sigtimedwait)
-weak_alias (__sigtimedwait, sigtimedwait)
-
-stub_warning (sigtimedwait)
diff --git a/signal/sigvec.c b/signal/sigvec.c
deleted file mode 100644
index 5313002089..0000000000
--- a/signal/sigvec.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* ABI compatibility for obsolete sigvec function from 4.2BSD.
- Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_21)
-
-# include <signal.h>
-# include <errno.h>
-# include <stddef.h>
-
-
-/* These are the struct sigvec and SV_* bit definitions that
- used to be in <signal.h>. The whole interface now exists
- solely for ABI compatibility, so it can just be here. */
-struct sigvec
- {
- __sighandler_t sv_handler; /* Signal handler. */
- int sv_mask; /* Mask of signals to be blocked. */
-
- int sv_flags; /* Flags (see below). */
- };
-# define SV_ONSTACK (1 << 0)/* Take the signal on the signal stack. */
-# define SV_INTERRUPT (1 << 1)/* Do not restart system calls. */
-# define SV_RESETHAND (1 << 2)/* Reset handler to SIG_DFL on receipt. */
-
-
-/* Include macros to convert between `sigset_t' and old-style mask. */
-# include <sigset-cvt-mask.h>
-
-# ifndef SA_RESETHAND
-/* When sigaction lacks the extension bit for it,
- we use a wrapper handler to support SV_RESETHAND. */
-struct sigvec_wrapper_data
-{
- __sighandler_t sw_handler;
- unsigned int sw_mask;
-};
-
-static void sigvec_wrapper_handler (int sig) __THROW;
-
-static struct sigvec_wrapper_data sigvec_wrapper_data[NSIG];
-# endif
-
-
-/* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member
- of VEC. The signals in `sv_mask' will be blocked while the handler runs.
- If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
- reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
- it is filled in with the old information for SIG. */
-int
-__sigvec (int sig,
- const struct sigvec *vec,
- struct sigvec *ovec)
-{
- struct sigaction old;
-
-# ifndef SA_RESETHAND
- if (vec == NULL || !(vec->sv_flags & SV_RESETHAND))
-# endif
- {
- struct sigaction new, *n;
-
- if (vec == NULL)
- n = NULL;
- else
- {
- __sighandler_t handler;
- unsigned int mask;
- unsigned int sv_flags;
- unsigned int sa_flags;
-
- handler = vec->sv_handler;
- mask = vec->sv_mask;
- sv_flags = vec->sv_flags;
- sa_flags = 0;
- if (sv_flags & SV_ONSTACK)
- {
-# ifdef SA_ONSTACK
- sa_flags |= SA_ONSTACK;
-# else
- __set_errno (ENOSYS);
- return -1;
-# endif
- }
-# ifdef SA_RESTART
- if (!(sv_flags & SV_INTERRUPT))
- sa_flags |= SA_RESTART;
-# endif
-# ifdef SA_RESETHAND
- if (sv_flags & SV_RESETHAND)
- sa_flags |= SA_RESETHAND;
-# endif
- n = &new;
- new.sa_handler = handler;
- if (sigset_set_old_mask (&new.sa_mask, mask) < 0)
- return -1;
- new.sa_flags = sa_flags;
- }
-
- if (__sigaction (sig, n, &old) < 0)
- return -1;
- }
-# ifndef SA_RESETHAND
- else
- {
- __sighandler_t handler;
- unsigned int mask;
- struct sigvec_wrapper_data *data;
- struct sigaction wrapper;
-
- handler = vec->sv_handler;
- mask = (unsigned int)vec->sv_mask;
- data = &sigvec_wrapper_data[sig];
- wrapper.sa_handler = sigvec_wrapper_handler;
- /* FIXME: should we set wrapper.sa_mask, wrapper.sa_flags?? */
- data->sw_handler = handler;
- data->sw_mask = mask;
-
- if (__sigaction (sig, &wrapper, &old) < 0)
- return -1;
- }
-# endif
-
- if (ovec != NULL)
- {
- __sighandler_t handler;
- unsigned int sv_flags;
- unsigned int sa_flags;
- unsigned int mask;
-
- handler = old.sa_handler;
- sv_flags = 0;
- sa_flags = old.sa_flags;
-# ifndef SA_RESETHAND
- if (handler == sigvec_wrapper_handler)
- {
- handler = sigvec_wrapper_data[sig].sw_handler;
- /* should we use data->sw_mask?? */
- sv_flags |= SV_RESETHAND;
- }
-# else
- if (sa_flags & SA_RESETHAND)
- sv_flags |= SV_RESETHAND;
-# endif
- mask = sigset_get_old_mask (&old.sa_mask);
-# ifdef SA_ONSTACK
- if (sa_flags & SA_ONSTACK)
- sv_flags |= SV_ONSTACK;
-# endif
-# ifdef SA_RESTART
- if (!(sa_flags & SA_RESTART))
-# endif
- sv_flags |= SV_INTERRUPT;
- ovec->sv_handler = handler;
- ovec->sv_mask = (int)mask;
- ovec->sv_flags = (int)sv_flags;
- }
-
- return 0;
-}
-
-compat_symbol (libc, __sigvec, sigvec, GLIBC_2_0);
-
-# ifndef SA_RESETHAND
-static void
-sigvec_wrapper_handler (int sig)
-{
- struct sigvec_wrapper_data *data;
- struct sigaction act;
- int save;
- __sighandler_t handler;
-
- data = &sigvec_wrapper_data[sig];
- act.sa_handler = SIG_DFL;
- act.sa_flags = 0;
- sigset_set_old_mask (&act.sa_mask, data->sw_mask);
- handler = data->sw_handler;
- save = errno;
- (void) __sigaction (sig, &act, (struct sigaction *) NULL);
- __set_errno (save);
-
- (*handler) (sig);
-}
-# endif /* No SA_RESETHAND. */
-
-#endif /* SHLIB_COMPAT */
diff --git a/signal/sigwait.c b/signal/sigwait.c
deleted file mode 100644
index da74c0e3b1..0000000000
--- a/signal/sigwait.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* sigwait - implementation of sigwait function from POSIX.1c.
- Copyright (C) 1996-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-int
-__sigwait (const sigset_t *set, int *sig)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-weak_alias (__sigwait, sigwait)
-
-stub_warning (sigwait)
diff --git a/signal/sigwaitinfo.c b/signal/sigwaitinfo.c
deleted file mode 100644
index 2375e06d75..0000000000
--- a/signal/sigwaitinfo.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Implementation of sigwaitinfo function from POSIX.1b.
- Copyright (C) 1997-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-int
-__sigwaitinfo (const sigset_t *set, siginfo_t *info)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-libc_hidden_def (__sigwaitinfo)
-weak_alias (__sigwaitinfo, sigwaitinfo)
-
-stub_warning (sigwaitinfo)
diff --git a/signal/sys/signal.h b/signal/sys/signal.h
deleted file mode 100644
index 2e602dad89..0000000000
--- a/signal/sys/signal.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <signal.h>
diff --git a/signal/sysv_signal.c b/signal/sysv_signal.c
deleted file mode 100644
index 04de2cf9ab..0000000000
--- a/signal/sysv_signal.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1991-2017 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
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-
-/* Set the handler for the signal SIG to HANDLER,
- returning the old handler, or SIG_ERR on error. */
-__sighandler_t
-__sysv_signal (int sig, __sighandler_t handler)
-{
- /* Check signal extents to protect __sigismember. */
- if (handler == SIG_ERR || sig < 1 || sig >= NSIG)
- {
- __set_errno (EINVAL);
- return SIG_ERR;
- }
-
- __set_errno (ENOSYS);
-
- return SIG_ERR;
-}
-weak_alias (__sysv_signal, sysv_signal)
-
-stub_warning (sysv_signal)
diff --git a/signal/tst-raise.c b/signal/tst-raise.c
deleted file mode 100644
index 5d540b8cef..0000000000
--- a/signal/tst-raise.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (C) 2003-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <error.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-volatile int count;
-
-void
-sh (int sig)
-{
- ++count;
-}
-
-int
-main (void)
-{
- struct sigaction sa;
- sa.sa_handler = sh;
- sigemptyset (&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction (SIGUSR1, &sa, NULL) < 0)
- {
- printf ("sigaction failed: %m\n");
- exit (1);
- }
- if (raise (SIGUSR1) < 0)
- {
- printf ("first raise failed: %m\n");
- exit (1);
- }
- if (raise (SIGUSR1) < 0)
- {
- printf ("second raise failed: %m\n");
- exit (1);
- }
- if (count != 2)
- {
- printf ("signal handler not called 2 times\n");
- exit (1);
- }
- exit (0);
-}
diff --git a/signal/tst-signal.c b/signal/tst-signal.c
deleted file mode 100644
index 6d3178792a..0000000000
--- a/signal/tst-signal.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int win = 0;
-
-static void
-handler (int sig)
-{
- printf ("Received signal %d (%s).\n", sig, strsignal(sig));
- win = 1;
-}
-
-int
-main (void)
-{
- if (signal (SIGTERM, handler) == SIG_ERR)
- {
- perror ("signal: SIGTERM");
- exit (EXIT_FAILURE);
- }
-
- puts ("Set handler.");
-
- printf ("Sending myself signal %d.\n", SIGTERM);
- fflush (stdout);
-
- if (raise (SIGTERM) < 0)
- {
- perror ("raise: SIGTERM");
- exit (EXIT_FAILURE);
- }
-
- if (!win)
- {
- puts ("Didn't get any signal. Test FAILED!");
- exit (EXIT_FAILURE);
- }
-
- puts ("Got a signal. Test succeeded.");
-
- return EXIT_SUCCESS;
-}
diff --git a/signal/tst-sigset.c b/signal/tst-sigset.c
deleted file mode 100644
index d47adcc0d4..0000000000
--- a/signal/tst-sigset.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Test sig*set functions. */
-
-#include <signal.h>
-#include <stdio.h>
-
-#define TEST_FUNCTION do_test ()
-static int
-do_test (void)
-{
- int result = 0;
- int sig = -1;
-
-#define TRY(call) \
- if (call) \
- { \
- printf ("%s (sig = %d): %m\n", #call, sig); \
- result = 1; \
- } \
- else
-
-
- sigset_t set;
- TRY (sigemptyset (&set) != 0);
-
-#ifdef SIGRTMAX
- int max_sig = SIGRTMAX;
-#else
- int max_sig = NSIG - 1;
-#endif
-
- for (sig = 1; sig <= max_sig; ++sig)
- {
- TRY (sigismember (&set, sig) != 0);
- TRY (sigaddset (&set, sig) != 0);
- TRY (sigismember (&set, sig) == 0);
- TRY (sigdelset (&set, sig) != 0);
- TRY (sigismember (&set, sig) != 0);
- }
-
- return result;
-}
-
-#include "../test-skeleton.c"
diff --git a/signal/tst-sigset2.c b/signal/tst-sigset2.c
deleted file mode 100644
index f653323321..0000000000
--- a/signal/tst-sigset2.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/* sigset_SIG_HOLD_bug.c [BZ #1951] */
-#include <errno.h>
-#include <error.h>
-#include <inttypes.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#define TEST_SIG SIGINT
-
-
-/* Print mask of blocked signals for this process */
-static void
-printSigMask (const char *msg)
-{
- sigset_t currMask;
- int sig;
- int cnt;
-
- if (msg != NULL)
- printf ("%s", msg);
-
- if (sigprocmask (SIG_BLOCK, NULL, &currMask) == -1)
- error (1, errno, "sigaction");
-
- cnt = 0;
- for (sig = 1; sig < NSIG; sig++)
- {
- if (sigismember (&currMask, sig))
- {
- cnt++;
- printf ("\t\t%d (%s)\n", sig, strsignal (sig));
- }
- }
-
- if (cnt == 0)
- printf ("\t\t<empty signal set>\n");
-} /* printSigMask */
-
-static void
-handler (int sig)
-{
- printf ("Caught signal %d\n", sig);
- printSigMask ("Signal mask in handler\n");
- printf ("Handler returning\n");
- _exit (1);
-} /* handler */
-
-static void
-printDisposition (sighandler_t disp)
-{
- if (disp == SIG_HOLD)
- printf ("SIG_HOLD");
- else if (disp == SIG_DFL)
- printf ("SIG_DFL");
- else if (disp == SIG_IGN)
- printf ("SIG_IGN");
- else
- printf ("handled at %" PRIxPTR, (uintptr_t) disp);
-} /* printDisposition */
-
-static int
-returnTest1 (void)
-{
- sighandler_t prev;
-
- printf ("===== TEST 1 =====\n");
- printf ("Blocking signal with sighold()\n");
- if (sighold (TEST_SIG) == -1)
- error (1, errno, "sighold");
- printSigMask ("Signal mask after sighold()\n");
-
- printf ("About to use sigset() to establish handler\n");
- prev = sigset (TEST_SIG, handler);
- if (prev == SIG_ERR)
- error(1, errno, "sigset");
-
- printf ("Previous disposition: ");
- printDisposition (prev);
- printf (" (should be SIG_HOLD)\n");
- if (prev != SIG_HOLD)
- {
- printf("TEST FAILED!!!\n");
- return 1;
- }
- return 0;
-} /* returnTest1 */
-
-static int
-returnTest2 (void)
-{
- sighandler_t prev;
-
- printf ("\n===== TEST 2 =====\n");
-
- printf ("About to use sigset() to set SIG_HOLD\n");
- prev = sigset (TEST_SIG, SIG_HOLD);
- if (prev == SIG_ERR)
- error (1, errno, "sigset");
-
- printf ("Previous disposition: ");
- printDisposition (prev);
- printf (" (should be SIG_DFL)\n");
- if (prev != SIG_DFL)
- {
- printf("TEST FAILED!!!\n");
- return 1;
- }
- return 0;
-} /* returnTest2 */
-
-static int
-returnTest3 (void)
-{
- sighandler_t prev;
-
- printf ("\n===== TEST 3 =====\n");
-
- printf ("About to use sigset() to set SIG_HOLD\n");
- prev = sigset (TEST_SIG, SIG_HOLD);
- if (prev == SIG_ERR)
- error (1, errno, "sigset");
-
- printf ("About to use sigset() to set SIG_HOLD (again)\n");
- prev = sigset (TEST_SIG, SIG_HOLD);
- if (prev == SIG_ERR)
- error (1, errno, "sigset");
-
- printf ("Previous disposition: ");
- printDisposition (prev);
- printf (" (should be SIG_HOLD)\n");
- if (prev != SIG_HOLD)
- {
- printf("TEST FAILED!!!\n");
- return 1;
- }
- return 0;
-} /* returnTest3 */
-
-int
-main (int argc, char *argv[])
-{
- pid_t childPid;
-
- childPid = fork();
- if (childPid == -1)
- error (1, errno, "fork");
-
- if (childPid == 0)
- exit (returnTest1 ());
-
- int status;
- if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
- error (1, errno, "waitpid");
- int result = !WIFEXITED (status) || WEXITSTATUS (status) != 0;
-
- childPid = fork();
- if (childPid == -1)
- error (1, errno, "fork");
-
- if (childPid == 0)
- exit (returnTest2 ());
-
- if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
- error (1, errno, "waitpid");
- result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0;
-
- childPid = fork();
- if (childPid == -1)
- error (1, errno, "fork");
-
- if (childPid == 0)
- exit (returnTest3 ());
-
- if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
- error (1, errno, "waitpid");
- result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0;
-
- return result;
-} /* main */
diff --git a/signal/tst-sigsimple.c b/signal/tst-sigsimple.c
deleted file mode 100644
index 0119fecb50..0000000000
--- a/signal/tst-sigsimple.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (C) 2003-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-
-
-static int
-do_test (void)
-{
- int result = 0;
- int e;
-
-#define RUN(test) \
- errno = 0; \
- e = test; \
- if (e != -1) \
- { \
- printf ("%s returned %d\n", #test, e); \
- result = 1; \
- } \
- else if (errno != EINVAL) \
- { \
- printf ("%s didn't set errno to EINVAL (%s instead)\n", \
- #test, strerror (errno)); \
- result = 1; \
- }
-
- RUN (sighold (-1));
- RUN (sighold (_NSIG + 100));
-
- RUN (sigrelse (-1));
- RUN (sigrelse (_NSIG + 100));
-
- return result;
-}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"