diff options
author | 2016-10-25 13:50:20 +0100 | |
---|---|---|
committer | 2016-10-25 13:50:20 +0100 | |
commit | b30f354acb39f63bf3213673a0584119e63538b9 (patch) | |
tree | 570805b631df94f370567b4fad450f68e26fed31 /gdb/common/common-defs.h | |
parent | new-op.c: Add comment about -fsanitize=address (diff) | |
download | binutils-gdb-b30f354acb39f63bf3213673a0584119e63538b9.tar.gz binutils-gdb-b30f354acb39f63bf3213673a0584119e63538b9.tar.bz2 binutils-gdb-b30f354acb39f63bf3213673a0584119e63538b9.zip |
common/common-defs.h: Define __STDC_FORMAT_MACROS as well
Ref: https://sourceware.org/ml/gdb-patches/2016-10/msg00694.html
gdb/ChangeLog:
2016-10-25 Pedro Alves <palves@redhat.com>
* common/common-defs.h (__STDC_FORMAT_MACROS): Define.
Diffstat (limited to 'gdb/common/common-defs.h')
-rw-r--r-- | gdb/common/common-defs.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 3d5ff188278..8fbb4bf9442 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -35,10 +35,18 @@ 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. */ + And: + https://www.gnu.org/software/gnulib/manual/html_node/inttypes_002eh.html + + "On some hosts that predate C++11, when using C++ one must define + __STDC_FORMAT_MACROS to make visible the declarations of format + macros such as PRIdMAX." + + Must do this before including any system header, since other system + headers may include stdint.h/inttypes.h. */ #define __STDC_CONSTANT_MACROS 1 #define __STDC_LIMIT_MACROS 1 +#define __STDC_FORMAT_MACROS 1 #include <stdarg.h> #include <stdio.h> |