From b1557680dd3f8531883bb768cd7438632c67bffe Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 30 Sep 2008 14:04:35 +0000 Subject: [PATCH] glib/gprintf.c Don't define _GNU_SOURCE on Windows, as _GNU_SOURCE has 2008-09-30 Tor Lillqvist * glib/gprintf.c * glib/gnulib/vasnprintf.c: Don't define _GNU_SOURCE on Windows, as _GNU_SOURCE has unintended side effects when compiling against newest mingw headers. svn path=/trunk/; revision=7563 --- ChangeLog | 7 +++++++ glib/gnulib/vasnprintf.c | 2 ++ glib/gprintf.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8bc0b010..22698262 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-30 Tor Lillqvist + + * glib/gprintf.c + * glib/gnulib/vasnprintf.c: Don't define _GNU_SOURCE on Windows, + as _GNU_SOURCE has unintended side effects when compiling against + newest mingw headers. + 2008-09-26 Dan Winship Bug 553447 – g_assert_no_error() diff --git a/glib/gnulib/vasnprintf.c b/glib/gnulib/vasnprintf.c index c31075f6..a8e9cc02 100644 --- a/glib/gnulib/vasnprintf.c +++ b/glib/gnulib/vasnprintf.c @@ -16,12 +16,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef _WIN32 /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif +#endif #ifdef HAVE_CONFIG_H # include diff --git a/glib/gprintf.c b/glib/gprintf.c index 6cbb214d..35288617 100644 --- a/glib/gprintf.c +++ b/glib/gprintf.c @@ -19,7 +19,9 @@ #include "config.h" +#ifndef _WIN32 #define _GNU_SOURCE /* For vasprintf */ +#endif #include #include -- 2.34.1