Skip to content
  • Eric Fiselier's avatar
    a6b7ebe2
    Add stdbool.h wrapper for libc++ · a6b7ebe2
    Eric Fiselier authored
    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
    a6b7ebe2
    Add stdbool.h wrapper for libc++
    Eric Fiselier authored
    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
Loading