info: shorten __FILE__ on all platforms
authorPeter Urbanec <git.user@urbanec.net>
Thu, 26 Feb 2015 14:16:58 +0000 (01:16 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 5 Mar 2015 17:53:16 +0000 (17:53 +0000)
This is useful not only for MSVC, but also with gcc/Linux
when doing cross-compilation builds and out-of-tree builds.

https://bugzilla.gnome.org/show_bug.cgi?id=745213

gst/gstinfo.c

index b2a3005..f945786 100644 (file)
@@ -444,7 +444,6 @@ gst_debug_log (GstDebugCategory * category, GstDebugLevel level,
   va_end (var_args);
 }
 
-#ifdef G_OS_WIN32
 /* based on g_basename(), which we can't use because it was deprecated */
 static inline const gchar *
 gst_path_basename (const gchar * file_name)
@@ -467,7 +466,6 @@ gst_path_basename (const gchar * file_name)
 
   return file_name;
 }
-#endif
 
 /**
  * gst_debug_log_valist:
@@ -500,9 +498,7 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
   /* The predefined macro __FILE__ is always the exact path given to the
    * compiler with MSVC, which may or may not be the basename.  We work
    * around it at runtime to improve the readability. */
-#ifdef G_OS_WIN32
   file = gst_path_basename (file);
-#endif
 
   message.message = NULL;
   message.format = format;