Added the definition of SET_BINMODE under WIN32.
This commit is contained in:
parent
5377f7340b
commit
b3eca60b5c
13
sf-pcap.c
13
sf-pcap.c
|
@ -67,6 +67,19 @@ static const char rcsid[] _U_ =
|
|||
|
||||
#include "sf-pcap.h"
|
||||
|
||||
/*
|
||||
* Setting O_BINARY on DOS/Windows is a bit tricky
|
||||
*/
|
||||
#if defined(WIN32)
|
||||
#define SET_BINMODE(f) _setmode(_fileno(f), _O_BINARY)
|
||||
#elif defined(MSDOS)
|
||||
#if defined(__HIGHC__)
|
||||
#define SET_BINMODE(f) setmode(f, O_BINARY)
|
||||
#else
|
||||
#define SET_BINMODE(f) setmode(fileno(f), O_BINARY)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Standard libpcap format.
|
||||
*/
|
||||
|
|
Reference in New Issue