mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-15 05:46:15 +01:00
gdatetime.c: Fix MSVC builds for lack of NAN items
Use a fallback for isnan() on Visual Studio 2012 or earlier, and define NAN if it does not exist.
This commit is contained in:
parent
b20a8b5a5a
commit
d6e5db6ed8
@ -80,6 +80,11 @@
|
|||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <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 */
|
#endif /* !G_OS_WIN32 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#ifndef NAN
|
||||||
|
#define NAN HUGE_VAL * 0.0f
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ASSERT_DATE(dt,y,m,d) G_STMT_START { \
|
#define ASSERT_DATE(dt,y,m,d) G_STMT_START { \
|
||||||
|
Loading…
Reference in New Issue
Block a user