[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] Many complaints on HAVE_..._SHORT_NAME
From: |
Alfred M. Szmidt |
Subject: |
Re: [bug-inetutils] Many complaints on HAVE_..._SHORT_NAME |
Date: |
Wed, 15 Jun 2011 17:30:09 -0400 |
I make this private since the config.log file is significant in size.
Thank you; adding bug-inetutils back to the list now.
So lets see what is going on here; src/syslogd.c:
#include <config.h> --
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
#define GNULIB_PROGRAM_INVOCATION_NAME 1
...
#include <argp.h> --
#ifdef GNULIB_PROGRAM_INVOCATION_NAME
extern char *program_invocation_name;
# undef HAVE_DECL_PROGRAM_INVOCATION_NAME
# define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
#endif
Which ends up redefining HAVE_DECL_PROGRAM_INVOCATION_NAME to 1; all
good so far since program_invocation_name is provided by gnulib.
A bit later, we do:
#include <libinetutils.h>
which includes <config.h>; which redefines
HAVE_DECL_PROGRAM_INVOCATION_NAME to 0. It isn't protected from
double inclusion either. Hence the redefinition I suspect. Could you
try a quick fix and enclose config.h with:
#ifndef IU_CONFIG_H
#define IU_CONFIG_H
... rest of config.h as usual
#endif
And see if that fixes the issue? I'm trying to think of a "good" fix
for this.