OSDN Git Service

2006-09-12 Paul Brook <paul@codesourcery.com>
authorjjohnstn <jjohnstn>
Tue, 12 Sep 2006 17:31:40 +0000 (17:31 +0000)
committerjjohnstn <jjohnstn>
Tue, 12 Sep 2006 17:31:40 +0000 (17:31 +0000)
        * libc/stdlib/rand.c (srand): Add _REENT_CHECK_RAND48.

newlib/ChangeLog
newlib/libc/stdlib/rand.c

index 9c9d8d2..b313eff 100644 (file)
@@ -1,5 +1,10 @@
+2006-09-12  Paul Brook  <paul@codesourcery.com>
+
+       * libc/stdlib/rand.c (srand): Add _REENT_CHECK_RAND48.
+
 2006-09-07  Masaki Muranaka  <monaka@monami-software.com>
 
+
        * libc/machine/xstormy16/Makefile.am:
        Add $(lpfx) prefix to LIBADD objects.
        lib_a_DEPENDENCIES uses the value of lib_a_LIBADD.
index 6a46aa8..131e5cf 100644 (file)
@@ -72,7 +72,8 @@ on two different systems.
 void
 _DEFUN (srand, (seed), unsigned int seed)
 {
-        _REENT_RAND_NEXT(_REENT) = seed;
+  _REENT_CHECK_RAND48(_REENT);
+  _REENT_RAND_NEXT(_REENT) = seed;
 }
 
 int