Path: blob/master/thirdparty/mingw-std-threads/patches/0002-clang-std-replacements-leak.patch
9903 views
diff --git a/thirdparty/mingw-std-threads/mingw.condition_variable.h b/thirdparty/mingw-std-threads/mingw.condition_variable.h1index f9e248c154..d099fad2ec 1006442--- a/thirdparty/mingw-std-threads/mingw.condition_variable.h3+++ b/thirdparty/mingw-std-threads/mingw.condition_variable.h4@@ -58,7 +58,7 @@56namespace mingw_stdthread7{8-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)9+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)10enum class cv_status { no_timeout, timeout };11#else12using std::cv_status;13@@ -547,7 +547,7 @@ namespace std14// was none. Direct specification (std::), however, would be unaffected.15// Take the safe option, and include only in the presence of MinGW's win3216// implementation.17-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)18+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)19using mingw_stdthread::cv_status;20using mingw_stdthread::condition_variable;21using mingw_stdthread::condition_variable_any;22diff --git a/thirdparty/mingw-std-threads/mingw.mutex.h b/thirdparty/mingw-std-threads/mingw.mutex.h23index 73698d13cb..1e881e6c7d 10064424--- a/thirdparty/mingw-std-threads/mingw.mutex.h25+++ b/thirdparty/mingw-std-threads/mingw.mutex.h26@@ -480,7 +480,7 @@ namespace std27// was none. Direct specification (std::), however, would be unaffected.28// Take the safe option, and include only in the presence of MinGW's win3229// implementation.30-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)31+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)32using mingw_stdthread::recursive_mutex;33using mingw_stdthread::mutex;34using mingw_stdthread::recursive_timed_mutex;35diff --git a/thirdparty/mingw-std-threads/mingw.shared_mutex.h b/thirdparty/mingw-std-threads/mingw.shared_mutex.h36index 5375b0fbd1..ddc46bb826 10064437--- a/thirdparty/mingw-std-threads/mingw.shared_mutex.h38+++ b/thirdparty/mingw-std-threads/mingw.shared_mutex.h39@@ -484,10 +484,10 @@ namespace std40// was none. Direct specification (std::), however, would be unaffected.41// Take the safe option, and include only in the presence of MinGW's win3242// implementation.43-#if (__cplusplus < 201703L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS))44+#if (__cplusplus < 201703L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__))45using mingw_stdthread::shared_mutex;46#endif47-#if (__cplusplus < 201402L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS))48+#if (__cplusplus < 201402L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__))49using mingw_stdthread::shared_timed_mutex;50using mingw_stdthread::shared_lock;51#elif !defined(MINGW_STDTHREAD_REDUNDANCY_WARNING) // Skip repetition52diff --git a/thirdparty/mingw-std-threads/mingw.thread.h b/thirdparty/mingw-std-threads/mingw.thread.h53index 4bcc63e1b1..60d2200db2 10064454--- a/thirdparty/mingw-std-threads/mingw.thread.h55+++ b/thirdparty/mingw-std-threads/mingw.thread.h56@@ -325,7 +325,7 @@ namespace std57// was none. Direct specification (std::), however, would be unaffected.58// Take the safe option, and include only in the presence of MinGW's win3259// implementation.60-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)61+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)62using mingw_stdthread::thread;63// Remove ambiguity immediately, to avoid problems arising from the above.64//using std::thread;656667