Wine Source build on native wchar_t 4 bytes

Mahin Pandya mahin.pandya at actian.com
Tue May 3 10:09:28 CDT 2022


Hello All,

We are trying to build Wine Source on Linux with native wchar_t size 4 bytes (instead of 2 bytes), is there any way it can be done? I started with doing following changes:

diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test
index b9628e8..91daac3 100644
--- a/tools/winapi/winapi_test
+++ b/tools/winapi/winapi_test
@@ -206,7 +206,11 @@ sub _find_align_kind_size($) {
        $align = 2;
        $kind = "signed";
        $size = 2;
-    } elsif (/^(?:char16_t|wchar_t|USHORT|WCHAR|WORD)$/) {
+    } elsif (/^(?:wchar_t|WCHAR)$/) {
+       $align = 4;
+       $kind = "unsigned";
+       $size = 4;
+    } elsif (/^(?:char16_t|USHORT|WORD|WCHAR_nt)$/) {
        $align = 2;
        $kind = "unsigned";
        $size = 2;

Also started changing some of headers e.g. winnt.h - removed "typedef unsigned short  WCHAR;"  Any pointers/suggestion are welcome. Thanking you.

regards,
Mahin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220503/91f59382/attachment.htm>


More information about the wine-devel mailing list