Esme Povirk (@madewokherd) commented about include/wine/debug.h:
const enum __wine_debug_class __dbcl = __WINE_DBCL##dbcl; \ __WINE_DBG_LOG
+#ifdef __FILE_NAME__ +#define __WINE_DBG_FILE __FILE_NAME__ +#elif defined(__GNUC__) || defined(__clang__) +#define __WINE_DBG_FILE (__builtin_strrchr( __FILE__, '/' ) ? __builtin_strrchr( __FILE__, '/' ) + 1 : __FILE__) +#else +#define __WINE_DBG_FILE (strrchr( __FILE__, '/' ) ? strrchr( __FILE__, '/' ) + 1 : __FILE__)
I'm not sure the strrchr approach is reliable because the path may have a \ when compiling on Windows.