[CMAKE] Use configured include files to define the __RELFILE__ hack (#979)
[reactos.git] / sdk / include / reactos / wine / debug.h
index 62f7da5..23f402a 100644 (file)
 #include <guiddef.h>
 #endif
 
-#include <builddir.h>
+#ifndef __RELFILE__
+#      ifdef __REACTOS__
+#              include <reactos/builddir.h>
+#              define __RELFILE__ &__FILE__[sizeof(REACTOS_SOURCE_DIR)]
+#      else
+#              define __RELFILE__ __FILE__
+#      endif
+#endif
 
 #ifdef __WINE_WINE_TEST_H
 #error This file should not be used in Wine tests
@@ -139,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)