dect
/
libpcap
Archived
13
0
Fork 0

Added the definition of SET_BINMODE under WIN32.

This commit is contained in:
test2 2010-03-09 12:27:31 -08:00
parent 5377f7340b
commit b3eca60b5c
1 changed files with 13 additions and 0 deletions

View File

@ -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.
*/