Commit a28cb16a authored by Bernhard Schommer's avatar Bernhard Schommer
Browse files

Diab defines w_char to be unsigned short.

parent 437ac774
......@@ -721,7 +721,8 @@ let type_of_member env fld =
let find_matching_unsigned_ikind sz =
assert (sz > 0);
if sz = !config.sizeof_int then IUInt
if sz = !config.sizeof_short then IUShort
else if sz = !config.sizeof_int then IUInt
else if sz = !config.sizeof_long then IULong
else if sz = !config.sizeof_longlong then IULongLong
else assert false
......
......@@ -170,6 +170,10 @@ let ppc_32_bigendian =
bitfields_msb_first = true;
supports_unaligned_accesses = true }
let ppc_32_diab_bigendian =
{ ppc_32_bigendian with sizeof_wchar = 2; wchar_signed = false }
let arm_littleendian =
{ ilp32ll64 with name = "arm" }
......
......@@ -62,6 +62,7 @@ val x86_64 : t
val win32 : t
val win64 : t
val ppc_32_bigendian : t
val ppc_32_diab_bigendian : t
val arm_littleendian : t
val gcc_extensions : t -> t
......
......@@ -661,7 +661,9 @@ let _ =
Printexc.record_backtrace true;
Machine.config :=
begin match Configuration.arch with
| "powerpc" -> Machine.ppc_32_bigendian
| "powerpc" -> if Configuration.system = "linux"
then Machine.ppc_32_bigendian
else Machine.ppc_32_diab_bigendian
| "arm" -> Machine.arm_littleendian
| "ia32" -> if Configuration.abi = "macosx"
then Machine.x86_32_macosx
......
......@@ -71,7 +71,7 @@ typedef signed long ptrdiff_t;
#ifdef _TYPE_wchar_t
_TYPE_wchar_t;
#else
typedef signed int wchar_t;
typedef unsigned short wchar_t;
#endif
#endif
#undef __need_wchar_t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment