1 /* Missing functions and other misc stuff to support
2 * the horrible MS C compiler
4 * TODO could be improved by version-checking for C99 support
7 // also disable strncpy vs strncpy_s warning
8 #pragma warning(disable : 4996)
11 #define inline __inline
13 // No snprintf in MS C, copy over implementation taken from
19 inline int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
24 count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
26 count = _vscprintf(format, ap);
31 inline int c99_snprintf(char* str, size_t size, const char* format, ...)
37 count = c99_vsnprintf(str, size, format, ap);
43 #define snprintf c99_snprintf
45 // And no __func__ either
47 #define __func__ __FUNCTION__