[PATCH v2 08/14] 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    | 5 +++++
 target.c | 1 +
 target.h | 1 +
 3 files changed, 7 insertions(+)

diff --git a/lib.c b/lib.c
index 0abefa083..605f9edd5 100644
--- a/lib.c
+++ b/lib.c
@@ -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);
diff --git a/target.c b/target.c
index e09eff865..57866c337 100644
--- a/target.c
+++ b/target.c
@@ -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))"
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.0




[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