Subject: pkg/11177: gcc redefines wint_t (defined in /usr/include/wchar.h)
To: None <>
From: Johnny C. Lam <>
List: netbsd-bugs
Date: 10/09/2000 09:14:15
>Number:         11177
>Category:       pkg
>Synopsis:       gcc redefines wint_t (defined in /usr/include/wchar.h)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 09 09:14:02 PDT 2000
>Originator:     Johnny C. Lam
>Release:        NetBSD-current 2000-09-17
	Department of Statistics, Carnegie Mellon University
System: NetBSD 1.5E NetBSD 1.5E (MARIPOSA) #0: Mon Sep 4 21:58:00 EDT 2000 i386

	lang/gcc doesn't properly fix the system include files when generating
the contents of /usr/pkg/gcc-2.95.2/lib/gcc-lib/i386--netbsdelf/2.95.2/include.
The header stddef.h redefines wint_t, which is previously defined in the
system header /usr/include/wchar.h.

	Install lang/gcc, and prepend /usr/pkg/gcc-2.95.2/bin to your PATH.
Try to build net/ORBit and get:

BUG=1 -DYYERROR_VERBOSE=1 -DIDL_LIBRARY -I/usr/pkg/lib/glib/include -I/usr/pkg/i
nclude/glib -DG_LOG_DOMAIN=\"libIDL\" -I/usr/pkg/include -O2 -mcpu=pentiumpro -m
arch=pentiumpro -mcpu=pentiumpro -march=pentiumpro -c parser.c  -fPIC -DPIC -o .
In file included from util.h:31,
                 from ./parser.y:33:
/usr/include/wchar.h:50: conflicting types for `wint_t'
/usr/pkg/gcc-2.95.2/lib/gcc-lib/i386--netbsdelf/2.95.2/include/stddef.h:280: pre
vious declaration of `wint_t'
gmake[2]: *** [parser.lo] Error 1
gmake[2]: Leaving directory `/tmp/net/ORBit/work/ORBit-0.5.3/libIDL'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/net/ORBit/work/ORBit-0.5.3'
gmake: *** [all-recursive-am] Error 2
*** Error code 2

*** Error code 1


	I'm not sure, but it probably involves fixing the fixincludes script
in the gcc sources.  It looked like there were existing workarounds for
wchar_t that could be adapted for wint_t.