Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/mingw-std-threads/patches/0002-clang-std-replacements-leak.patch
9903 views
1
diff --git a/thirdparty/mingw-std-threads/mingw.condition_variable.h b/thirdparty/mingw-std-threads/mingw.condition_variable.h
2
index f9e248c154..d099fad2ec 100644
3
--- a/thirdparty/mingw-std-threads/mingw.condition_variable.h
4
+++ b/thirdparty/mingw-std-threads/mingw.condition_variable.h
5
@@ -58,7 +58,7 @@
6
7
namespace mingw_stdthread
8
{
9
-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)
10
+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)
11
enum class cv_status { no_timeout, timeout };
12
#else
13
using std::cv_status;
14
@@ -547,7 +547,7 @@ namespace std
15
// was none. Direct specification (std::), however, would be unaffected.
16
// Take the safe option, and include only in the presence of MinGW's win32
17
// implementation.
18
-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)
19
+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)
20
using mingw_stdthread::cv_status;
21
using mingw_stdthread::condition_variable;
22
using mingw_stdthread::condition_variable_any;
23
diff --git a/thirdparty/mingw-std-threads/mingw.mutex.h b/thirdparty/mingw-std-threads/mingw.mutex.h
24
index 73698d13cb..1e881e6c7d 100644
25
--- a/thirdparty/mingw-std-threads/mingw.mutex.h
26
+++ b/thirdparty/mingw-std-threads/mingw.mutex.h
27
@@ -480,7 +480,7 @@ namespace std
28
// was none. Direct specification (std::), however, would be unaffected.
29
// Take the safe option, and include only in the presence of MinGW's win32
30
// implementation.
31
-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)
32
+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)
33
using mingw_stdthread::recursive_mutex;
34
using mingw_stdthread::mutex;
35
using mingw_stdthread::recursive_timed_mutex;
36
diff --git a/thirdparty/mingw-std-threads/mingw.shared_mutex.h b/thirdparty/mingw-std-threads/mingw.shared_mutex.h
37
index 5375b0fbd1..ddc46bb826 100644
38
--- a/thirdparty/mingw-std-threads/mingw.shared_mutex.h
39
+++ b/thirdparty/mingw-std-threads/mingw.shared_mutex.h
40
@@ -484,10 +484,10 @@ namespace std
41
// was none. Direct specification (std::), however, would be unaffected.
42
// Take the safe option, and include only in the presence of MinGW's win32
43
// implementation.
44
-#if (__cplusplus < 201703L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS))
45
+#if (__cplusplus < 201703L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__))
46
using mingw_stdthread::shared_mutex;
47
#endif
48
-#if (__cplusplus < 201402L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS))
49
+#if (__cplusplus < 201402L) || (defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__))
50
using mingw_stdthread::shared_timed_mutex;
51
using mingw_stdthread::shared_lock;
52
#elif !defined(MINGW_STDTHREAD_REDUNDANCY_WARNING) // Skip repetition
53
diff --git a/thirdparty/mingw-std-threads/mingw.thread.h b/thirdparty/mingw-std-threads/mingw.thread.h
54
index 4bcc63e1b1..60d2200db2 100644
55
--- a/thirdparty/mingw-std-threads/mingw.thread.h
56
+++ b/thirdparty/mingw-std-threads/mingw.thread.h
57
@@ -325,7 +325,7 @@ namespace std
58
// was none. Direct specification (std::), however, would be unaffected.
59
// Take the safe option, and include only in the presence of MinGW's win32
60
// implementation.
61
-#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS)
62
+#if defined(__MINGW32__ ) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(__clang__)
63
using mingw_stdthread::thread;
64
// Remove ambiguity immediately, to avoid problems arising from the above.
65
//using std::thread;
66
67