[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-inetutils] warning: "HAVE_DECL_PROGRAM_INVOCATION_NAME" redefined
From: |
Simon Josefsson |
Subject: |
[bug-inetutils] warning: "HAVE_DECL_PROGRAM_INVOCATION_NAME" redefined |
Date: |
Mon, 07 Dec 2009 13:33:18 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
I get ton of these when building under Mac OS X:
espresso:~/inetutils-1.6.91/rlogin jas$ make
CC rlogin.o
In file included from ../libinetutils/libinetutils.h:19,
from rlogin.c:118:
../config.h:312:1: warning: "HAVE_DECL_PROGRAM_INVOCATION_NAME" redefined
In file included from rlogin.c:98:
../lib/argp.h:432:1: warning: this is the location of the previous definition
In file included from ../libinetutils/libinetutils.h:19,
from rlogin.c:118:
../config.h:316:1: warning: "HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME" redefined
In file included from rlogin.c:98:
../lib/argp.h:438:1: warning: this is the location of the previous definition
CCLD rlogin
espresso:~/inetutils-1.6.91/rlogin jas$
The reason is that libinetutils.h includes config.h, but config.h has
already been included. Including config.h twice is not reliable, and
including config.h should be done first by each file including
libinetutils.h anyway. I checked that all users of libinetutils did
this, so the patch below should be safe.
Pushed, please holler/revert if there is any problem.
/Simon
>From 29264df2bfb6f455bcf61aa57cf9e3a0a8caf230 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Mon, 7 Dec 2009 13:32:38 +0100
Subject: [PATCH] Don't include config.h.
---
ChangeLog | 5 +++++
libinetutils/libinetutils.h | 1 -
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d537134..b064791 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-12-07 Simon Josefsson <address@hidden>
+ * libinetutils/libinetutils.h: Don't include config.h, leads to
+ double inclusion of config.h.
+
+2009-12-07 Simon Josefsson <address@hidden>
+
* rexec/rexec.c (do_rexec): Don't use reserved variable 'stdin'.
2009-12-07 Simon Josefsson <address@hidden>
diff --git a/libinetutils/libinetutils.h b/libinetutils/libinetutils.h
index 5fc3062..dccd7ae 100644
--- a/libinetutils/libinetutils.h
+++ b/libinetutils/libinetutils.h
@@ -16,7 +16,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see `http://www.gnu.org/licenses/'. */
-#include "config.h"
#include "argp-version-etc.h"
void utmp_init (char *line, char *user, char *id);
--
1.6.5.3
- [bug-inetutils] warning: "HAVE_DECL_PROGRAM_INVOCATION_NAME" redefined,
Simon Josefsson <=