[Top][All Lists]

[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 20:29:40 +0100

At 10:17 -0500 1-01-12, Jesse Thilo wrote:
>> Hans> - On a number of places there is include <config.h> It should be
>> Hans> include "config.h"
>> I never quite understood the difference between the two, and some
>> people will tell you to do just the opposite (see the Autoconf doc for
>> a start).
>I agree with Hans on this point, but few others. ;-) I like to put
>system-provided header files in brokets, and package-provided header
>files in quotes.  Aside from being the actual intent behind the
>difference, it distinguishes them visually and it makes gcc's -MM
>option work better.  Rule of thumb: if a header file has a reasonable
>chance of being modified during development, put it in quotes.
>config.h certainly qualifies.  The only files *not* likely to be
>modified (barring an OS upgrade) are system header files.

#include "..." first searches local places, and then standard places,
whereas #include <...> only searches standard places (in typical compiler

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.

>> Hans> - File "xstrdup.c", "xmalloc.c", and others, contains platform
>> Hans> specific seemingly unneeded #include <sys/types.h>
>> Fetched from elsewhere, and I trust the guy who wrote them.
>> Hans> - Files "quote.c", "quote_arg.c" includes platform specific
>> Hans> <sys/types.h>.
>> So what?
>Agreed: so what?  <sys/types.h> is platform specific, but the platform
>is POSIX, which is a widely recognized standard.  Akim is right: we
>are not going to touch imported library files.  It's too much
>headache.  Feel free to report any problems to the maintainer(s) of
>those files, however.

I just reported the problem, and I do not come up with a suggestion.

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.

  Hans Aberg
                  * Email: Hans Aberg <mailto:address@hidden>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>

reply via email to

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