We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80e487a commit 6248424Copy full SHA for 6248424
Zend/zend_atomic.h
@@ -23,21 +23,22 @@
23
#define __has_feature(x) 0
24
#endif
25
26
-#ifndef __GNUC_PREREQ__
27
-#define __GNUC_PREREQ__(x, y) 0
28
-#endif
+#define ZEND_GCC_PREREQ(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || (__GNUC__ > (x)))
29
30
/* Builtins are used to avoid library linkage */
31
#if __has_feature(c_atomic)
32
#define HAVE_C11_ATOMICS 1
33
-#elif __GNUC_PREREQ__(4, 7)
+#elif ZEND_GCC_PREREQ(4, 7)
34
#define HAVE_GNUC_ATOMICS 1
35
#elif defined(__GNUC__)
36
#define HAVE_SYNC_ATOMICS 1
37
#elif !defined(ZEND_WIN32)
38
#define HAVE_NO_ATOMICS 1
39
40
+#undef ZEND_GCC_PREREQ
41
+
42
/* Treat zend_atomic_* types as opaque. They have definitions only for size
43
* and alignment purposes.
44
*/
0 commit comments