[git commit master] sigwait: remove __sigwait and __GI_sigwait symbols - they are unused

Denys Vlasenko vda.linux at googlemail.com
Sat Sep 19 01:41:14 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=d4b4c5a0633be8be45583b2fd2238514a52e4202
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

sigwait is not called from any uclibc function, so "hidden symbol"
trick is not needed on it. __sigwait also is never used,
and it's not clear why it even existed.

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 include/signal.h                                   |    1 -
 libc/signal/sigwait.c                              |   11 +++++------
 .../linuxthreads/sysdeps/unix/sysv/linux/sigwait.c |    8 ++------
 3 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/include/signal.h b/include/signal.h
index d104630..f727079 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -303,7 +303,6 @@ extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
    __THROW.  */
 extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
      __nonnull ((1, 2));
-libc_hidden_proto(sigwait)
 
 # if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__
 /* Select any of pending signals from SET and place information in INFO.
diff --git a/libc/signal/sigwait.c b/libc/signal/sigwait.c
index 2cdc3ac..6bca1b1 100644
--- a/libc/signal/sigwait.c
+++ b/libc/signal/sigwait.c
@@ -24,8 +24,7 @@
 
 #if defined __UCLIBC_HAS_REALTIME__
 
-int __sigwait (const sigset_t *set, int *sig) attribute_hidden;
-int __sigwait (const sigset_t *set, int *sig)
+int sigwait(const sigset_t *set, int *sig)
 {
 	int ret = sigwaitinfo(set, NULL);
 	if (ret != -1) {
@@ -34,16 +33,18 @@ int __sigwait (const sigset_t *set, int *sig)
 	}
 	return 1;
 }
+
 #else /* __UCLIBC_HAS_REALTIME__ */
 /* variant without REALTIME extensions */
 
 static smallint was_sig; /* obviously not thread-safe */
+
 static void ignore_signal(int sig)
 {
 	was_sig = sig;
 }
-int __sigwait (const sigset_t *set, int *sig) attribute_hidden;
-int __sigwait (const sigset_t *set, int *sig)
+
+int sigwait (const sigset_t *set, int *sig)
 {
   sigset_t tmp_mask;
   struct sigaction saved[NSIG];
@@ -94,5 +95,3 @@ int __sigwait (const sigset_t *set, int *sig)
   return was_sig == -1 ? -1 : 0;
 }
 #endif /* __UCLIBC_HAS_REALTIME__ */
-weak_alias(__sigwait,sigwait)
-libc_hidden_def(sigwait)
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c
index 9bacb13..859cad5 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c
@@ -68,9 +68,7 @@ weak_extern (__pthread_sigwait)
 #endif
 
 int
-__sigwait (set, sig)
-     const sigset_t *set;
-     int *sig;
+sigwait (const sigset_t *set, int *sig)
 {
 #ifndef NOT_IN_libc
   return __libc_maybe_call2 (pthread_sigwait, (set, sig),
@@ -79,9 +77,7 @@ __sigwait (set, sig)
   return do_sigwait (set, sig);
 #endif
 }
-libc_hidden_def (__sigwait)
-weak_alias (__sigwait, sigwait)
-strong_alias (__sigwait, __libc_sigwait)
+strong_alias(sigwait, __libc_sigwait)
 
 /* Cancellation is handled in __pthread_sigwait.  */
 LIBC_CANCEL_HANDLED ();
-- 
1.6.3.3



More information about the uClibc-cvs mailing list