svn commit: branches/uClibc-nptl/libc/signal

sjhill at uclibc.org sjhill at uclibc.org
Sun Feb 26 04:33:45 UTC 2006


Author: sjhill
Date: 2006-02-25 20:33:43 -0800 (Sat, 25 Feb 2006)
New Revision: 14291

Log:
Merge from trunk.


Modified:
   branches/uClibc-nptl/libc/signal/
   branches/uClibc-nptl/libc/signal/Makefile.in
   branches/uClibc-nptl/libc/signal/allocrtsig.c
   branches/uClibc-nptl/libc/signal/killpg.c
   branches/uClibc-nptl/libc/signal/raise.c
   branches/uClibc-nptl/libc/signal/sigaction.c
   branches/uClibc-nptl/libc/signal/sigaddset.c
   branches/uClibc-nptl/libc/signal/sigandset.c
   branches/uClibc-nptl/libc/signal/sigblock.c
   branches/uClibc-nptl/libc/signal/sigdelset.c
   branches/uClibc-nptl/libc/signal/sigempty.c
   branches/uClibc-nptl/libc/signal/sigfillset.c
   branches/uClibc-nptl/libc/signal/siggetmask.c
   branches/uClibc-nptl/libc/signal/sighold.c
   branches/uClibc-nptl/libc/signal/sigignore.c
   branches/uClibc-nptl/libc/signal/sigintr.c
   branches/uClibc-nptl/libc/signal/sigisempty.c
   branches/uClibc-nptl/libc/signal/sigjmp.c
   branches/uClibc-nptl/libc/signal/signal.c
   branches/uClibc-nptl/libc/signal/sigorset.c
   branches/uClibc-nptl/libc/signal/sigpause.c
   branches/uClibc-nptl/libc/signal/sigrelse.c
   branches/uClibc-nptl/libc/signal/sigset.c
   branches/uClibc-nptl/libc/signal/sigsetmask.c
   branches/uClibc-nptl/libc/signal/sigsetops.c
   branches/uClibc-nptl/libc/signal/sigwait.c
   branches/uClibc-nptl/libc/signal/sysv_signal.c


Changeset:

Property changes on: branches/uClibc-nptl/libc/signal
___________________________________________________________________
Name: svn:ignore
   + *.os


Modified: branches/uClibc-nptl/libc/signal/Makefile.in
===================================================================
--- branches/uClibc-nptl/libc/signal/Makefile.in	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/Makefile.in	2006-02-26 04:33:43 UTC (rev 14291)
@@ -1,11 +1,11 @@
 # Makefile for uClibc
 #
-# Copyright (C) 2000-2005 Erik Andersen <andersen at uclibc.org>
+# Copyright (C) 2000-2006 Erik Andersen <andersen at uclibc.org>
 #
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-CSRC:=	allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
+CSRC :=	allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
 	sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c sighold.c \
 	sigignore.c sigintr.c sigisempty.c sigismem.c sigjmp.c signal.c \
 	sigorset.c sigpause.c sigrelse.c sigset.c sigsetmask.c sigsetops.c \
@@ -16,22 +16,18 @@
 endif
 
 ifneq ($(strip $(ARCH_OBJS)),)
-CSRC:=$(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))
+CSRC := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))
 endif
 
-SIGNAL_DIR:=$(top_srcdir)libc/signal
-SIGNAL_OUT:=$(top_builddir)libc/signal
+SIGNAL_DIR := $(top_srcdir)libc/signal
+SIGNAL_OUT := $(top_builddir)libc/signal
 
-SIGNAL_SRC:=$(patsubst %.c,$(SIGNAL_DIR)/%.c,$(CSRC))
+SIGNAL_SRC := $(patsubst %.c,$(SIGNAL_DIR)/%.c,$(CSRC))
+SIGNAL_OBJ := $(patsubst %.c,$(SIGNAL_OUT)/%.o,$(CSRC))
 
