From alane@geeksrus.net  Wed Mar  6 11:36:46 2002
Return-Path: <alane@geeksrus.net>
Received: from wwweasel.geeksrus.net (wwweasel.geeksrus.net [64.8.210.226])
	by hub.freebsd.org (Postfix) with ESMTP id C418837B404
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Mar 2002 11:36:45 -0800 (PST)
Received: (from alane@localhost)
	by wwweasel.geeksrus.net (8.11.6/8.11.6) id g26JWaW14852;
	Wed, 6 Mar 2002 14:32:36 -0500 (EST)
	(envelope-from alane)
Message-Id: <200203061932.g26JWaW14852@wwweasel.geeksrus.net>
Date: Wed, 6 Mar 2002 14:32:36 -0500 (EST)
From: Alan Eldridge <ports@geeksrus.net>
Reply-To: Alan Eldridge <ports@geeksrus.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: In -CURRENT, arpa/inet.h & netinet/in.h each must include the other
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35598
>Category:       bin
>Synopsis:       In -CURRENT, arpa/inet.h & netinet/in.h each must include the other
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 06 11:40:01 PST 2002
>Closed-Date:    Sat Mar 9 23:59:11 PST 2002
>Last-Modified:  Sun Mar 10 00:06:18 PST 2002
>Originator:     Alan Eldridge
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Geeksrus.NET
>Environment:
System: FreeBSD wwweasel.geeksrus.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Fri Feb 8 21:25:34 EST 2002 root@wwweasel.geeksrus.net:/usr/obj/usr/src/sys/WWWEASEL i386

>Description:

See also bin/35071.

A recent modification to <netinet/in.h> has the consequence that it must
include <arpa/inet.h>. As per bin/35071, <arpa/inet.h> must include
<netinet/in.h> in order to provide struct definitions necessary for 
Single Unix Spec compliance, and required for some ports to compile. 

So now we have two headers that each require the other to be included. 
This situation is not acceptable.

First, the most recent change to netinet/in.h cannot get MFC'd to -STABLE,
or it will break any C++ code (like Qt) that includes it.

Second, it is acceptable according to SUSv2 that arpa/inet.h includes
netinet/in.h. That is what bin/35071 does.

The reverse problem, where netinet/in.h references the __[hn]to[hn][sl]()
functions, should not be solved by a mutual include. I suggest duplicating
the prototypes for these functions from arpa/inet.h in netinet/in.h.

I also suggest immediately backing out the most recent change to netinet/in.h
in -CURRENT.

I'll followup with patches later; I'm at work and don't have time to do it
right now.

>How-To-Repeat:
>Fix:

Patches will follow.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Sat Mar 9 23:59:11 PST 2002 
State-Changed-Why:  

<netinet/in.h> and <arpa/inet.h> have never in their history ever 
required one another to compile.  There was a ordering bug where 
ntohl() and family were redefined to their double underscored variants 
before providing prototypes.  This broken some C++ software since 
missing prototypes are fatal in C++, and I think what this PR was 
actually referring to (though you wouldn't know it from reading it). 
This problem was solved today. 

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