#ifndef HAVE_CTIME_R
+#ifdef ctime_r
+#undef ctime_r
+#endif
#define ctime_r unbound_ctime_r
char *ctime_r(const time_t *timep, char *buf);
#endif
fi
+#LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
if test "x$ac_cv_func_strsep" = xyes; then :
$as_echo "#define HAVE_STRSEP 1" >>confdefs.h
LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
AC_SUBST(LIBOBJ_WITHOUT_CTIME)
AC_REPLACE_FUNCS(ctime_r)
+#LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
AC_REPLACE_FUNCS(strsep)
AC_ARG_ENABLE(allsymbols, AS_HELP_STRING([--enable-allsymbols],[export all symbols from libunbound and link binaries to it, smaller install size but libunbound export table is polluted by internal symbols]))
[
#ifndef HAVE_CTIME_R
+#ifdef ctime_r
+#undef ctime_r
+#endif
#define ctime_r unbound_ctime_r
char *ctime_r(const time_t *timep, char *buf);
#endif
#include "testcode/testpkts.h"
#include "testcode/fake_event.h"
#include "sldns/str2wire.h"
-#ifdef ctime_r
-#undef ctime_r
-#endif
/** max length of lines in file */
#define MAX_LINE_LEN 10240
log_err("macro ctime: expected number, not: %s", arg);
return NULL;
}
-#ifndef HAVE_CTIME_R
- unbound_ctime_r(&tt, buf);
-#else
ctime_r(&tt, buf);
-#endif
strip_end_white(buf);
return strdup(buf);
}