From 5d6acc5c3f6271db79fbb8b481981d3cf0c5c27a Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:35:23 -0800 Subject: Remove check for gettimeofday + tz in CMake (#4045) This is not used in the library --- config/cmake/ConfigureChecks.cmake | 2 -- config/cmake/HDFTests.c | 23 ----------------------- 2 files changed, 25 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index df28f76..37f306e 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -78,7 +78,6 @@ if (WINDOWS) endif () if (NOT UNIX AND NOT CYGWIN) set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1) - set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1) set (${HDF_PREFIX}_HAVE_TIMEZONE 1) set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1) set (${HDF_PREFIX}_HAVE_LIBWS2_32 1) @@ -396,7 +395,6 @@ if (MINGW OR NOT WINDOWS) CHECK_FUNCTION_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY) foreach (time_test # HAVE_TIMEZONE - GETTIMEOFDAY_GIVES_TZ HAVE_TM_ZONE HAVE_STRUCT_TM_TM_ZONE ) diff --git a/config/cmake/HDFTests.c b/config/cmake/HDFTests.c index 3897390..095f113 100644 --- a/config/cmake/HDFTests.c +++ b/config/cmake/HDFTests.c @@ -175,29 +175,6 @@ int main(int argc, char **argv) } #endif -#ifdef GETTIMEOFDAY_GIVES_TZ -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -int main(void) -{ - struct timeval tv; - struct timezone tz; - - tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */ - tz.tz_dsttime = 7; - - gettimeofday(&tv, &tz); - - /* Check whether the function returned any value at all */ - if (tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) - return 1; - else - return 0; -} -#endif - #ifdef HAVE_IOEO #include -- cgit v0.12