From marko@kind.ki.informatik.uni-frankfurt.de Thu Oct 14 08:33:14 1999
Return-Path: <marko@kind.ki.informatik.uni-frankfurt.de>
Received: from kind.ki.informatik.uni-frankfurt.de (kind.ki.informatik.uni-frankfurt.de [141.2.10.10])
	by hub.freebsd.org (Postfix) with ESMTP id 8B81914C27
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Oct 1999 08:32:39 -0700 (PDT)
	(envelope-from marko@kind.ki.informatik.uni-frankfurt.de)
Received: (from marko@localhost)
	by kind.ki.informatik.uni-frankfurt.de (8.9.3/8.9.3) id RAA50809;
	Thu, 14 Oct 1999 17:10:18 +0200 (CEST)
	(envelope-from marko)
Message-Id: <199910141510.RAA50809@kind.ki.informatik.uni-frankfurt.de>
Date: Thu, 14 Oct 1999 17:10:18 +0200 (CEST)
From: marko@ki.informatik.uni-frankfurt.de
Sender: marko@kind.ki.informatik.uni-frankfurt.de
Reply-To: marko@ki.informatik.uni-frankfurt.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: fjh@cs.mu.oz.au
Subject: netdb.h not namespace clean 
X-Send-Pr-Version: 3.2

>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:    mike
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 14 08:40:01 PDT 1999
>Closed-Date:    Thu Aug 2 07:37:36 PDT 2001
>Last-Modified:  Thu Aug 02 07:38:21 PDT 2001
>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:
Responsible-Changed-From-To: freebsd-bugs->mike 
Responsible-Changed-By: mike 
Responsible-Changed-When: Fri Jul 20 19:13:22 PDT 2001 
Responsible-Changed-Why:  

I'll fix this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14327 
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Thu Aug 2 07:37:36 PDT 2001 
State-Changed-Why:  

A slightly difference patch was committed to -CURRENT and -STABLE. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14327 
>Unformatted:
