summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-04-29 16:47:14 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-04-29 16:47:14 +0000
commitdcb0e9d4be21cac28319300d0c66526aae3ec75e (patch)
tree2ee6254f90cc451176466754ff33d5466ed4fffc /cpp/src
parentFixed bugs, added method to instantiate a server with the admin interface. (diff)
downloadice-dcb0e9d4be21cac28319300d0c66526aae3ec75e.tar.bz2
ice-dcb0e9d4be21cac28319300d0c66526aae3ec75e.tar.xz
ice-dcb0e9d4be21cac28319300d0c66526aae3ec75e.zip
Added call to srand48()
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Instance.cpp3
-rw-r--r--cpp/src/IceUtil/Thread.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index dec825794a8..3b9403d825e 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -439,6 +439,9 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope
unsigned int seed = static_cast<unsigned int>(IceUtil::Time::now().toMicroSeconds());
srand(seed);
+#ifndef _WIN32
+ srand48(seed);
+#endif
if(_properties->getPropertyAsInt("Ice.NullHandleAbort") > 0)
{
diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp
index 9a4897558b5..1e7c43489e2 100644
--- a/cpp/src/IceUtil/Thread.cpp
+++ b/cpp/src/IceUtil/Thread.cpp
@@ -189,6 +189,9 @@ startHook(void* arg)
//
unsigned int seed = static_cast<unsigned int>(IceUtil::Time::now().toMicroSeconds());
srand(seed);
+#ifndef _WIN32
+ srand48(seed);
+#endif
//
// Ensure that the thread doesn't go away until run() has