diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/common/common-defs.h | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d326b9c..044140e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2015-11-17 Pedro Alves <palves@redhat.com> + * common/common-defs.h (ATTRIBUTE_PRINTF): Redefine in terms of + _GL_ATTRIBUTE_FORMAT_PRINTF after including ansidecl.h. + +2015-11-17 Pedro Alves <palves@redhat.com> + * common/common-defs.h (__STDC_CONSTANT_MACROS) (__STDC_LIMIT_MACROS): Define before including stdint.h. diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 548fe42..acea663 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -51,7 +51,16 @@ #include <string.h> #include <errno.h> #include <alloca.h> + #include "ansidecl.h" +/* This is defined by ansidecl.h, but we prefer gnulib's version. On + MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not + require use of attribute gnu_printf instead of printf. gnulib + checks that at configure time. Since _GL_ATTRIBUTE_FORMAT_PRINTF + is compatible with ATTRIBUTE_PRINTF, simply use it. */ +#undef ATTRIBUTE_PRINTF +#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF + #include "libiberty.h" #include "pathmax.h" #include "gdb/signals.h" |