From: Joel Brobecker Date: Tue, 19 Mar 2013 21:13:32 +0000 (+0000) Subject: Win32: Fix compilation warnings triggered by Python's pyerrors.h X-Git-Tag: gdb_7_6-2013-04-26-release~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eabe9b47d108df1fb692a62d2838dd912d4d4ab0;p=thirdparty%2Fbinutils-gdb.git Win32: Fix compilation warnings triggered by Python's pyerrors.h gdb/ChangeLog: * python/python-internal.h (HAVE_SNPRINTF) [_WIN32 && HAVE_DECL_SNPRINTF]: Define, to avoid compiler warnings about redefinition of snprintf by pyerrors.h. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7c02381af5b..d14a13e1d19 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -8,6 +8,12 @@ * elfread.c (elf_symtab_read): Handle BSF_GNU_UNIQUE for certain symbols. +2013-03-19 Eli Zaretskii + + * python/python-internal.h (HAVE_SNPRINTF) + [_WIN32 && HAVE_DECL_SNPRINTF]: Define, to avoid compiler warnings + about redefinition of snprintf by pyerrors.h. + 2013-03-14 Jan Kratochvil * source.c (print_source_lines_base): Make a local copy of diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 753ba96a012..ea97226f473 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -41,6 +41,11 @@ around technique as above. */ #undef _FILE_OFFSET_BITS +/* A kludge to avoid redefinition of snprintf on Windows by pyerrors.h. */ +#if defined(_WIN32) && defined(HAVE_DECL_SNPRINTF) +#define HAVE_SNPRINTF 1 +#endif + /* Request clean size types from Python. */ #define PY_SSIZE_T_CLEAN