[PATCH v3 12/19] add predefined macros for wint_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This type seems to use 'unsigned int' on all archs but for
Darwin & FreeBSD.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 lib.c    | 1 +
 target.c | 5 +++++
 target.h | 1 +
 3 files changed, 7 insertions(+)

diff --git a/lib.c b/lib.c
index d03bb856e..359b3ed49 100644
--- a/lib.c
+++ b/lib.c
@@ -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);
diff --git a/target.c b/target.c
index 27503e244..279d1142d 100644
--- a/target.c
+++ b/target.c
@@ -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
 }
diff --git a/target.h b/target.h
index 74f51ffeb..998d25af5 100644
--- a/target.h
+++ b/target.h
@@ -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))"
-- 
2.19.2




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux