diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-06 02:37:27 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-06 02:37:27 +0200 |
commit | 7ee126fdeaec9513bb0b97e075f3964b79c00582 (patch) | |
tree | 3c947e76e01e353dc6af5910efaa08bf69c35085 /source/kit_test | |
parent | 3cf844d8637ec31bbbba2997c106330991d67528 (diff) | |
download | kit-7ee126fdeaec9513bb0b97e075f3964b79c00582.zip |
time.h fixes; incomplete
Diffstat (limited to 'source/kit_test')
-rw-r--r-- | source/kit_test/shared.inl.h | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/source/kit_test/shared.inl.h b/source/kit_test/shared.inl.h index 90efcd3..f80f7ff 100644 --- a/source/kit_test/shared.inl.h +++ b/source/kit_test/shared.inl.h @@ -1,20 +1,44 @@ #ifndef KIT_TEST_SHARED_INL_H #define KIT_TEST_SHARED_INL_H -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif +// kit/time.h +// +#ifndef KIT_TIME_H +# define KIT_TIME_H + +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif + +# include <time.h> + +# ifndef TIME_UTC +# define TIME_UTC 1 + +struct timespec { + time_t tv_sec; + long tv_nsec; +}; + +# if defined(_WIN32) && !defined(__CYGWIN__) +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# include <Windows.h> + +static int timespec_get(struct timespec *ts, int base) { } +# else +static int timespec_get(struct timespec *ts, int base) { } +# endif +# endif + +#endif // kit/time.h #include <setjmp.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <time.h> - -#ifndef TIME_UTC -# define TIME_UTC 1 -#endif enum { white, blue, light, yellow, red, green }; |