From 2c36338d54116fd20f88a44177598a0031d4b633 Mon Sep 17 00:00:00 2001 From: Vitali Haravy Date: Sat, 4 May 2013 01:41:47 +0100 Subject: [PATCH] Fix issues #3005 and #3009. --- deps/libuv | 2 +- src/flisp/flisp.c | 2 +- src/support/dtypes.h | 8 ++++++++ src/support/ios.c | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/deps/libuv b/deps/libuv index d469f03eda6c9..c793029362a8b 160000 --- a/deps/libuv +++ b/deps/libuv @@ -1 +1 @@ -Subproject commit d469f03eda6c95f064be3c25b7a9e9a7547c7617 +Subproject commit c793029362a8b78532fff99b7d7e7759fb873ae3 diff --git a/src/flisp/flisp.c b/src/flisp/flisp.c index c6b7a2448d714..c766d4320622e 100644 --- a/src/flisp/flisp.c +++ b/src/flisp/flisp.c @@ -50,7 +50,7 @@ #else #include #endif -#if defined(_OS_WINDOWS_) +#if defined(_OS_WINDOWS_) && !defined(_COMPILER_MINGW_) char * basename(char *); char * dirname(char *); #else diff --git a/src/support/dtypes.h b/src/support/dtypes.h index 76a21f9ceac2b..99e182c93c917 100644 --- a/src/support/dtypes.h +++ b/src/support/dtypes.h @@ -11,6 +11,12 @@ #if defined(_OS_WINDOWS_) +#include +#include +#include + +#if !defined(_COMPILER_MINGW_) + #define strtoull _strtoui64 #define strtoll _strtoi64 #define strcasecmp _stricmp @@ -22,6 +28,8 @@ #define STDOUT_FILENO 1 #define STDERR_FILENO 2 +#endif /* !_COMPILER_MINGW_ */ + #if defined(_COMPILER_MICROSOFT_) #define isnan _isnan #endif /* _COMPILER_MICROSOFT_ */ diff --git a/src/support/ios.c b/src/support/ios.c index 2212a119132e1..bd749cf8ea8e1 100644 --- a/src/support/ios.c +++ b/src/support/ios.c @@ -34,7 +34,7 @@ #if defined(__APPLE__) || defined(_OS_WINDOWS_) void *memrchr(const void *s, int c, size_t n) { - const unsigned char *src = (char *)s + n; + const unsigned char *src = (unsigned char *)s + n; unsigned char uc = c; while (--src >= (unsigned char *) s) if (*src == uc) @@ -527,7 +527,7 @@ int ios_trunc(ios_t *s, size_t size) #if !defined(_OS_WINDOWS_) if (ftruncate(s->fd, size) == 0) #else - if (_chsize_s(s->fd, size) == 0) + if (_chsize(s->fd, size) == 0) #endif return 0; }