From 84c5a9ba481d7a33cc0fd0ca43867b61d127d907 Mon Sep 17 00:00:00 2001 From: anonimal Date: Wed, 28 Jun 2017 21:07:24 +0000 Subject: Unbound: remove unbound from in-tree source We'll instead use a git submodule to pull from our unbound repo. --- external/unbound/compat/ctime_r.c | 42 --------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 external/unbound/compat/ctime_r.c (limited to 'external/unbound/compat/ctime_r.c') diff --git a/external/unbound/compat/ctime_r.c b/external/unbound/compat/ctime_r.c deleted file mode 100644 index 87c2609a8..000000000 --- a/external/unbound/compat/ctime_r.c +++ /dev/null @@ -1,42 +0,0 @@ -/* taken from ldns 1.6.1 */ -#include "config.h" -#ifdef HAVE_TIME_H -#include -#endif -#include "util/locks.h" - -/** the lock for ctime buffer */ -static lock_basic_type ctime_lock; -/** has it been inited */ -static int ctime_r_init = 0; - -/** cleanup ctime_r on exit */ -static void -ctime_r_cleanup(void) -{ - if(ctime_r_init) { - ctime_r_init = 0; - lock_basic_destroy(&ctime_lock); - } -} - -char *ctime_r(const time_t *timep, char *buf) -{ - char* result; - if(!ctime_r_init) { - /* still small race where this init can be done twice, - * which is mostly harmless */ - ctime_r_init = 1; - lock_basic_init(&ctime_lock); - atexit(&ctime_r_cleanup); - } - lock_basic_lock(&ctime_lock); - result = ctime(timep); - if(buf && result) { - if(strlen(result) > 10 && result[7]==' ' && result[8]=='0') - result[8]=' '; /* fix error in windows ctime */ - strcpy(buf, result); - } - lock_basic_unlock(&ctime_lock); - return result; -} -- cgit v1.2.3 From efe70a15f819d7935421d2eef3a29933f5b9defb Mon Sep 17 00:00:00 2001 From: anonimal Date: Wed, 28 Jun 2017 21:15:37 +0000 Subject: Unbound: add git submodule for unbound --- external/unbound | 1 + 1 file changed, 1 insertion(+) create mode 160000 external/unbound (limited to 'external/unbound/compat/ctime_r.c') diff --git a/external/unbound b/external/unbound new file mode 160000 index 000000000..193bdc4ee --- /dev/null +++ b/external/unbound @@ -0,0 +1 @@ +Subproject commit 193bdc4ee3fe2b0d17e547e86512528c2614483a -- cgit v1.2.3