From: Jacek Caban Subject: Re: [PATCH] gdi32: Reformat some strings to improve readability Message-Id: <2f257bee-0bbf-0322-94a8-a8245cd258bb@codeweavers.com> Date: Fri, 12 Apr 2019 17:07:13 +0200 In-Reply-To: <20190401073518.27827-1-mstefani@winehq.org> References: <20190401073518.27827-1-mstefani@winehq.org> Hi Michael, On 4/1/19 9:35 AM, Michael Stefaniuc wrote: > Signed-off-by: Michael Stefaniuc > --- > 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