Menu

#1 FNAME-define not working properly

open
nobody
None
5
2003-03-07
2003-03-07
No

I'm trying to compile dhcp6-0.2 on a Mandrake 9.0. The
compiler complains about having parse-errors whenever
FNAME occurs somewhere.

It looks like the definition in common.h

#ifdef HAVE_ANSI_FUNC
#define FNAME __func__ ": "
#elif defined (HAVE_GCC_FUNCTION)
#define FNAME __FUNCTION__ ": "
#else
#define FNAME ""
#endif

does not work properly. If you comment everything out
except for

#define FNAME __func__ ": "

it compiles until it tries to compile lease_token.c.
There it says:

gcc -g -O2 -I. -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DINET6=1 -DHAVE_LIBINET6=1 -DHAVE_GETADDRINFO=1
-DHAVE_GETNAMEINFO=1 -DHAVE_GETIFADDRS=1
-DHAVE_IF_NAMETOINDEX=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1
-DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1
-DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1
-DHAVE_TM_ZONE=1 -DGETPGRP_VOID=1 -DSETPGRP_VOID=1
-DRETSIGTYPE=void -DHAVE_MKTIME=1 -DHAVE_SELECT=1
-DHAVE_SOCKET=1 -DHAVE_ANSI_FUNC=1 -DHAVE_STDARG_H=1
-DCONF_DH6OPT_DNS=25 -DCONF_DH6OPT_PREFIX_DELEGATION=30
-DCONF_DH6OPT_PREFIX_INFORMATION=31
-DCONF_DH6OPT_PREFIX_REQUEST=32 -c -o lease_token.o
lease_token.c
lease_token.l: In function `do_iaidaddr_hash':
lease_token.l:284: parse error before string constant
lease_token.l:308: parse error before string constant
lease_token.l:314: parse error before string constant
lease_token.l:328: parse error before string constant
lease_token.l: In function `add_lease':
lease_token.l:360: parse error before string constant
lease_token.l:368: parse error before string constant
lease_token.l:389: parse error before string constant
lease_token.l:403: parse error before string constant
lease_token.l:416: parse error before string constant
lease_token.l:433: parse error before string constant
lease_token.l:442: parse error before string constant
lease_token.l: In function `remove_lease':
lease_token.l:454: parse error before string constant
lease_token.l:462: parse error before string constant
make: *** [lease_token.o] Fehler 1

Same problem with FNAME than before, except that it
does not get defined, eventhough it actually is in
common.h.

I'm not much of a coder myself, but I sure hope this
will help to find a solution.

Christian

Discussion


Log in to post a comment.

MongoDB Logo MongoDB