Bug 1119776, Part 3: Avoid defining snprintf when MSVC provides it (WebRTC), r=rjesup

This commit is contained in:
Brian Smith 2015-01-08 22:32:30 -08:00
parent 9058178f66
commit d871011af1
2 changed files with 5 additions and 3 deletions

View File

@ -750,6 +750,7 @@ int gettimeofday(struct timeval *tv, void *tz)
return 0;
}
#if _MSC_VER < 1900
int snprintf(char *buffer, size_t n, const char *format, ...)
{
va_list argp;
@ -760,6 +761,7 @@ int snprintf(char *buffer, size_t n, const char *format, ...)
va_end(argp);
return ret;
}
#endif
#endif

View File

@ -12,12 +12,12 @@ __BEGIN_DECLS
#include <string.h>
#ifdef _MSC_VER
#if defined(_MSC_VER)
#define cpr_strcasecmp _stricmp
#define cpr_strncasecmp _strnicmp
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#else // _MSC_VER
#define cpr_strcasecmp strcasecmp