@@ -1231,6 +1231,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);
@@ -7,6 +7,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))"
@@ -68,4 +69,8 @@ void init_target(void)
default:
break;
}
+
+#if defined(__FreeBSD__) || defined(__APPLE__)
+ wint_ctype = &int_ctype;
+#endif
}
@@ -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 | 1 + target.c | 5 +++++ target.h | 1 + 3 files changed, 7 insertions(+)