Skip to content

Commit

Permalink
make SDL_strtoll and SDL_strtoull exports not be missing in win32 dlls.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Jul 1, 2018
1 parent dca277f commit 9b096d4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/stdlib/SDL_string.c
Expand Up @@ -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)
Expand All @@ -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 */
Expand Down

0 comments on commit 9b096d4

Please sign in to comment.