[Xorp-cvs] XORP cvs commit: xorp/libxipc

Pavlin Radoslavov pavlin@icir.org
Fri, 29 Jul 2005 10:58:05 -0700


> CVSROOT:	/usr/local/www/data/cvs
> Module name:	xorp
> Changes by:	bms@xorpc.icir.org	2005-07-29 17:34:04 UTC
> 
> XORP CVS repository
> 
> 
> Modified files:
> 	libxipc       call_xrl.cc 
> 
> Log message:
> 	Use include guards. Put config.h at top.

The "libxorp/xorp.h" header file already includes "config.h", and
"libxorp/xorp.h" should be included everywhere.
Hence, shouldn't we add the "#ifdef HAVE_CONFIG_H" ... "#endif"
wrapper inside "libxorp/xorp.h" and stop including "config.h"
elsewhere?

Pavlin

P.S. Including <getopt.h> inside call_xrl.cc breaks the compilation
on FreeBSD-4.10 :

g++34 -DHAVE_CONFIG_H -I. -I/home/possum/u0/pavlin/xorp/libxipc
-I.. -I/home/possum/u0/pavlin/xorp    -g -W -Wall -Wwrite-strings
-Wcast-qual -Werror -Wpointer-arith -Wcast-align
-Woverloaded-virtual -ftemplate-depth-22 -pipe -c -o call_xrl.o
`test -f /home/possum/u0/pavlin/xorp/libxipc/call_xrl.cc || echo
'/home/possum/u0/pavlin/xorp/libxipc/'`/home/possum/u0/pavlin/xorp/libxipc/call_xrl.cc
In file included from
/home/possum/u0/pavlin/xorp/libxipc/call_xrl.cc:30:
/usr/local/include/getopt.h:115: error: declaration of C function
`int getopt()' conflicts with
/usr/include/unistd.h:112: error: previous declaration `int
getopt(int, char* const*, const char*)' here
/usr/local/include/getopt.h: In function `int main(int, char*
const*)':
/usr/local/include/getopt.h:115: error: too many arguments to
function `int getopt()'
/home/possum/u0/pavlin/xorp/libxipc/call_xrl.cc:255: error: at this
point in file