Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-12-29 09:33:30 +0300
committerChristopher Faylor <me@cgf.cx>2010-12-29 09:33:30 +0300
commit2be50cacae3b600f699a07a3bc24505ad98b16a2 (patch)
tree2b8410294874b9c55db17e2fbcf611e73b3c3bbc /winsup/cygwin/cygtls.cc
parentc27459e6757edf6246e010a3e19325717b6a18a4 (diff)
* cygtls.cc: Include stdlib.h.
(_cygtls::init_thread): Seed random number generator on a per-thread basis.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index c59f0cbd0..730c14182 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -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 ();