This commit is contained in:
Alex Shinn 2015-12-23 17:27:07 +09:00
commit b4ab726e8e
3 changed files with 9 additions and 2 deletions

4
eval.c
View file

@ -1302,11 +1302,11 @@ static sexp sexp_load_dl (sexp ctx, sexp file, sexp env) {
#endif #endif
#if SEXP_USE_DL || SEXP_USE_STATIC_LIBS #if SEXP_USE_DL || SEXP_USE_STATIC_LIBS
static sexp sexp_load_binary(sexp ctx, sexp source, sexp env) { static sexp sexp_load_binary(sexp ctx, sexp file, sexp env) {
#if SEXP_USE_STATIC_LIBS #if SEXP_USE_STATIC_LIBS
struct sexp_library_entry_t *entry; struct sexp_library_entry_t *entry;
#endif #endif
sexp res = sexp_load_dl(ctx, source, env); sexp res = sexp_load_dl(ctx, file, env);
#if SEXP_USE_STATIC_LIBS #if SEXP_USE_STATIC_LIBS
if (res == SEXP_UNDEF || sexp_exceptionp(res)) { if (res == SEXP_UNDEF || sexp_exceptionp(res)) {
entry = sexp_find_static_library(sexp_string_data(file)); entry = sexp_find_static_library(sexp_string_data(file));

View file

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

View file

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