diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/snprintf.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/src/snprintf.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/snprintf.c b/Build/source/libs/gd/libgd-src/src/snprintf.c deleted file mode 100644 index 33d1b42c81d..00000000000 --- a/Build/source/libs/gd/libgd-src/src/snprintf.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Provide a snprintf on Windows for older Visual Studio builds. - * VS2013 and older do not support C99 snprintf(). The subsitute _snprintf() - * does not correctly NUL-terminate buffers in case of overflow. - * This implementation emulates the ISO C99 snprintf() for VS2013 and older. - */ - -#if defined(_MSC_VER) && _MSC_VER < 1900 - -#include <stdio.h> -#include <stdarg.h> - -int snprintf(char* buf, size_t len, const char* fmt, ...) -{ - int n; - va_list ap; - va_start(ap, fmt); - - n = _vscprintf(fmt, ap); - vsnprintf_s(buf, len, _TRUNCATE, fmt, ap); - - va_end(ap); - return n; -} - -#endif |