-# serial 18
+# serial 20
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
time_t_max = (! time_t_signed
? (time_t) -1
- : ~ (~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)));
+ : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
+ * 2 + 1));
time_t_min = (! time_t_signed
? (time_t) 0
: time_t_signed_magnitude
? ~ (time_t) 0
- : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1));
+ : ~ time_t_max);
delta = time_t_max / 997; /* a suitable prime number */
for (i = 0; i < N_STRINGS; i++)
fi
])
+AC_DEFUN([gl_FUNC_MKTIME_INTERNAL], [
+ AC_REQUIRE([gl_FUNC_MKTIME])
+ if test $REPLACE_MKTIME = 0; then
+ dnl BeOS has __mktime_internal in libc, but other platforms don't.
+ AC_CHECK_FUNC([__mktime_internal],
+ [AC_DEFINE([mktime_internal], [__mktime_internal],
+ [Define to the real name of the mktime_internal function.])
+ ],
+ [dnl mktime works but it doesn't export __mktime_internal,
+ dnl so we need to substitute our own mktime implementation.
+ REPLACE_MKTIME=1
+ AC_LIBOBJ([mktime])
+ gl_PREREQ_MKTIME
+ ])
+ fi
+])
+
# Prerequisites of lib/mktime.c.
AC_DEFUN([gl_PREREQ_MKTIME],
[