summaryrefslogtreecommitdiff
path: root/gi/pygi-basictype.c
diff options
context:
space:
mode:
Diffstat (limited to 'gi/pygi-basictype.c')
-rw-r--r--gi/pygi-basictype.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gi/pygi-basictype.c b/gi/pygi-basictype.c
index 6fbe9292..c9606a93 100644
--- a/gi/pygi-basictype.c
+++ b/gi/pygi-basictype.c
@@ -25,6 +25,22 @@
#include "pygi-argument.h"
#include "pygi-private.h"
+#ifdef G_OS_WIN32
+#ifdef _MSC_VER
+#include <math.h>
+
+#ifndef NAN
+static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
+#define NAN (*(const float *) __nan)
+#endif
+
+#ifndef INFINITY
+#define INFINITY HUGE_VAL
+#endif
+
+#endif
+#endif
+
/*
* From Python Marshaling