This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fixincludes needed on linux?
- To: ddsinc09 at ix dot netcom dot com
- Subject: Re: fixincludes needed on linux?
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Sun, 25 Oct 1998 10:38:15 -0500
- cc: David Dawes <dawes at rf900 dot physics dot usyd dot edu dot au>, egcs at cygnus dot com
On Wed, 21 Oct 1998 13:18:37 -0700, Bruce Korb wrote:
>Zack Weinberg wrote:
>
>> >Understood, but some of the changed symbols were defined explicitly
>> >by X's imake config. For example, it adds -Dsun to the compiler
>> >arguments rather than relying on the compiler to define it. The X code
>> >knows this. SunPro's C compiler defines "__sun" in ANSI mode and both
>> >"sun" and "__sun" otherwise (similarly it defines __unix instead of
>> >__unix__). The imake config could be changed to define __sun__, but
>> >then anyone who has X code which relies on the old behaviour will have
>> >problems.
>>
>> In that case perhaps GCC should avoid modifying the X headers in this
>> fashion. Bruce, can you get fixincludes to ignore X11/*.h ?
>
>I can do anything. :) Would such a change in fixincludes behavior be
>acceptedinto EGCS? Different question. Remember, we are talking
>about compiling some random program that is being compiled by EGCS
>and including an X11 header. When X11 is itself being compiled, it
>is free to do the "-Dsun" thing. EGCS will not predefine "sun".
Most programs that use X11 headers use Imake, which will insert
-Dsun. But we shouldn't rely on that.
>Here are the issues, as I see them.
>
>1. No matter what gets decided about what to do with non-conforming headers
> (fix them in the original; or fix them in the compiler internal includes;
> or just ignore them), the preprocessor must present to the compiler
> the correct text for the machine/os target being compiled to.
> And it must do so for the currently installed base of header files.
Agree.
>2. It is not required, but it would be nice to minimize the number of files
> ensnared by fixincludes with inconsequential changes. For example,
> there is not much point in ANSI-fying "#if defined(sun)" on a i386 Linux
> box. On a _sun_ box, however, EGCS/GCC only pre-defines "__sun__".
> Consequently, in order to deliver the correct text to the compiler,
> fixincludes _must_ change solitary "#if defined(sun)" constructs.
Agree.
>At the moment, what is being installed is, to the best of my ability, an
>exact, faithful copy of the old fixincludes functionality. Once that dust
>settles, we can worry about enhancing fixes in ways that do not break
>things where the fixes are truely needed. I must say, tho, that I think
>it would be really nice if the suppliers of the headers would, when reasonably
>convenient, make slight changes to their code. Changes so that not only
>would any real broken-ness be corrected, but even leave clues in them to
>let fixincludes be able to determine that a fix is not needed.
>
>I think we are turning this new stuff on soon now, yes Jeff?
Yes, let's let the dust settle before we make changes. My concern is
that you've made a change already, by turning on fixincludes where it
wasn't used before - Linux, *BSD, etc.
zw