diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-19 09:58:44 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-19 09:58:44 +0100 |
commit | 85edb1c711f7816ed1a30edd07b37d314fac216a (patch) | |
tree | 814487cc06993dd6e133ab4b23e5bc16b6cb5e2d /media | |
parent | bc9ad467f0886f8799c2c4781b1a0b654b362ecf (diff) | |
download | uxp-85edb1c711f7816ed1a30edd07b37d314fac216a.tar.gz |
Make the proper Windows APIs natively available to our tree.
Tag #22.
This bypasses custom definitions of some functions for things natively available in Windows 7.
Diffstat (limited to 'media')
-rw-r--r-- | media/mtransport/third_party/nrappkit/src/util/util.c | 15 | ||||
-rw-r--r-- | media/mtransport/third_party/nrappkit/src/util/util.h | 3 |
2 files changed, 2 insertions, 16 deletions
diff --git a/media/mtransport/third_party/nrappkit/src/util/util.c b/media/mtransport/third_party/nrappkit/src/util/util.c index 31a245f454..1e28012594 100644 --- a/media/mtransport/third_party/nrappkit/src/util/util.c +++ b/media/mtransport/third_party/nrappkit/src/util/util.c @@ -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> @@ -775,18 +775,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 diff --git a/media/mtransport/third_party/nrappkit/src/util/util.h b/media/mtransport/third_party/nrappkit/src/util/util.h index 869b728632..975baa4aa2 100644 --- a/media/mtransport/third_party/nrappkit/src/util/util.h +++ b/media/mtransport/third_party/nrappkit/src/util/util.h @@ -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 |