This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch roland/tests created. glibc-2.20-597-g2373fa6


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, roland/tests has been created
        at  2373fa6849ae40de6d4f53e543d8ae3892496ba5 (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2373fa6849ae40de6d4f53e543d8ae3892496ba5

commit 2373fa6849ae40de6d4f53e543d8ae3892496ba5
Author: Roland McGrath <roland@hack.frob.com>
Date:   Fri Jan 30 11:17:06 2015 -0800

    NPTL: Conditionalize some sanity tests for SIGCANCEL/SIGSETXID.

diff --git a/ChangeLog b/ChangeLog
index 6d7d894..0d54b2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-30  Roland McGrath  <roland@hack.frob.com>
+
+	* nptl/tst-cancel25.c (tf2): Test for SIGCANCEL being blocked only if
+	it's defined.
+	* nptl/tst-signal7.c (do_test): Test SIGCANCEL only if it's defined.
+	Test SIGSETXID only if it's defined.
+
 2015-01-28  Roland McGrath  <roland@hack.frob.com>
 
 	* nptl/tst-locale1.c (useless): Use SIGRTMIN only if it's defined.
diff --git a/nptl/tst-cancel25.c b/nptl/tst-cancel25.c
index 00b99ad..ed4205e 100644
--- a/nptl/tst-cancel25.c
+++ b/nptl/tst-cancel25.c
@@ -11,6 +11,7 @@ static pthread_t th2;
 static void *
 tf2 (void *arg)
 {
+#ifdef SIGCANCEL
   sigset_t mask;
   if (pthread_sigmask (SIG_SETMASK, NULL, &mask) != 0)
     {
@@ -22,6 +23,7 @@ tf2 (void *arg)
       puts ("SIGCANCEL blocked in new thread");
       exit (1);
     }
+#endif
 
   /* Sync with the main thread so that we do not test anything else.  */
   int e = pthread_barrier_wait (&b);
diff --git a/nptl/tst-signal7.c b/nptl/tst-signal7.c
index b388989..1fbf3db 100644
--- a/nptl/tst-signal7.c
+++ b/nptl/tst-signal7.c
@@ -27,6 +27,7 @@ do_test (void)
 {
   int result = 0;
 
+#ifdef SIGCANCEL
   errno = 0;
   if (sigaction (SIGCANCEL, NULL, NULL) == 0)
     {
@@ -38,7 +39,9 @@ do_test (void)
       puts ("sigaction(SIGCANCEL) did not set errno to EINVAL");
       result = 1;
     }
+#endif
 
+#ifdef SIGSETXID
   errno = 0;
   if (sigaction (SIGSETXID, NULL, NULL) == 0)
     {
@@ -50,6 +53,7 @@ do_test (void)
       puts ("sigaction(SIGSETXID) did not set errno to EINVAL");
       result = 1;
     }
+#endif
 
   return result;
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2584c4832085723146b9e96aa9fb566698403757

commit 2584c4832085723146b9e96aa9fb566698403757
Author: Roland McGrath <roland@hack.frob.com>
Date:   Wed Jan 28 14:36:25 2015 -0800

    Conditionalize use of SIGRTMIN in nptl/tst-locale1.c.

diff --git a/ChangeLog b/ChangeLog
index a782e4f..6d7d894 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-01-28  Roland McGrath  <roland@hack.frob.com>
 
+	* nptl/tst-locale1.c (useless): Use SIGRTMIN only if it's defined.
+
+2015-01-28  Roland McGrath  <roland@hack.frob.com>
+
 	* rt/tst-timer2.c (do_test): Don't initialize SIGEV.sigev_signo, which
 	will not be used.  Use NULL rather than 0 for .sigev_notify_attributes.
 
diff --git a/nptl/tst-locale1.c b/nptl/tst-locale1.c
index 2ee4c3f..887b9a6 100644
--- a/nptl/tst-locale1.c
+++ b/nptl/tst-locale1.c
@@ -12,7 +12,11 @@ useless (void)
 {
   pthread_t th;
   pthread_create (&th, 0, (void *(*) (void *)) useless, 0);
+  int result = 0;
+#ifdef SIGRTMIN
   /* This is to check __libc_current_sigrt* can be used in statically
      linked apps.  */
-  return SIGRTMIN;
+  result = SIGRTMIN;
+#endif
+  return result;
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2984d765cc495480f3e2bba3d64fe4938a844be

commit f2984d765cc495480f3e2bba3d64fe4938a844be
Author: Roland McGrath <roland@hack.frob.com>
Date:   Wed Jan 28 14:17:42 2015 -0800

    Don't set unused field in rt/tst-timer2.

diff --git a/ChangeLog b/ChangeLog
index 970d646..a782e4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-28  Roland McGrath  <roland@hack.frob.com>
+
+	* rt/tst-timer2.c (do_test): Don't initialize SIGEV.sigev_signo, which
+	will not be used.  Use NULL rather than 0 for .sigev_notify_attributes.
+
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
 	* nptl/tst-align2.c: Moved ...
diff --git a/rt/tst-timer2.c b/rt/tst-timer2.c
index 60026c1..b2ce987 100644
--- a/rt/tst-timer2.c
+++ b/rt/tst-timer2.c
@@ -30,9 +30,8 @@ do_test (void)
   itval.it_value.tv_nsec = 0;
 
   sigev.sigev_notify = SIGEV_THREAD;
-  sigev.sigev_signo = SIGRTMIN;
   sigev.sigev_notify_function = thread;
-  sigev.sigev_notify_attributes = 0;
+  sigev.sigev_notify_attributes = NULL;
   sigev.sigev_value.sival_ptr = (void *) &timerId;
 
   for (i = 0; i < 100; i++)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0b8246470c3e95072fd3f164cfe765aeac3dc087

commit 0b8246470c3e95072fd3f164cfe765aeac3dc087
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 15:26:26 2015 -0800

    NPTL: Build tests using clone directly only for Linux.

diff --git a/ChangeLog b/ChangeLog
index 9267bb6..970d646 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* nptl/tst-align2.c: Moved ...
+	* sysdeps/unix/sysv/linux/tst-align-clone.c: ... here.
+	* nptl/Makefile (tests): Remove tst-align2.
+	* sysdeps/unix/sysv/linux/Makefile
+	[$(subdir) = nptl] (tests): Add tst-align-clone.
+	* nptl/tst-getpid1.c: Moved ...
+	* sysdeps/unix/sysv/linux/tst-getpid1.c: ... here.
+	* nptl/tst-getpid2.c: Moved ...
+	* sysdeps/unix/sysv/linux/tst-getpid2.c: ... here.
+	* nptl/Makefile (tests): Move tst-getpid1 and tst-getpid2 ...
+	* sysdeps/unix/sysv/linux/Makefile
+	[$(subdir) = nptl] (tests): ... here.
+	* nptl/Makefile (tst-getpid2-ENV): Move variable ...
+	* sysdeps/unix/sysv/linux/Makefile
+	[$(subdir) = nptl] (tst-getpid2-ENV): ... here.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* nptl/tst-cleanup2.c (do_test): Use signal rather than sigaction.
 	Drop trailing \n from perror argument.  Use return rather than exit.
 
diff --git a/nptl/Makefile b/nptl/Makefile
index 43d8510..6ae76bb 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -229,7 +229,7 @@ tests = tst-typesizes \
 	tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
 	tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 tst-sem13 tst-sem14 \
 	tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
-	tst-align tst-align2 tst-align3 \
+	tst-align tst-align3 \
 	tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
 	tst-basic7 \
 	tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \
@@ -269,7 +269,7 @@ tests = tst-typesizes \
 	tst-backtrace1 \
 	tst-abstime \
 	tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
-	tst-getpid1 tst-getpid2 tst-getpid3 \
+	tst-getpid3 \
 	tst-setuid3 \
 	tst-initializers1 $(addprefix tst-initializers1-,c89 gnu89 c99 gnu99) \
 	tst-bad-schedattr
@@ -463,11 +463,6 @@ tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)"
 tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
 tst-umask1-ARGS = $(objpfx)tst-umask1.temp
 
-# In this test, we create a CLONE_VM "thread" that shares TLS storage
-# with the original thread. Both threads then race in ld.so with lazy PLT
-# resolution. Avoid this race by disabling lazy binding. BZ #11214.
-tst-getpid2-ENV = LD_BIND_NOW=1
-
 $(objpfx)tst-atfork2: $(libdl) $(shared-thread-library)
 LDFLAGS-tst-atfork2 = -rdynamic
 tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 9f3718b..c26a12f 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -196,5 +196,10 @@ CFLAGS-gai.c += -DNEED_NETLINK
 endif
 
 ifeq ($(subdir),nptl)
-tests += tst-setgetname
+tests += tst-setgetname tst-align-clone tst-getpid1 tst-getpid2
+
+# In this test, we create a CLONE_VM "thread" that shares TLS storage
+# with the original thread. Both threads then race in ld.so with lazy PLT
+# resolution. Avoid this race by disabling lazy binding. BZ #11214.
+tst-getpid2-ENV = LD_BIND_NOW=1
 endif
diff --git a/nptl/tst-align2.c b/sysdeps/unix/sysv/linux/tst-align-clone.c
similarity index 100%
rename from nptl/tst-align2.c
rename to sysdeps/unix/sysv/linux/tst-align-clone.c
diff --git a/nptl/tst-getpid1.c b/sysdeps/unix/sysv/linux/tst-getpid1.c
similarity index 100%
rename from nptl/tst-getpid1.c
rename to sysdeps/unix/sysv/linux/tst-getpid1.c
diff --git a/nptl/tst-getpid2.c b/sysdeps/unix/sysv/linux/tst-getpid2.c
similarity index 100%
rename from nptl/tst-getpid2.c
rename to sysdeps/unix/sysv/linux/tst-getpid2.c

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a27ccd328e0b808c3a3c6dd498bbced30564ef24

commit a27ccd328e0b808c3a3c6dd498bbced30564ef24
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:53:43 2015 -0800

    Use signal rather than sigaction in nptl/tst-cleanup2.

diff --git a/ChangeLog b/ChangeLog
index 793c74b..9267bb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* nptl/tst-cleanup2.c (do_test): Use signal rather than sigaction.
+	Drop trailing \n from perror argument.  Use return rather than exit.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* nptl/tst-cancel20.c (do_test): Conditionalize SA_SIGINFO-using tests
 	on [SA_SIGINFO].
 	* nptl/tst-cancel21.c (do_test): Likewise.
diff --git a/nptl/tst-cleanup2.c b/nptl/tst-cleanup2.c
index 8a524de..9e5a957 100644
--- a/nptl/tst-cleanup2.c
+++ b/nptl/tst-cleanup2.c
@@ -40,16 +40,11 @@ do_test (void)
      array.  Mark the return value as volatile so that it gets reloaded on
      return.  */
   volatile int ret = 0;
-  struct sigaction sa;
 
-  sa.sa_handler = sig_handler;
-  sigemptyset (&sa.sa_mask);
-  sa.sa_flags = SA_SIGINFO;
-
-  if (sigaction (SIGSEGV, &sa, 0))
+  if (signal (SIGSEGV, &sig_handler) == SIG_ERR)
     {
-      perror ("installing SIGSEGV handler\n");
-      exit (1);
+      perror ("installing SIGSEGV handler");
+      return 1;
     }
 
   puts ("Attempting to sprintf to null ptr");

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13ce2f782f58d5f46daa60deae7197c10544d14b

commit 13ce2f782f58d5f46daa60deae7197c10544d14b
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:53:22 2015 -0800

    Conditionalize some tests' use of SA_SIGINFO.

diff --git a/ChangeLog b/ChangeLog
index 73f1c70..793c74b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* nptl/tst-cancel20.c (do_test): Conditionalize SA_SIGINFO-using tests
+	on [SA_SIGINFO].
+	* nptl/tst-cancel21.c (do_test): Likewise.
+	* debug/tst-backtrace6.c: Include <signal.h> first thing.
+	Conditionalize inclusion of tst-backtrace5.c on [SA_SIGINFO].
+	[!SA_SIGINFO]: Make it a stub test.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* misc/tst-pselect.c (do_test): Don't set SA_NOCLDWAIT in sa_flags for
 	SIGCHLD; it's redundant	with SIG_IGN as sa_handler.
 
diff --git a/debug/tst-backtrace6.c b/debug/tst-backtrace6.c
index eb5028e..9c1ed75 100644
--- a/debug/tst-backtrace6.c
+++ b/debug/tst-backtrace6.c
@@ -17,5 +17,12 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define SIGACTION_FLAGS SA_SIGINFO
-#include <debug/tst-backtrace5.c>
+#include <signal.h>
+
+#ifdef SA_SIGINFO
+# define SIGACTION_FLAGS SA_SIGINFO
+# include <debug/tst-backtrace5.c>
+#else
+# define TEST_FUNCTION  0
+# include "../test-skeleton.c"
+#endif
diff --git a/nptl/tst-cancel20.c b/nptl/tst-cancel20.c
index 4a964da..51b558e 100644
--- a/nptl/tst-cancel20.c
+++ b/nptl/tst-cancel20.c
@@ -227,6 +227,7 @@ do_test (void)
   if (do_one_test ())
     return 1;
 
+#ifdef SA_SIGINFO
   sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh;
   sigemptyset (&sa.sa_mask);
   sa.sa_flags = SA_SIGINFO;
@@ -254,6 +255,7 @@ do_test (void)
   puts ("sa_flags = SA_SIGINFO|SA_ONSTACK test");
   if (do_one_test ())
     return 1;
+#endif
 
   return 0;
 }
diff --git a/nptl/tst-cancel21.c b/nptl/tst-cancel21.c
index 35a27d4..b54f236 100644
--- a/nptl/tst-cancel21.c
+++ b/nptl/tst-cancel21.c
@@ -257,6 +257,7 @@ do_test (void)
   if (do_one_test ())
     return 1;
 
+#ifdef SA_SIGINFO
   sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh;
   sigemptyset (&sa.sa_mask);
   sa.sa_flags = SA_SIGINFO;
@@ -284,6 +285,7 @@ do_test (void)
   puts ("sa_flags = SA_SIGINFO|SA_ONSTACK test");
   if (do_one_test ())
     return 1;
+#endif
 
   return 0;
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86625934d012e20a8e84d9458e22c9bb25729e32

commit 86625934d012e20a8e84d9458e22c9bb25729e32
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:53:09 2015 -0800

    Do not use SA_NOCLDWAIT in tst-pselect.

diff --git a/ChangeLog b/ChangeLog
index 030ab2c..73f1c70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* misc/tst-pselect.c (do_test): Don't set SA_NOCLDWAIT in sa_flags for
+	SIGCHLD; it's redundant	with SIG_IGN as sa_handler.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* posix/tst-getlogin.c: Move to ...
 	* login/tst-getlogin.c: ... here.
 	* posix/Makefile (tests): Move tst-getlogin to ...
diff --git a/misc/tst-pselect.c b/misc/tst-pselect.c
index 095d794..0d11a80 100644
--- a/misc/tst-pselect.c
+++ b/misc/tst-pselect.c
@@ -31,8 +31,6 @@ do_test (void)
     }
 
   sa.sa_handler = SIG_IGN;
-  sa.sa_flags = SA_NOCLDWAIT;
-
   if (sigaction (SIGCHLD, &sa, NULL) != 0)
     {
       puts ("2nd sigaction failed");

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ae675233f4b865cd86eeeb792dcc043cc98f37e

commit 0ae675233f4b865cd86eeeb792dcc043cc98f37e
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:52:55 2015 -0800

    Move tst-getlogin to login/ subdirectory.

diff --git a/ChangeLog b/ChangeLog
index 1fc2e81..030ab2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* posix/tst-getlogin.c: Move to ...
+	* login/tst-getlogin.c: ... here.
+	* posix/Makefile (tests): Move tst-getlogin to ...
+	* login/Makefile (tests): ... here.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* math/test-snan.c: Drop unnecessary #include's of <stdlib.h>,
 	<sys/time.h>, <string.h>, and <errno.h>.
 	(dest_offset, dest_address, value, zero): Remove unused variables.
diff --git a/login/Makefile b/login/Makefile
index a2ebeff..0f4bb22 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -43,7 +43,7 @@ endif
 subdir-dirs = programs
 vpath %.c programs
 
-tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname
+tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin
 
 # Build the -lutil library with these extra functions.
 extra-libs      := libutil
diff --git a/posix/tst-getlogin.c b/login/tst-getlogin.c
similarity index 100%
rename from posix/tst-getlogin.c
rename to login/tst-getlogin.c
diff --git a/posix/Makefile b/posix/Makefile
index 5ee7b28..15e8818 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -64,7 +64,7 @@ routines :=								      \
 aux		:= init-posix environ
 tests		:= tstgetopt testfnm runtests runptests	     \
 		   tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \
-		   tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \
+		   tst-mmap tst-getaddrinfo tst-truncate \
 		   tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \
 		   tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \
 		   tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51b423ba7a2eeb5e6fcc397a17efe1899038c92b

commit 51b423ba7a2eeb5e6fcc397a17efe1899038c92b
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:52:43 2015 -0800

    Clean up math/test-snan.

diff --git a/ChangeLog b/ChangeLog
index 63cb759..1fc2e81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* math/test-snan.c: Drop unnecessary #include's of <stdlib.h>,
+	<sys/time.h>, <string.h>, and <errno.h>.
+	(dest_offset, dest_address, value, zero): Remove unused variables.
+	(ldouble): Remove typedef.
+	(myFPsighandler): Use simple handler signature, not SA_SIGINFO
+	signature.  Pass 1 to siglongjmp rather than 0 (which is converted to
+	1).  Fix code style.
+	(set_sigaction_FP, remove_sigaction_FP): Functions removed.
+	(check): Function removed.
+	(CHECK): New macro.
+	(TEST_FUNC): Fix code style.  Use CHECK macro rather than repeating
+	boilerplate feclearexcept + feenableexcept + sigsetjmp code.
+	Don't call set_sigaction_FP and remove_sigaction_FP here.
+	(ldouble_test): Just use 'long double' as macro argument, no need for
+	the 'ldouble' typedef.
+	(do_test): Set up SIGFPE handler at start, using plain signal rather
+	than sigaction.  Fix code style.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* libio/tst-atime.c (do_test): Move local variables SV and E
 	inside [ST_NOATIME] conditional.
 
diff --git a/math/test-snan.c b/math/test-snan.c
index 2bcf2be..0c36224 100644
--- a/math/test-snan.c
+++ b/math/test-snan.c
@@ -19,73 +19,40 @@
 
 #define _GNU_SOURCE 1
 #include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <string.h>
 #include <math.h>
 #include <float.h>
 #include <fenv.h>
 #include <signal.h>
 #include <setjmp.h>
-#include <errno.h>
 
 #include <math-tests.h>
 
 
-int dest_offset;
-char *dest_address;
-double	value = 123.456;
-double	zero = 0.0;
-
 static sigjmp_buf sigfpe_buf;
 
-typedef long double ldouble;
-
-
-void
-myFPsighandler(int signal,
-             siginfo_t *info,
-             void *context)
-{
-  siglongjmp(sigfpe_buf, 0);
-}
-
-int
-set_sigaction_FP(void)
+static void
+myFPsighandler (int signal)
 {
-    struct sigaction sa;
-    /* register RT signal handler via sigaction */
-    sa.sa_flags = SA_SIGINFO;
-    sa.sa_sigaction = &myFPsighandler;
-    sigemptyset(&sa.sa_mask);
-    sigaction(SIGFPE, &sa, NULL);
-
-    return 0;
-}
-
-int
-remove_sigaction_FP(void)
-{
-    struct sigaction sa;
-    /* restore default RT signal handler via sigaction */
-    sa.sa_flags = SA_SIGINFO;
-    sa.sa_handler = SIG_DFL;
-    sigemptyset(&sa.sa_mask);
-    sigaction(SIGFPE, &sa, NULL);
-
-    return 0;
+  siglongjmp (sigfpe_buf, 1);
 }
 
 static int errors = 0;
 
-static void
-check (const char *testname, int result)
-{
-  if (!result) {
-    printf ("Failure: %s\n", testname);
-    errors++;
-  }
-}
+#define CHECK(testname, expr)						      \
+  do {									      \
+    feclearexcept (FE_ALL_EXCEPT);					      \
+    feenableexcept (FE_ALL_EXCEPT);					      \
+    if (sigsetjmp (sigfpe_buf, 0))					      \
+      {									      \
+	printf ("%s raised SIGFPE\n", testname);			      \
+	++errors;							      \
+      }									      \
+    else if (!(expr))							      \
+      {									      \
+        printf ("Failure: %s\n", testname);				      \
+        ++errors;							      \
+      }									      \
+  } while (0)
 
 #define TEST_FUNC(NAME, FLOAT, SUFFIX)					      \
 static void								      \
@@ -112,278 +79,63 @@ NAME (void)								      \
   (void) &minus_sNaN_var;						      \
   (void) &Inf_var;							      \
 									      \
-  set_sigaction_FP ();							      \
-  fegetenv(&saved_fenv);						      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " issignaling (qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " issignaling (qNaN)", !issignaling (qNaN_var));	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " issignaling (-qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " issignaling (-qNaN)", !issignaling (-qNaN_var));	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " issignaling (sNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " issignaling (sNaN)",				      \
-	     SNAN_TESTS (FLOAT) ? issignaling (sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " issignaling (-sNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " issignaling (-sNaN)",				      \
-	     SNAN_TESTS (FLOAT) ? issignaling (minus_sNaN_var) : 1);	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnan (qNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnan (qNaN)", isnan (qNaN_var));			      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnan (-qNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnan (-qNaN)", isnan (-qNaN_var));		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnan (sNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnan (sNaN)",					      \
-	     SNAN_TESTS (FLOAT) ? isnan (sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnan (-sNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnan (-sNaN)",					      \
-	     SNAN_TESTS (FLOAT) ? isnan (minus_sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isinf (qNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isinf (qNaN)", !isinf (qNaN_var));		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isinf (-qNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isinf (-qNaN)", !isinf (-qNaN_var));		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isinf (sNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isinf (sNaN)",					      \
-	     SNAN_TESTS (FLOAT) ? !isinf (sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isinf (-sNaN) raised SIGFPE\n");			      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isinf (-sNaN)",					      \
-	     SNAN_TESTS (FLOAT) ? !isinf (minus_sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isfinite (qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isfinite (qNaN)", !isfinite (qNaN_var));		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isfinite (-qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isfinite (-qNaN)", !isfinite (-qNaN_var));	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isfinite (sNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isfinite (sNaN)",					      \
-	     SNAN_TESTS (FLOAT) ? !isfinite (sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isfinite (-sNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isfinite (-sNaN)",				      \
-	     SNAN_TESTS (FLOAT) ? !isfinite (minus_sNaN_var) : 1);	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnormal (qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnormal (qNaN)", !isnormal (qNaN_var));		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnormal (-qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnormal (-qNaN)", !isnormal (-qNaN_var));	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnormal (sNaN) isnormal SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnormal (sNaN)",					      \
-	     SNAN_TESTS (FLOAT) ? !isnormal (sNaN_var) : 1);		      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " isnormal (-sNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " isnormal (-sNaN)",				      \
-	     SNAN_TESTS (FLOAT) ? !isnormal (minus_sNaN_var) : 1);	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " fpclassify (qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " fpclassify (qNaN)", (fpclassify (qNaN_var)==FP_NAN));   \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " fpclassify (-qNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " fpclassify (-qNaN)", (fpclassify (-qNaN_var)==FP_NAN)); \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " fpclassify (sNaN) isnormal SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " fpclassify (sNaN)",				      \
-	     SNAN_TESTS (FLOAT) ? fpclassify (sNaN_var) == FP_NAN : 1);	      \
-    }									      \
-									      \
-  feclearexcept(FE_ALL_EXCEPT);						      \
-  feenableexcept (FE_ALL_EXCEPT);					      \
-  if (sigsetjmp(sigfpe_buf, 0))						      \
-    {									      \
-      printf (#FLOAT " fpclassify (-sNaN) raised SIGFPE\n");		      \
-      errors++;								      \
-    } else {								      \
-      check (#FLOAT " fpclassify (-sNaN)",				      \
-	     SNAN_TESTS (FLOAT) ? fpclassify (minus_sNaN_var) == FP_NAN : 1); \
-    }									      \
-									      \
-  fesetenv(&saved_fenv); /* restore saved fenv */			      \
-  remove_sigaction_FP();						      \
-}
+  fegetenv (&saved_fenv);						      \
+									      \
+  CHECK (#FLOAT " issignaling (qNaN)", !issignaling (qNaN_var));	      \
+  CHECK (#FLOAT " issignaling (-qNaN)", !issignaling (-qNaN_var));	      \
+  CHECK (#FLOAT " issignaling (sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? issignaling (sNaN_var) : 1);		      \
+  CHECK (#FLOAT " issignaling (-sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? issignaling (minus_sNaN_var) : 1);	      \
+  CHECK (#FLOAT " isnan (qNaN)", isnan (qNaN_var));			      \
+  CHECK (#FLOAT " isnan (-qNaN)", isnan (-qNaN_var));			      \
+  CHECK (#FLOAT " isnan (sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? isnan (sNaN_var) : 1);			      \
+  CHECK (#FLOAT " isnan (-sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? isnan (minus_sNaN_var) : 1);		      \
+  CHECK (#FLOAT " isinf (qNaN)", !isinf (qNaN_var));			      \
+  CHECK (#FLOAT " isinf (-qNaN)", !isinf (-qNaN_var));			      \
+  CHECK (#FLOAT " isinf (sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? !isinf (sNaN_var) : 1);			      \
+  CHECK (#FLOAT " isinf (-sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? !isinf (minus_sNaN_var) : 1);		      \
+  CHECK (#FLOAT " isfinite (qNaN)", !isfinite (qNaN_var));		      \
+  CHECK (#FLOAT " isfinite (-qNaN)", !isfinite (-qNaN_var));		      \
+  CHECK (#FLOAT " isfinite (sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? !isfinite (sNaN_var) : 1);		      \
+  CHECK (#FLOAT " isfinite (-sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? !isfinite (minus_sNaN_var) : 1);		      \
+  CHECK (#FLOAT " isnormal (qNaN)", !isnormal (qNaN_var));		      \
+  CHECK (#FLOAT " isnormal (-qNaN)", !isnormal (-qNaN_var));		      \
+  CHECK (#FLOAT " isnormal (sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? !isnormal (sNaN_var) : 1);		      \
+  CHECK (#FLOAT " isnormal (-sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? !isnormal (minus_sNaN_var) : 1);		      \
+  CHECK (#FLOAT " fpclassify (qNaN)", (fpclassify (qNaN_var)==FP_NAN));	      \
+  CHECK (#FLOAT " fpclassify (-qNaN)", (fpclassify (-qNaN_var)==FP_NAN));     \
+  CHECK (#FLOAT " fpclassify (sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? fpclassify (sNaN_var) == FP_NAN : 1);	      \
+  CHECK (#FLOAT " fpclassify (-sNaN)",					      \
+         SNAN_TESTS (FLOAT) ? fpclassify (minus_sNaN_var) == FP_NAN : 1);     \
+									      \
+  fesetenv (&saved_fenv); /* restore saved fenv */			      \
+}									      \
 
 TEST_FUNC (float_test, float, f)
 TEST_FUNC (double_test, double, )
 #ifndef NO_LONG_DOUBLE
-TEST_FUNC (ldouble_test, ldouble, l)
+TEST_FUNC (ldouble_test, long double, l)
 #endif
 
 static int
 do_test (void)
 {
-  float_test();
-  double_test();
+  signal (SIGFPE, &myFPsighandler);
+
+  float_test ();
+  double_test ();
 #ifndef NO_LONG_DOUBLE
-  ldouble_test();
+  ldouble_test ();
 #endif
 
   return errors != 0;

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=96a71f8c3e21be67a966dd6fe68681299fa245c0

commit 96a71f8c3e21be67a966dd6fe68681299fa245c0
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:52:22 2015 -0800

    Fix libio/tst-atime not to presume ST_NOATIME exists.

diff --git a/ChangeLog b/ChangeLog
index 106768b..63cb759 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* libio/tst-atime.c (do_test): Move local variables SV and E
+	inside [ST_NOATIME] conditional.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* dirent/tst-fdopendir.c (O_NOATIME): If not defined, #define to 0.
 
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
diff --git a/libio/tst-atime.c b/libio/tst-atime.c
index 0b0b4f0..31ca59f 100644
--- a/libio/tst-atime.c
+++ b/libio/tst-atime.c
@@ -23,8 +23,6 @@ do_test (void)
   int ch;
   struct stat st1;
   struct stat st2;
-  struct statvfs sv;
-  int e;
 
   buf = (char *) malloc (strlen (test_dir) + sizeof "/tst-atime.XXXXXX");
   if (buf == NULL)
@@ -44,7 +42,8 @@ do_test (void)
 #ifdef ST_NOATIME
   /* Make sure the filesystem doesn't have the noatime option set.  If
      statvfs is not available just continue.  */
-  e = fstatvfs (fd, &sv);
+  struct statvfs sv;
+  int e = fstatvfs (fd, &sv);
   if (e != ENOSYS)
     {
       if (e != 0)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9db1da13e86bfc39c631fca4ea81b0f7c4fa60d7

commit 9db1da13e86bfc39c631fca4ea81b0f7c4fa60d7
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:50:35 2015 -0800

    Fix dirent/tst-fdopendir not to presume O_NOATIME exists.

diff --git a/ChangeLog b/ChangeLog
index 2eefd30..106768b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* dirent/tst-fdopendir.c (O_NOATIME): If not defined, #define to 0.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* nptl/tst-kill5.c (do_test): Use INT_MAX rather than SIGRTMAX + 10.
 
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
diff --git a/dirent/tst-fdopendir.c b/dirent/tst-fdopendir.c
index 3cf315d..0780c19 100644
--- a/dirent/tst-fdopendir.c
+++ b/dirent/tst-fdopendir.c
@@ -6,6 +6,9 @@
 #include <stdbool.h>
 #include <string.h>
 
+#ifndef O_NOATIME
+# define O_NOATIME	0
+#endif
 
 static int
 do_test (void)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf492bc3e99ae93ecdec3adcae20fc509b2dec60

commit cf492bc3e99ae93ecdec3adcae20fc509b2dec60
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:50:23 2015 -0800

    Fix nptl/tst-kill5 not to presume SIGRTMAX exists.

diff --git a/ChangeLog b/ChangeLog
index ac69a8e..2eefd30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-01-27  Roland McGrath  <roland@hack.frob.com>
 
+	* nptl/tst-kill5.c (do_test): Use INT_MAX rather than SIGRTMAX + 10.
+
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
 	* nptl/tst-join5.c: Drop #include <sys/syscall.h>.
 	(wait_code): New function replaces macro.
 	Call nanosleep rather than syscall.
diff --git a/nptl/tst-kill5.c b/nptl/tst-kill5.c
index f16aae9..0717c03 100644
--- a/nptl/tst-kill5.c
+++ b/nptl/tst-kill5.c
@@ -21,6 +21,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <limits.h>
 
 
 int
@@ -28,7 +29,7 @@ do_test (void)
 {
   /* XXX This test might require architecture and system specific changes.
      There is no guarantee that this signal number is invalid.  */
-  int e = pthread_kill (pthread_self (), SIGRTMAX + 10);
+  int e = pthread_kill (pthread_self (), INT_MAX);
   if (e == 0)
     {
       puts ("kill didn't failed");

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dbaba67b53643e46e789aa176c62c37ffa5c8301

commit dbaba67b53643e46e789aa176c62c37ffa5c8301
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jan 27 12:50:09 2015 -0800

    Clean up nptl/tst-join5 use of nanosleep.

diff --git a/ChangeLog b/ChangeLog
index 2aef0fe..ac69a8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-27  Roland McGrath  <roland@hack.frob.com>
+
+	* nptl/tst-join5.c: Drop #include <sys/syscall.h>.
+	(wait_code): New function replaces macro.
+	Call nanosleep rather than syscall.
+
 2015-02-05  Roland McGrath  <roland@hack.frob.com>
 
 	* inet/Versions (libc: GLIBC_2.0): Move getrpcbyname, getrpcbyname_r,
diff --git a/nptl/tst-join5.c b/nptl/tst-join5.c
index e83f895..b45d210 100644
--- a/nptl/tst-join5.c
+++ b/nptl/tst-join5.c
@@ -22,15 +22,15 @@
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/syscall.h>
 
 
-#define wait_code()							      \
-  do {									      \
-    struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 };		      \
-    while (syscall (__NR_nanosleep, &ts, &ts) < 0)			      \
-      /* nothing */;							      \
-  } while (0)
+static void
+wait_code (void)
+{
+  struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 };
+  while (nanosleep (&ts, &ts) < 0)
+    ;
+}
 
 
 #ifdef WAIT_IN_CHILD

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bed9525c7e2cf61d213567191b4111c8e485adbc

commit bed9525c7e2cf61d213567191b4111c8e485adbc
Author: Roland McGrath <roland@hack.frob.com>
Date:   Thu Feb 5 14:49:16 2015 -0800

    Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc.

diff --git a/ChangeLog b/ChangeLog
index e6d71ee..2aef0fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,35 @@
 2015-02-05  Roland McGrath  <roland@hack.frob.com>
 
+	* inet/Versions (libc: GLIBC_2.0): Move getrpcbyname, getrpcbyname_r,
+	getrpcbynumber, getrpcbynumber_r, getrpcent, getrpcent_r, endrpcent,
+	setrpcent, and getrpcport to ...
+	* sunrpc/Versions (libc: GLIBC_2.0): ... here.
+	* inet/Versions (libc: GLIBC_2.1.2): Move getrpcbyname_r,
+	getrpcbynumber_r, and getrpcent_r to ...
+	* sunrpc/Versions (libc: GLIBC_2.1.2): ... this new set.
+	* inet/getrpcbyname.c: Moved ...
+	* sunrpc/getrpcbyname.c: ... here.
+	* inet/getrpcbyname_r.c: Moved ...
+	* sunrpc/getrpcbyname_r.c: ... here.
+	* inet/getrpcbynumber.c: Moved ...
+	* sunrpc/getrpcbynumber.c: ... here.
+	* inet/getrpcbynumber_r.c: Moved ...
+	* sunrpc/getrpcbynumber_r.c: ... here.
+	* inet/getrpcent.c: Moved ...
+	* sunrpc/getrpcent.c: ... here.
+	* inet/getrpcent_r.c: Moved ...
+	* sunrpc/getrpcent_r.c: ... here.
+	* inet/Makefile (routines): Move those to ...
+	* sunrpc/Makefile (routines): ... here.
+	* nss/Makefile (databases): Add key and rpc only if sunrpc appears in
+	the $(subdirs) list.
+	(CPPFLAGS-getent.c): New variable.  Pass -D option to set HAVE_SUNRPC
+	to 0 or 1, indicating whether sunrpc appears in the $(subdirs) list.
+	* nss/getent.c (print_rpc, rpc_keys): Conditionalize on [HAVE_SUNRPC].
+	(databases): Conditionalize rpc entry on [HAVE_SUNRPC].
+
+2015-02-05  Roland McGrath  <roland@hack.frob.com>
+
 	* elf/Makefile (routines): Include $(all-dl-routines), not just
 	$(dl-routines).
 	(rtld-routines): Likewise.  Use = rather than :=.
diff --git a/inet/Makefile b/inet/Makefile
index 267f060..f1d871f 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -37,8 +37,6 @@ routines := htonl htons		\
 	    getproto getproto_r getprtent getprtent_r getprtname getprtname_r \
 	    getsrvbynm getsrvbynm_r getsrvbypt getsrvbypt_r getservent \
 	    getservent_r	\
-	    getrpcent getrpcbyname getrpcbynumber \
-	    getrpcent_r getrpcbyname_r getrpcbynumber_r \
 	    ether_aton ether_aton_r ether_hton ether_line \
 	    ether_ntoa ether_ntoa_r ether_ntoh \
 	    rcmd rexec ruserpass \
diff --git a/inet/Versions b/inet/Versions
index 0650719..56eb274 100644
--- a/inet/Versions
+++ b/inet/Versions
@@ -7,8 +7,7 @@ libc {
     rexecoptions;
 
     # e*
-    endaliasent; endhostent; endnetent; endnetgrent; endprotoent; endrpcent;
-    endservent;
+    endaliasent; endhostent; endnetent; endnetgrent; endprotoent; endservent;
 
     # e*
     ether_aton; ether_aton_r; ether_hostton; ether_line; ether_ntoa;
@@ -21,9 +20,8 @@ libc {
     gethostent_r; getnetbyaddr; getnetbyaddr_r; getnetbyname;
     getnetbyname_r; getnetent; getnetent_r; getnetgrent; getnetgrent_r;
     getprotobyname; getprotobyname_r; getprotobynumber;
-    getprotobynumber_r; getprotoent; getprotoent_r; getrpcbyname;
-    getrpcbyname_r; getrpcbynumber; getrpcbynumber_r; getrpcent; getrpcent_r;
-    getrpcport; getservbyname; getservbyname_r; getservbyport;
+    getprotobynumber_r; getprotoent; getprotoent_r;
+    getservbyname; getservbyname_r; getservbyport;
     getservbyport_r; getservent; getservent_r;
 
     # h*
@@ -41,7 +39,7 @@ libc {
     rcmd; rexec; rresvport; ruserok; ruserpass;
 
     # s*
-    setaliasent; setnetent; setnetgrent; setprotoent; setrpcent; setservent;
+    setaliasent; setnetent; setnetgrent; setprotoent; setservent;
   }
   GLIBC_2.1 {
     # variables in normal name space
@@ -55,8 +53,7 @@ libc {
     getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r;
     gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r;
     getnetent_r; getnetgrent_r; getprotobyname_r; getprotobynumber_r;
-    getprotoent_r; getrpcbyname_r; getrpcbynumber_r; getrpcent_r;
-    getservbyname_r;
+    getprotoent_r; getservbyname_r;
   }
   GLIBC_2.2 {
     # i*
diff --git a/nss/Makefile b/nss/Makefile
index d419baf..d75dad2 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -31,8 +31,16 @@ routines		= nsswitch getnssent getnssent_r digits_dots \
 # These are the databases that go through nss dispatch.
 # Caution: if you add a database here, you must add its real name
 # in databases.def, too.
-databases		= proto service hosts network grp pwd rpc ethers \
-			  spwd netgrp key alias sgrp
+databases		= proto service hosts network grp pwd ethers \
+			  spwd netgrp alias sgrp
+
+ifneq (,$(filter sunrpc,$(subdirs)))
+databases		+= key rpc
+have-sunrpc		:= 1
+else
+have-sunrpc		:= 0
+endif
+CPPFLAGS-getent.c	= -DHAVE_SUNRPC=$(have-sunrpc)
 
 others                  := getent makedb
 install-bin             := getent makedb
diff --git a/nss/getent.c b/nss/getent.c
index 901ec5e..34df848 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -700,6 +700,7 @@ protocols_keys (int number, char *key[])
   return result;
 }
 
+#if HAVE_SUNRPC
 /* Now is all for rpc */
 static void
 print_rpc (struct rpcent *rpc)
@@ -745,6 +746,7 @@ rpc_keys (int number, char *key[])
 
   return result;
 }
+#endif
 
 /* for services */
 static void
@@ -884,7 +886,9 @@ D(netgroup)
 D(networks)
 D(passwd)
 D(protocols)
+#if HAVE_SUNRPC
 D(rpc)
+#endif
 D(services)
 D(shadow)
 #undef D
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index b65f2f5..c29f4a9 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -76,6 +76,8 @@ routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
 	    pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \
 	    svc_simple xdr_float xdr_rec publickey authdes_prot \
 	    des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \
+	    getrpcent getrpcbyname getrpcbynumber \
+	    getrpcent_r getrpcbyname_r getrpcbynumber_r \
 	    clnt_unix svc_unix create_xid $(need-export-routines)
 ifneq ($(link-obsolete-rpc),yes)
 # We only add the RPC for compatibility to libc.so.
diff --git a/sunrpc/Versions b/sunrpc/Versions
index a11dd8d..77bc6a4 100644
--- a/sunrpc/Versions
+++ b/sunrpc/Versions
@@ -21,8 +21,13 @@ libc {
     clnt_perror; clnt_spcreateerror; clnt_sperrno; clnt_sperror;
     clntraw_create; clnttcp_create; clntudp_bufcreate; clntudp_create;
 
+    # e*
+    endrpcent;
+
     # g*
     get_myaddress; getpublickey; getsecretkey;
+    getrpcbyname; getrpcbyname_r; getrpcbynumber; getrpcbynumber_r;
+    getrpcent; getrpcent_r; getrpcport;
 
     # p*
     pmap_getmaps; pmap_getport; pmap_rmtcall; pmap_set; pmap_unset;
@@ -31,6 +36,7 @@ libc {
     registerrpc;
 
     # s*
+    setrpcent;
     svc_exit; svc_getreq; svc_getreqset; svc_register; svc_run;
     svc_sendreply; svc_unregister; svcerr_auth; svcerr_decode;
     svcerr_noproc; svcerr_noprog; svcerr_progvers; svcerr_systemerr;
@@ -106,6 +112,9 @@ libc {
     xdr_hyper; xdr_u_hyper; xdr_longlong_t; xdr_u_longlong_t;
     xdr_int64_t; xdr_uint64_t;
   }
+  GLIBC_2.1.2 {
+    getrpcbyname_r; getrpcbynumber_r; getrpcent_r;
+  }
   GLIBC_2.2 {
     svc_getreq_common; svc_getreq_poll; svc_max_pollfd; svc_pollfd;
   }
diff --git a/inet/getrpcbyname.c b/sunrpc/getrpcbyname.c
similarity index 100%
rename from inet/getrpcbyname.c
rename to sunrpc/getrpcbyname.c
diff --git a/inet/getrpcbyname_r.c b/sunrpc/getrpcbyname_r.c
similarity index 100%
rename from inet/getrpcbyname_r.c
rename to sunrpc/getrpcbyname_r.c
diff --git a/inet/getrpcbynumber.c b/sunrpc/getrpcbynumber.c
similarity index 100%
rename from inet/getrpcbynumber.c
rename to sunrpc/getrpcbynumber.c
diff --git a/inet/getrpcbynumber_r.c b/sunrpc/getrpcbynumber_r.c
similarity index 100%
rename from inet/getrpcbynumber_r.c
rename to sunrpc/getrpcbynumber_r.c
diff --git a/inet/getrpcent.c b/sunrpc/getrpcent.c
similarity index 100%
rename from inet/getrpcent.c
rename to sunrpc/getrpcent.c
diff --git a/inet/getrpcent_r.c b/sunrpc/getrpcent_r.c
similarity index 100%
rename from inet/getrpcent_r.c
rename to sunrpc/getrpcent_r.c

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d992f74718975a6e2b885eb3f8d496eaea2e6170

commit d992f74718975a6e2b885eb3f8d496eaea2e6170
Author: Roland McGrath <roland@hack.frob.com>
Date:   Thu Feb 5 14:48:56 2015 -0800

    Clean up sysdep-dl-routines variable.

diff --git a/ChangeLog b/ChangeLog
index 43c6082..e6d71ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,32 @@
 2015-02-05  Roland McGrath  <roland@hack.frob.com>
 
+	* elf/Makefile (routines): Include $(all-dl-routines), not just
+	$(dl-routines).
+	(rtld-routines): Likewise.  Use = rather than :=.
+	* sysdeps/aarch64/Makefile [$(subdir) = elf]
+	(sysdep_routines, sysdep-rtld-routines): Don't add tlsdesc and
+	dl-tlsdesc to these; sysdep-dl-routines alone is enough.
+	* sysdeps/arm/Makefile: Likewise.
+	* sysdeps/i386/Makefile: Likewise.
+	* sysdeps/x86_64/Makefile: Likewise.
+	* sysdeps/hppa/Makefile [$(subdir) = elf]
+	(sysdep_routines, sysdep-rtld-routines): Don't add
+	$(sysdep-dl-routines) to these.
+	* sysdeps/ia64/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/aarch64/Makefile [$(subdir) = elf]
+	[$(build-shared) = yes] (sysdep_routines, sysdep-rtld-routines):
+	Don't add dl-static to these; sysdep-dl-routines alone is enough.
+	* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/mips/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/tile/Makefile: Likewise.
+	* sysdeps/powerpc/Makefile [$(subdir) = elf]
+	(sysdep_routines, sysdep-rtld-routines): Don't add dl-machine to
+	these; sysdep-dl-routines alone is enough.
+
+2015-02-05  Roland McGrath  <roland@hack.frob.com>
+
 	* nptl/pt-system.c: Rewritten.  Put everything under
 	[SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_22)].
 	Use IFUNC to redirect when possible.
diff --git a/elf/Makefile b/elf/Makefile
index e5b142c..f2d1781 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -22,7 +22,7 @@ subdir		:= elf
 include ../Makeconfig
 
 headers		= elf.h bits/elfclass.h link.h bits/link.h
-routines	= $(dl-routines) dl-support dl-iteratephdr \
+routines	= $(all-dl-routines) dl-support dl-iteratephdr \
 		  dl-addr enbl-secure dl-profstub \
 		  dl-origin dl-libc dl-sym dl-tsd dl-sysdep
 
@@ -43,7 +43,7 @@ shared-only-routines += dl-caller
 
 # ld.so uses those routines, plus some special stuff for being the program
 # interpreter and operating independent of libc.
-rtld-routines	:= rtld $(dl-routines) dl-sysdep dl-environ dl-minimal
+rtld-routines	= rtld $(all-dl-routines) dl-sysdep dl-environ dl-minimal
 all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
 
 CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/sysdeps/aarch64/Makefile b/sysdeps/aarch64/Makefile
index 5af7a16..0632355 100644
--- a/sysdeps/aarch64/Makefile
+++ b/sysdeps/aarch64/Makefile
@@ -6,8 +6,6 @@ endif
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += tlsdesc dl-tlsdesc
-sysdep_routines += tlsdesc dl-tlsdesc
-sysdep-rtld-routines += tlsdesc dl-tlsdesc
 gen-as-const-headers += dl-link.sym
 endif
 
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
index f72cce0..17c129b 100644
--- a/sysdeps/arm/Makefile
+++ b/sysdeps/arm/Makefile
@@ -3,8 +3,8 @@ static-gnulib-arch = $(elf-objpfx)libgcc-stubs.a
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += tlsdesc dl-tlsdesc
-sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
-sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
+sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
+sysdep-rtld-routines += aeabi_unwind_cpp_pr1
 shared-only-routines += aeabi_unwind_cpp_pr1
 
 $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index 9e24349..eed6aca 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -24,8 +24,6 @@ LDFLAGS-c_pic.os += -Wl,--unique=.text*
 ifeq ($(subdir),elf)
 CFLAGS-rtld.c += -mdisable-fpregs
 sysdep-dl-routines += dl-symaddr dl-fptr
-sysdep_routines += $(sysdep-dl-routines)
-sysdep-rtld-routines += $(sysdep-dl-routines)
 endif
 
 ifeq ($(subdir),csu)
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index e1deece..c8af591 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -66,8 +66,6 @@ endif
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += tlsdesc dl-tlsdesc
-sysdep_routines += tlsdesc dl-tlsdesc
-sysdep-rtld-routines += tlsdesc dl-tlsdesc
 endif
 
 ifeq ($(subdir),csu)
diff --git a/sysdeps/ia64/Makefile b/sysdeps/ia64/Makefile
index 09e41f2..5ebca89 100644
--- a/sysdeps/ia64/Makefile
+++ b/sysdeps/ia64/Makefile
@@ -17,6 +17,4 @@ endif
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += dl-symaddr dl-fptr
-sysdep_routines += $(sysdep-dl-routines)
-sysdep-rtld-routines += $(sysdep-dl-routines)
 endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/Makefile b/sysdeps/unix/sysv/linux/aarch64/Makefile
index f2f28ee..6b4e620 100644
--- a/sysdeps/unix/sysv/linux/aarch64/Makefile
+++ b/sysdeps/unix/sysv/linux/aarch64/Makefile
@@ -10,8 +10,6 @@ sysdep-rtld-routines += __read_tp
 ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
-sysdep_routines += dl-static
-sysdep-rtld-routines += dl-static
 endif
 endif
 
diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile
index f1049c3..359e0c2 100644
--- a/sysdeps/unix/sysv/linux/ia64/Makefile
+++ b/sysdeps/unix/sysv/linux/ia64/Makefile
@@ -15,8 +15,6 @@ endif
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += dl-static
-sysdep_routines += $(sysdep-dl-routines)
-sysdep-rtld-routines += $(sysdep-dl-routines)
 endif
 
 ifeq ($(subdir),rt)
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index de27824..61c355a 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -13,8 +13,8 @@ endif
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += dl-static
-sysdep_routines += dl-vdso libc-m68k-vdso dl-static
-sysdep-rtld-routines += m68k-vdso dl-static
+sysdep_routines += dl-vdso libc-m68k-vdso
+sysdep-rtld-routines += m68k-vdso
 sysdep-others += lddlibc4
 install-bin += lddlibc4
 endif
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 25fb18b..8127025 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -96,8 +96,6 @@ ifeq ($(subdir),elf)
 ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
-sysdep_routines += dl-static
-sysdep-rtld-routines += dl-static
 endif
 endif
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index dd5d3bc..fcf3bb5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -19,8 +19,6 @@ sysdep_routines += dl-vdso
 ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
-sysdep_routines += dl-static
-sysdep-rtld-routines += dl-static
 endif
 endif
 
diff --git a/sysdeps/unix/sysv/linux/tile/Makefile b/sysdeps/unix/sysv/linux/tile/Makefile
index 6d360c0..1c1cfff 100644
--- a/sysdeps/unix/sysv/linux/tile/Makefile
+++ b/sysdeps/unix/sysv/linux/tile/Makefile
@@ -19,8 +19,6 @@ sysdep_routines += dl-vdso
 ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
-sysdep_routines += dl-static
-sysdep-rtld-routines += dl-static
 endif
 endif
 
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 32b36d5..ef70a50 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -20,8 +20,6 @@ endif
 
 ifeq ($(subdir),elf)
 sysdep-dl-routines += tlsdesc dl-tlsdesc
-sysdep_routines += tlsdesc dl-tlsdesc
-sysdep-rtld-routines += tlsdesc dl-tlsdesc
 
 tests += tst-quad1 tst-quad2
 modules-names += tst-quadmod1 tst-quadmod2

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]