aboutsummaryrefslogtreecommitdiff
path: root/savefile.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-22 13:58:47 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-22 13:59:44 -0800
commitfa79dd4c6f651fb853efe95681c9843b16a40df8 (patch)
tree000839b089f63e128962f732193d6c03881be73e /savefile.c
parent73f57d1a0858589206d99df72029de2d90d5329c (diff)
On Windows, do the appropriate DLL exporting and importing.
Diffstat (limited to 'savefile.c')
-rw-r--r--savefile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/savefile.c b/savefile.c
index b8d1d305..5d9429c4 100644
--- a/savefile.c
+++ b/savefile.c
@@ -62,6 +62,23 @@
#include "sf-pcap.h"
#include "sf-pcap-ng.h"
+#ifdef _WIN32
+/*
+ * These aren't exported on Windows, because they would only work if both
+ * WinPcap and the code using it were to use the Universal CRT; otherwise,
+ * a FILE structure in WinPcap and a FILE structure in the code using it
+ * could be different if they're using different versions of the C runtime.
+ *
+ * Instead, pcap/pcap.h defines them as macros that wrap the hopen versions,
+ * with the wrappers calling _fileno() and _get_osfhandle() themselves,
+ * so that they convert the appropriate CRT version's FILE structure to
+ * a HANDLE (which is OS-defined, not CRT-defined, and is part of the Win32
+ * and Win64 ABIs).
+ */
+static pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *);
+static pcap_t *pcap_fopen_offline(FILE *, char *);
+#endif
+
/*
* Setting O_BINARY on DOS/Windows is a bit tricky
*/