Eric Blake wrote: > According to Jim Meyering on 1/28/2010 6:45 AM: >>>> It looks like several other files have a sane definition, such as fts_.h. >>> 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? On the other hand, modules like string (lib/string.in.h) >>> still have to open-code their checks, since the point of replacement >>> headers is that they can be installed without <config.h>. >> >> Good idea. >> I do see some value in factoring out the duplication (there are >> currently 4, and we need a 5th), even if we have to leave a copy >> or two open-coded for string.h. > > For now, I'm just committing this to fix compilation, but when I get more > time, I'll try and do the factorization of creating a gnuc-prereq module. > > $ git grep '__GNUC__ [<=>]' lib > > shows that at least these files could benefit: ...
Yes. That's an even stronger argument. Good. > Subject: [PATCH] regex: fix build failure > > * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc > platforms. Thanks for the quick fix!
