From bca93a379db696117e134729d6749a17a4b13394 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Thu, 4 Jan 2024 11:54:42 +0300 Subject: [PATCH 1/2] win32, simd: ensure we are on msvc when checking MSVC specific headers --- include/cglm/simd/intrin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cglm/simd/intrin.h b/include/cglm/simd/intrin.h index 8fb51d7..137df65 100644 --- a/include/cglm/simd/intrin.h +++ b/include/cglm/simd/intrin.h @@ -63,7 +63,7 @@ #endif /* ARM Neon */ -#if defined(_WIN32) +#if defined(_WIN32) && defined(_MSC_VER) /* TODO: non-ARM stuff already inported, will this be better option */ /* # include */ From a682b9e6cfe9425375ad153d3d70c88f7c31a044 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Thu, 4 Jan 2024 12:49:45 +0300 Subject: [PATCH 2/2] win32, tests: fix drand48() error on mingw --- test/include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/include/common.h b/test/include/common.h index 2eb2e83..cdeede2 100644 --- a/test/include/common.h +++ b/test/include/common.h @@ -145,7 +145,7 @@ typedef struct test_entry_t { } \ } while(0); -#if defined(_WIN32) +#if defined(_WIN32) || defined(__MINGW32__) || defined(__MINGW64__) # define drand48() ((float)(rand() / (RAND_MAX + 1.0))) # define OK_TEXT "ok:" # define FAIL_TEXT "fail:"