diff options
Diffstat (limited to 'examples/redis-unstable/deps/hiredis/win32.h')
| -rw-r--r-- | examples/redis-unstable/deps/hiredis/win32.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/examples/redis-unstable/deps/hiredis/win32.h b/examples/redis-unstable/deps/hiredis/win32.h deleted file mode 100644 index 04289c6..0000000 --- a/examples/redis-unstable/deps/hiredis/win32.h +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | #ifndef _WIN32_HELPER_INCLUDE | ||
| 2 | #define _WIN32_HELPER_INCLUDE | ||
| 3 | #ifdef _MSC_VER | ||
| 4 | |||
| 5 | #include <winsock2.h> /* for struct timeval */ | ||
| 6 | |||
| 7 | #ifndef inline | ||
| 8 | #define inline __inline | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #ifndef strcasecmp | ||
| 12 | #define strcasecmp stricmp | ||
| 13 | #endif | ||
| 14 | |||
| 15 | #ifndef strncasecmp | ||
| 16 | #define strncasecmp strnicmp | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #ifndef va_copy | ||
| 20 | #define va_copy(d,s) ((d) = (s)) | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #ifndef snprintf | ||
| 24 | #define snprintf c99_snprintf | ||
| 25 | |||
| 26 | __inline int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) | ||
| 27 | { | ||
| 28 | int count = -1; | ||
| 29 | |||
| 30 | if (size != 0) | ||
| 31 | count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); | ||
| 32 | if (count == -1) | ||
| 33 | count = _vscprintf(format, ap); | ||
| 34 | |||
| 35 | return count; | ||
| 36 | } | ||
| 37 | |||
| 38 | __inline int c99_snprintf(char* str, size_t size, const char* format, ...) | ||
| 39 | { | ||
| 40 | int count; | ||
| 41 | va_list ap; | ||
| 42 | |||
| 43 | va_start(ap, format); | ||
| 44 | count = c99_vsnprintf(str, size, format, ap); | ||
| 45 | va_end(ap); | ||
| 46 | |||
| 47 | return count; | ||
| 48 | } | ||
| 49 | #endif | ||
| 50 | #endif /* _MSC_VER */ | ||
| 51 | |||
| 52 | #ifdef _WIN32 | ||
| 53 | #define strerror_r(errno,buf,len) strerror_s(buf,len,errno) | ||
| 54 | #endif /* _WIN32 */ | ||
| 55 | |||
| 56 | #endif /* _WIN32_HELPER_INCLUDE */ | ||
