gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 109/208: cmake: if inet_pton is used, bump _WIN32_W


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 109/208: cmake: if inet_pton is used, bump _WIN32_WINNT
Date: Wed, 09 Aug 2017 17:35:06 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.

commit 9ee6cb1b77c7a9a17c5ce380cec72066e13b1ebf
Author: Daniel Stenberg <address@hidden>
AuthorDate: Wed Jul 5 10:21:58 2017 +0200

    cmake: if inet_pton is used, bump _WIN32_WINNT
    
    ... and make sure inet_pton is always checked for when *not* using Windows,
    which is a regression from 4fc6ebe18.
    
    Idea-by: Sergei Nikulov
---
 CMakeLists.txt | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 727ca8153..5d8b9f10f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -932,8 +932,17 @@ check_symbol_exists(ioctl          "${CURL_INCLUDES}" 
HAVE_IOCTL)
 check_symbol_exists(setsockopt     "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
 
 # symbol exists in win32, but function does not.
-if(ENABLE_INET_PTON)  
-  check_function_exists(inet_pton HAVE_INET_PTON)
+if(WIN32)
+  if(ENABLE_INET_PTON)
+    check_function_exists(inet_pton HAVE_INET_PTON)
+    # _WIN32_WINNT_VISTA (0x0600)
+    add_definitions(-D_WIN32_WINNT=0x0600)
+  else()
+    # _WIN32_WINNT_WINXP (0x0501)
+    add_definitions(-D_WIN32_WINNT=0x0501)
+  endif()
+else()
+    check_function_exists(inet_pton HAVE_INET_PTON)
 endif()
 
 check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR)
@@ -1136,11 +1145,6 @@ include(CMake/OtherTests.cmake)
 
 add_definitions(-DHAVE_CONFIG_H)
 
-# For windows, do not allow the compiler to use default target (Vista).
-if(WIN32)
-  add_definitions(-D_WIN32_WINNT=0x0501)
-endif(WIN32)
-
 # For windows, all compilers used by cmake should support large files
 if(WIN32)
   set(USE_WIN32_LARGE_FILES ON)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]