diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-29 23:40:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-29 23:40:50 +0000 |
commit | 8101c7f8a9b9494014db5da9f88b50e69f90acf4 (patch) | |
tree | 51b5a3261c418a681896308fefa6ab142294b7b9 /lib | |
parent | 0fcba567b93b4af6045d51ef28b22b029a03a010 (diff) |
Teach tgmath.h to only include <complex.h> if it's available.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149213 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Headers/tgmath.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Headers/tgmath.h b/lib/Headers/tgmath.h index 1b0b9d24c1..554af6cf74 100644 --- a/lib/Headers/tgmath.h +++ b/lib/Headers/tgmath.h @@ -30,7 +30,9 @@ /* C++ handles type genericity with overloading in math.h. */ #ifndef __cplusplus -#include <complex.h> +#if __has_include(<complex.h>) +# include <complex.h> +#endif #define _TG_ATTRSp __attribute__((__overloadable__)) #define _TG_ATTRS __attribute__((__overloadable__, __always_inline__)) |