From: W.C.A. Wijngaards Date: Fri, 25 Jun 2021 12:37:53 +0000 (+0200) Subject: Analysis workflow, check for ctime define. X-Git-Tag: release-1.13.2rc1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=770a54600cd6e683abb23c0aaef8f6e5dd13e336;p=thirdparty%2Funbound.git Analysis workflow, check for ctime define. --- diff --git a/config.h.in b/config.h.in index cb27afa4f..385ea3cde 100644 --- a/config.h.in +++ b/config.h.in @@ -1263,6 +1263,9 @@ int memcmp(const void *x, const void *y, size_t n); #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 diff --git a/configure b/configure index 3ed5dadda..c86635be4 100755 --- a/configure +++ b/configure @@ -21048,6 +21048,7 @@ esac 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 diff --git a/configure.ac b/configure.ac index 5ffbe6834..1d22e3633 100644 --- a/configure.ac +++ b/configure.ac @@ -1717,6 +1717,7 @@ fi 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])) @@ -2044,6 +2045,9 @@ AHX_MEMCMP_BROKEN(unbound) [ #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 diff --git a/testcode/replay.c b/testcode/replay.c index b5235d7a6..69f1544db 100644 --- a/testcode/replay.c +++ b/testcode/replay.c @@ -51,9 +51,6 @@ #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 @@ -690,11 +687,7 @@ do_macro_ctime(char* arg) 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); }