Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 4, 2010, 20:45 UTC
- Message-ID
- <20101204204541.GA3170@burratino>
- In-Reply-To
- <4CFA8E64.6070402@ramsay1.demon.co.uk>
Ramsay Jones wrote:
Show 5 quoted lines
> The msvc winsock2.h header file conditionally defines or declares > poll() related symbols which cause many macro redefinition errors, > a struct type redefinition error and syntax errors. These symbols > are defined in support of the WSAPoll() API, new in Windows Vista, > when the symbol _WIN32_WINNT is defined and _WIN32_WINNT >= 0x0600.
Could it make sense to define this at the same time as _GNU_SOURCE et al?
#define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 #define _NETBSD_SOURCE 1 #define _SGI_SOURCE 1 #define _WIN32_WINNT 0x0502
Haven't thought carefully about the consequences, though; your patch is probably safer.