diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-08-31 14:39:23 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-08-31 14:39:23 -0700 |
commit | 5ff25beec7ad7fb229b943ecb86fe55bcad531c4 (patch) | |
tree | 0c9dc7ea5723347abf7836b66695804a0f3ac546 /pcap-win32.c | |
parent | 1a44e70c2d2b754b3f92c66a0a590f6fdc347566 (diff) |
The official #define for 32-bit and 64-bit Windows is _WIN32.
It's _WIN32, with a leading underscore, not WIN32. See, for example:
https://sourceforge.net/p/predef/wiki/OperatingSystems/
and
https://msdn.microsoft.com/en-us/library/b0084kay.aspx
*Some* environments may also define WIN32, but we shouldn't depend on
that.
Diffstat (limited to 'pcap-win32.c')
-rw-r--r-- | pcap-win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-win32.c b/pcap-win32.c index 9b38f3c3..7457df36 100644 --- a/pcap-win32.c +++ b/pcap-win32.c @@ -61,7 +61,7 @@ static int pcap_setnonblock_win32(pcap_t *, int, char *); #define WIN32_DEFAULT_USER_BUFFER_SIZE 256000 /*dimension of the buffer in the kernel driver NPF */ -#define WIN32_DEFAULT_KERNEL_BUFFER_SIZE 1000000 +#define _WIN32_DEFAULT_KERNEL_BUFFER_SIZE 1000000 /* Equivalent to ntohs(), but a lot faster under Windows */ #define SWAPS(_X) ((_X & 0xff) << 8) | (_X >> 8) @@ -655,7 +655,7 @@ pcap_activate_win32(pcap_t *p) * WIN32_DEFAULT_USER_BUFFER_SIZE. */ if (p->opt.buffer_size == 0) - p->opt.buffer_size = WIN32_DEFAULT_KERNEL_BUFFER_SIZE; + p->opt.buffer_size = _WIN32_DEFAULT_KERNEL_BUFFER_SIZE; if(PacketSetBuff(p->adapter,p->opt.buffer_size)==FALSE) { |