summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-03-31 18:51:56 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-03-31 18:51:56 +0800
commit4d33776930c4f3a2cfbc78ee3a16e75a5a9b0a1c (patch)
tree4952d7fc69f35c738f6eec92f989e11b544116fc
parentb0627bcdde55b95f584a79f2edd8ae1807668209 (diff)
downloadglib-vs2012-2-68.tar.gz
option-context.c: Define NAN for MSVC onlyvs2012-2-68
... if needed, as it might differ on other systems and seems unnecessary for other systems.
-rw-r--r--glib/tests/option-context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
index e68bbe74e..8a5d2091d 100644
--- a/glib/tests/option-context.c
+++ b/glib/tests/option-context.c
@@ -28,8 +28,10 @@
#include <locale.h>
#include <math.h>
-#ifndef NAN
-#define NAN HUGE_VAL * 0.0f
+#ifdef _MSC_VER
+# ifndef NAN
+# define NAN HUGE_VAL * 0.0f
+# endif
#endif
static GOptionEntry main_entries[] = {