Fix usage own snprintf() and vsnprintf()

This commit is contained in:
Stas Degteff 2011-03-05 00:32:23 +00:00
parent 64d51f76b4
commit 5ee8951707
2 changed files with 7 additions and 3 deletions

View File

@ -64,7 +64,11 @@ char* strlwr(char* s);
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if !defined(HAVE_SNPRINTF) #if !defined(HAVE_SNPRINTF)
int snprintf( char *buffer, size_t sizeOfBuffer, const char *format, ... ); #ifdef HAVE_STDARG_H
int snprintf (char *str,size_t count,const char *fmt,...);
#else
int snprintf (va_alist);
#endif
#endif #endif
#if !defined(HAVE_VSNPRINTF) #if !defined(HAVE_VSNPRINTF)
int vsnprintf( char *buffer, size_t sizeOfBuffer, const char *format, va_list argptr ); int vsnprintf( char *buffer, size_t sizeOfBuffer, const char *format, va_list argptr );

View File

@ -69,10 +69,10 @@ int vsnprintf( char *buffer, size_t sizeOfBuffer, const char *format, va_list ar
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
# include "snprintf.c" # include "snprintf.c"
# if defined(HAVE__SNPRINTF) # if !defined(HAVE__SNPRINTF)
# define HAVE_SNPRINTF 1 # define HAVE_SNPRINTF 1
# endif # endif
# if defined(HAVE__VSNPRINTF) # if !defined(HAVE__VSNPRINTF)
# define HAVE_VSNPRINTF 1 # define HAVE_VSNPRINTF 1
# endif # endif
#endif #endif