Define HAVE_SNPRINTF, HAVE_VSNPRINTF, HAVE_STDARG_H at compile time (Fix DJGPP build)

This commit is contained in:
Stas Degteff
2011-03-01 17:10:09 +00:00
parent 2b8880986c
commit c90f069a9a
3 changed files with 9 additions and 12 deletions

View File

@@ -59,8 +59,10 @@ char* strlwr(char* s);
// ------------------------------------------------------------------
#if defined(_MSC_VER)
#if !defined(HAVE_SNPRINTF)
int snprintf( char *buffer, size_t sizeOfBuffer, const char *format, ... );
#endif
#if !defined(HAVE_VSNPRINTF)
int vsnprintf( char *buffer, size_t sizeOfBuffer, const char *format, va_list argptr );
#endif

View File

@@ -31,16 +31,6 @@
// -------------------------------------------------------------------
// snprintf() and vsnprintf()
// ---- FIXME: All HAVE_* macro should be defined in makefile or created by autoconf
#ifdef __GNUC__
# define HAVE_SNPRINTF
# define HAVE_VSNPRINTF
# define HAVE_STDARG_H
#endif
#if defined(__WATCOMC__)
# define HAVE__SNPRINTF
# define HAVE__VSNPRINTF
#endif
#if defined(_MSC_VER)
/* It is need a workaround for implementation "speciality" in snprintf() and vsnprintf() from Microsoft. */
int snprintf( char *buffer, size_t sizeOfBuffer, const char *format, ... )