]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/commitdiff
Allow stdatomic.h to be included from mingw prebuilt.
authorHans Boehm <hboehm@google.com>
Wed, 12 Nov 2014 18:34:26 +0000 (10:34 -0800)
committerHans Boehm <hboehm@google.com>
Thu, 13 Nov 2014 02:08:25 +0000 (18:08 -0800)
Define __GNUC_PREREQ if it isn't already defined.
This is a bit ugly, but it seems to be easiest to make this header as
context-independent as possible.  Together with the addition of a symbolic
link to this file from the mingw prebuilt, this appears to unblock
commit e9fa6be333e35d9e7ae435aeb32532875b95fe22.

Change-Id: I97e39cda8d8f9aa108aa61c4121da09eb9739062

libc/include/stdatomic.h

index 58cb1bc0e183af3460b3e8b293827371b8d04b64..2c4f1ce30f012ad84363cc2d2e7bc00c4de92d01 100644 (file)
 
 #include <sys/cdefs.h>
 
+#if defined(__GNUC__) && !defined(__GNUC_PREREQ)
+/* Duplicate definition here, since the mingw sys/cdefs.h omits the  */
+/* definition, and this needs to be usable there.                    */
+#define        __GNUC_PREREQ(x, y)    \
+       ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || (__GNUC__ > (x)))
+#endif /* __GNUC__ && ... */
 
 #if defined(__cplusplus) && __cplusplus >= 201103L && defined(_USING_LIBCXX)
 # ifdef __clang__