Re: Lingering patches



> Also there is an issue with configure.ac. It contains the lines:
> linux*)
>     AC_DEFINE(_GNU_SOURCE,, [Define to request GNU feature set on
> Linux])
>
> Why wasn't this introduced as:
> linux*)
>     AC_DEFINE(_GNU_SOURCE, 1, [Define to request GNU feature set on
> Linux])
> ?

Who else but me could have done this? ;-) cvs annotate could help in this
case, and I think I also provided a useful commit message.

I had problems with src/regex.c, because it first #defines _GNU_SOURCE and
then #includes <config.h>, which makes gcc (and maybe others) choke about
the duplicate definition. But later I noticed that some other files first
#define _GNU_SOURCE 1 and then #include <config.h>. So the solution is to
#define _GNU_SOURCE to 1 in the <config.h> and repair all the files that
#define _GNU_SOURCE to #define it _after_ #including <config.h>.

The current usage is:

src/regex.c:
#define _GNU_SOURCE
#include <config.h>

{some_other_file.c}:
#define _GNU_SOURCE 1
#include <config.h>

This should be changed to:

#include <config.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif

Roland




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