[glib/vs2012-2-68] option-context.c: Define NAN for MSVC only



commit 4d33776930c4f3a2cfbc78ee3a16e75a5a9b0a1c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Mar 31 18:51:56 2021 +0800

    option-context.c: Define NAN for MSVC only
    
    ... if needed, as it might differ on other systems and seems unnecessary
    for other systems.

 glib/tests/option-context.c | 6 ++++--
 1 file 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[] = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]