gst/gstinfo.h: Copy G_STRFUNC implementation from glib-2.4 and use it for GST_FUNCTIO...
authorDavid Schleef <ds@schleef.org>
Thu, 19 Feb 2004 20:08:45 +0000 (20:08 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 19 Feb 2004 20:08:45 +0000 (20:08 +0000)
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
gst/gstinfo.h

index 4a0b979..ba0fde7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-19  David Schleef  <ds@schleef.org>
+
+       * 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  <thomas at apestaart dot org>
 
        * po/fr.po:
index ab8c2b4..15946c1 100644 (file)
@@ -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,