2008-05-07 Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com>
+ * gst/gstinfo.c (gst_debug_log_valist):
+ Improved the __FILE__ part of debug output for MSVC.
+
+2008-05-07 Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com>
+
* libs/gst/base/gstbasesrc.c (gst_base_src_default_query):
Declaration after statement fix for compilers like MSVC.
LogFuncEntry *entry;
GSList *handler;
+#ifdef _MSC_VER
+ gchar *file_basename;
+#endif
+
g_return_if_fail (category != NULL);
g_return_if_fail (file != NULL);
g_return_if_fail (function != NULL);
g_return_if_fail (format != NULL);
+#ifdef _MSC_VER
+ /*
+ * 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.
+ */
+ file = file_basename = g_path_get_basename (file);
+#endif
+
message.message = NULL;
message.format = format;
G_VA_COPY (message.arguments, args);
}
g_free (message.message);
va_end (message.arguments);
+
+#ifdef _MSC_VER
+ g_free (file_basename);
+#endif
}
/**