]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Analysis workflow, check for ctime define.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 12:37:53 +0000 (14:37 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 12:37:53 +0000 (14:37 +0200)
config.h.in
configure
configure.ac
testcode/replay.c

index cb27afa4fe27e63a34407f1f9c1e0f5fefc253b8..385ea3cdeb32b971823dc4b0f25d966c16099249 100644 (file)
@@ -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
index 3ed5daddaaa8a957c49716760c22385040b04e01..c86635be49976d5286a617c101c3471a9ff63e16 100755 (executable)
--- 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
index 5ffbe68344ec26cf6f44078637d4961876e6fc78..1d22e363311e010970c200eee637a9f392651f1d 100644 (file)
@@ -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
index b5235d7a650f1307c0e6be4d4b41cf5bfaa8e6b6..69f1544db8739c52c0b2112cac7ba81d48e53e4e 100644 (file)
@@ -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);
 }