summaryrefslogtreecommitdiff
path: root/m4/mktime.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-07-28 21:01:16 +0200
committerBruno Haible <bruno@clisp.org>2009-07-28 21:01:52 +0200
commitab3390dfbe250699c6c6f59654516b688363f38f (patch)
tree3758ae88bbd7d3936cfb00bfe075b5b2ec84ad19 /m4/mktime.m4
parentb598e4850109a959ef3722bf14d917ee608c3794 (diff)
downloadgnulib-ab3390dfbe250699c6c6f59654516b688363f38f.tar.gz
Fix compilation error when <ctime> is used and mktime is replaced.
* lib/time.in.h (mktime): New declaration. * m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set REPLACE_MKTIME instead of defining mktime in config.h. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME. * modules/time (Makefile.am): Substitute REPLACE_MKTIME. Reported by Ross McFarland <rwmcfa1@neces.com>.
Diffstat (limited to 'm4/mktime.m4')
-rw-r--r--m4/mktime.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 1e926e86b0..3eeace5517 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -215,11 +215,11 @@ fi
AC_DEFUN([gl_FUNC_MKTIME],
[
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
AC_FUNC_MKTIME
dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]).
if test $ac_cv_func_working_mktime = no; then
- AC_DEFINE([mktime], [rpl_mktime],
- [Define to rpl_mktime if the replacement function should be used.])
+ REPLACE_MKTIME=1
gl_PREREQ_MKTIME
fi
])