]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: remove redundant `CURL_PULL_*` settings
authorViktor Szakats <commit@vsz.me>
Mon, 11 Dec 2023 17:28:35 +0000 (17:28 +0000)
committerViktor Szakats <commit@vsz.me>
Sat, 16 Dec 2023 13:16:26 +0000 (13:16 +0000)
These macros were not propagated to the source code from CMake.

autotools set only one of them (`CURL_PULL_SYS_POLL_H`), initially to
address an AIX issue [1]. This later broke when introducing `system.h`
[2] without the logic it enabled. A subsequent fix [3] re-added the
logic, and also enabled it for AIX before its use, directly in
`system.h`.

[1] 2012-11-23: 665adcd4b7bcdb7deb638cdc499fbe71f8d777f2
[2] 2017-03-29: 9506d01ee50d5908138ebad0fd9fbd39b66bd64d #1373
[3] 2017-08-25: 8a84fcc4b59e8b78d2acc6febf44a43d6bc81b59 #1828 #1833

Reviewed-by: Daniel Stenberg
Closes #12502

CMakeLists.txt
acinclude.m4
configure.ac

index 08c81451b9b197bb96ccd2e4d60b05917ae1c8b3..b1f3e27d655128075e414427983a60a4c03b3077 100644 (file)
@@ -1386,13 +1386,6 @@ if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
   endif()
 endif()
 
-# TODO test which of these headers are required
-if(NOT WIN32)
-  set(CURL_PULL_SYS_TYPES_H ${HAVE_SYS_TYPES_H})
-  set(CURL_PULL_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H})
-  set(CURL_PULL_SYS_POLL_H ${HAVE_SYS_POLL_H})
-endif()
-
 include(CMake/OtherTests.cmake)
 
 add_definitions(-DHAVE_CONFIG_H)
index df80d693a5201157a0fb7a9833874b1131cb9ac9..96187ade14ecc42897422b11257a0679819f41c1 100644 (file)
@@ -156,7 +156,6 @@ AC_DEFUN([CURL_CHECK_AIX_ALL_SOURCE], [
 #endif])
   AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl
   AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])dnl
-  AC_BEFORE([$0], [CURL_CONFIGURE_PULL_SYS_POLL])dnl
   AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)])
   AC_EGREP_CPP([yes_this_is_aix],[
 #ifdef _AIX
@@ -1116,40 +1115,6 @@ cat >>confdefs.h <<_EOF
 _EOF
 ])
 
-dnl CURL_CONFIGURE_PULL_SYS_POLL
-dnl -------------------------------------------------
-dnl The need for the sys/poll.h inclusion arises mainly to properly
-dnl interface AIX systems which define macros 'events' and 'revents'.
-
-AC_DEFUN([CURL_CONFIGURE_PULL_SYS_POLL], [
-  AC_REQUIRE([CURL_INCLUDES_POLL])dnl
-  #
-  tst_poll_events_macro_defined="unknown"
-  #
-  AC_COMPILE_IFELSE([
-    AC_LANG_PROGRAM([[
-      $curl_includes_poll
-    ]],[[
-#if defined(events) || defined(revents)
-      return 0;
-#else
-      force compilation error
-#endif
-    ]])
-  ],[
-    tst_poll_events_macro_defined="yes"
-  ],[
-    tst_poll_events_macro_defined="no"
-  ])
-  #
-  if test "$tst_poll_events_macro_defined" = "yes"; then
-    if test "x$ac_cv_header_sys_poll_h" = "xyes"; then
-      CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_POLL_H])
-    fi
-  fi
-  #
-])
-
 
 dnl CURL_CHECK_FUNC_SELECT
 dnl -------------------------------------------------
index 810e3562bd8efee8438d87c4d708b0b2f169dfe6..536198369ab27b35e8e9a48513af1c1e9d867ed6 100644 (file)
@@ -3500,8 +3500,6 @@ CURL_RUN_IFELSE(
   AC_MSG_RESULT([no])
 ])
 
-CURL_CONFIGURE_PULL_SYS_POLL
-
 TYPE_IN_ADDR_T
 
 TYPE_SOCKADDR_STORAGE