svn commit: branches/uClibc-nptl/libc: sysdeps/linux/mips unistd

sjhill at uclibc.org sjhill at uclibc.org
Sat Dec 10 18:44:07 UTC 2005


Author: sjhill
Date: 2005-12-10 10:44:06 -0800 (Sat, 10 Dec 2005)
New Revision: 12824

Log:
Bring in sleep.c from trunk and update change sigaction.c for MIPS
to call __memcpy, even though it produces a compiler warning.


Modified:
   branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c
   branches/uClibc-nptl/libc/unistd/sleep.c


Changeset:
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c	2005-12-10 18:39:26 UTC (rev 12823)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c	2005-12-10 18:44:06 UTC (rev 12824)
@@ -39,7 +39,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 (kact.sa_mask));
 	kact.sa_flags = act->sa_flags;
 # ifdef HAVE_SA_RESTORER
 #  if _MIPS_SIM == _ABIO32
@@ -57,7 +57,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 (oact->sa_mask));
 	oact->sa_flags = koact.sa_flags;
 # ifdef HAVE_SA_RESTORER
 	oact->sa_restorer = koact.sa_restorer;

Modified: branches/uClibc-nptl/libc/unistd/sleep.c
===================================================================
--- branches/uClibc-nptl/libc/unistd/sleep.c	2005-12-10 18:39:26 UTC (rev 12823)
+++ branches/uClibc-nptl/libc/unistd/sleep.c	2005-12-10 18:44:06 UTC (rev 12824)
@@ -18,6 +18,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#define sigaction __sigaction
+#define nanosleep __nanosleep
+
 #include <errno.h>
 #include <time.h>
 #include <signal.h>
@@ -27,7 +30,7 @@
 /* This is a quick and dirty, but not 100% compliant with
  * the stupid SysV SIGCHLD vs. SIG_IGN behaviour.  It is
  * fine unless you are messing with SIGCHLD...  */
-unsigned int sleep (unsigned int sec)
+unsigned int attribute_hidden __sleep (unsigned int sec)
 {
 	unsigned int res;
 	struct timespec ts = { .tv_sec = (long int) seconds, .tv_nsec = 0 };
@@ -41,7 +44,7 @@
 /* We are going to use the `nanosleep' syscall of the kernel.  But the
    kernel does not implement the sstupid SysV SIGCHLD vs. SIG_IGN
    behaviour for this syscall.  Therefore we have to emulate it here.  */
-unsigned int sleep (unsigned int seconds)
+unsigned int attribute_hidden __sleep (unsigned int seconds)
 {
     struct timespec ts = { .tv_sec = (long int) seconds, .tv_nsec = 0 };
     sigset_t set, oset;
@@ -105,3 +108,4 @@
     return result;
 }
 #endif
+strong_alias(__sleep,sleep)




More information about the uClibc-cvs mailing list