From 47296e5c11692cf6bcec3854a6a282969ed46cf7 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Mon, 29 Jun 2020 21:53:09 +0200 Subject: [PATCH] The user can define M_USE_C11_NO_THREADS to disable C11 header (Support for broken C11 implementation) --- README.md | 2 +- m-mutex.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 74e4e62d..27c35a13 100644 --- a/README.md +++ b/README.md @@ -6033,7 +6033,7 @@ If the C11 implementation does not respect the C standard (i.e. the compiler targets C11 mode the \_\_STDC\_NO\_THREADS\_\_ macro is not defined but the header threads.h is not available or not working), -then the user shall define manually the \_\_STDC\_NO\_THREADS\_\_ +then the user shall define manually the M\_USE\_C11\_NO\_THREADS macro before including any M\*LIB header to disable it, so that M\*LIB can select another implementation. diff --git a/m-mutex.h b/m-mutex.h index 70abf308..9f1ba4ed 100644 --- a/m-mutex.h +++ b/m-mutex.h @@ -26,7 +26,8 @@ #define MSTARLIB_MUTEX_H #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ - && !defined(__STDC_NO_THREADS__) + && !defined(__STDC_NO_THREADS__) \ + && !defined(M_USE_C11_NO_THREADS) /****************************** C11 version ********************************/