1 From 81fecd367b016e5ac4fb0c04b84da5c474f30da6 Mon Sep 17 00:00:00 2001
2 From: Peter Urbanec <git.user@urbanec.net>
3 Date: Fri, 27 Feb 2015 01:16:58 +1100
4 Subject: [PATCH 1/1] gstinfo: Shorten __FILE__ on all platforms.
6 This is useful not only for MSVC, but also with gcc/Linux when doing
7 cross-compilation builds and out-of-tree builds.
9 Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=745213]
11 Signed-off-by: Peter Urbanec <git.user@urbanec.net>
13 gst/gstinfo.c | 11 ++++-------
14 1 file changed, 4 insertions(+), 7 deletions(-)
16 diff --git a/gst/gstinfo.c b/gst/gstinfo.c
17 index b2a3005..8b61d09 100644
20 @@ -444,7 +444,6 @@ gst_debug_log (GstDebugCategory * category, GstDebugLevel level,
25 /* based on g_basename(), which we can't use because it was deprecated */
26 static inline const gchar *
27 gst_path_basename (const gchar * file_name)
28 @@ -467,7 +466,6 @@ gst_path_basename (const gchar * file_name)
35 * gst_debug_log_valist:
36 @@ -497,12 +495,11 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
37 g_return_if_fail (function != NULL);
38 g_return_if_fail (format != NULL);
40 - /* The predefined macro __FILE__ is always the exact path given to the
41 - * compiler with MSVC, which may or may not be the basename. We work
42 - * around it at runtime to improve the readability. */
44 + /* The predefined macro __FILE__ can be an absolute path in some build
45 + * environments, such as MSVC or out-of-tree cross-compiles. This may
46 + * be significantly longer than the filename. We work around it at
47 + * runtime to improve the readability. */
48 file = gst_path_basename (file);
51 message.message = NULL;
52 message.format = format;