From fba77bb9035c2c9d35b55d6065972908dcd43231 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 19 Feb 2004 20:08:45 +0000 Subject: [PATCH] gst/gstinfo.h: Copy G_STRFUNC implementation from glib-2.4 and use it for GST_FUNCTION. (bug #134750) Original commit message from CVS: * gst/gstinfo.h: Copy G_STRFUNC implementation from glib-2.4 and use it for GST_FUNCTION. (bug #134750) --- ChangeLog | 5 +++++ gst/gstinfo.h | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a0b9791d1..ba0fde767c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-19 David Schleef + + * gst/gstinfo.h: Copy G_STRFUNC implementation from glib-2.4 + and use it for GST_FUNCTION. (bug #134750) + 2004-02-19 Thomas Vander Stichele * po/fr.po: diff --git a/gst/gstinfo.h b/gst/gstinfo.h index ab8c2b4aa2..15946c1719 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -116,19 +116,16 @@ struct _GstDebugCategory { /* You might want to define GST_FUNCTION in apps' configure script */ #ifndef GST_FUNCTION -#ifdef G_GNUC_PRETTY_FUNCTION -#define GST_FUNCTION G_GNUC_PRETTY_FUNCTION -#elif HAVE_FUNC -#define GST_FUNCTION __func__ -#elif HAVE_PRETTY_FUNCTION -#define GST_FUNCTION __PRETTY_FUNCTION__ -#elif HAVE_FUNCTION -#define GST_FUNCTION __FUNCTION__ +#if defined (__GNUC__) +# define GST_FUNCTION ((const char*) (__PRETTY_FUNCTION__)) +#elif defined (G_HAVE_ISO_VARARGS) +# define GST_FUNCTION ((const char*) (__func__)) #else -#define GST_FUNCTION "" +# define GST_FUNCTION ((const char*) ("???")) #endif #endif /* ifndef GST_FUNCTION */ + typedef struct _GstDebugMessage GstDebugMessage; typedef void (*GstLogFunction) (GstDebugCategory * category, GstDebugLevel level,