diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-03-17 19:10:38 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-03-17 19:10:38 +0000 |
commit | 1cdd32326fa4a5f8812eef6f754d8a4b018fc959 (patch) | |
tree | 681471decf1d0a55405d84fa9bdc81270fefe5ab /gdb | |
parent | 72edb7c28f204d6c0512612968482803747b6d4f (diff) | |
download | gdb-1cdd32326fa4a5f8812eef6f754d8a4b018fc959.zip gdb-1cdd32326fa4a5f8812eef6f754d8a4b018fc959.tar.gz gdb-1cdd32326fa4a5f8812eef6f754d8a4b018fc959.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/python/python-internal.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index da461ec..5dc439c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-03-17 Eli Zaretskii <eliz@gnu.org> + + * python/python-internal.h (HAVE_SNPRINTF) + [_WIN32 && HAVE_DECL_SNPRINTF]: Define, to avoid compiler warnings + about redefinition of snprintf by pyerrors.h. + 2013-03-15 Steve Ellcey <sellcey@mips.com> * remote-sim.c (sim_command_completer): Make char arguments const. 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 |