[glib] grand: rand_s is available in mingw64
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] grand: rand_s is available in mingw64
- Date: Wed, 24 Feb 2016 10:28:55 +0000 (UTC)
commit 7a8abb20ab5f214d8fb5713420a5dc5fd61ef79c
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Feb 24 11:27:09 2016 +0100
grand: rand_s is available in mingw64
glib/grand.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/glib/grand.c b/glib/grand.c
index ac1053d..0cb833e 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++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]