Commit 9908c076 by Edward Thomson

posix: use WSAPoll on win32

parent 94f98400
......@@ -89,8 +89,12 @@ check_function_exists(getloadavg GIT_RAND_GETLOADAVG)
# poll
check_symbol_exists(poll poll.h GIT_IO_POLL)
check_symbol_exists(select sys/select.h GIT_IO_SELECT)
if(WIN32)
set(GIT_IO_WSAPOLL 1)
else()
check_symbol_exists(poll poll.h GIT_IO_POLL)
check_symbol_exists(select sys/select.h GIT_IO_SELECT)
endif()
# determine architecture of the machine
......
......@@ -62,6 +62,7 @@
#cmakedefine GIT_RAND_GETLOADAVG 1
#cmakedefine GIT_IO_POLL 1
#cmakedefine GIT_IO_WSAPOLL 1
#cmakedefine GIT_IO_SELECT 1
#endif
......@@ -198,6 +198,9 @@ extern const char *p_gai_strerror(int ret);
#ifdef GIT_IO_POLL
# include <poll.h>
# define p_poll poll
#elif GIT_IO_WSAPOLL
# include <winsock2.h>
# define p_poll WSAPoll
#else
# define POLLIN 0x01
# define POLLPRI 0x02
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment