Eric Blake wrote:
> For that matter, would it make sense to have a gnulib module that
> guarantees that __GNUC_PREREQ is defined in <config.h>, and then convert
> various other modules to use it rather than open-coding their __GNUC__
> version checks?
I don't think it's worth it:
- You would be replacing a well understandable one-liner with another
understandable one-liner. No win in terms of maintainability.
- As you say, one would have to think about the difference between standalone
generated header files and other header files. A minus for
maintainability.
- Either you make it a module of its own, requiring people to think about the
module dependency - also a minus for maintainability -, or it goes into
gnulib-common.m4 - which is IMO also not good, please keep gnulib-common as
thin as possible.
The only win would be for modules that come from glibc; it's a small set of
modules that use __GNUC_PREREQ: fts, getopt, inttostr, md5, regex, and
safe-alloc (not from glibc).
Bruno