Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes remaining H5_TIME_WITH_SYS_TIME cruft #810

Merged
merged 1 commit into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions config/cmake/H5pubconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,6 @@
PTHREAD_SCOPE_SYSTEM) call. */
#cmakedefine H5_SYSTEM_SCOPE_THREADS @H5_SYSTEM_SCOPE_THREADS@

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine H5_TIME_WITH_SYS_TIME @H5_TIME_WITH_SYS_TIME@

/* Define using v1.10 public API symbols by default */
#cmakedefine H5_USE_110_API_DEFAULT @H5_USE_110_API_DEFAULT@

Expand Down
1 change: 0 additions & 1 deletion config/cmake_ext_mod/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ if (MINGW OR NOT WINDOWS)
#-----------------------------------------------------------------------------
CHECK_STRUCT_HAS_MEMBER("struct tm" tm_gmtoff "time.h" ${HDF_PREFIX}_HAVE_TM_GMTOFF)
CHECK_STRUCT_HAS_MEMBER("struct tm" __tm_gmtoff "time.h" ${HDF_PREFIX}_HAVE___TM_GMTOFF)
CHECK_STRUCT_HAS_MEMBER("struct tm" tm_sec "sys/types.h;sys/time.h;time.h" ${HDF_PREFIX}_TIME_WITH_SYS_TIME)
if (${HDF_PREFIX}_HAVE_SYS_TIME_H)
CHECK_STRUCT_HAS_MEMBER("struct tm" tz_minuteswest "sys/types.h;sys/time.h;time.h" ${HDF_PREFIX}_HAVE_STRUCT_TIMEZONE)
else ()
Expand Down
9 changes: 3 additions & 6 deletions tools/lib/io_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@

#include "hdf5.h"

#if defined(H5_TIME_WITH_SYS_TIME)
#include <sys/time.h>
#include <time.h>
#elif defined(H5_HAVE_SYS_TIME_H)

#ifdef H5_HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif

#ifdef H5_HAVE_WINSOCK2_H
#include <winsock2.h>
#endif /* H5_HAVE_WINSOCK2_H */
#endif

/* The different types of timers we can have */
typedef enum timer_type_ {
Expand Down
24 changes: 11 additions & 13 deletions tools/test/perform/direct_write_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,30 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

#ifdef H5_HAVE_UNISTD_H
#include <sys/types.h>
#include <unistd.h>
#endif
#include <time.h>

#ifdef H5_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif

#if defined(H5_TIME_WITH_SYS_TIME)
#include <sys/time.h>
#include <time.h>
#elif defined(H5_HAVE_SYS_TIME_H)
#ifdef H5_HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif

#ifdef H5_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#ifdef H5_HAVE_UNISTD_H
#include <unistd.h>
#endif

const char *FILENAME[] = {"direct_write", "unix.raw", NULL};

/*
* Print the current location on the standard output stream.
*/
#define FUNC __func__
#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define H5_FAILED() \
{ \
puts("*FAILED*"); \
Expand Down
21 changes: 10 additions & 11 deletions tools/test/perform/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,22 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef H5_HAVE_UNISTD_H
#include <sys/types.h>
#include <unistd.h>
#endif
#include <time.h>

#ifdef H5_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif

#if defined(H5_TIME_WITH_SYS_TIME)
#include <sys/time.h>
#include <time.h>
#elif defined(H5_HAVE_SYS_TIME_H)
#ifdef H5_HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif

#ifdef H5_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#ifdef H5_HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <mpi.h>
Expand Down