[PATCH][1/1] - Xserver - XTrap prep sources for config.h inclusion

Shawn Starr shawn.starr at rogers.com
Tue Apr 19 11:50:36 PDT 2005


Ideally, thats the idea. I can certainly remove config.h from headers. 

Shawn.

On April 19, 2005 06:55, GOMBAS Gabor wrote:
> On Tue, Apr 19, 2005 at 05:57:59PM +1000, Daniel Stone wrote:
> > Depends if they're internal or external headers.  But even if they're
> > external, it'd be unlikely to do any harm.  That being said, it's not
> > the best of ideas that you should do it unless you need to.
>
> #including <config.h> from external headers _is_ extremely harmful:
>
> 1. All projects that do not use autoconf will break if they try to use
>    that header file
> 2. Even if config.h is provided by the project wanting to include the
>    header, it's contents will be completely different from what the
>    header expects (even the _meaning_ of the very same macro being
>    defined/undefined might be different)
>
> Please do not include <config.h> from any external header. In fact, the
> best practice is not to include <config.h> from _any_ header at all,
> include it only from source (.c, .cpp etc.) files.
>
> Gabor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-modular/attachments/20050419/1bb57ac2/attachment.pgp


More information about the xorg-modular mailing list