Merge pull request #290 from frerejerome/patch-1

Patch-1 for MinGW
This commit is contained in:
Alex Shinn 2015-12-13 20:24:14 +09:00
commit 27f17a54f6
2 changed files with 7 additions and 0 deletions

View file

@ -739,6 +739,10 @@
#define isinf(x) (isInf(x,1) || isInf(x,-1))
#define isnan(x) isNaN(x)
#elif defined(_WIN32)
#ifdef __MINGW32__
#include <shlwapi.h>
#define strcasestr StrStrI
#else
#define snprintf(buf, len, fmt, val) sprintf(buf, fmt, val)
#define strcasecmp lstrcmpi
#define strncasecmp(s1, s2, n) lstrcmpi(s1, s2)
@ -747,6 +751,7 @@
#define isnan(x) (x!=x)
#define isinf(x) (x > DBL_MAX || x < -DBL_MAX)
#endif
#endif
#ifdef _WIN32
#define sexp_pos_infinity (DBL_MAX*DBL_MAX)

View file

@ -65,7 +65,9 @@ typedef unsigned long size_t;
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#if !(defined _WIN32) || defined(__CYGWIN__)
#include <sys/socket.h>
#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <math.h>