Add file src/share/grabbag/snprintf.c to grabbag library.

Define function flac_snprintf() which has ISO C99 snprintf() behavior
even when compiling with Microsoft Visual Studio, by wrapping the
MSVS snprintf_s() function.
This commit is contained in:
Erik de Castro Lopo
2013-03-17 20:51:52 +11:00
parent 248d7924b7
commit 06af237c70
4 changed files with 89 additions and 1 deletions

View File

@@ -143,4 +143,14 @@
# endif
#endif /* defined _MSC_VER */
/* FLAC needs to compile and work correctly on systems with a norrmal ISO C99
* snprintf as well as Microsoft Visual Studio which has an non-standards
* conformant snprint_s function.
*
* This function wraps the MS version to behave more like the the ISO version.
*/
int flac_snprintf(char *str, size_t size, const char *fmt, ...);
#endif /* FLAC__SHARE__COMPAT_H */