aboutsummaryrefslogtreecommitdiff
path: root/missing/win_asprintf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-08-09 14:49:08 -0700
committerGuy Harris <guy@alum.mit.edu>2019-08-09 14:49:08 -0700
commit28e59ef688d13addc6fb5df8362ad61ac6ce826d (patch)
treebd4a5f3b4d97b78aaddf749e2c7e7123b54f74cc /missing/win_asprintf.c
parentf773b1c56122feaff9e9ecabbde3326b7c081233 (diff)
Remove some workarounds for old compilers.
Require Visual Studio 2015 or later; fail if we don't have it, and remove checks for older versions. That means we have C99-compliant snprintf() and vsnprintf(); require them when configuring for UN*X, and then use them directly, rather than having wrappers for systems lacking them. If we're using MSVC, skip the tests for options to request C99 compatibility - either we have VS 2015, which is sufficient, or we don't, in which case we fail.
Diffstat (limited to 'missing/win_asprintf.c')
-rw-r--r--missing/win_asprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/missing/win_asprintf.c b/missing/win_asprintf.c
index cce62960..e4bd13c6 100644
--- a/missing/win_asprintf.c
+++ b/missing/win_asprintf.c
@@ -23,7 +23,7 @@ pcap_vasprintf(char **strp, const char *format, va_list args)
*strp = NULL;
return (-1);
}
- ret = pcap_vsnprintf(str, str_size, format, args);
+ ret = vsnprintf(str, str_size, format, args);
if (ret == -1) {
free(str);
*strp = NULL;
@@ -31,7 +31,7 @@ pcap_vasprintf(char **strp, const char *format, va_list args)
}
*strp = str;
/*
- * pcap_vsnprintf() shouldn't truncate the string, as we have
+ * vsnprintf() shouldn't truncate the string, as we have
* allocated a buffer large enough to hold the string, so its
* return value should be the number of characters printed.
*/