diff options
author | Ignacio Casal Quinteiro <icq@gnome.org> | 2016-02-24 11:27:09 +0100 |
---|---|---|
committer | Ignacio Casal Quinteiro <icq@gnome.org> | 2016-02-24 11:27:09 +0100 |
commit | 7a8abb20ab5f214d8fb5713420a5dc5fd61ef79c (patch) | |
tree | 830ebc32e50aea5e6f101183bb4778ed9e0effed | |
parent | 5e009153548bf1ed176ea3e75f261394e9f3af74 (diff) | |
download | glib-7a8abb20ab5f214d8fb5713420a5dc5fd61ef79c.tar.gz |
grand: rand_s is available in mingw64
-rw-r--r-- | glib/grand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/glib/grand.c b/glib/grand.c index ac1053daf..0cb833e9a 100644 --- a/glib/grand.c +++ b/glib/grand.c @@ -262,8 +262,10 @@ g_rand_new (void) seed[3] = getppid (); } #else /* G_OS_WIN32 */ - /* rand_s() is only available since Visual Studio 2005 */ -#if defined(_MSC_VER) && _MSC_VER >= 1400 + /* rand_s() is only available since Visual Studio 2005 and + * MinGW-w64 has a wrapper that will emulate rand_s() if it's not in msvcrt + */ +#if (defined(_MSC_VER) && _MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR) gint i; for (i = 0; i < G_N_ELEMENTS (seed); i++) |