mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 15:46:17 +01:00
grand: rand_s is available in mingw64
This commit is contained in:
parent
5e00915354
commit
7a8abb20ab
@ -262,8 +262,10 @@ g_rand_new (void)
|
|||||||
seed[3] = getppid ();
|
seed[3] = getppid ();
|
||||||
}
|
}
|
||||||
#else /* G_OS_WIN32 */
|
#else /* G_OS_WIN32 */
|
||||||
/* rand_s() is only available since Visual Studio 2005 */
|
/* rand_s() is only available since Visual Studio 2005 and
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
* 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;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (seed); i++)
|
for (i = 0; i < G_N_ELEMENTS (seed); i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user