compat/poll: prepare for targeting Windows Vista
commitd7e357fb9c702979d5b3a7d9faa869844a12e4d9
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 3 Oct 2018 19:43:41 +0000 (3 12:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Oct 2018 12:39:56 +0000 (4 05:39 -0700)
tree4523cf36dbfeaf303ead7dd2b404ead3e02b58f2
parentfe8321ec057f9231c26c29b364721568e58040f7
compat/poll: prepare for targeting Windows Vista

Windows Vista (and later) actually have a working poll(), but we still
cannot use it because it only works on sockets.

So let's detect when we are targeting Windows Vista and undefine those
constants, and define `pollfd` so that we can declare our own pollfd
struct.

We also need to make sure that we override those constants *after*
`winsock2.h` has been `#include`d (otherwise we would not really
override those constants).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/poll/poll.c
compat/poll/poll.h