summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext/algorithm
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2003-12-04 19:37:21 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2003-12-04 19:37:21 +0000
commit82fa4538b5437476dabcb695c381eda2a3742a7c (patch)
treec4b41551fc999d690c910e50dfb93f1258a707e2 /libstdc++-v3/include/ext/algorithm
parentcb611e3e83647cf4efbe784e0092294bf8f51b07 (diff)
downloadgcc-82fa4538b5437476dabcb695c381eda2a3742a7c.tar.gz
re PR libstdc++/13284 (126 g++ failures due to lrand48 not defined)
2003-12-04 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/13284 * include/bits/stl_algo.h (__random_number): Remove. (random_shuffle): Use rand, as permitted by DR 395. * include/ext/algorithm: Same. * linkage.m4 (GLIBCXX_CHECK_STDLIB_SUPPORT): Remove lrand48. * acconfig.h: Same. * crossconfig.m4: Remove HAVE_DRAND48, HAVE_LRAND48. * config.h.in: Regenerated. * configure: Same. * aclocal.m4: Same. From-SVN: r74288
Diffstat (limited to 'libstdc++-v3/include/ext/algorithm')
-rw-r--r--libstdc++-v3/include/ext/algorithm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/ext/algorithm b/libstdc++-v3/include/ext/algorithm
index dfb551535cd..fa6996cd7c9 100644
--- a/libstdc++-v3/include/ext/algorithm
+++ b/libstdc++-v3/include/ext/algorithm
@@ -274,7 +274,7 @@ namespace __gnu_cxx
_Distance __m = min(__n, __remaining);
while (__m > 0) {
- if (std::__random_number(__remaining) < __m) {
+ if ((std::rand() % __remaining) < __m) {
*__out = *__first;
++__out;
--__m;
@@ -335,7 +335,7 @@ namespace __gnu_cxx
while (__first != __last) {
++__t;
- _Distance __M = std::__random_number(__t);
+ _Distance __M = std::rand() % (__t);
if (__M < __n)
__out[__M] = *__first;
++__first;