From f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:52 -0500 Subject: build: Build mlibc + add distclean target Signed-off-by: Ian Moffett --- lib/mlibc/tests/ansi/timegm.c | 45 ------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 lib/mlibc/tests/ansi/timegm.c (limited to 'lib/mlibc/tests/ansi/timegm.c') diff --git a/lib/mlibc/tests/ansi/timegm.c b/lib/mlibc/tests/ansi/timegm.c deleted file mode 100644 index f5af03e..0000000 --- a/lib/mlibc/tests/ansi/timegm.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include - -int main() { - struct tm soon = {}; - soon.tm_sec = 0; - soon.tm_min = 0; - soon.tm_hour = 0; - soon.tm_mday = 1; - soon.tm_mon = 0; - soon.tm_year = 70; - time_t result; - time_t expected_result = 0; - // This should be epoch. - result = timegm(&soon); - printf("epoch: %ld\n", result); - assert(result == expected_result); - - soon.tm_sec = 12; - soon.tm_min = 8; - soon.tm_hour = 16; - soon.tm_mday = 17; - soon.tm_mon = 4; - soon.tm_year = 122; - expected_result = 1652803692; - result = timegm(&soon); - // On my host, this returned 1652803692, verify this. - printf("epoch: %ld\n", result); - assert(result == expected_result); - - soon.tm_sec = 45; - soon.tm_min = 42; - soon.tm_hour = 17; - soon.tm_mday = 16; - soon.tm_mon = 8; - soon.tm_year = 69; - expected_result = -9181035; - result = timegm(&soon); - // On my host, this returned -9181035, verify this. - printf("epoch: %ld\n", result); - assert(result == expected_result); - - return 0; -} -- cgit v1.2.3