From 0e534ee7e0ea9aae89f015e3d86bb81b485ffb16 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Tue, 16 May 2023 20:03:36 +0800 Subject: [PATCH 1/3] Warn on 4-byte char, not err out --- parallel_hashmap/phmap_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parallel_hashmap/phmap_config.h b/parallel_hashmap/phmap_config.h index 744de18..0505e8d 100644 --- a/parallel_hashmap/phmap_config.h +++ b/parallel_hashmap/phmap_config.h @@ -100,7 +100,7 @@ #endif #if CHAR_BIT != 8 - #error "phmap assumes CHAR_BIT == 8." + #warning "phmap assumes CHAR_BIT == 8." #endif // phmap currently assumes that an int is 4 bytes. From 47ee627eab1663a76ae4066b4f7df8fef6a16c9d Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Tue, 16 May 2023 20:04:53 +0800 Subject: [PATCH 2/3] Unbreak build on Apple with GCC: do not use clangism Fixes: https://github.com/greg7mdp/parallel-hashmap/issues/192 --- parallel_hashmap/phmap_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parallel_hashmap/phmap_config.h b/parallel_hashmap/phmap_config.h index 0505e8d..06385f5 100644 --- a/parallel_hashmap/phmap_config.h +++ b/parallel_hashmap/phmap_config.h @@ -154,7 +154,7 @@ // ------------------------------------------------------------------- #ifdef PHMAP_HAVE_THREAD_LOCAL #error PHMAP_HAVE_THREAD_LOCAL cannot be directly set -#elif defined(__APPLE__) +#elif defined(__APPLE__) && !defined(__GNUC__) #if __has_feature(cxx_thread_local) && \ !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0) #define PHMAP_HAVE_THREAD_LOCAL 1 From 4b113aac1b6136d4a62cda52b14f461b5973f136 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Tue, 16 May 2023 21:11:08 +0800 Subject: [PATCH 3/3] Update parallel_hashmap/phmap_config.h Co-authored-by: Gregory Popovitch --- parallel_hashmap/phmap_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parallel_hashmap/phmap_config.h b/parallel_hashmap/phmap_config.h index 06385f5..88edaae 100644 --- a/parallel_hashmap/phmap_config.h +++ b/parallel_hashmap/phmap_config.h @@ -154,7 +154,7 @@ // ------------------------------------------------------------------- #ifdef PHMAP_HAVE_THREAD_LOCAL #error PHMAP_HAVE_THREAD_LOCAL cannot be directly set -#elif defined(__APPLE__) && !defined(__GNUC__) +#elif defined(__APPLE__) && defined(__clang__) #if __has_feature(cxx_thread_local) && \ !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0) #define PHMAP_HAVE_THREAD_LOCAL 1