From owner-freebsd-bugs Sun Mar 10 1: 0:17 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D1F6637B405 for ; Sun, 10 Mar 2002 01:00:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2A904696246; Sun, 10 Mar 2002 01:00:04 -0800 (PST) (envelope-from gnats) Date: Sun, 10 Mar 2002 01:00:04 -0800 (PST) Message-Id: <200203100900.g2A904696246@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Alan Eldridge Subject: Re: bin/35071: include/arpa/inet.h broken: must include Reply-To: Alan Eldridge Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/35071; it has been noted by GNATS. From: Alan Eldridge To: mike@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org, FreeBSD Bugs Subject: Re: bin/35071: include/arpa/inet.h broken: must include Date: Sun, 10 Mar 2002 03:58:34 -0500 On Sat, Mar 09, 2002 at 11:57:17PM -0800, mike@FreeBSD.org wrote: >Synopsis: include/arpa/inet.h broken: must include > and will never conform to SUSv2 in the >4.x branch, but 5.0-RELEASE will resolve this issue. The patch >submitted in this PR takes advantage of which I consider to be >mistakes in SUSv2 and other standards, which allow for sloppy >implementations. Needless to say, this is not the approach taken in >5.0. Perhaps I should have been more explicit: there is a missing structure definition that provokes "incomplete type" warnings (at best) and compilation errors (in cases where the code include the header actually uses 'struct in_addr'). The fact that including a system header will unconditionally provoke compiler warnings is sufficient for me to label that header "broken". (In the 20+ years that I have been doing "C" development, I have seen very few occasions where a compilation warning was truly innocuous; at best, they indicate sloppy coding practice.) AFAIK, other Unixes manage to get this right. There is code out there, in real applications, that assumes (IMO, correctly) that it will get 'struct in_addr' with "include ". I had to recently make patches to wget's CVS tree because of this issue, for example. Including was the easies, and least intrusive method to fix this; it is by no means the most elegant, nor was it advertised as such. I don't disagree that a different solution would be preferable to the one proposed; I do strongly disagree that no solution should be forthcoming until 5.0-RELEASE. A temporary fix to 4.x, pending the "real" one in 5.0, is better than none at all. -- Alan Eldridge "Dave's not here, man." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message