From db07376a3e5396ed7b3cfa21b452bb56ef6766b6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Sep 2023 13:57:07 +0200 Subject: [PATCH] lib: remove TIME_WITH_SYS_TIME It is not used in any code anywhere. Ref: #11964 Closes #11975 --- CMake/CurlTests.c | 17 ----------------- CMake/OtherTests.cmake | 1 - CMake/Platforms/WindowsCache.cmake | 1 - CMakeLists.txt | 1 - lib/config-amigaos.h | 1 - lib/config-dos.h | 1 - lib/config-mac.h | 3 --- lib/config-os400.h | 3 --- lib/config-plan9.h | 2 -- lib/config-riscos.h | 3 --- lib/config-win32.h | 3 --- lib/config-win32ce.h | 3 --- lib/curl_config.h.cmake | 3 --- 13 files changed, 42 deletions(-) diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index 38be522d5e..ea80ec89ab 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -21,23 +21,6 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#ifdef TIME_WITH_SYS_TIME -/* Time with sys/time test */ - -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} - -#endif #ifdef HAVE_FCNTL_O_NONBLOCK diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index b1dd2574c4..78d3940455 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -57,7 +57,6 @@ 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") endif() check_c_source_compiles("${_source_epilogue} #include diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake index edf6058855..6c79e1854e 100644 --- a/CMake/Platforms/WindowsCache.cmake +++ b/CMake/Platforms/WindowsCache.cmake @@ -112,7 +112,6 @@ if(NOT UNIX) set(HAVE_GETHOSTBYNAME_R_6 0) set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0) - set(TIME_WITH_SYS_TIME 0) set(HAVE_O_NONBLOCK 0) set(HAVE_IN_ADDR_T 0) set(STDC_HEADERS 1) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ba52a040e..6ce5f3b1e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1207,7 +1207,6 @@ foreach(CURL_TEST HAVE_IOCTL_FIONBIO HAVE_IOCTL_SIOCGIFADDR HAVE_SETSOCKOPT_SO_NONBLOCK - TIME_WITH_SYS_TIME HAVE_O_NONBLOCK HAVE_GETHOSTBYNAME_R_3 HAVE_GETHOSTBYNAME_R_5 diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h index f5d020253d..8f4d3e6c31 100644 --- a/lib/config-amigaos.h +++ b/lib/config-amigaos.h @@ -92,7 +92,6 @@ #endif #define STDC_HEADERS 1 -#define TIME_WITH_SYS_TIME 1 #define in_addr_t int diff --git a/lib/config-dos.h b/lib/config-dos.h index 5c646bb5ed..550c410a12 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -82,7 +82,6 @@ #define SIZEOF_SIZE_T 4 #define SIZEOF_CURL_OFF_T 8 #define STDC_HEADERS 1 -#define TIME_WITH_SYS_TIME 1 /* Qualifiers for send() and recv() */ diff --git a/lib/config-mac.h b/lib/config-mac.h index 5429fbee48..c29888f8f7 100644 --- a/lib/config-mac.h +++ b/lib/config-mac.h @@ -56,9 +56,6 @@ #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_UTIME_H 1 #define HAVE_SYS_IOCTL_H 1 - -#define TIME_WITH_SYS_TIME 1 - #define HAVE_ALARM 1 #define HAVE_FTRUNCATE 1 #define HAVE_UTIME 1 diff --git a/lib/config-os400.h b/lib/config-os400.h index 04f7752936..e9a6288630 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -247,9 +247,6 @@ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME - /* Define to enable HTTP3 support (experimental, requires NGTCP2, QUICHE or MSH3) */ #undef ENABLE_QUIC diff --git a/lib/config-plan9.h b/lib/config-plan9.h index 60e3402eb5..fa4be8e6d2 100644 --- a/lib/config-plan9.h +++ b/lib/config-plan9.h @@ -138,8 +138,6 @@ #define HAVE_POSIX_STRERROR_R 1 #define HAVE_STRERROR_R 1 - -#define TIME_WITH_SYS_TIME 1 #define USE_MANUAL 1 #define __attribute__(x) diff --git a/lib/config-riscos.h b/lib/config-riscos.h index e3834b66d3..52c279f5bf 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -213,9 +213,6 @@ /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - /* Version number of package */ #undef VERSION diff --git a/lib/config-win32.h b/lib/config-win32.h index 5534bb8fc0..e55ef2fd20 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -133,9 +133,6 @@ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 -/* Define if you can safely include both and . */ -/* #define TIME_WITH_SYS_TIME 1 */ - /* Define to 1 if bool is an available type. */ #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__) #define HAVE_BOOL_T 1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 1a34239006..cc3833d017 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -101,9 +101,6 @@ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 -/* Define if you can safely include both and . */ -/* #define TIME_WITH_SYS_TIME 1 */ - /* ---------------------------------------------------------------- */ /* FUNCTIONS */ /* ---------------------------------------------------------------- */ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 528cad4eff..a503423d22 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -655,9 +655,6 @@ ${SIZEOF_TIME_T_CODE} /* Define to 1 if you have the ANSI C header files. */ #cmakedefine STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#cmakedefine TIME_WITH_SYS_TIME 1 - /* Define if you want to enable c-ares support */ #cmakedefine USE_ARES 1 -- 2.47.3