diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-06 02:41:14 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-06 02:41:14 +0200 |
commit | 28c9ec1eeb2c44bc3658ae1ca63b11ce8ae2e584 (patch) | |
tree | 3e9c294f14f43b3571e50a5c3b5e93619b067bef /source | |
parent | 7ee126fdeaec9513bb0b97e075f3964b79c00582 (diff) | |
download | kit-28c9ec1eeb2c44bc3658ae1ca63b11ce8ae2e584.zip |
test
Diffstat (limited to 'source')
-rw-r--r-- | source/kit/time.h | 24 | ||||
-rw-r--r-- | source/kit_test/shared.inl.h | 14 |
2 files changed, 13 insertions, 25 deletions
diff --git a/source/kit/time.h b/source/kit/time.h index af36211..e16d3a2 100644 --- a/source/kit/time.h +++ b/source/kit/time.h @@ -9,30 +9,20 @@ #ifndef TIME_UTC # define TIME_UTC 1 +#endif +#ifdef __MINGW32__ 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) { - // TODO - // Windows implementation. - // -} -# else -static int timespec_get(struct timespec *ts, int base) { - // TODO - // Posix implementation. - // -} +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 # endif +# include <Windows.h> + +static int timespec_get(struct timespec *ts, int base) { } #endif #endif diff --git a/source/kit_test/shared.inl.h b/source/kit_test/shared.inl.h index f80f7ff..07cb966 100644 --- a/source/kit_test/shared.inl.h +++ b/source/kit_test/shared.inl.h @@ -14,22 +14,20 @@ # ifndef TIME_UTC # define TIME_UTC 1 +# endif +# ifdef __MINGW32__ 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> +# 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 |