summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2015-10-19 11:33:19 +0200
committerStef Walter <stefw@redhat.com>2015-10-19 11:33:19 +0200
commit29014eab3caf4f70fcd94c8198ca24992b1e5ec6 (patch)
tree172df08d5fcb545e3bff4975a8792da2a3e99eef
parent3be562d4d386eddc79489715507d979135d4b74a (diff)
downloadp11-kit-29014eab3caf4f70fcd94c8198ca24992b1e5ec6.tar.gz
common: Remove compat timegm() implementation
We no longer use timegm()
-rw-r--r--common/compat.c31
-rw-r--r--configure.ac1
2 files changed, 0 insertions, 32 deletions
diff --git a/common/compat.c b/common/compat.c
index 768bb7d..de5b99b 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -622,37 +622,6 @@ gmtime_r (const time_t *timep,
#endif /* HAVE_GMTIME_R */
-#ifndef HAVE_TIMEGM
-
-time_t
-timegm (struct tm *tm)
-{
- time_t tl, tb;
- struct tm tg;
-
- tl = mktime (tm);
- if (tl == -1) {
- tm->tm_hour--;
- tl = mktime (tm);
- if (tl == -1)
- return -1;
- tl += 3600;
- }
- gmtime_r (&tl, &tg);
- tg.tm_isdst = 0;
- tb = mktime (&tg);
- if (tb == -1) {
- tg.tm_hour--;
- tb = mktime (&tg);
- if (tb == -1)
- return -1;
- tb += 3600;
- }
- return (tl - (tb - tl));
-}
-
-#endif /* HAVE_TIMEGM */
-
#if !defined(HAVE_MKDTEMP) || !defined(HAVE_MKSTEMP)
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/configure.ac b/configure.ac
index 77bda6a..c353046 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,7 +91,6 @@ if test "$os_unix" = "yes"; then
AC_CHECK_FUNCS([getauxval issetugid getresuid secure_getenv])
AC_CHECK_FUNCS([strnstr memdup strndup strerror_r])
AC_CHECK_FUNCS([asprintf vasprintf vsnprintf])
- AC_CHECK_FUNCS([timegm])
AC_CHECK_FUNCS([fdwalk])
AC_CHECK_FUNCS([setenv])