From 1cdd32326fa4a5f8812eef6f754d8a4b018fc959 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 17 Mar 2013 19:10:38 +0000 Subject: Avoid MinGW warnings about redefinition of snprintf. gdb/python/python-internal.h (HAVE_SNPRINTF) [_WIN32 && HAVE_DECL_SNPRINTF]: Define, to avoid compiler warnings about redefinition of snprintf by pyerrors.h. --- gdb/python/python-internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/python/python-internal.h') diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 753ba96..ea97226 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 -- cgit v1.1