curl: Hard-code HAVE_W* macros on UNIX for Cygwin

The curl library code assumes that HAVE_WINDOWS_H and similar macros are
not defined on Cygwin.  Its CMake code achieved this by not even testing
for the corresponding headers on UNIX platforms.  However, libarchive
does test HAVE_WINDOWS_H and confuses our curl build.  We avoid the
conflict by hard-coding the macros to 0 for UNIX builds inside the curl
tree.
This commit is contained in:
Brad King 2009-12-01 12:03:32 -05:00
parent 7380d3ab7c
commit 997fd839ed
1 changed files with 6 additions and 0 deletions

View File

@ -246,6 +246,12 @@ MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
# Check for header files
IF(UNIX)
SET(HAVE_WINDOWS_H 0)
SET(HAVE_WINSOCK_H 0)
SET(HAVE_WS2TCPIP_H 0)
SET(HAVE_WINSOCK2_H 0)
ENDIF(UNIX)
IF(NOT UNIX)
CHECK_INCLUDE_FILE_CONCAT("ws2tcpip.h" HAVE_WS2TCPIP_H)
CHECK_INCLUDE_FILE_CONCAT("winsock2.h" HAVE_WINSOCK2_H)