cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH 1/4] cmake: drop _BSD_SOURCE macro usage

From: Peter Wu <peter_at_lekensteyn.nl>
Date: Fri, 31 Oct 2014 12:32:38 +0100

autotools does not use features.h nor _BSD_SOURCE. As this macro
triggers warnings since glibc 2.20, remove it. It should not have
functional differences.

Signed-off-by: Peter Wu <peter_at_lekensteyn.nl>

---
 CMake/Platforms/WindowsCache.cmake |  1 -
 CMakeLists.txt                     |  3 ---
 lib/CMakeLists.txt                 | 19 -------------------
 3 files changed, 23 deletions(-)
diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake
index 3533a54..53d1c6d 100644
--- a/CMake/Platforms/WindowsCache.cmake
+++ b/CMake/Platforms/WindowsCache.cmake
@@ -14,7 +14,6 @@ if(NOT UNIX)
     set(HAVE_ARPA_INET_H 0)
     set(HAVE_DLFCN_H 0)
     set(HAVE_FCNTL_H 1)
-    set(HAVE_FEATURES_H 0)
     set(HAVE_INTTYPES_H 0)
     set(HAVE_IO_H 1)
     set(HAVE_MALLOC_H 1)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b997510..cbf6c0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -508,9 +508,6 @@ if(CMAKE_USE_GSSAPI)
   endif()
 endif()
 
-# If we have features.h, then do the _BSD_SOURCE magic
-check_include_file("features.h"       HAVE_FEATURES_H)
-
 # Check for header files
 if(NOT UNIX)
   check_include_file_concat("ws2tcpip.h"     HAVE_WS2TCPIP_H)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 3ad62df..78fde4d 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -48,25 +48,6 @@ endif()
 # )
 # ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
 
-if(HAVE_FEATURES_H)
-  set_source_files_properties(
-    cookie.c
-    easy.c
-    formdata.c
-    getenv.c
-    nonblock.c
-    hash.c
-    http.c
-    if2ip.c
-    mprintf.c
-    multi.c
-    sendf.c
-    telnet.c
-    transfer.c
-    url.c
-    COMPILE_FLAGS -D_BSD_SOURCE)
-endif(HAVE_FEATURES_H)
-
 
 # The rest of the build
 
-- 
2.1.2
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-31