From itojun@kame.net  Tue Aug 21 22:07:15 2001
Return-Path: <itojun@kame.net>
Received: from kame199.kame.net (kame199.kame.net [203.178.141.199])
	by hub.freebsd.org (Postfix) with ESMTP id 4FA1237B413
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Aug 2001 22:07:14 -0700 (PDT)
	(envelope-from itojun@kame.net)
Received: (from itojun@localhost)
	by kame199.kame.net (8.9.3+3.2W/3.7W) id OAA03950;
	Wed, 22 Aug 2001 14:07:13 +0900 (JST)
Message-Id: <200108220507.OAA03950@kame199.kame.net>
Date: Wed, 22 Aug 2001 14:07:13 +0900 (JST)
From: itojun@itojun.org
Reply-To: itojun@kame.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: ntohl() and friends uses non-standard types
X-Send-Pr-Version: 3.2

>Number:         29946
>Category:       i386
>Synopsis:       ntohl() and friends uses non-standard types
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 21 22:10:17 PDT 2001
>Closed-Date:    Mon Feb 25 23:31:02 PST 2002
>Last-Modified:  Mon Feb 25 23:33:12 PST 2002
>Originator:     Jun-ichiro itojun Hagino
>Release:        FreeBSD 2.2.8 and up to current
>Organization:
itojun.org
>Environment:

	all past revisions of freebsd/i386.  checked with cvs.

>Description:

	in XNET 5.2, ntohl() and htonl() are typed as follows:
		uint32_t ntohl(uint32_t x);
	and ntohs() and htons() are:
		uint16_t ntohs(uint16_t x);

	freebsd src/sys/i386/include/endian.h uses u_long and u_short, which
	are different from these types, and causes problem in portable
	appliation programming.

>How-To-Repeat:

	code inspection

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bde 
Responsible-Changed-By: brian 
Responsible-Changed-When: Thu Aug 23 07:20:53 PDT 2001 
Responsible-Changed-Why:  
I tried to fix this some time ago (sys/i386/include/endian.h 1.19).  Bruce 
eventually mostly reverted the change (I didn't object), so I think this 
PR belongs to him :*D 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29946 
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Mon Feb 25 23:31:02 PST 2002 
State-Changed-Why:  

This was fixed some time ago in -CURRENT.  There are no plans to fix 
this this in -STABLE. 

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