diff options
author | Michal Gorny <mgorny@gentoo.org> | 2016-09-26 20:20:00 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2016-09-26 20:20:00 +0000 |
commit | 9eddaeb5340035f1ed36940f7478999616a898f0 (patch) | |
tree | 188154b9f0634e030b1dae62749db71a0a6d6f5b /lldb/packages/Python/lldbsuite/test/test_runner/process_control.py | |
parent | 5deb06eb43c73ded9debc59a87947a91649c94c0 (diff) | |
download | bcm5719-llvm-9eddaeb5340035f1ed36940f7478999616a898f0.tar.gz bcm5719-llvm-9eddaeb5340035f1ed36940f7478999616a898f0.zip |
[include] Declare __STDC_*_MACROS for C++11 compat in old libc
Declare __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and
__STDC_CONSTANT_MACROS before including real inttypes.h/stdint.h when
the wrapper-header is included in C++11, in order to enable
the necessary macros in C99-compliant libc.
The C99 standard defined that the format macros in inttypes.h should be
defined by the C++ implementations only when __STDC_FORMAT_MACROS is
defined, and the limit and constant macros in stdint.h should be defined
only when __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are defined
appropriately. Following this specification, multiple old versions of
glibc up to 2.17 do not define those macros by default for C++,
rendering the libc++ headers non-compliant to the C++11 standard.
In order to achieve the necessary compliance, __STDC_FORMAT_MACROS is
defined in wrapped inttypes.h just before including the system
inttypes.h, when C++11 or newer is used. Both __STDC_LIMIT_MACROS
and __STDC_CONSTANT_MACROS are defined in newly-wrapped stdint.h. This
fixes the C++11 compliance while preserving the current behavior for
C++03.
Differential Revision: https://reviews.llvm.org/D24903
llvm-svn: 282435
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/test_runner/process_control.py')
0 files changed, 0 insertions, 0 deletions