-SIGNAL_OBJ:=$(patsubst $(SIGNAL_DIR)/%.c,$(SIGNAL_OUT)/%.o,$(SIGNAL_SRC))
+libc-y += $(SIGNAL_OBJ)
 
-libc-a-y+=$(SIGNAL_OBJ)
-libc-so-y+=$(SIGNAL_OBJ:.o=.os)
+objclean-y += signal_objclean
 
-libc-multi-y+=$(SIGNAL_SRC)
-
-objclean-y+=signal_objclean
-
 signal_objclean:
 	$(RM) $(SIGNAL_OUT)/*.{o,os}

Modified: branches/uClibc-nptl/libc/signal/allocrtsig.c
===================================================================
--- branches/uClibc-nptl/libc/signal/allocrtsig.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/allocrtsig.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -55,6 +55,7 @@
 /* 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);
 int __libc_allocate_rtsig (int high)
 {
   if (current_rtmin == -1 || current_rtmin > current_rtmax)

Modified: branches/uClibc-nptl/libc/signal/killpg.c
===================================================================
--- branches/uClibc-nptl/libc/signal/killpg.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/killpg.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -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

Modified: branches/uClibc-nptl/libc/signal/raise.c
===================================================================
--- branches/uClibc-nptl/libc/signal/raise.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/raise.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -3,18 +3,20 @@
  * 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(getpid)
+libc_hidden_proto(kill)
+
+int __raise (int signo)  attribute_hidden;
+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_proto(raise)
+weak_alias(__raise,raise)
+libc_hidden_def(raise)

Modified: branches/uClibc-nptl/libc/signal/sigaction.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigaction.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigaction.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2000,2002,2003,2005,2006 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
@@ -16,18 +16,24 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <features.h>
 #include <errno.h>
 #include <signal.h>
 #include <string.h>
 
 #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
    translate it here.  */
 #include <bits/kernel_sigaction.h>
 
+#ifndef LIBC_SIGACTION
+extern __typeof(sigaction) __libc_sigaction;
+#endif
+
 #if defined __NR_rt_sigaction
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
@@ -40,7 +46,7 @@
 
 	if (act) {
 		kact.k_sa_handler = act->sa_handler;
-		__memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
+		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 +61,7 @@
 
 	if (oact && result >= 0) {
 		oact->sa_handler = koact.k_sa_handler;
-		__memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (oact->sa_mask));
+		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;
@@ -103,6 +109,7 @@
 #endif
 
 #ifndef LIBC_SIGACTION
-hidden_weak_alias(__libc_sigaction,__sigaction)
+libc_hidden_proto(sigaction)
 weak_alias(__libc_sigaction,sigaction)
+libc_hidden_weak(sigaction)
 #endif

Modified: branches/uClibc-nptl/libc/signal/sigaddset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigaddset.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigaddset.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -19,6 +19,7 @@
 #include "sigsetops.h"
 
 /* Add SIGNO to SET.  */
+libc_hidden_proto(sigaddset)
 int
 sigaddset (set, signo)
      sigset_t *set;
@@ -32,3 +33,4 @@
 
   return __sigaddset (set, signo);
 }
+libc_hidden_def(sigaddset)

Modified: branches/uClibc-nptl/libc/signal/sigandset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigandset.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigandset.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -17,7 +17,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#define __USE_GNU
 #include <signal.h>
 #define __need_NULL
 #include <stddef.h>

Modified: branches/uClibc-nptl/libc/signal/sigblock.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigblock.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigblock.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -16,23 +16,26 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#define __UCLIBC_HIDE_DEPRECATED__
 #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)
+libc_hidden_proto(sigblock)
+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_def(sigblock)

Modified: branches/uClibc-nptl/libc/signal/sigdelset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigdelset.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigdelset.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -19,8 +19,8 @@
 #include "sigsetops.h"
 
 /* Add SIGNO to SET.  */
