[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with getopt.h when compiling cfengine 2.0.a15 under NT
From: |
Andrews, Martin |
Subject: |
problem with getopt.h when compiling cfengine 2.0.a15 under NT |
Date: |
Wed, 16 Jan 2002 16:05:07 -0500 |
When I try compiling cfengine 2.0.a15 under cygwin I get the following
error:
gcc -DHAVE_CONFIG_H -I. -I/cygdrive/h/orig/cfengine-2.0.a15/src -I.
-I/usr/local/BerkeleyDB.3.2/include -I/usr/local/ssl/include
-I/usr/local/include -I/tmp/cf2real/src -g -O2 -c `test -f
/cygdrive/h/orig/cfengine-2.0.a15/src/cfagent.c
|| echo
'/cygdrive/h/orig/cfengine-2.0.a15/src/'`/cygdrive/h/orig/cfengine-2.0.a15/s
rc/cfagent.c
In file included from /cygdrive/h/orig/cfengine-2.0.a15/src/cfagent.c:39:
/cygdrive/h/orig/cfengine-2.0.a15/src/../pub/getopt.h:82: redefinition of
`struct option'
It seems the getopt.h in cfengine conflicts with the one in cygwin - and
core include files in cygwin (unistd.h) include the system getopt.h. I got
around this by including the cfengine one before anything else and then
making the cfengine getopt.h define the flag that avoid including the system
getopt.h. This seems wrong - anyone have a better solution? We could skip
using the cfengine included getopt.h if the system has it, but cfengine
seems to have stopped doing that sort of thing (cfengine 1 used to I think).
Anyway - my patch to use cfengine getopt.h instead of the system one is
attached.
Martin
---
Martin Andrews
address@hidden
getopt.patch
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- problem with getopt.h when compiling cfengine 2.0.a15 under NT,
Andrews, Martin <=