diff options
author | 2016-10-25 11:47:18 +0100 | |
---|---|---|
committer | 2016-10-25 11:47:18 +0100 | |
commit | 28fe4f87e0b815f4c0d9b80e0a9f3e6a53c649b3 (patch) | |
tree | 02d756a8fec1541dde258372eecc32a2c95622ac /gdb/common/common-defs.h | |
parent | Don't override operator new if GDB is built with -fsanitize=address (diff) | |
download | binutils-gdb-28fe4f87e0b815f4c0d9b80e0a9f3e6a53c649b3.tar.gz binutils-gdb-28fe4f87e0b815f4c0d9b80e0a9f3e6a53c649b3.tar.bz2 binutils-gdb-28fe4f87e0b815f4c0d9b80e0a9f3e6a53c649b3.zip |
Define __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS again.
Revert commit f6abaf7a4088 (gdb: no longer define
__STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS), with the tweak suggested
in that commit's log: the macros are now defined before any system
header is included.
This should fix AIX:
https://sourceware.org/ml/gdb-patches/2016-10/msg00682.html
gdb/ChangeLog:
2016-10-25 Pedro Alves <palves@redhat.com>
* common/common-defs.h (__STDC_CONSTANT_MACROS)
(__STDC_LIMIT_MACROS): Define.
Diffstat (limited to 'gdb/common/common-defs.h')
-rw-r--r-- | gdb/common/common-defs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 9b5d853c255..3d5ff188278 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -27,6 +27,19 @@ #include "build-gnulib/config.h" #endif +/* From: + https://www.gnu.org/software/gnulib/manual/html_node/stdint_002eh.html + + "On some hosts that predate C++11, when using C++ one must define + __STDC_CONSTANT_MACROS to make visible the definitions of constant + macros such as INTMAX_C, and one must define __STDC_LIMIT_MACROS to + make visible the definitions of limit macros such as INTMAX_MAX.". + + Must do this before including any system header, since system + headers may include stdint.h. */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> |