From: mquinson Date: Mon, 17 Jul 2006 17:16:17 +0000 (+0000) Subject: Get xbt_init seeding the system random generator X-Git-Tag: v3.3~2756 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/020eb26a4ec67a9ead30b460e0ef977425eda1c0 Get xbt_init seeding the system random generator git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2603 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/module.c b/src/xbt/module.c index 652b0c795a..f6f079cc8b 100644 --- a/src/xbt/module.c +++ b/src/xbt/module.c @@ -7,6 +7,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "time.h" /* to seed the random generator */ + #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/dynar.h" @@ -38,6 +40,7 @@ xbt_init(int *argc, char **argv) { return; xbt_binary_name = strdup(argv[0]); + srand((unsigned int)time(NULL)); VERB0("Initialize XBT"); xbt_log_init(argc,argv);