mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
(svn r11744) -Codechange: don't redefine snprintf when using MinGW Runtime 3.14 or superior, as it now have snprintf() and vsnprintf conform to C99
This commit is contained in:
parent
8e0f02d840
commit
3265ed1b70
@ -153,6 +153,8 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/* Since version 3.14, MinGW Runtime has snprintf() and vsnprintf() conform to C99 but it's not the case for older versions */
|
||||
#if (__MINGW32_MAJOR_VERSION < 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 14))
|
||||
int CDECL snprintf(char *str, size_t size, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@ -163,6 +165,7 @@ int CDECL snprintf(char *str, size_t size, const char *format, ...)
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
#endif /* MinGW Runtime < 3.14 */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* *nprintf broken, not POSIX compliant, MSDN description
|
||||
|
Loading…
Reference in New Issue
Block a user