diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-14 00:58:03 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-14 00:58:03 +0000 |
commit | af0172162f7c653cad6a11ed1c1a5459bc154465 (patch) | |
tree | 70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/signal | |
parent | c8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff) |
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/signal')
-rw-r--r-- | libc/signal/killpg.c | 3 | ||||
-rw-r--r-- | libc/signal/raise.c | 16 | ||||
-rw-r--r-- | libc/signal/sigaction.c | 14 | ||||
-rw-r--r-- | libc/signal/sigaddset.c | 2 | ||||
-rw-r--r-- | libc/signal/sigblock.c | 10 | ||||
-rw-r--r-- | libc/signal/sigdelset.c | 6 | ||||
-rw-r--r-- | libc/signal/sigempty.c | 6 | ||||
-rw-r--r-- | libc/signal/sigfillset.c | 12 | ||||
-rw-r--r-- | libc/signal/siggetmask.c | 5 | ||||
-rw-r--r-- | libc/signal/sighold.c | 7 | ||||
-rw-r--r-- | libc/signal/sigignore.c | 3 | ||||
-rw-r--r-- | libc/signal/sigintr.c | 4 | ||||
-rw-r--r-- | libc/signal/sigjmp.c | 4 | ||||
-rw-r--r-- | libc/signal/signal.c | 10 | ||||
-rw-r--r-- | libc/signal/sigpause.c | 18 | ||||
-rw-r--r-- | libc/signal/sigrelse.c | 9 | ||||
-rw-r--r-- | libc/signal/sigset.c | 8 | ||||
-rw-r--r-- | libc/signal/sigsetmask.c | 11 | ||||
-rw-r--r-- | libc/signal/sigwait.c | 12 | ||||
-rw-r--r-- | libc/signal/sysv_signal.c | 3 |
20 files changed, 93 insertions, 70 deletions
diff --git a/libc/signal/killpg.c b/libc/signal/killpg.c index 91a332af6..6de79a714 100644 --- a/libc/signal/killpg.c +++ b/libc/signal/killpg.c @@ -16,11 +16,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define kill __kill - #include <errno.h> #include <signal.h> +libc_hidden_proto(kill) /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in diff --git a/libc/signal/raise.c b/libc/signal/raise.c index 5a964c4b6..09beba0d6 100644 --- a/libc/signal/raise.c +++ b/libc/signal/raise.c @@ -3,18 +3,18 @@ * under the GNU Library General Public License. */ -#define kill __kill - #include <unistd.h> #include <string.h> #include <signal.h> #include <sys/types.h> -#undef raise -int attribute_hidden __raise(int signo) +libc_hidden_proto(raise) + +libc_hidden_proto(getpid) +libc_hidden_proto(kill) + +int raise(int signo) { - return kill(__getpid(), signo); + return kill(getpid(), signo); } - -/* psm: keep this weak, because the one in libpthread.so could overwrite it */ -weak_alias(__raise, raise) +libc_hidden_def(raise) diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c index fb46f9c01..01b8c763a 100644 --- a/libc/signal/sigaction.c +++ b/libc/signal/sigaction.c @@ -22,6 +22,7 @@ #include <sys/syscall.h> +libc_hidden_proto(memcpy) /* The difference here is that the sigaction structure used in the kernel is not the same as we use in the libc. Therefore we must @@ -32,7 +33,7 @@ /* 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 +int attribute_hidden __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { int result; @@ -40,7 +41,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) if (act) { kact.k_sa_handler = act->sa_handler; - __memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); + memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); kact.sa_flags = act->sa_flags; # ifdef HAVE_SA_RESTORER kact.sa_restorer = act->sa_restorer; @@ -55,7 +56,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) if (oact && result >= 0) { oact->sa_handler = koact.k_sa_handler; - __memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t)); + memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t)); oact->sa_flags = koact.sa_flags; # ifdef HAVE_SA_RESTORER oact->sa_restorer = koact.sa_restorer; @@ -69,7 +70,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *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 +int attribute_hidden __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { int result; @@ -103,6 +104,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) #endif #ifndef LIBC_SIGACTION -hidden_weak_alias(__libc_sigaction,__sigaction) -weak_alias(__libc_sigaction,sigaction) +strong_alias(__libc_sigaction,sigaction) +libc_hidden_proto(sigaction) +libc_hidden_def(sigaction) #endif diff --git a/libc/signal/sigaddset.c b/libc/signal/sigaddset.c index e5813c117..36d1edc32 100644 --- a/libc/signal/sigaddset.c +++ b/libc/signal/sigaddset.c @@ -32,3 +32,5 @@ sigaddset (set, signo) return __sigaddset (set, signo); } +libc_hidden_proto(sigaddset) +libc_hidden_def(sigaddset) diff --git a/libc/signal/sigblock.c b/libc/signal/sigblock.c index d3568b9f5..8dd4eebd7 100644 --- a/libc/signal/sigblock.c +++ b/libc/signal/sigblock.c @@ -19,20 +19,22 @@ #include <errno.h> #include <signal.h> +libc_hidden_proto(sigprocmask) + #include "sigset-cvt-mask.h" /* Block signals in MASK, returning the old mask. */ -int attribute_hidden __sigblock (int mask) +int sigblock (int mask) { sigset_t set, oset; if (sigset_set_old_mask (&set, mask) < 0) return -1; - if (__sigprocmask (SIG_BLOCK, &set, &oset) < 0) + if (sigprocmask (SIG_BLOCK, &set, &oset) < 0) return -1; return sigset_get_old_mask (&oset); } - -strong_alias (__sigblock, sigblock) +libc_hidden_proto(sigblock) +libc_hidden_def(sigblock) diff --git a/libc/signal/sigdelset.c b/libc/signal/sigdelset.c index ea36b6c3c..6fa7241c7 100644 --- a/libc/signal/sigdelset.c +++ b/libc/signal/sigdelset.c @@ -19,8 +19,7 @@ #include "sigsetops.h" /* Add SIGNO to SET. */ -int attribute_hidden -__sigdelset_internal (sigset_t *set, int signo) +int sigdelset (sigset_t *set, int signo) { if (set == NULL || signo <= 0 || signo >= NSIG) { @@ -30,4 +29,5 @@ __sigdelset_internal (sigset_t *set, int signo) return __sigdelset (set, signo); } -strong_alias(__sigdelset_internal,sigdelset) +libc_hidden_proto(sigdelset) +libc_hidden_def(sigdelset) diff --git a/libc/signal/sigempty.c b/libc/signal/sigempty.c index 777edbdd5..64330a686 100644 --- a/libc/signal/sigempty.c +++ b/libc/signal/sigempty.c @@ -20,6 +20,8 @@ #include <signal.h> #include <string.h> +libc_hidden_proto(memset) + /* Clear all signals from SET. */ int sigemptyset (set) @@ -31,7 +33,9 @@ sigemptyset (set) return -1; } - __memset (set, 0, sizeof (sigset_t)); + memset (set, 0, sizeof (sigset_t)); return 0; } +libc_hidden_proto(sigemptyset) +libc_hidden_def(sigemptyset) diff --git a/libc/signal/sigfillset.c b/libc/signal/sigfillset.c index 84862cfa2..2f72e8247 100644 --- a/libc/signal/sigfillset.c +++ b/libc/signal/sigfillset.c @@ -20,9 +20,12 @@ #include <signal.h> #include <string.h> +libc_hidden_proto(memset) +libc_hidden_proto(__sigdelset) + /* Set all signals in SET. */ -int attribute_hidden -__sigfillset_internal (sigset_t *set) +int +sigfillset (sigset_t *set) { if (set == NULL) { @@ -30,7 +33,7 @@ __sigfillset_internal (sigset_t *set) return -1; } - __memset (set, 0xff, sizeof (sigset_t)); + memset (set, 0xff, sizeof (sigset_t)); /* If the implementation uses a cancellation signal don't set the bit. */ #ifdef SIGCANCEL @@ -43,4 +46,5 @@ __sigfillset_internal (sigset_t *set) return 0; } -strong_alias(__sigfillset_internal,sigfillset) +libc_hidden_proto(sigfillset) +libc_hidden_def(sigfillset) diff --git a/libc/signal/siggetmask.c b/libc/signal/siggetmask.c index 18e3d367d..8b6db202d 100644 --- a/libc/signal/siggetmask.c +++ b/libc/signal/siggetmask.c @@ -19,11 +19,12 @@ #include <signal.h> -extern int __sigblock (int __mask) __THROW /*__attribute_deprecated__*/ attribute_hidden; +libc_hidden_proto(sigblock) + int siggetmask (void) { - return __sigblock (0); + return sigblock (0); } link_warning (siggetmask, diff --git a/libc/signal/sighold.c b/libc/signal/sighold.c index 29b452f63..d51ac1243 100644 --- a/libc/signal/sighold.c +++ b/libc/signal/sighold.c @@ -23,6 +23,9 @@ #define _GNU_SOURCE #include <signal.h> +libc_hidden_proto(sigprocmask) +libc_hidden_proto(sigaddset) + int sighold (sig) int sig; @@ -30,7 +33,7 @@ sighold (sig) sigset_t set; /* Retrieve current signal set. */ - if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0) + if (sigprocmask (SIG_SETMASK, NULL, &set) < 0) return -1; /* Add the specified signal. */ @@ -38,5 +41,5 @@ sighold (sig) return -1; /* Set the new mask. */ - return __sigprocmask (SIG_SETMASK, &set, NULL); + return sigprocmask (SIG_SETMASK, &set, NULL); } diff --git a/libc/signal/sigignore.c b/libc/signal/sigignore.c index 3f8b8985f..f44784b93 100644 --- a/libc/signal/sigignore.c +++ b/libc/signal/sigignore.c @@ -18,8 +18,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigaction __sigaction - #define _GNU_SOURCE #include <errno.h> #define __need_NULL @@ -27,6 +25,7 @@ #include <signal.h> #include <string.h> /* For the real memset prototype. */ +libc_hidden_proto(sigaction) int sigignore (sig) diff --git a/libc/signal/sigintr.c b/libc/signal/sigintr.c index 797c52843..022d185bc 100644 --- a/libc/signal/sigintr.c +++ b/libc/signal/sigintr.c @@ -16,12 +16,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigaction __sigaction - #include <stddef.h> #include <signal.h> #include <errno.h> +libc_hidden_proto(sigaction) + /* 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. */ diff --git a/libc/signal/sigjmp.c b/libc/signal/sigjmp.c index d11933891..26eec738f 100644 --- a/libc/signal/sigjmp.c +++ b/libc/signal/sigjmp.c @@ -21,6 +21,8 @@ #include <signal.h> #include <libc-internal.h> +libc_hidden_proto(sigprocmask) + /* This function is called by the `sigsetjmp' macro before doing a `__setjmp' on ENV[0].__jmpbuf. Always return zero. */ @@ -29,7 +31,7 @@ attribute_hidden int __sigjmp_save (sigjmp_buf env, int savemask) { env[0].__mask_was_saved = (savemask && - __sigprocmask (SIG_BLOCK, (sigset_t *) NULL, &env[0].__saved_mask) == 0); + sigprocmask (SIG_BLOCK, (sigset_t *) NULL, &env[0].__saved_mask) == 0); return 0; } diff --git a/libc/signal/signal.c b/libc/signal/signal.c index bcc31c0bc..c9ad64387 100644 --- a/libc/signal/signal.c +++ b/libc/signal/signal.c @@ -18,12 +18,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigaction __sigaction - #include <errno.h> #include <signal.h> #include <string.h> /* For the real memset prototype. */ +libc_hidden_proto(sigaction) sigset_t _sigintr attribute_hidden; /* Set by siginterrupt. */ @@ -51,6 +50,7 @@ __bsd_signal (int sig, __sighandler_t handler) return oact.sa_handler; } -weak_alias (__bsd_signal, bsd_signal) -hidden_weak_alias (__bsd_signal, __signal) -weak_alias (__bsd_signal, signal) +strong_alias(__bsd_signal,bsd_signal) +strong_alias(__bsd_signal,signal) +libc_hidden_proto(signal) +libc_hidden_def(signal) diff --git a/libc/signal/sigpause.c b/libc/signal/sigpause.c index 7e0852dbc..e5dfc8e01 100644 --- a/libc/signal/sigpause.c +++ b/libc/signal/sigpause.c @@ -17,25 +17,26 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigdelset __sigdelset_internal -#define sigsuspend __sigsuspend - #include <errno.h> #include <signal.h> #include <stddef.h> /* For NULL. */ +libc_hidden_proto(sigprocmask) +libc_hidden_proto(sigdelset) +libc_hidden_proto(sigsuspend) + #include "sigset-cvt-mask.h" /* Set the mask of blocked signals to MASK, wait for a signal to arrive, and then restore the mask. */ -int attribute_hidden __sigpause_internal (int sig_or_mask, int is_sig) +int __sigpause (int sig_or_mask, int is_sig) { sigset_t set; if (is_sig != 0) { /* The modern X/Open implementation is requested. */ - if (__sigprocmask (0, NULL, &set) < 0 + if (sigprocmask (0, NULL, &set) < 0 /* Yes, we call `sigdelset' and not `__sigdelset'. */ || sigdelset (&set, sig_or_mask) < 0) return -1; @@ -45,7 +46,8 @@ int attribute_hidden __sigpause_internal (int sig_or_mask, int is_sig) return sigsuspend (&set); } -strong_alias(__sigpause_internal,__sigpause) +libc_hidden_proto(__sigpause) +libc_hidden_def(__sigpause) #undef sigpause @@ -54,5 +56,7 @@ strong_alias(__sigpause_internal,__sigpause) the BSD version. So make this the default. */ int sigpause (int mask) { - return __sigpause_internal (mask, 0); + return __sigpause (mask, 0); } +libc_hidden_proto(sigpause) +libc_hidden_def(sigpause) diff --git a/libc/signal/sigrelse.c b/libc/signal/sigrelse.c index e2fa775bd..a0f55d419 100644 --- a/libc/signal/sigrelse.c +++ b/libc/signal/sigrelse.c @@ -18,13 +18,14 @@ 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 #include <signal.h> +libc_hidden_proto(sigprocmask) +libc_hidden_proto(sigdelset) + int sigrelse (sig) int sig; @@ -32,7 +33,7 @@ sigrelse (sig) sigset_t set; /* Retrieve current signal set. */ - if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0) + if (sigprocmask (SIG_SETMASK, NULL, &set) < 0) return -1; /* Remove the specified signal. */ @@ -40,5 +41,5 @@ sigrelse (sig) return -1; /* Set the new mask. */ - return __sigprocmask (SIG_SETMASK, &set, NULL); + return sigprocmask (SIG_SETMASK, &set, NULL); } diff --git a/libc/signal/sigset.c b/libc/signal/sigset.c index 305cd96fb..d2a395bcf 100644 --- a/libc/signal/sigset.c +++ b/libc/signal/sigset.c @@ -16,8 +16,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigaction __sigaction - #include <errno.h> #define __need_NULL #include <stddef.h> @@ -25,6 +23,8 @@ #include <signal.h> #include <string.h> /* For the real memset prototype. */ +libc_hidden_proto(sigaction) +libc_hidden_proto(sigprocmask) /* Set the disposition for SIG. */ __sighandler_t @@ -48,7 +48,7 @@ sigset (sig, disp) return SIG_ERR; /* Add the signal set to the current signal mask. */ - if (__sigprocmask (SIG_BLOCK, &set, NULL) < 0) + if (sigprocmask (SIG_BLOCK, &set, NULL) < 0) return SIG_ERR; return SIG_HOLD; @@ -78,7 +78,7 @@ sigset (sig, disp) return SIG_ERR; /* Remove the signal set from the current signal mask. */ - if (__sigprocmask (SIG_UNBLOCK, &set, NULL) < 0) + if (sigprocmask (SIG_UNBLOCK, &set, NULL) < 0) return SIG_ERR; return oact.sa_handler; diff --git a/libc/signal/sigsetmask.c b/libc/signal/sigsetmask.c index 56d7eccfa..ea68d3ebb 100644 --- a/libc/signal/sigsetmask.c +++ b/libc/signal/sigsetmask.c @@ -19,21 +19,24 @@ #include <errno.h> #include <signal.h> +libc_hidden_proto(sigprocmask) + #include "sigset-cvt-mask.h" /* Set the mask of blocked signals to MASK, returning the old mask. */ -int attribute_hidden -__sigsetmask (int mask) +int +sigsetmask (int mask) { sigset_t set, oset; if (sigset_set_old_mask (&set, mask) < 0) return -1; - if (__sigprocmask (SIG_SETMASK, &set, &oset) < 0) + if (sigprocmask (SIG_SETMASK, &set, &oset) < 0) return -1; return sigset_get_old_mask (&oset); } -weak_alias(__sigsetmask,sigsetmask) +libc_hidden_proto(sigsetmask) +libc_hidden_def(sigsetmask) diff --git a/libc/signal/sigwait.c b/libc/signal/sigwait.c index 13d65ed5e..cd46d2dbe 100644 --- a/libc/signal/sigwait.c +++ b/libc/signal/sigwait.c @@ -18,14 +18,13 @@ * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA. */ -#define sigwaitinfo __sigwaitinfo - #include <errno.h> #include <signal.h> #include <string.h> -#undef sigwait -int attribute_hidden __sigwait (const sigset_t *set, int *sig) +libc_hidden_proto(sigwaitinfo) + +int sigwait (const sigset_t *set, int *sig) { int ret = 1; if ((ret = sigwaitinfo(set, NULL)) != -1) { @@ -34,6 +33,5 @@ int attribute_hidden __sigwait (const sigset_t *set, int *sig) } return 1; } - -/* psm: keep this weak, because the one in libpthread.so could overwrite it */ -weak_alias(__sigwait, sigwait) +libc_hidden_proto(sigwait) +libc_hidden_def(sigwait) diff --git a/libc/signal/sysv_signal.c b/libc/signal/sysv_signal.c index 608aef235..97a216363 100644 --- a/libc/signal/sysv_signal.c +++ b/libc/signal/sysv_signal.c @@ -16,12 +16,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define sigaction __sigaction - #include <errno.h> #include <signal.h> #include <string.h> /* For the real memset prototype. */ +libc_hidden_proto(sigaction) /* Tolerate non-threads versions of Posix */ #ifndef SA_ONESHOT |