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 master updated. glibc-2.23-328-gb098852


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, master has been updated
       via  b098852ac2664e7857387c2071439e1473e6e899 (commit)
      from  4242d9683fef6e618b80ec939adc37ff25cd2d79 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit b098852ac2664e7857387c2071439e1473e6e899
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue May 17 15:48:29 2016 +0000

    Fix stdlib.h rand_r namespace (bug 20074).
    
    stdlib.h declares rand_r if __USE_POSIX; i.e., POSIX.1:1990.  But
    rand_r was added along with threads, so the condition should be
    __USE_POSIX199506.  This patch corrects the condition.
    
    Tested for x86_64 and x86 (testsuite, and that installed stripped
    shared libraries are unchanged by the patch).
    
    	[BZ #20074]
    	* stdlib/stdlib.h (rand_r): Declare if [__USE_POSIX199506], not if
    	[__USE_POSIX].
    	* conform/Makefile (test-xfail-XPG4/stdlib.h/conform): Remove
    	variable.

diff --git a/ChangeLog b/ChangeLog
index ead0766..7d38ded 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-05-17  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #20074]
+	* stdlib/stdlib.h (rand_r): Declare if [__USE_POSIX199506], not if
+	[__USE_POSIX].
+	* conform/Makefile (test-xfail-XPG4/stdlib.h/conform): Remove
+	variable.
+
 	[BZ #20051]
 	* posix/unistd.h [__USE_XOPEN_EXTENDED && !__USE_UNIX98]
 	(ttyslot): Do not declare.
diff --git a/conform/Makefile b/conform/Makefile
index ab9da78..8e9ad85 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -174,7 +174,6 @@ test-xfail-XPG4/arpa/inet.h/conform = yes
 test-xfail-XPG4/netdb.h/conform = yes
 test-xfail-XPG4/netinet/in.h/conform = yes
 test-xfail-XPG4/signal.h/conform = yes
-test-xfail-XPG4/stdlib.h/conform = yes
 test-xfail-XPG4/sys/stat.h/conform = yes
 test-xfail-XPG4/sys/wait.h/conform = yes
 test-xfail-XPG4/ucontext.h/conform = yes
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 5c0c982..ad9c6c8 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -337,7 +337,7 @@ extern int rand (void) __THROW;
 extern void srand (unsigned int __seed) __THROW;
 __END_NAMESPACE_STD
 
-#ifdef __USE_POSIX
+#ifdef __USE_POSIX199506
 /* Reentrant interface according to POSIX.1.  */
 extern int rand_r (unsigned int *__seed) __THROW;
 #endif

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

Summary of changes:
 ChangeLog        |    6 ++++++
 conform/Makefile |    1 -
 stdlib/stdlib.h  |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)


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]