Bug 12505 - [3.3 Regression] build failure due to defines of uchar in cpphash.h and sys/types.h
[3.3 Regression] build failure due to defines of uchar in cpphash.h and sys/t...
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: other
3.3.1
: P3 normal
: 3.3.3
Assigned To: Zack Weinberg
: build, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-03 19:37 UTC by stuart_yarus
Modified: 2005-02-09 02:18 UTC (History)
3 users (show)

See Also:
Host: powerpc-ibm-aix4.1.5.0
Target: powerpc-ibm-aix4.1.5.0
Build: powerpc-ibm-aix4.1.5.0
Known to work:
Known to fail:
Last reconfirmed: 2003-10-26 21:48:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stuart_yarus 2003-10-03 19:37:24 UTC
problem: 
in compiling cpplib.o, 'uchar' defined in gcc/cpphash.h and
/usr/include/sys/types.h.

log:
xlc -c   -g  -DIN_GCC     -DHAVE_CONFIG_H    -I. -I. -I../../gcc-3.3.1/gcc -I../
../gcc-3.3.1/gcc/. -I../../gcc-3.3.1/gcc/config -I../../gcc-3.3.1/gcc/../include
 ../../gcc-3.3.1/gcc/cpplib.c -o cpplib.o
../../gcc-3.3.1/gcc/cpphash.h", line 32.23: 1506-334 (S) Identifier uchar h
as already been defined on line 175 of "/usr/include/sys/types.h


my fix:
comment out line 32

result:
build continued


build was from full distribution gcc-3.3.1.tar.gz.

build done with "make bootstrap"

configuration options, from gcc -v:
Configured with: ../gcc-3.3.1/configure --prefix=/usr/local --libdir=/usr/local/
gcclib --program-suffix=3.3.1 --enable-threads=aix --enable-languages=c,c++ --di
sable-libgcj --disable-multilib
Thread model: aix
gcc version 3.3.1
Comment 1 Andrew Pinski 2003-10-06 03:45:18 UTC
Fixed on the mainline by:
2003-01-20  Zack Weinberg  <zack@codesourcery.com>

        * configure.in: Check for system-provided 'uchar' type.
        * configure, config.in: Regenerate.
        * cpphash.h: Only typedef 'uchar' if the system doesn't.
This orginally caused by:
2002-05-16  Neil Booth  <neil@daikokuya.demon.co.uk>
        
        * cpphash.h (cpp_macro): Move here, and make expansion a union.
        * cppmacro.c (cpp_macro): Remove.
        (enter_macro_context, replace_args, warn_of_redefinition,
        _cpp_create_definition, cpp_macro_definition): Update.
Comment 2 Mark Mitchell 2003-10-16 09:37:04 UTC
Postponed until GCC 3.3.3.
Comment 3 Andrew Pinski 2003-10-26 22:29:19 UTC
Here is the patch which fixed it: <http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01412.html>.
Comment 4 Zack Weinberg 2003-12-01 22:58:25 UTC
Gabriel - OK to backport to 3.3 branch?
Comment 5 Gabriel Dos Reis 2003-12-01 23:02:36 UTC
Subject: Re:  [3.3 Regression] build failure due to defines of uchar in cpphash.h and sys/types.h

"zack at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Gabriel - OK to backport to 3.3 branch?

Yes.  Thanks!

-- Gaby
Comment 6 Zack Weinberg 2003-12-02 01:56:21 UTC
Done.