From 2d23ce58cb53a3a9026bc12c79e6c0fa99b5aa30 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 24 Jan 2023 15:58:38 +0100 Subject: Introduce `wchar_ikind` in machine descriptions This replaces `sizeof_wchar` and `wchar_signed`, and makes it possible to request that `wchar_t` is `long` instead of `int`, something that seems needed for PowerPC. --- cparser/Lexer.mll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Lexer.mll') diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index 2efa4216..95374afe 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -241,7 +241,7 @@ let add_char enc c accu = | Chr x, Cabs.EncU32 -> (* Characters are not encoded *) Int64.of_int x :: accu | Chr x, Cabs.EncWide -> (* Depends on size of wchar_t *) - if Machine.(!config.sizeof_wchar) = 2 + if Cutil.sizeof_ikind (Cutil.wchar_ikind ()) = 2 then add_char_utf16 x accu else Int64.of_int x :: accu } -- cgit