From 8fece396e5461cba0d68e611588ec7be23f1df40 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 28 Jan 2002 23:01:19 +0000 Subject: [PATCH] Only use __FUNCTION__, __PRETTY_FUNCTION__ for G_GNUC_FUNCTION, Mon Jan 28 17:56:10 2002 Owen Taylor * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < 3, since in 3.0.3 the semantics of these functions were changed in an incompatible way. (#69097) --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ glib/gmacros.h | 4 ++-- 9 files changed, 58 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21e9bc9..c48bd25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 21e9bc9..c48bd25 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Mon Jan 28 17:56:10 2002 Owen Taylor + + * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for + G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ < + 3, since in 3.0.3 the semantics of these functions were changed in + an incompatible way. (#69097) + 2002-01-28 Ron Steinke * glib/giochannel.c: Some documentation fixes/elaborations diff --git a/glib/gmacros.h b/glib/gmacros.h index 5002d85..2f42a31 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -82,7 +82,7 @@ /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with * macros, so we can refer to them as strings unconditionally. */ -#ifdef __GNUC__ +#ifdef __GNUC__ && (__GNUC__ < 3) #define G_GNUC_FUNCTION __FUNCTION__ #define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ #else /* !__GNUC__ */ @@ -94,7 +94,7 @@ #define G_STRINGIFY_ARG(contents) #contents /* Provide a string identifying the current code position */ -#ifdef __GNUC__ +#if defined(__GNUC__) && (__GNUC__ < 3) # define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()" #else # define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -- 2.7.4