@@ -520,6 +520,10 @@ static void handle_arch_m64_finalize(void)
#endif
break;
}
+
+#if defined(__FreeBSD__) || defined(__APPLE__)
+ wint_ctype = &int_ctype;
+#endif
}
static void handle_arch_msize_long_finalize(void)
@@ -1250,6 +1254,7 @@ static void predefined_macros(void)
predefined_ctype("SHRT", &short_ctype, PTYPE_MAX|PTYPE_WIDTH);
predefined_ctype("SCHAR", &char_ctype, PTYPE_MAX|PTYPE_WIDTH);
predefined_ctype("WCHAR", wchar_ctype, PTYPE_ALL_T|PTYPE_TYPE);
+ predefined_ctype("WINT", wint_ctype, PTYPE_ALL_T|PTYPE_TYPE);
predefined_ctype("INT", &int_ctype, PTYPE_ALL);
predefined_ctype("LONG", &long_ctype, PTYPE_ALL);
@@ -6,6 +6,7 @@
struct symbol *size_t_ctype = &uint_ctype;
struct symbol *ssize_t_ctype = &int_ctype;
struct symbol *wchar_ctype = &int_ctype;
+struct symbol *wint_ctype = &uint_ctype;
/*
* For "__attribute__((aligned))"
@@ -4,6 +4,7 @@
extern struct symbol *size_t_ctype;
extern struct symbol *ssize_t_ctype;
extern struct symbol *wchar_ctype;
+extern struct symbol *wint_ctype;
/*
* For "__attribute__((aligned))"
This type seems to use 'unsigned int' on all archs but for Darwin & FreeBSD. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- lib.c | 5 +++++ target.c | 1 + target.h | 1 + 3 files changed, 7 insertions(+)