diff options
author | Joseph Myers <joseph@codesourcery.com> | 2016-05-17 15:48:29 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2016-05-17 15:48:29 +0000 |
commit | b098852ac2664e7857387c2071439e1473e6e899 (patch) | |
tree | 0decf253e2c4740ed3bea477ff966e2e7542f1af /stdlib | |
parent | Correct ttyslot header declaration conditions (bug 20051). (diff) | |
download | glibc-b098852ac2664e7857387c2071439e1473e6e899.tar.gz glibc-b098852ac2664e7857387c2071439e1473e6e899.tar.bz2 glibc-b098852ac2664e7857387c2071439e1473e6e899.zip |
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.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/stdlib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 5c0c982ccf..ad9c6c8904 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 |