summaryrefslogtreecommitdiffstats
path: root/compat/compat.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'compat/compat.h.in')
-rw-r--r--compat/compat.h.in18
1 files changed, 14 insertions, 4 deletions
diff --git a/compat/compat.h.in b/compat/compat.h.in
index c697d6c..3baa489 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -3,7 +3,7 @@
* @author Michal Vasko <mvasko@cesnet.cz>
* @brief compatibility functions header
*
- * Copyright (c) 2021 CESNET, z.s.p.o.
+ * Copyright (c) 2021 - 2023 CESNET, z.s.p.o.
*
* This source code is licensed under BSD 3-Clause License (the "License").
* You may not use this file except in compliance with the License.
@@ -65,14 +65,12 @@
#cmakedefine HAVE_STRCHRNUL
#cmakedefine HAVE_GET_CURRENT_DIR_NAME
#cmakedefine HAVE_PTHREAD_MUTEX_TIMEDLOCK
-#cmakedefine HAVE_TM_GMTOFF
-#cmakedefine HAVE_TIME_H_TIMEZONE
#cmakedefine HAVE_REALPATH
#cmakedefine HAVE_LOCALTIME_R
#cmakedefine HAVE_GMTIME_R
+#cmakedefine HAVE_TIMEGM
#cmakedefine HAVE_STRPTIME
#cmakedefine HAVE_MMAP
-#cmakedefine HAVE_DIRNAME
#cmakedefine HAVE_STRCASECMP
#cmakedefine HAVE_SETENV
@@ -188,6 +186,18 @@ char *realpath(const char *path, char *resolved_path);
struct tm *localtime_r(const time_t *timep, struct tm *result);
#endif
+#ifndef HAVE_GMTIME_R
+struct tm *gmtime_r(const time_t *timep, struct tm *result);
+#endif
+
+#ifndef HAVE_TIMEGM
+# if defined (_WIN32)
+# define timegm _mkgmtime
+# else
+# error No timegm() implementation for this platform is available.
+# endif
+#endif
+
#ifndef HAVE_STRPTIME
char *strptime(const char *s, const char *format, struct tm *tm);
#endif