Date: Thu, 14 Oct 1999 17:10:18 +0200 (CEST) From: marko@ki.informatik.uni-frankfurt.de To: FreeBSD-gnats-submit@freebsd.org Cc: fjh@cs.mu.oz.au Subject: misc/14327: netdb.h not namespace clean Message-ID: <199910141510.RAA50809@kind.ki.informatik.uni-frankfurt.de>
next in thread | raw e-mail | index | archive | help
>Number: 14327 >Category: misc >Synopsis: names used in netdb.h may conflict with names defined in including file >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 14 08:40:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Marko Schuetz >Release: FreeBSD 3.2-STABLE i386 >Organization: J.W. Goethe Universitaet, Frankfurt >Environment: >Description: ----begin forwarded mail---- On 13-Oct-1999, Marko Schuetz <marko@ki.informatik.uni-frankfurt.de> wrote: > In file included from mercury_trace_external.c:44: > /usr/include/netdb.h:179: parse error before `(' > /usr/include/netdb.h:179: `type name' declared as function returning an array > /usr/include/netdb.h:179: `type name' declared as function returning a function > /usr/include/netdb.h:179: parse error before `)' This is a bug in the FreeBSD header files: they are not namespace-clean. The problem is a name clash between a macro `hp' defined by the Mercury headers and a parameter name in the FreeBSD header file. I suggest you report this as a bug to the developers of the FreeBSD header files. I've attached a patch which will fix this. -- Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp. ----end forwarded mail---- >How-To-Repeat: get mercury-compiler-rotd-1999-10-12.tar.gz from ftp.mercury.cs.mu.oz.au tar xzf mercury-compiler-rotd-1999-10-12.tar.gz cd mercury-compiler-rotd-1999-10-12 ./configure make >Fix: --- netdb.h.old Thu Oct 14 12:41:11 1999 +++ netdb.h Thu Oct 14 12:41:35 1999 @@ -175,8 +175,8 @@ struct netent * _getnetbyhtaddr __P((unsigned long, int)); struct netent * _getnetbydnsaddr __P((unsigned long, int)); struct netent * _getnetbynisaddr __P((unsigned long, int)); -void _map_v4v6_address __P((const char *src, char *dst)); -void _map_v4v6_hostent __P((struct hostent *hp, char **bp, int *len)); +void _map_v4v6_address __P((const char *__src, char *__dst)); +void _map_v4v6_hostent __P((struct hostent *__hp, char **__bp, int *__len)); __END_DECLS #endif /* !_NETDB_H_ */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910141510.RAA50809>