This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Patch to fix wchar_t definition on FreeBSD
- To: egcs-bugs at cygnus dot com
- Subject: Patch to fix wchar_t definition on FreeBSD
- From: Dmitrij Tejblum <tejblum at arc dot hq dot cti dot ru>
- Date: Tue, 30 Jun 1998 16:44:21 +0400
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