Add stdbool.h wrapper for libc++
authorEric Fiselier <eric@efcs.ca>
Sat, 20 Feb 2016 00:16:41 +0000 (00:16 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 20 Feb 2016 00:16:41 +0000 (00:16 +0000)
commita6b7ebe2cd3b1cc95a195ebc6e4cfdd1584b415e
treeb1c8e3e24eb45586d590394aef132ff72c334766
parent344078f51fcd0a63e3e37692d42914ea5fafb098
Add stdbool.h wrapper for libc++

Summary:
According to the C++ standard <stdbool.h> isn't allowed to define `true` `false` or `bool`. However these macros are sometimes defined by the compilers `stdbool.h`.

Clang defines the macros whenever `__STRICT_ANSI__` isn't defined (ie `-std=gnu++11`).
New GCC versions define the macros in C++03 mode only, older GCC versions (4.9 and before) always define the macros.

This patch adds a wrapper header for `stdbool.h` that undefs the required macros.

Reviewers: mclow.lists, rsmith, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16346

llvm-svn: 261381
libcxx/include/stdbool.h [new file with mode: 0644]