On Thu Oct 31 10:19:00 2024 +0000, Alfred Agrell wrote:
While I agree that that define is trouble (dlls/kernel32/tests/file.c already has a workaround), I feel that deleting it yields a high regression risk from code trying to call the actual function. Perhaps you should instead move the define higher, so the struct's member gets renamed alongside the accessors. That's what the official headers do. https://godbolt.org/z/4a3fjsqTx (Alternatively, create an inline function that calls the appropriate A/W version. I don't think anyone cares whether that name is a macro or a define, as long as it's callable.)
I don't know the reason behind these macros but given their "WINELIB" prefix I feel like there are there for historical reasons but that it became a bit less relevant now. For instance I don't think there's any "risk" of trying the call the function, it doesn't exist. So instead of a compilation error from the #define you would probably get a warning and -if it didn't fail before- a link error.