This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Define wint_t for VxWorks


The default wint_t is "unsigned int", but VxWorks RTPs use "unsigned short"
instead (as they do for wchar_t).  The kernel headers don't provide a
wchar.h header, so there are no compatiblity issues there.

For context, the preceding code is:

   /* VxWorks uses wchar_t == unsigned short (UCS2) on all architectures.  */
   #undef WCHAR_TYPE
   #define WCHAR_TYPE "short unsigned int"
   #undef WCHAR_TYPE_SIZE
   #define WCHAR_TYPE_SIZE 16

Tested on i586-wrs-vxworks, where it fixes gcc.dg/wint_t-1.c.
Ok to install?

Richard


gcc/
	* config/vx-common.h (WINT_TYPE, WINT_TYPE_SIZE): Define.

Index: gcc/config/vx-common.h
===================================================================
--- gcc/config/vx-common.h	(revision 122984)
+++ gcc/config/vx-common.h	(working copy)
@@ -56,6 +56,12 @@ #define WCHAR_TYPE "short unsigned int"
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 16
 
+/* Likewise wint_t.  */
+#undef WINT_TYPE
+#define WINT_TYPE "short unsigned int"
+#undef WINT_TYPE_SIZE
+#define WINT_TYPE_SIZE 16
+
 /* Dwarf2 unwind info is not supported.  */
 #define DWARF2_UNWIND_INFO 0
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]