summaryrefslogtreecommitdiffstats
path: root/gl/m4/timegm.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/timegm.m4')
-rw-r--r--gl/m4/timegm.m412
1 files changed, 8 insertions, 4 deletions
diff --git a/gl/m4/timegm.m4 b/gl/m4/timegm.m4
index 6079f1a3..cb6da6da 100644
--- a/gl/m4/timegm.m4
+++ b/gl/m4/timegm.m4
@@ -1,15 +1,16 @@
1# timegm.m4 serial 13 1# timegm.m4
2dnl Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc. 2# serial 16
3dnl Copyright (C) 2003, 2007, 2009-2025 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
6 8
7AC_DEFUN([gl_FUNC_TIMEGM], 9AC_DEFUN([gl_FUNC_TIMEGM],
8[ 10[
9 AC_REQUIRE([gl_TIME_H_DEFAULTS]) 11 AC_REQUIRE([gl_TIME_H_DEFAULTS])
10 AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) 12 AC_REQUIRE([gl_FUNC_MKTIME_WORKS])
11 REPLACE_TIMEGM=0 13 gl_CHECK_FUNCS_ANDROID([timegm], [[#include <time.h>]])
12 AC_CHECK_FUNCS_ONCE([timegm])
13 if test $ac_cv_func_timegm = yes; then 14 if test $ac_cv_func_timegm = yes; then
14 if test "$gl_cv_func_working_mktime" != yes; then 15 if test "$gl_cv_func_working_mktime" != yes; then
15 # Assume that timegm is buggy if mktime is. 16 # Assume that timegm is buggy if mktime is.
@@ -17,6 +18,9 @@ AC_DEFUN([gl_FUNC_TIMEGM],
17 fi 18 fi
18 else 19 else
19 HAVE_TIMEGM=0 20 HAVE_TIMEGM=0
21 case "$gl_cv_onwards_func_timegm" in
22 future*) REPLACE_TIMEGM=1 ;;
23 esac
20 fi 24 fi
21]) 25])
22 26