diff options
| author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-04 19:37:21 +0000 |
|---|---|---|
| committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-04 19:37:21 +0000 |
| commit | b87cc05b351ece3650993daa6d5ce0c80f5ee645 (patch) | |
| tree | c4b41551fc999d690c910e50dfb93f1258a707e2 /libstdc++-v3/include/ext/algorithm | |
| parent | 715b1e2a84e50cd2715745849e20670717e6cebe (diff) | |
| download | ppe42-gcc-b87cc05b351ece3650993daa6d5ce0c80f5ee645.tar.gz ppe42-gcc-b87cc05b351ece3650993daa6d5ce0c80f5ee645.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74288 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext/algorithm')
| -rw-r--r-- | libstdc++-v3/include/ext/algorithm | 4 |
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; |

