diff -r 93d455c647be -r 20f95cd51aba lemon/random.h --- a/lemon/random.h Tue Apr 14 16:36:45 2015 +0200 +++ b/lemon/random.h Tue Apr 28 18:13:42 2015 +0200 @@ -62,6 +62,8 @@ #ifndef LEMON_RANDOM_H #define LEMON_RANDOM_H +#include + #include #include #include @@ -71,7 +73,7 @@ #include #include -#ifndef WIN32 +#ifndef LEMON_WIN32 #include #include #include @@ -605,7 +607,7 @@ /// it uses the \c seedFromTime(). /// \return Currently always \c true. bool seed() { -#ifndef WIN32 +#ifndef LEMON_WIN32 if (seedFromFile("/dev/urandom", 0)) return true; #endif if (seedFromTime()) return true; @@ -625,7 +627,7 @@ /// \param file The source file /// \param offset The offset, from the file read. /// \return \c true when the seeding successes. -#ifndef WIN32 +#ifndef LEMON_WIN32 bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0) #else bool seedFromFile(const std::string& file = "", int offset = 0) @@ -647,7 +649,7 @@ /// random sequence. /// \return Currently always \c true. bool seedFromTime() { -#ifndef WIN32 +#ifndef LEMON_WIN32 timeval tv; gettimeofday(&tv, 0); seed(getpid() + tv.tv_sec + tv.tv_usec);