Merge changes I0aa46d9d,I6431111b
* changes: Add __INTRODUCED_IN_{32,64}. Add __INTRODUCED_IN hack to complex test.
This commit is contained in:
commit
ee6fb66dc1
|
@ -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 New Issue