-int attribute_hidden
-__sigdelset_internal (sigset_t *set, int signo)
+libc_hidden_proto(sigdelset)
+int sigdelset (sigset_t *set, int signo)
 {
   if (set == NULL || signo <= 0 || signo >= NSIG)
     {
@@ -30,4 +30,4 @@
 
   return __sigdelset (set, signo);
 }
-strong_alias(__sigdelset_internal,sigdelset)
+libc_hidden_def(sigdelset)

Modified: branches/uClibc-nptl/libc/signal/sigempty.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigempty.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigempty.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -20,7 +20,10 @@
 #include <signal.h>
 #include <string.h>
 
+libc_hidden_proto(memset)
+
 /* Clear all signals from SET.  */
+libc_hidden_proto(sigemptyset)
 int
 sigemptyset (set)
      sigset_t *set;
@@ -31,7 +34,8 @@
       return -1;
     }
 
-  __memset (set, 0, sizeof (sigset_t));
+  memset (set, 0, sizeof (sigset_t));
 
   return 0;
 }
+libc_hidden_def(sigemptyset)

Modified: branches/uClibc-nptl/libc/signal/sigfillset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigfillset.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigfillset.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -20,9 +20,12 @@
 #include <signal.h>
 #include <string.h>
 
+libc_hidden_proto(memset)
+
 /* Set all signals in SET.  */
-int attribute_hidden
-__sigfillset_internal (sigset_t *set)
+libc_hidden_proto(sigfillset)
+int
+sigfillset (sigset_t *set)
 {
   if (set == NULL)
     {
@@ -30,11 +33,7 @@
       return -1;
     }
 
-#ifdef IS_IN_libc
-  __memset (set, 0xff, sizeof (sigset_t));
-#else
   memset (set, 0xff, sizeof (sigset_t));
-#endif
 
   /* If the implementation uses a cancellation signal don't set the bit.  */
 #ifdef SIGCANCEL
@@ -47,4 +46,4 @@
 
   return 0;
 }
-strong_alias(__sigfillset_internal,sigfillset)
+libc_hidden_def(sigfillset)

Modified: branches/uClibc-nptl/libc/signal/siggetmask.c
===================================================================
--- branches/uClibc-nptl/libc/signal/siggetmask.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/siggetmask.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -17,13 +17,15 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#define __UCLIBC_HIDE_DEPRECATED__
 #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,

Modified: branches/uClibc-nptl/libc/signal/sighold.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sighold.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sighold.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -20,9 +20,11 @@
 
 #define __need_NULL
 #include <stddef.h>
-#define _GNU_SOURCE
 #include <signal.h>
 
+libc_hidden_proto(sigprocmask)
+libc_hidden_proto(sigaddset)
+
 int
 sighold (sig)
      int sig;
@@ -30,7 +32,7 @@
   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 +40,5 @@
     return -1;
 
   /* Set the new mask.  */
-  return __sigprocmask (SIG_SETMASK, &set, NULL);
+  return sigprocmask (SIG_SETMASK, &set, NULL);
 }

Modified: branches/uClibc-nptl/libc/signal/sigignore.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigignore.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigignore.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -18,15 +18,13 @@
    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
 #include <stddef.h>
 #include <signal.h>
 #include <string.h>	/* For the real memset prototype.  */
 
+libc_hidden_proto(sigaction)
 
 int
 sigignore (sig)

Modified: branches/uClibc-nptl/libc/signal/sigintr.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigintr.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigintr.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -16,22 +16,25 @@
    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.  */
