From 7c325b8aab369b3db924f9c3bcfbf8a97523745c Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 20 Apr 2019 22:47:09 +0200 Subject: [PATCH] drand48 is not used anymore; stop using srand48. --- ChangeLog | 3 +++ src/instr/instr_private.hpp | 2 -- src/xbt/xbt_main.cpp | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 951d936a71..31b379070b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ SimGrid (3.23) NOT RELEASED (Release Target: June 21. 2019, 15:54 UTC) +General: + - Stop setting random seed with srand48() at initialization. + XBT: - New log appenders: stdout and stderr. Use stdout for xbt_help. - Drop xbt_dict_dump. diff --git a/src/instr/instr_private.hpp b/src/instr/instr_private.hpp index 985d664e1c..4aa5ee91c0 100644 --- a/src/instr/instr_private.hpp +++ b/src/instr/instr_private.hpp @@ -27,8 +27,6 @@ #include #ifdef WIN32 #include // _mkdir -/* Need to define function drand48 for Windows */ -#define drand48() (rand() / (RAND_MAX + 1.0)) #endif typedef simgrid::instr::Container* container_t; diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index 5fe38453b0..5a80ce6412 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -93,11 +93,6 @@ static void xbt_preinit() #endif xbt_log_preinit(); xbt_dict_preinit(); - -#ifndef _WIN32 - constexpr unsigned seed = 2147483647; - srand48(seed); // FIXME: still worthwhile? -#endif atexit(xbt_postexit); } -- 2.20.1