From: Damir Tomic Date: Sat, 20 Jun 2015 07:57:06 +0000 (+0200) Subject: testcalshims.c~f84485d2b13cef55: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4b2e7a20c248b7b6bdeb876a0ebebc4756699ac;p=thirdparty%2Fntp.git testcalshims.c~f84485d2b13cef55: Delete: tests/libntp/testcalshims.c testcalshims.h~5612fd527e4d6de9: Delete: tests/libntp/testcalshims.h bk: 55851cd2BXGUdBVv5Yo1-xJiDFC-Bw --- diff --git a/tests/libntp/testcalshims.c b/tests/libntp/testcalshims.c deleted file mode 100644 index 6e77a70bb..000000000 --- a/tests/libntp/testcalshims.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "config.h" - -#include "ntp_stdlib.h" -#include "ntp_calendar.h" - -/* This file contains various constants that libntp needs to be set - * and that is normally defined in ntpd/ntpq/... - */ - -//u_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime. -//const char *progname = "libntptest"; - -//static //should be static in c -static time_t nowtime = 0; - - -time_t timefunc(time_t *ptr) -{ - if (ptr) - *ptr = nowtime; - return nowtime; -} - - -//commented out cuz it was causing problems for a_md5encrypt.c - -void settime(int y, int m, int d, int H, int M, int S) -{ - time_t days(ntpcal_edate_to_eradays(y-1, m-1, d-1) + 1 - DAY_UNIX_STARTS); - time_t secs(ntpcal_etime_to_seconds(H, M, S)); - - nowtime = days * SECSPERDAY + secs; -} - diff --git a/tests/libntp/testcalshims.h b/tests/libntp/testcalshims.h deleted file mode 100644 index c4aeef28b..000000000 --- a/tests/libntp/testcalshims.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "config.h" - -#include "ntp_stdlib.h" -#include "ntp_calendar.h" - - -static time_t timefunc(time_t*); -static time_t nowtime; -static void settime(int y, int m, int d, int H, int M, int S); -