Explorar el Código

curl: Never consider using Windows APIs on Cygwin

Our Windows API header checks are conditioned on if(NOT UNIX) but
libarchive checks HAVE_WINDOWS_H anyway so the result leaks into
the cache and influenes the curl build.  Set the check results to
false explicitly for curl when not on Windows to tolerate this.

Reported-by: Vyacheslav Karpukhin <[email protected]>
Brad King hace 10 años
padre
commit
4a2ff2b7f2
Se han modificado 1 ficheros con 8 adiciones y 2 borrados
  1. 8 2
      Utilities/cmcurl/CMakeLists.txt

+ 8 - 2
Utilities/cmcurl/CMakeLists.txt

@@ -524,12 +524,18 @@ check_include_file("features.h"       HAVE_FEATURES_H)
 if(NOT UNIX)
   check_include_file_concat("ws2tcpip.h"     HAVE_WS2TCPIP_H)
   check_include_file_concat("winsock2.h"     HAVE_WINSOCK2_H)
-endif(NOT UNIX)
+else()
+  set(HAVE_WS2TCPIP_H 0)
+  set(HAVE_WINSOCK2_H 0)
+endif()
 check_include_file_concat("stdio.h"          HAVE_STDIO_H)
 if(NOT UNIX)
   check_include_file_concat("windows.h"      HAVE_WINDOWS_H)
   check_include_file_concat("winsock.h"      HAVE_WINSOCK_H)
-endif(NOT UNIX)
+else()
+  set(HAVE_WINDOWS_H 0)
+  set(HAVE_WINSOCK_H 0)
+endif()
 
 check_include_file_concat("inttypes.h"       HAVE_INTTYPES_H)
 check_include_file_concat("sys/filio.h"      HAVE_SYS_FILIO_H)