1 dnl Reentrant time functions like localtime_r.
3 dnl Copyright (C) 2003 Free Software Foundation, Inc.
5 dnl This file is free software, distributed under the terms of the GNU
6 dnl General Public License. As a special exception to the GNU General
7 dnl Public License, this file may be distributed as part of a program
8 dnl that contains a configuration script generated by Autoconf, under
9 dnl the same distribution terms as the rest of that program.
11 dnl Written by Paul Eggert.
15 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
16 AC_REQUIRE([gl_C_RESTRICT])
18 AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature],
22 [/* We don't need to append 'restrict's to the argument types,
23 even though the POSIX signature has the 'restrict's,
24 since C99 says they can't affect type compatibility. */
25 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;],
26 [gl_cv_time_r_posix=yes],
27 [gl_cv_time_r_posix=no])])
28 if test $gl_cv_time_r_posix = yes; then
29 AC_DEFINE([HAVE_TIME_R_POSIX], 1,
30 [Define to 1 if localtime_r, etc. have the type signatures that
38 # Prerequisites of lib/time_r.c.
39 AC_DEFUN([gl_PREREQ_TIME_R], [