From 96c29900bcec32dd6bc8e9857c8871ff4b8b8ed9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 25 Sep 2023 20:06:44 +0000 Subject: [PATCH] build: delete checks for C89 standard headers Delete checks and guards for standard C89 headers and assume these are available: `stdio.h`, `string.h`, `time.h`, `setjmp.h`, `stdlib.h`, `stddef.h`, `signal.h`. Some of these we already used unconditionally, some others we only used for feature checks. Follow-up to 9c7165e96a3a9a2d0b7059c87c699b5ca8cdae93 #11918 (for `stdio.h` in CMake) Closes #11940 --- CMake/OtherTests.cmake | 2 +- CMake/Platforms/WindowsCache.cmake | 5 ----- CMakeLists.txt | 28 +++++++++++----------------- acinclude.m4 | 2 -- lib/config-amigaos.h | 4 ---- lib/config-dos.h | 2 -- lib/config-mac.h | 3 --- lib/config-os400.h | 12 ------------ lib/config-plan9.h | 5 ----- lib/config-riscos.h | 12 ------------ lib/config-win32.h | 15 --------------- lib/config-win32ce.h | 9 --------- lib/curl_config.h.cmake | 15 --------------- lib/curl_memrchr.h | 4 +--- lib/curl_ntlm_wb.c | 2 -- lib/hostip.c | 4 ---- lib/hostip.h | 2 -- lib/sigpipe.h | 2 +- lib/transfer.c | 2 -- m4/curl-functions.m4 | 24 ++++++++---------------- src/tool_main.c | 2 -- tests/server/mqttd.c | 2 -- tests/server/resolve.c | 2 -- tests/server/rtspd.c | 2 -- tests/server/sockfilt.c | 2 -- tests/server/socksd.c | 2 -- tests/server/sws.c | 2 -- tests/server/tftpd.c | 4 ---- tests/server/util.c | 2 -- tests/unit/unit2600.c | 4 ---- 30 files changed, 22 insertions(+), 156 deletions(-) diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 762e6d1a5e..b1dd2574c4 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -58,9 +58,9 @@ check_c_source_compiles("${_source_epilogue} if(NOT HAVE_WINDOWS_H) add_header_include(HAVE_SYS_TIME_H "sys/time.h") add_header_include(TIME_WITH_SYS_TIME "time.h") - add_header_include(HAVE_TIME_H "time.h") endif() check_c_source_compiles("${_source_epilogue} +#include int main(void) { struct timeval ts; ts.tv_sec = 0; diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake index 6a8756623f..6451383516 100644 --- a/CMake/Platforms/WindowsCache.cmake +++ b/CMake/Platforms/WindowsCache.cmake @@ -63,11 +63,7 @@ if(NOT UNIX) set(HAVE_IOCTL_SIOCGIFADDR 0) set(HAVE_POLL_H 0) set(HAVE_PWD_H 0) - set(HAVE_SETJMP_H 1) - set(HAVE_SIGNAL_H 1) - set(HAVE_STDLIB_H 1) set(HAVE_STRINGS_H 0) - set(HAVE_STRING_H 1) set(HAVE_SYS_FILIO_H 0) set(HAVE_SYS_IOCTL_H 0) set(HAVE_SYS_PARAM_H 0) @@ -83,7 +79,6 @@ if(NOT UNIX) set(HAVE_SYS_UTIME_H 1) set(HAVE_TERMIOS_H 0) set(HAVE_TERMIO_H 0) - set(HAVE_TIME_H 1) set(HAVE_UTIME_H 0) set(HAVE_SOCKET 1) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84774dc1db..557ab02620 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -995,6 +995,11 @@ if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS) "Set CURL_CA_PATH=none or enable one of those TLS backends.") endif() +# TODO: offload these headers to the specific tests where they are needed. +list(APPEND CURL_INCLUDES "string.h") +list(APPEND CURL_INCLUDES "stdlib.h") +list(APPEND CURL_INCLUDES "stddef.h") + # Check for header files if(NOT UNIX) check_include_file_concat("windows.h" HAVE_WINDOWS_H) @@ -1032,14 +1037,9 @@ check_include_file("linux/tcp.h" HAVE_LINUX_TCP_H) check_include_file_concat("poll.h" HAVE_POLL_H) check_include_file_concat("pwd.h" HAVE_PWD_H) -check_include_file_concat("setjmp.h" HAVE_SETJMP_H) -check_include_file_concat("signal.h" HAVE_SIGNAL_H) check_include_file_concat("stdatomic.h" HAVE_STDATOMIC_H) check_include_file_concat("stdbool.h" HAVE_STDBOOL_H) check_include_file_concat("stdint.h" HAVE_STDINT_H) -check_include_file_concat("stdio.h" HAVE_STDIO_H) -check_include_file_concat("stdlib.h" HAVE_STDLIB_H) -check_include_file_concat("string.h" HAVE_STRING_H) check_include_file_concat("strings.h" HAVE_STRINGS_H) check_include_file_concat("stropts.h" HAVE_STROPTS_H) check_include_file_concat("termio.h" HAVE_TERMIO_H) @@ -1048,8 +1048,6 @@ check_include_file_concat("time.h" HAVE_TIME_H) check_include_file_concat("unistd.h" HAVE_UNISTD_H) check_include_file_concat("utime.h" HAVE_UTIME_H) -check_include_file_concat("stddef.h" HAVE_STDDEF_H) - check_type_size(size_t SIZEOF_SIZE_T) check_type_size(ssize_t SIZEOF_SSIZE_T) check_type_size("long long" SIZEOF_LONG_LONG) @@ -1123,8 +1121,8 @@ endif() check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO) check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE) check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE) -check_symbol_exists(fseeko "${CURL_INCLUDES}" HAVE_FSEEKO) -check_symbol_exists(_fseeki64 "${CURL_INCLUDES}" HAVE__FSEEKI64) +check_symbol_exists(fseeko "${CURL_INCLUDES};stdio.h" HAVE_FSEEKO) +check_symbol_exists(_fseeki64 "${CURL_INCLUDES};stdio.h" HAVE__FSEEKI64) check_symbol_exists(getpeername "${CURL_INCLUDES}" HAVE_GETPEERNAME) check_symbol_exists(getsockname "${CURL_INCLUDES}" HAVE_GETSOCKNAME) check_symbol_exists(if_nametoindex "${CURL_INCLUDES}" HAVE_IF_NAMETOINDEX) @@ -1163,16 +1161,12 @@ set(CMAKE_EXTRA_INCLUDE_FILES "") # sigaction and sigsetjmp are special. Use special mechanism for # detecting those, but only if previous attempt failed. -if(HAVE_SIGNAL_H) - check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION) -endif() +check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION) if(NOT HAVE_SIGSETJMP) - if(HAVE_SETJMP_H) - check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP) - if(HAVE_MACRO_SIGSETJMP) - set(HAVE_SIGSETJMP 1) - endif() + check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP) + if(HAVE_MACRO_SIGSETJMP) + set(HAVE_SIGSETJMP 1) endif() endif() diff --git a/acinclude.m4 b/acinclude.m4 index 81a1c1d0de..0a5f809790 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1142,9 +1142,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ AC_MSG_CHECKING([if monotonic clock_gettime works]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h index a6a518abb3..f5d020253d 100644 --- a/lib/config-amigaos.h +++ b/lib/config-amigaos.h @@ -41,15 +41,12 @@ #define HAVE_NET_IF_H 1 #define HAVE_PWD_H 1 #define HAVE_SELECT 1 -#define HAVE_SETJMP_H 1 #define HAVE_SIGNAL 1 -#define HAVE_SIGNAL_H 1 #define HAVE_SOCKET 1 #define HAVE_STRCASECMP 1 #define HAVE_STRDUP 1 #define HAVE_STRICMP 1 #define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 #define HAVE_STRUCT_TIMEVAL 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_SOCKET_H 1 @@ -57,7 +54,6 @@ #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TYPES_H 1 -#define HAVE_TIME_H 1 #define HAVE_UNISTD_H 1 #define HAVE_UTIME 1 #define HAVE_UTIME_H 1 diff --git a/lib/config-dos.h b/lib/config-dos.h index 05c1a81407..5c646bb5ed 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -61,7 +61,6 @@ #define HAVE_RECV 1 #define HAVE_SELECT 1 #define HAVE_SEND 1 -#define HAVE_SETJMP_H 1 #define HAVE_SETLOCALE 1 #define HAVE_SETMODE 1 #define HAVE_SIGNAL 1 @@ -74,7 +73,6 @@ #define HAVE_SYS_SOCKET_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TYPES_H 1 -#define HAVE_TIME_H 1 #define HAVE_UNISTD_H 1 #define NEED_MALLOC_H 1 diff --git a/lib/config-mac.h b/lib/config-mac.h index ff6fdb25ae..5429fbee48 100644 --- a/lib/config-mac.h +++ b/lib/config-mac.h @@ -52,8 +52,6 @@ #define HAVE_GETTIMEOFDAY 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_TIME_H 1 #define HAVE_UTIME_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_UTIME_H 1 @@ -69,7 +67,6 @@ #define HAVE_STRUCT_TIMEVAL 1 #define HAVE_SIGACTION 1 -#define HAVE_SIGNAL_H 1 #ifdef MACOS_SSL_SUPPORT # define USE_OPENSSL 1 diff --git a/lib/config-os400.h b/lib/config-os400.h index 2d0291d16d..04f7752936 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -149,18 +149,12 @@ /* Define if you have the `signal' function. */ #undef HAVE_SIGNAL -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H - /* Define if you have the `socket' function. */ #define HAVE_SOCKET /* Define if you have the header file. */ #undef HAVE_STDINT_H -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - /* The following define is needed on OS400 to enable strcmpi(), stricmp() and strdup(). */ @@ -181,9 +175,6 @@ /* Define if you have the header file. */ #define HAVE_STRINGS_H -/* Define if you have the header file. */ -#define HAVE_STRING_H - /* Define if you have the header file. */ #undef HAVE_STROPTS_H @@ -226,9 +217,6 @@ /* Define if you have the header file. */ #undef HAVE_TERMIO_H -/* Define if you have the header file. */ -#define HAVE_TIME_H - /* Define if you have the header file. */ #define HAVE_UNISTD_H diff --git a/lib/config-plan9.h b/lib/config-plan9.h index 54f89b06cf..60e3402eb5 100644 --- a/lib/config-plan9.h +++ b/lib/config-plan9.h @@ -108,22 +108,18 @@ #define HAVE_POLL_FINE 1 #define HAVE_POLL_H 1 #define HAVE_PTHREAD_H 1 -#define HAVE_SETJMP_H 1 #define HAVE_SETLOCALE 1 #define HAVE_SIGACTION 1 #define HAVE_SIGNAL 1 -#define HAVE_SIGNAL_H 1 #define HAVE_SIGSETJMP 1 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 #define HAVE_SOCKET 1 #define HAVE_SSL_GET_SHUTDOWN 1 #define HAVE_STDBOOL_H 1 #define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 #define HAVE_STRCASECMP 1 #define HAVE_STRDUP 1 -#define HAVE_STRING_H 1 #define HAVE_STRTOK_R 1 #define HAVE_STRTOLL 1 #define HAVE_STRUCT_TIMEVAL 1 @@ -136,7 +132,6 @@ #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_UN_H 1 #define HAVE_TERMIOS_H 1 -#define HAVE_TIME_H 1 #define HAVE_UNISTD_H 1 #define HAVE_UTIME 1 #define HAVE_UTIME_H 1 diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 94946187d8..e3834b66d3 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -141,18 +141,12 @@ /* Define if you have the `signal' function. */ #define HAVE_SIGNAL -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H - /* Define if you have the `socket' function. */ #define HAVE_SOCKET /* Define if you have the header file. */ #undef HAVE_STDINT_H -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - /* Define if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP @@ -168,9 +162,6 @@ /* Define if you have the header file. */ #undef HAVE_STRINGS_H -/* Define if you have the header file. */ -#define HAVE_STRING_H - /* Define if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R @@ -204,9 +195,6 @@ /* Define if you have the header file. */ #undef HAVE_TERMIO_H -/* Define if you have the header file. */ -#undef HAVE_TIME_H - /* Define if you have the header file. */ #define HAVE_UNISTD_H diff --git a/lib/config-win32.h b/lib/config-win32.h index f8f7b1ba34..5534bb8fc0 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -66,17 +66,11 @@ /* Define if you have the header file. */ /* #define HAVE_NETINET_IN_H 1 */ -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H 1 - /* Define to 1 if you have the header file. */ #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__) #define HAVE_STDBOOL_H 1 #endif -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - /* Define if you have the header file. */ /* #define HAVE_SYS_PARAM_H 1 */ @@ -109,9 +103,6 @@ /* Define if you have the header file. */ /* #define HAVE_TERMIOS_H 1 */ -/* Define if you have the header file. */ -#define HAVE_TIME_H 1 - /* Define if you have the header file. */ #if defined(__MINGW32__) || defined(__LCC__) || defined(__POCC__) #define HAVE_UNISTD_H 1 @@ -130,12 +121,6 @@ #define HAVE_WS2TCPIP_H 1 #endif -/* Define to 1 if you have the header file. */ -#define HAVE_SETJMP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - /* Define to 1 if you have the header file. */ #if defined(__MINGW32__) #define HAVE_LIBGEN_H 1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 2f9a530524..1a34239006 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -50,12 +50,6 @@ /* Define if you have the header file. */ /* #define HAVE_NETINET_IN_H 1 */ -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - /* Define if you have the header file. */ /* #define HAVE_SYS_PARAM_H 1 */ @@ -86,9 +80,6 @@ /* Define if you have the header file. */ /* #define HAVE_TERMIOS_H 1 */ -/* Define if you have the header file. */ -#define HAVE_TIME_H 1 - /* Define if you have the header file. */ #if defined(__MINGW32__) || defined(__LCC__) #define HAVE_UNISTD_H 1 diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 328a77d733..7aefe428dd 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -430,9 +430,6 @@ /* fsetxattr() takes 6 args */ #cmakedefine HAVE_FSETXATTR_6 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SETJMP_H 1 - /* Define to 1 if you have the `setlocale' function. */ #cmakedefine HAVE_SETLOCALE 1 @@ -454,9 +451,6 @@ /* Define to 1 if you have the signal function. */ #cmakedefine HAVE_SIGNAL 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SIGNAL_H 1 - /* Define to 1 if you have the sigsetjmp function or macro. */ #cmakedefine HAVE_SIGSETJMP 1 @@ -481,9 +475,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H 1 - /* Define to 1 if you have the strcasecmp function. */ #cmakedefine HAVE_STRCASECMP 1 @@ -502,9 +493,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRINGS_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STROPTS_H 1 @@ -565,9 +553,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_TERMIO_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TIME_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UNISTD_H 1 diff --git a/lib/curl_memrchr.h b/lib/curl_memrchr.h index a1a4ba0927..45bb38c68e 100644 --- a/lib/curl_memrchr.h +++ b/lib/curl_memrchr.h @@ -28,9 +28,7 @@ #ifdef HAVE_MEMRCHR -#ifdef HAVE_STRING_H -# include -#endif +#include #ifdef HAVE_STRINGS_H # include #endif diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c index a10e2a1b09..aa7bea75e3 100644 --- a/lib/curl_ntlm_wb.c +++ b/lib/curl_ntlm_wb.c @@ -39,9 +39,7 @@ #ifdef HAVE_SYS_WAIT_H #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_PWD_H #include #endif diff --git a/lib/hostip.c b/lib/hostip.c index acb4b5140b..3cd9a65c50 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -41,12 +41,8 @@ #include #endif -#ifdef HAVE_SETJMP_H #include -#endif -#ifdef HAVE_SIGNAL_H #include -#endif #include "urldata.h" #include "sendf.h" diff --git a/lib/hostip.h b/lib/hostip.h index 06d0867277..b68f539b2d 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -30,9 +30,7 @@ #include "timeval.h" /* for timediff_t */ #include "asyn.h" -#ifdef HAVE_SETJMP_H #include -#endif /* Allocate enough memory to hold the full name information structs and * everything. OSF1 is known to require at least 8872 bytes. The buffer diff --git a/lib/sigpipe.h b/lib/sigpipe.h index 48761ad0fd..9b29403c28 100644 --- a/lib/sigpipe.h +++ b/lib/sigpipe.h @@ -25,7 +25,7 @@ ***************************************************************************/ #include "curl_setup.h" -#if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && \ +#if defined(HAVE_SIGACTION) && \ (defined(USE_OPENSSL) || defined(USE_MBEDTLS) || defined(USE_WOLFSSL)) #include diff --git a/lib/transfer.c b/lib/transfer.c index 4c9ff0aa84..b9ce2b5131 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -40,9 +40,7 @@ #ifdef HAVE_SYS_IOCTL_H #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_SYS_PARAM_H #include diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index bd2ebbd019..1c96fb3bf0 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -214,12 +214,10 @@ curl_includes_setjmp="\ #ifdef HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SETJMP_H -# include -#endif +include /* includes end */" AC_CHECK_HEADERS( - sys/types.h setjmp.h, + sys/types.h, [], [], [$curl_includes_setjmp]) ]) @@ -235,12 +233,10 @@ curl_includes_signal="\ #ifdef HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SIGNAL_H -# include -#endif +include /* includes end */" AC_CHECK_HEADERS( - sys/types.h signal.h, + sys/types.h, [], [], [$curl_includes_signal]) ]) @@ -277,12 +273,10 @@ curl_includes_stdlib="\ #ifdef HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif +include /* includes end */" AC_CHECK_HEADERS( - sys/types.h stdlib.h, + sys/types.h, [], [], [$curl_includes_stdlib]) ]) @@ -298,15 +292,13 @@ curl_includes_string="\ #ifdef HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_STRING_H -# include -#endif +#include #ifdef HAVE_STRINGS_H # include #endif /* includes end */" AC_CHECK_HEADERS( - sys/types.h string.h strings.h, + sys/types.h strings.h, [], [], [$curl_includes_string]) ]) diff --git a/src/tool_main.c b/src/tool_main.c index 5c904e86c7..2f132e2d29 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -29,9 +29,7 @@ #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_FCNTL_H #include diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c index e6e5cf0635..55ef02cdb6 100644 --- a/tests/server/mqttd.c +++ b/tests/server/mqttd.c @@ -40,9 +40,7 @@ /* based on sockfilt.c */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 37432e4c85..221df64b01 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -33,9 +33,7 @@ * */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c index cf080ecd05..47bd32e74e 100644 --- a/tests/server/rtspd.c +++ b/tests/server/rtspd.c @@ -29,9 +29,7 @@ * This source file was started based on curl's HTTP test suite server. */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index d47f3b2ad0..473b651f7d 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -85,9 +85,7 @@ * it! */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/socksd.c b/tests/server/socksd.c index e53001d320..cf9a14fd82 100644 --- a/tests/server/socksd.c +++ b/tests/server/socksd.c @@ -57,9 +57,7 @@ /* based on sockfilt.c */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/sws.c b/tests/server/sws.c index 91b4d5a0e9..bea3191a2a 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -30,9 +30,7 @@ */ -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 8db82ff233..670897c0d4 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -55,9 +55,7 @@ #ifdef HAVE_SYS_IOCTL_H #include #endif -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif @@ -75,9 +73,7 @@ #include #endif -#ifdef HAVE_SETJMP_H #include -#endif #ifdef HAVE_PWD_H #include diff --git a/tests/server/util.c b/tests/server/util.c index 435cf61835..19faa26151 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -23,9 +23,7 @@ ***************************************************************************/ #include "server_setup.h" -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/unit/unit2600.c b/tests/unit/unit2600.c index 4710d21762..d7b1efdd75 100644 --- a/tests/unit/unit2600.c +++ b/tests/unit/unit2600.c @@ -40,12 +40,8 @@ #include #endif -#ifdef HAVE_SETJMP_H #include -#endif -#ifdef HAVE_SIGNAL_H #include -#endif #include "urldata.h" #include "connect.h"