+#ifdef SA_RESTART
+extern sigset_t _sigintr attribute_hidden;	/* Defined in signal.c.  */
+#endif
+
 int
 siginterrupt (sig, interrupt)
      int sig;
      int interrupt;
 {
 #ifdef	SA_RESTART
-  extern sigset_t _sigintr attribute_hidden;	/* Defined in signal.c.  */
   struct sigaction action;
 
   if (sigaction (sig, (struct sigaction *) NULL, &action) < 0)

Modified: branches/uClibc-nptl/libc/signal/sigisempty.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigisempty.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigisempty.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -17,7 +17,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#define __USE_GNU
 #include <signal.h>
 #define __need_NULL
 #include <stddef.h>

Modified: branches/uClibc-nptl/libc/signal/sigjmp.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigjmp.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigjmp.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -19,15 +19,19 @@
 #include <stddef.h>
 #include <setjmp.h>
 #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.  */
 
+int __sigjmp_save (sigjmp_buf env, int savemask) 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;
 }

Modified: branches/uClibc-nptl/libc/signal/signal.c
===================================================================
--- branches/uClibc-nptl/libc/signal/signal.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/signal.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -18,18 +18,18 @@
    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.  */
 
 /* Set the handler for the signal SIG to HANDLER,
    returning the old handler, or SIG_ERR on error.  */
-__sighandler_t
+extern __typeof(bsd_signal) __bsd_signal;
+attribute_hidden __sighandler_t
 __bsd_signal (int sig, __sighandler_t handler)
 {
   struct sigaction act, oact;
@@ -51,6 +51,7 @@
 
   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)
+libc_hidden_proto(signal)
+strong_alias(__bsd_signal,signal)
+libc_hidden_def(signal)

Modified: branches/uClibc-nptl/libc/signal/sigorset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigorset.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigorset.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -17,7 +17,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#define __USE_GNU
 #include <signal.h>
 #define __need_NULL
 #include <stddef.h>

Modified: branches/uClibc-nptl/libc/signal/sigpause.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigpause.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigpause.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -17,25 +17,30 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigdelset __sigdelset_internal
-#define sigsuspend __sigsuspend
-
+#define __UCLIBC_HIDE_DEPRECATED__
+/* psm: need the BSD version of sigpause here */
 #include <errno.h>
+#define __FAVOR_BSD
 #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)
+libc_hidden_proto(__sigpause)
+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,14 +50,16 @@
 
   return sigsuspend (&set);
 }
-strong_alias(__sigpause_internal,__sigpause)
+libc_hidden_def(__sigpause)
 
 #undef sigpause
 
 /* We have to provide a default version of this function since the
    standards demand it.  The version which is a bit more reasonable is
    the BSD version.  So make this the default.  */
+libc_hidden_proto(sigpause)
 int sigpause (int mask)
 {
-  return __sigpause_internal (mask, 0);
+  return __sigpause (mask, 0);
 }
+libc_hidden_def(sigpause)

Modified: branches/uClibc-nptl/libc/signal/sigrelse.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigrelse.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigrelse.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -18,13 +18,13 @@
    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 +32,7 @@
   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 +40,5 @@
     return -1;
 
   /* Set the new mask.  */
-  return __sigprocmask (SIG_SETMASK, &set, NULL);
+  return sigprocmask (SIG_SETMASK, &set, NULL);
 }

Modified: branches/uClibc-nptl/libc/signal/sigset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigset.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigset.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -16,15 +16,14 @@
    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>
-#define __USE_XOPEN_EXTENDED
 #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 +47,7 @@
 	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 +77,7 @@
     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;

Modified: branches/uClibc-nptl/libc/signal/sigsetmask.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigsetmask.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigsetmask.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -16,24 +16,28 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#define __UCLIBC_HIDE_DEPRECATED__
 #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)
+libc_hidden_proto(sigsetmask)
+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_def(sigsetmask)

Modified: branches/uClibc-nptl/libc/signal/sigsetops.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigsetops.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigsetops.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -8,4 +8,4 @@
 # define __USE_EXTERN_INLINES	1
 #endif
 
-#include "signal.h"
+#include <signal.h>

