Merge changes I0aa46d9d,I6431111b am: ee6fb66dc1
am: f8b63759dd
* commit 'f8b63759dd035e4e235830b996d2cc028869e802':
Add __INTRODUCED_IN_{32,64}.
Add __INTRODUCED_IN hack to complex test.
Change-Id: I22ed91a7b06063632a4219f1d96eff8a08a44ce2
This commit is contained in:
commit
a18f854409
2 changed files with 20 additions and 5 deletions
|
@ -451,15 +451,21 @@
|
|||
|
||||
#ifdef __clang__
|
||||
#define __AVAILABILITY(...) __attribute__((availability(android,__VA_ARGS__)))
|
||||
#else
|
||||
#define __AVAILABILITY(...)
|
||||
#endif // __clang__
|
||||
|
||||
#define __INTRODUCED_IN(api_level) __AVAILABILITY(introduced=api_level)
|
||||
#define __DEPRECATED_IN(api_level) __AVAILABILITY(deprecated=api_level)
|
||||
#define __REMOVED_IN(api_level) __AVAILABILITY(obsoleted=api_level)
|
||||
|
||||
#if __LP64__
|
||||
#define __INTRODUCED_IN_32(api_level)
|
||||
#define __INTRODUCED_IN_64 __INTRODUCED_IN
|
||||
#else
|
||||
#define __AVAILABILITY(...)
|
||||
#define __INTRODUCED_IN(api_level)
|
||||
#define __DEPRECATED_IN(api_level)
|
||||
#define __REMOVED_IN(api_level)
|
||||
#endif // __clang__
|
||||
#define __INTRODUCED_IN_32 __INTRODUCED_IN
|
||||
#define __INTRODUCED_IN_64(api_level)
|
||||
#endif
|
||||
|
||||
#if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5
|
||||
#if __LP64__
|
||||
|
|
|
@ -16,6 +16,15 @@
|
|||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
// This file is compiled against both glibc and bionic, and our complex.h
|
||||
// depends on bionic-specific macros, so hack around that.
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(__INTRODUCED_IN)
|
||||
#define __INTRODUCED_IN(x)
|
||||
#define __INTRODUCED_IN_32(x)
|
||||
#define __INTRODUCED_IN_64(x)
|
||||
#endif
|
||||
|
||||
// libc++ actively gets in the way of including <complex.h> from C++, so we
|
||||
// have to be naughty.
|
||||
#include <../libc/include/complex.h>
|
||||
|
|
Loading…
Reference in a new issue