]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygtls.cc: Include stdlib.h.
authorChristopher Faylor <me@cgf.cx>
Wed, 29 Dec 2010 06:33:30 +0000 (06:33 +0000)
committerChristopher Faylor <me@cgf.cx>
Wed, 29 Dec 2010 06:33:30 +0000 (06:33 +0000)
(_cygtls::init_thread): Seed random number generator on a per-thread basis.

winsup/cygwin/ChangeLog
winsup/cygwin/cygtls.cc

index 51a7bb5fd9595ba9bbd3d5433ec2e9ab578136bd..cd103f7e99a6f23462dcfdf3707427f06e33c9b8 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-29  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * cygtls.cc: Include stdlib.h.
+       (_cygtls::init_thread): Seed random number generator on a per-thread
+       basis.
+
 2010-12-27  Christopher Faylor  <me+cygwin@cgf.cx>
 
        * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 234.
index c59f0cbd06b40d7060eae8d2248679ee4a9935e2..730c1418201fc13405d440f6f975ef32201b3476 100644 (file)
@@ -10,6 +10,7 @@ details. */
 #define USE_SYS_TYPES_FD_SET
 #include "cygtls.h"
 #include <syslog.h>
+#include <stdlib.h>
 #include "path.h"
 #include "fhandler.h"
 #include "dtable.h"
@@ -93,6 +94,7 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
        }
       local_clib._current_locale = "C";
       locals.process_logmask = LOG_UPTO (LOG_DEBUG);
+      srand48 ((long int) &x);
     }
 
   thread_id = GetCurrentThreadId ();
This page took 0.0368 seconds and 5 git commands to generate.