diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-12 13:58:33 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-17 21:56:32 +0100 |
commit | e019565f57e76774f24c54b9b89a5e44fb4052a1 (patch) | |
tree | 8749a259a240993c14e101f61739a53b48c8a222 | |
parent | 63d65194edf1ab5017a4faebed7f816e5cbc24bd (diff) | |
download | sparse-e019565f57e76774f24c54b9b89a5e44fb4052a1.tar.gz |
add predefined macros for wint_t
This type seems to use 'unsigned int' on all archs but for
Darwin & FreeBSD.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | lib.c | 1 | ||||
-rw-r--r-- | target.c | 4 | ||||
-rw-r--r-- | target.h | 1 |
3 files changed, 6 insertions, 0 deletions
@@ -1231,6 +1231,7 @@ static void predefined_macros(void) predefined_ctype("SHRT", &short_ctype, PTYPE_MAX|PTYPE_WIDTH); predefined_ctype("SCHAR", &schar_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))" @@ -72,4 +73,7 @@ void init_target(void) #if defined(__CYGWIN__) wchar_ctype = &ushort_ctype; #endif +#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))" |