Modified: branches/uClibc-nptl/libc/signal/sigwait.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigwait.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sigwait.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -1,8 +1,7 @@
 /* vi: set sw=4 ts=4: */
 /* sigwait
  *
- * Copyright (C) 2006 by Steven J. Hill <sjhill at realitydiluted.com>
- * Copyright (C) 2003-2005 by Erik Andersen <andersen at uclibc.org>
+ * Copyright (C) 2003 by Erik Andersen <andersen at uclibc.org>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -19,89 +18,15 @@
  * 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>
 
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-# include <sysdep-cancel.h>
+libc_hidden_proto(sigwaitinfo)
 
-# ifdef __NR_rt_sigtimedwait
-
-/* Return any pending signal or wait for one for the given time.  */
-static int do_sigwait(const sigset_t *set, int *sig)
-{
-	int ret;
-
-#  ifdef SIGCANCEL
-	sigset_t tmpset;
-	if (set != NULL
-		&& (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
-#   ifdef SIGSETXID
-		|| __builtin_expect (__sigismember (set, SIGSETXID), 0)
-#   endif
-		))
-	{
-		/* Create a temporary mask without the bit for SIGCANCEL set.  */
-		// We are not copying more than we have to.
-#   ifdef IS_IN_libc
-		__memcpy(&tmpset, set, _NSIG / 8);
-#   else
-		memcpy(&tmpset, set, _NSIG / 8);
-#   endif
-		__sigdelset(&tmpset, SIGCANCEL);
-#   ifdef SIGSETXID
-		__sigdelset(&tmpset, SIGSETXID);
-#   endif
-		set = &tmpset;
-	}
-#  endif
-
-	/* XXX The size argument hopefully will have to be changed to the
-	   real size of the user-level sigset_t.  */
-#  ifdef INTERNAL_SYSCALL
-	INTERNAL_SYSCALL_DECL(err);
-	do
-		ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, set, NULL,
-			NULL, _NSIG / 8);
-	while (INTERNAL_SYSCALL_ERROR_P (ret, err)
-		&& INTERNAL_SYSCALL_ERRNO (ret, err) == EINTR);
-	if (! INTERNAL_SYSCALL_ERROR_P (ret, err))
-	{
-		*sig = ret;
-		ret = 0;
-	}
-else
-	ret = INTERNAL_SYSCALL_ERRNO (ret, err);
-#  else
-#   error INTERNAL_SYSCALL must be defined!!!
-#  endif
-
-	return ret;
-}
-
+int __sigwait (const sigset_t *set, int *sig) attribute_hidden;
 int __sigwait (const sigset_t *set, int *sig)
 {
-	if(SINGLE_THREAD_P)
-		return do_sigwait(set, sig);
-
-	int oldtype = LIBC_CANCEL_ASYNC();
-
-	int result = do_sigwait(set, sig);
-
-	LIBC_CANCEL_RESET(oldtype);
-
-	return result;
-}
-# else
-#  error We must have rt_sigtimedwait defined!!!
-# endif
-#else
-# undef sigwait
-int attribute_hidden __sigwait (const sigset_t *set, int *sig)
-{
 	int ret = 1;
 	if ((ret = sigwaitinfo(set, NULL)) != -1) {
 		*sig = ret;
@@ -109,5 +34,6 @@
 	}
 	return 1;
 }
-#endif
-weak_alias(__sigwait, sigwait)
+libc_hidden_proto(sigwait)
+weak_alias(__sigwait,sigwait)
+libc_hidden_def(sigwait)

Modified: branches/uClibc-nptl/libc/signal/sysv_signal.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sysv_signal.c	2006-02-26 03:57:14 UTC (rev 14290)
+++ branches/uClibc-nptl/libc/signal/sysv_signal.c	2006-02-26 04:33:43 UTC (rev 14291)
@@ -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
@@ -60,5 +59,4 @@
 
   return oact.sa_handler;
 }
-
-weak_alias (__sysv_signal, sysv_signal)
+strong_alias(__sysv_signal,sysv_signal)




More information about the uClibc-cvs mailing list