[PATCH] gdi32: Reformat some strings to improve readability

Jacek Caban jacek at codeweavers.com
Fri Apr 12 10:07:13 CDT 2019


Hi Michael,

On 4/1/19 9:35 AM, Michael Stefaniuc wrote:
> Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
> ---
> No-op as gcc generates the exact same object files.
> Only gdiobj.c, font.c and freetype.c need "CFLAGS=-O2 -g0 -DNDEBUG" as
> they use asserts and the line count changes.


I miss this patch every time I need utf16 literal ;) Are you actually 
planning on following up on this?


The compatibility is the obvious problem here. I would suggest to start 
with a less controversial change and try to make TEXT() macro more 
portable. Here are a few thoughts:


- You may use L"" form for all actual Windows compiler. It's supported 
all versions of MSVC and mingw, so this would get those handled. (As a 
side note, in C++, char16_t and wchar_t are different builtin types even 
if wchar_t is 16-bit; this doesn't matter for Wine internal use, but it 
means that we should use L"" form in headers whenever possible).


- Recent and future C compilers should support u"", so we only need to 
worry about old ones.


- If my quick search is right, u"" is available in GCC since version 
4.4. Earlier versions supported -fshort-wchar so we may use that in 
combination with L"" form to get all GCC versions covered.


Having TEXT macro that's actually portable would be a convincing 
argument to start using it in Wine.


Cheers,

Jacek




More information about the wine-devel mailing list