[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems concerning preprocessor macros in ifconf.c
From: |
Martin Jost |
Subject: |
Problems concerning preprocessor macros in ifconf.c |
Date: |
Tue, 26 Mar 2002 16:16:47 +0100 |
Hello,
while compiling cfengine 2.0.0 I got two warnings from the cpp on HPUX
10.20 using HP ANSI C.
HPs cpp doesn't know about something like '# else if'. It just takes
the '#else', throws away the 'if' and spits out a warning.
The second '#else if' seems to be wrong. There is an 'if' but no
condition.
I fixed this like this:
--------------------------- snip, snip -----------------------------
--- src/ifconf.c 26 Mar 2002 15:05:24 -0000 1.2
+++ src/ifconf.c 26 Mar 2002 15:06:55 -0000
@@ -365,7 +365,7 @@
# ifdef HAVE_ORTENTRY
struct ortentry route;
-# else if HAVE_RTENTRY
+# elif HAVE_RTENTRY
struct rtentry route;
# endif
@@ -460,7 +460,7 @@
CfLog(cferror,OUTPUT,"");
}
-# else if
+# else
/* Socket routing - don't really know how to do this yet */
--------------------------- snip, snip -----------------------------
I hope this is usable for other compilers too ?!
Martin
- Problems concerning preprocessor macros in ifconf.c,
Martin Jost <=