This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR15824: Broken configure test in libcpp
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Nov 2004 09:32:38 -0800
- Subject: Re: [PATCH] PR15824: Broken configure test in libcpp
- References: <Pine.LNX.4.44.0411240635160.11122-100000@www.eyesopen.com>
Roger Sayle <roger@eyesopen.com> writes:
> On Tue, 23 Nov 2004, Zack Weinberg wrote:
>> Roger Sayle <roger@eyesopen.com> writes:
>> > My suggested fix below is to completely ignore "ansidecl.h" and
>> > the not yet generated "system.h", and directly include <sys/types.h>
>> > as described in this test's commentary. If sys/types.h doesn't
>> > exist, we're no worse off than we currently are, but on AIX and
>> > Tru64, this simplified test is sufficient to do the right thing.
>> >
>> > Ok for mainline?
>>
>> Yes, this is OK. I worry a little about systems where some other
>> header is the one that defines uchar, but let's cross that bridge when
>> we discover it.
>
> Many thanks.
>
> I apologise for teasing a second review out of you, but the form of
> the patch below was dependent upon the solution chosen for PR15824.
>
> Now that libcpp is fixed, there is a related problem in the gcc/
> directory caused by the #include "../libcpp/internal.h" in the file
> c-ppoutput.c. There's now a warning/bootstrap failure as libcpp's
> internal.h, includes libcpp/include/cpp-id-data.h which contains the
> test for HAVE_UCHAR. Unfortunately, HAVE_UCHAR is only in libcpp's
> config.h, but not in gcc's auto-host.h.
>
> My proposed solution in the patch below is to copy the configure
> test for HAVE_UCHAR from libcpp's configure.ac, and repeat the
> test in the gcc directory's configure.
I think I'd rather that you s/uchar/unsigned char/ throughout both
cpp-id-data.h and internal.h, and wrap the definition of uchar in
#ifndef IN_GCC. That way, when (hopefully for 4.1) c-ppoutput.c is
either moved back into cpplib or made not to include internal.h, we
will not have to remember to delete the test from gcc's configure.
zw