* Check wether we're compiling as C99

* if not #error about requiring a C99-compliant snprintf & vsnprintf implementation

NOTE: This doesn't affect MSVC as I've already provided a C99-compliant implementation for it


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3449 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-01-13 13:53:00 +00:00
parent 33f7de2240
commit d938ed3946
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,8 @@ extern int wz_snprintf(char* str, size_t size, const char* format, ...);
// Necessary to prevent conflicting symbols with MSVC's own (incorrect!) implementations of these functions
# define vsnprintf wz_vsnprintf
# define snprintf wz_snprintf
#elif !defined(WZ_C99)
# error "This code depends on a C99-compliant implementation of snprintf and vsnprintf; please compile as C99 or provide a compliant implementation!"
#endif
// A stack-allocating variant of sprintf