X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Frandom%2Frandom.c;h=1e8390abe24ffcb323a0c2c261709d1afec06e03;hb=d191fe153c29168087ae76c7d672d7fcf217fbad;hp=b8295a73d72b2c1a387c7baa6a51b4ea5a6d1474;hpb=fdbd674832f07e7388761a004321edd1089e8d39;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/random/random.c b/src/gromacs/random/random.c index b8295a73d7..1e8390abe2 100644 --- a/src/gromacs/random/random.c +++ b/src/gromacs/random/random.c @@ -45,17 +45,11 @@ #include #include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef GMX_NATIVE_WINDOWS -#include -#endif - #include "external/Random123-1.08/include/Random123/threefry.h" #include "gromacs/math/utilities.h" #include "gromacs/random/random_gausstable.h" +#include "gromacs/utility/sysinfo.h" #define RNG_N 624 #define RNG_M 397 @@ -237,12 +231,8 @@ gmx_rng_make_seed(void) else { /* No random device available, use time-of-day and process id */ -#ifdef GMX_NATIVE_WINDOWS - my_pid = (long)_getpid(); -#else - my_pid = (long)getpid(); -#endif - data = (unsigned int)(((long)time(NULL)+my_pid) % (long)1000000); + my_pid = gmx_getpid(); + data = (unsigned int)(((long)time(NULL)+my_pid) % (long)1000000); } return data; }