diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-12-30 18:46:33 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-12-30 19:40:03 +0800 |
commit | d6e5db6ed8411b7b09c87d4393ac8f1fd83871fc (patch) | |
tree | 5b01ee087253758e5b121e8907af21037edb986e /glib/gdatetime.c | |
parent | b20a8b5a5a5ab9001c1306dc840781050e2e51f9 (diff) | |
download | glib-266.c89.tar.gz |
gdatetime.c: Fix MSVC builds for lack of NAN items266.c89
Use a fallback for isnan() on Visual Studio 2012 or earlier, and define
NAN if it does not exist.
Diffstat (limited to 'glib/gdatetime.c')
-rw-r--r-- | glib/gdatetime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/glib/gdatetime.c b/glib/gdatetime.c index 02cc3bd01..a43efab0b 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -80,6 +80,11 @@ #ifndef G_OS_WIN32 #include <sys/time.h> #include <time.h> +#else +#if defined (_MSC_VER) && (_MSC_VER < 1800) +/* fallback implementation for isnan() on VS2012 and earlier */ +#define isnan _isnan +#endif #endif /* !G_OS_WIN32 */ /** |