Lingering patches
Roland Illig
roland.illig at gmx.de
Mon Oct 4 18:35:05 UTC 2004
> 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
More information about the mc-devel
mailing list