/* Define to 1 if you have the `gmtime_r' function. */
/* #undef HAVE_GMTIME_R */
+/* Define to 1 if you have the `ctime_r' function. */
+/* #undef HAVE_CTIME_R */
+
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
# Checks for library functions.
AC_FUNC_STRFTIME
AC_FUNC_STRERROR_R
-AC_CHECK_FUNCS([strchr strdup strstr gmtime_r strtok_r strcasecmp])
+AC_CHECK_FUNCS([strchr strdup strstr gmtime_r ctime_r strtok_r strcasecmp])
AC_CHECK_HEADERS([dlfcn.h])
# old_LIBS="$LIBS"
{
// Create a timestamp
time_t now = time(NULL);
+#ifdef HAVE_CTIME_R
+ char timebuf[32];
+ insert("now", ctime_r(&now,timebuf));
+#else
insert("now", ctime(&now));
+#endif
if (!output)
output=&m_generated;