From 9b096d47fbf2c601ad2baba58c5b71702a1b6719 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 1 Jul 2018 09:27:03 +0300 Subject: [PATCH] make SDL_strtoll and SDL_strtoull exports not be missing in win32 dlls. --- src/stdlib/SDL_string.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index 4927a4eff..25f1e6983 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -623,6 +623,15 @@ Sint64 SDL_strtoll(const char *string, char **endp, int base) } return value; } +#elif defined(__WIN32__) /* so that the export won't be missing */ +#undef SDL_strtoll +DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base) { + #ifdef HAVE__STRTOI64 + return _strtoi64 (string, endp, base); + #else + return strtoll (string, endp, base); + #endif +} #endif #if !defined(HAVE_STRTOULL) && !defined(HAVE__STRTOUI64) @@ -645,6 +654,15 @@ Uint64 SDL_strtoull(const char *string, char **endp, int base) } return value; } +#elif defined(__WIN32__) /* so that the export won't be missing */ +#undef SDL_strtoull +DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, int base) { + #ifdef HAVE__STRTOUI64 + return _strtoui64(string, endp, base); + #else + return strtoull(string, endp, base); + #endif +} #endif #endif /* SDL_HAS_64BIT_TYPE */