projects
/
debian
/
tar
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import upstream version 1.27
[debian/tar]
/
m4
/
time_r.m4
diff --git
a/m4/time_r.m4
b/m4/time_r.m4
index 9e82d39ffbdfe2c86d33a8d66f3c41aae9c7c46d..c388a8312fbec201db82381a5fcb4604dc7aee40 100644
(file)
--- a/
m4/time_r.m4
+++ b/
m4/time_r.m4
@@
-1,6
+1,6
@@
dnl Reentrant time functions: localtime_r, gmtime_r.
dnl Reentrant time functions: localtime_r, gmtime_r.
-dnl Copyright (C) 2003, 2006-201
0
Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-201
3
Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@
-15,8
+15,16
@@
AC_DEFUN([gl_TIME_R],
AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
AC_REQUIRE([AC_C_RESTRICT])
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([localtime_r], [], [], [[#include <time.h>]])
+ 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
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(
AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature],
[gl_cv_time_r_posix],
[AC_COMPILE_IFELSE(
@@
-42,10
+50,6
@@
AC_DEFUN([gl_TIME_R],
else
HAVE_LOCALTIME_R=0
fi
else
HAVE_LOCALTIME_R=0
fi
- if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
- AC_LIBOBJ([time_r])
- gl_PREREQ_TIME_R
- fi
])
# Prerequisites of lib/time_r.c.
])
# Prerequisites of lib/time_r.c.