summaryrefslogtreecommitdiff
path: root/libc/signal
diff options
context:
space:
mode:
Diffstat (limited to 'libc/signal')
-rw-r--r--libc/signal/killpg.c2
-rw-r--r--libc/signal/raise.c5
-rw-r--r--libc/signal/sigaction.c21
-rw-r--r--libc/signal/sigdelset.c7
-rw-r--r--libc/signal/sigfillset.c6
-rw-r--r--libc/signal/sigignore.c2
-rw-r--r--libc/signal/sigintr.c2
-rw-r--r--libc/signal/signal.c2
-rw-r--r--libc/signal/sigpause.c2
-rw-r--r--libc/signal/sigrelse.c2
-rw-r--r--libc/signal/sigset.c2
-rw-r--r--libc/signal/sysv_signal.c2
12 files changed, 33 insertions, 22 deletions
diff --git a/libc/signal/killpg.c b/libc/signal/killpg.c
index 1fcf6bfa5..91a332af6 100644
--- a/libc/signal/killpg.c
+++ b/libc/signal/killpg.c
@@ -16,6 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define kill __kill
+
#include <errno.h>
#include <signal.h>
diff --git a/libc/signal/raise.c b/libc/signal/raise.c
index 69b61385c..5a964c4b6 100644
--- a/libc/signal/raise.c
+++ b/libc/signal/raise.c
@@ -2,6 +2,9 @@
* This file is part of the Linux-8086 C library and is distributed
* under the GNU Library General Public License.
*/
+
+#define kill __kill
+
#include <unistd.h>
#include <string.h>
#include <signal.h>
@@ -10,7 +13,7 @@
#undef raise
int attribute_hidden __raise(int signo)
{
- return kill(getpid(), signo);
+ return kill(__getpid(), signo);
}
/* psm: keep this weak, because the one in libpthread.so could overwrite it */
diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c
index 5a56ed1e6..0976e827c 100644
--- a/libc/signal/sigaction.c
+++ b/libc/signal/sigaction.c
@@ -28,17 +28,12 @@
translate it here. */
#include <bits/kernel_sigaction.h>
-int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact);
-
#if defined __NR_rt_sigaction
/* 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 (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
+int attribute_hidden
+__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
@@ -74,11 +69,8 @@ __libc_sigaction (sig, act, oact)
/* 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 (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
+int attribute_hidden
+__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct old_kernel_sigaction kact, koact;
@@ -110,5 +102,6 @@ __libc_sigaction (sig, act, oact)
#endif
-weak_alias (__libc_sigaction, __sigaction)
-weak_alias (__libc_sigaction, sigaction)
+strong_alias(__sigaction_internal,__libc_sigaction)
+weak_alias(__sigaction_internal,__sigaction)
+weak_alias(__sigaction_internal,sigaction)
diff --git a/libc/signal/sigdelset.c b/libc/signal/sigdelset.c
index 16bc9ea4a..ea36b6c3c 100644
--- a/libc/signal/sigdelset.c
+++ b/libc/signal/sigdelset.c
@@ -19,10 +19,8 @@
#include "sigsetops.h"
/* Add SIGNO to SET. */
-int
-sigdelset (set, signo)
- sigset_t *set;
- int signo;
+int attribute_hidden
+__sigdelset_internal (sigset_t *set, int signo)
{
if (set == NULL || signo <= 0 || signo >= NSIG)
{
@@ -32,3 +30,4 @@ sigdelset (set, signo)
return __sigdelset (set, signo);
}
+strong_alias(__sigdelset_internal,sigdelset)
diff --git a/libc/signal/sigfillset.c b/libc/signal/sigfillset.c
index f06334216..84862cfa2 100644
--- a/libc/signal/sigfillset.c
+++ b/libc/signal/sigfillset.c
@@ -21,9 +21,8 @@
#include <string.h>
/* Set all signals in SET. */
-int
-sigfillset (set)
- sigset_t *set;
+int attribute_hidden
+__sigfillset_internal (sigset_t *set)
{
if (set == NULL)
{
@@ -44,3 +43,4 @@ sigfillset (set)
return 0;
}
+strong_alias(__sigfillset_internal,sigfillset)
diff --git a/libc/signal/sigignore.c b/libc/signal/sigignore.c
index 407b52e2a..490cc3814 100644
--- a/libc/signal/sigignore.c
+++ b/libc/signal/sigignore.c
@@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigaction __sigaction_internal
+
#define _GNU_SOURCE
#include <errno.h>
#define __need_NULL
diff --git a/libc/signal/sigintr.c b/libc/signal/sigintr.c
index 8315c3a6b..c55d58618 100644
--- a/libc/signal/sigintr.c
+++ b/libc/signal/sigintr.c
@@ -16,6 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigaction __sigaction_internal
+
#include <stddef.h>
#include <signal.h>
#include <errno.h>
diff --git a/libc/signal/signal.c b/libc/signal/signal.c
index 7df88eff0..f8355258a 100644
--- a/libc/signal/signal.c
+++ b/libc/signal/signal.c
@@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigaction __sigaction_internal
+
#include <errno.h>
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
diff --git a/libc/signal/sigpause.c b/libc/signal/sigpause.c
index 35d58c680..fc77c958d 100644
--- a/libc/signal/sigpause.c
+++ b/libc/signal/sigpause.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigdelset __sigdelset_internal
+
#include <errno.h>
#include <signal.h>
#include <stddef.h> /* For NULL. */
diff --git a/libc/signal/sigrelse.c b/libc/signal/sigrelse.c
index 5519480e1..e2fa775bd 100644
--- a/libc/signal/sigrelse.c
+++ b/libc/signal/sigrelse.c
@@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigdelset __sigdelset_internal
+
#define __need_NULL
#include <stddef.h>
#define _GNU_SOURCE
diff --git a/libc/signal/sigset.c b/libc/signal/sigset.c
index 350e3cb2d..7860669b6 100644
--- a/libc/signal/sigset.c
+++ b/libc/signal/sigset.c
@@ -16,6 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigaction __sigaction_internal
+
#include <errno.h>
#define __need_NULL
#include <stddef.h>
diff --git a/libc/signal/sysv_signal.c b/libc/signal/sysv_signal.c
index 576fc0b8d..78c9696dd 100644
--- a/libc/signal/sysv_signal.c
+++ b/libc/signal/sysv_signal.c
@@ -16,6 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define sigaction __sigaction_internal
+
#include <errno.h>
#include <signal.h>
#include <string.h> /* For the real memset prototype. */