[CMAKE] Use configured include files to define the __RELFILE__ hack (#979)
[reactos.git] / sdk / include / reactos / wine / debug.h
index cd366ab..23f402a 100644 (file)
 #endif
 
 #ifndef __RELFILE__
-#define __RELFILE__ __FILE__
+#      ifdef __REACTOS__
+#              include <reactos/builddir.h>
+#              define __RELFILE__ &__FILE__[sizeof(REACTOS_SOURCE_DIR)]
+#      else
+#              define __RELFILE__ __FILE__
+#      endif
 #endif
 
 #ifdef __WINE_WINE_TEST_H
@@ -141,7 +146,7 @@ struct __wine_debug_channel
 
 #define __WINE_DPRINTF(dbcl,dbch) \
     (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
-     (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"",__LINE__,"") == -1)) ? \
+     (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__RELFILE__,__FUNCTION__,__LINE__,"") == -1)) ? \
      (void)0 : (void)wine_dbg_printf
 
 #define __WINE_PRINTF_ATTR(fmt, args)