X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftime_r.m4;h=f9bed0c5c83db52f076eff5e390bb44d6af9b13b;hb=115dcb2a1ade67d78b430081e225f46aad742e7b;hp=9e82d39ffbdfe2c86d33a8d66f3c41aae9c7c46d;hpb=57505a676083a77cf44f683f65281c7fff5bf6fb;p=gnulib.git diff --git a/m4/time_r.m4 b/m4/time_r.m4 index 9e82d39ff..f9bed0c5c 100644 --- a/m4/time_r.m4 +++ b/m4/time_r.m4 @@ -15,8 +15,16 @@ AC_DEFUN([gl_TIME_R], AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) + dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is + dnl not defined. + AC_CHECK_DECLS_ONCE([localtime_r]) + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 + fi + AC_CHECK_FUNCS_ONCE([localtime_r]) if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], [gl_cv_time_r_posix], [AC_COMPILE_IFELSE(