This is the mail archive of the gcc-bugs@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]

Patch to fix wchar_t definition on FreeBSD


gcc/config/i386/freebsd.h think that FreeBSD's wchar_t is "unsigned 
short". This is wrong. On FreeBSD, wchar_t is "int". Here is a patch to 
change it. It is in FreeBSD's source tree for ages.

Index: gcc/config/i386/freebsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/freebsd.h,v
retrieving revision 1.8
diff -u -r1.8 freebsd.h
--- gcc/config/i386/freebsd.h	1998/05/22 00:01:10	1.8
+++ gcc/config/i386/freebsd.h	1998/06/08 15:17:38
@@ -47,12 +47,12 @@
 #define PTRDIFF_TYPE "int"
 
 #undef WCHAR_TYPE
-#define WCHAR_TYPE "short unsigned int"
+#define WCHAR_TYPE "int"
 
-#define WCHAR_UNSIGNED 1
+#define WCHAR_UNSIGNED 0
 
 #undef WCHAR_TYPE_SIZE
-#define WCHAR_TYPE_SIZE 16
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
 
 #define HAVE_ATEXIT
 







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