Bug 1322546 - Cannot compile nrappkit with WINVER=0x0600 or later. r=drno

MozReview-Commit-ID: HBVVHafiRKQ
This commit is contained in:
Makoto Kato 2016-12-15 16:37:51 +09:00
parent 7ca1cb79d0
commit 3ee6f7badc
2 changed files with 2 additions and 17 deletions

View File

@ -506,7 +506,7 @@ strlcat(dst, src, siz)
#endif /* LINUX or WIN32 */
#if defined(USE_OWN_INET_NTOP) || defined(WIN32)
#if defined(USE_OWN_INET_NTOP) || (defined(WIN32) && WINVER < 0x0600)
#include <errno.h>
#ifdef WIN32
#include <Ws2ipdef.h>
@ -774,19 +774,5 @@ 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;
int ret;
va_start(argp, format);
ret = _vscprintf(format, argp);
vsnprintf_s(buffer, n, _TRUNCATE, format, argp);
va_end(argp);
return ret;
}
#endif
#endif

View File

@ -64,8 +64,7 @@ int nr_write_pid_file(char *pid_filename);
int nr_reg_uint4_fetch_and_check(NR_registry key, UINT4 min, UINT4 max, int log_fac, int die, UINT4 *val);
int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_fac, int die, UINT8 *val);
#ifdef WIN32
int snprintf(char *buffer, size_t n, const char *format, ...);
#if defined(WIN32) && WINVER < 0x0600
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
int inet_pton(int af, const char *src, void *dst);
#endif