[Top][All Lists]

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

Re: [PATCH] lib/malloca.c, lib/md5.c, lib/sha1.c: don't include <config.

From: Eric Blake
Subject: Re: [PATCH] lib/malloca.c, lib/md5.c, lib/sha1.c: don't include <config.h> unless HAVE_CONFIG_H is defined
Date: Wed, 24 Feb 2010 10:54:02 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

According to Peter Simons on 2/24/2010 10:46 AM:
> Hi Simon,
>  >> The following patches are necessary to make those modules compile in
>  >> projects that don't use a <config.h> header.
>  >
>  > That is generally not supported by gnulib. The majority of code in gnulib
>  > assumes there is a config.h already; >95% if my grep is working.
> given the extreme technical simplicity of supporting both builds with and
> without a config.h header file, do you think that is a wise choice?

These days, gnulib uses so many #defines that it would exceed command-line
length limits on some platforms if they were passed via -D through the
Makefile.  That, and some things don't work well through makefiles, such
as an expansion containing # (and gnulib now has some of those for the
*.in.h replacement headers).  So going without any header at all is no
longer a portable option.

Which means the question is now one of whether we should support an
arbitrary name, or just hard-code <config.h>.  We went with the latter.
At this point, it is technically just simpler to make your package use
config.h than it is to try to make gnulib support conditional config.h.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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