diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-22 13:58:47 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-22 13:59:44 -0800 |
commit | fa79dd4c6f651fb853efe95681c9843b16a40df8 (patch) | |
tree | 000839b089f63e128962f732193d6c03881be73e /savefile.c | |
parent | 73f57d1a0858589206d99df72029de2d90d5329c (diff) |
On Windows, do the appropriate DLL exporting and importing.
Diffstat (limited to 'savefile.c')
-rw-r--r-- | savefile.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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 */ |