bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison-20001221


From: Hans Aberg
Subject: Re: bison-20001221
Date: Fri, 12 Jan 2001 21:43:56 +0100

At 21:00 +0100 1-01-12, Magnus Fromreide wrote:
>> So if the intent that one should be able to pick down a package and compile
>> it straight off the headers in that package should all have the #include
>> "..." form.
>>
>> If however the intent is that some of the files should first be moved to
>> the standard places before compilation, then those headers could be
>> included using the #include <...> form.
>
>Well, it depends, as is pointed out in the exerpt from the Autoconf manual
>the reason for it is that you might wish to use another config.h than the
>one in the current directory. If you give the compiler the flag -I. then
>the two forms will end up as equivalent for this which is the whole point
>of the exercise.

Correct, for compilers that have the `-I' flag...

>> I noted though that those includes were somehow unnecessary for the package
>> to compile; the writers of those package evidently puts in unneeded headers
>> making it unneededly platform specific. -- A sort of funny approach.
>
>They might be on your platform.

Some C standard headers must be included, that is clear, but I do not
recall how. But in some case, not even that seemed necessary -- just quote
out the platform specific header.

>I have had the opportuninty to learn a lot about the header file structure
>of FreeBSD lately and they do notoriously not include all headers needed
>by other headers from the needing headers - one effect of this is that you
>have to include sys/types from about everywhere so I do think that they
>might be necessary somewhere, and since they won't hurt on other platforms
>then it is simpler to just include them.

It may depend on how you hook up the compiler: If you use precompiled
headers, and then hooks up the compiler to read those first, then no
includes are needed. Precompiled headers are used because it speeds up
compilation, but I do not use that. Of course, if you use a precompiled
header and then tries to port to another platform, you will have to write
in all those headers...

>I still do have to say that you are doing a good job in finding oddities.
>It is good that someone speaks.

I do not come across these oddities because I want to; it is my compiler
that finds them. :-)

  Hans Aberg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]