Skip to content

Commit

Permalink
Remove check for gettimeofday + tz in CMake
Browse files Browse the repository at this point in the history
This is not used in the library
  • Loading branch information
derobins committed Feb 25, 2024
1 parent 560e80c commit a00216b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
)
Expand Down
23 changes: 0 additions & 23 deletions config/cmake/HDFTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,29 +175,6 @@ int main(int argc, char **argv)
}
#endif

#ifdef GETTIMEOFDAY_GIVES_TZ
#include <time.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#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 <windows.h>
Expand Down

0 comments on commit a00216b

Please sign in to comment.