forked from pool/python-gevent
- libev.patch: fix syntax error in preprocessor conditional OBS-URL: https://build.opensuse.org/request/show/236960 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=13
25 lines
1.2 KiB
Diff
25 lines
1.2 KiB
Diff
Index: gevent-1.0/libev/ev.c
|
|
===================================================================
|
|
--- gevent-1.0.orig/libev/ev.c
|
|
+++ gevent-1.0/libev/ev.c
|
|
@@ -617,9 +617,16 @@ struct signalfd_siginfo
|
|
#if ECB_GCC_VERSION(4,7)
|
|
/* see comment below (stdatomic.h) about the C11 memory model. */
|
|
#define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST)
|
|
- #elif defined __clang && __has_feature (cxx_atomic)
|
|
- /* see comment below (stdatomic.h) about the C11 memory model. */
|
|
- #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
|
|
+
|
|
+ /* The __has_feature syntax from clang is so misdesigned that we cannot use it
|
|
+ * without risking compile time errors with other compilers. We *could*
|
|
+ * define our own ecb_clang_has_feature, but I just can't be bothered to work
|
|
+ * around this shit time and again.
|
|
+ * #elif defined __clang && __has_feature (cxx_atomic)
|
|
+ * // see comment below (stdatomic.h) about the C11 memory model.
|
|
+ * #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
|
|
+ */
|
|
+
|
|
#elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__
|
|
#define ECB_MEMORY_FENCE __sync_synchronize ()
|
|
#elif _MSC_VER >= 1400 /* VC++ 2005 */
|