Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Sep 2001 05:42:33 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "David O'Brien" <obrien@FreeBSD.org>
Cc:        Mike Barcroft <mike@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/lib/libc/net byteorder.3 src/sys/alpha/include ansi.h endian.h src/sys/arm/include ansi.h src/sys/i386/include ansi.h endian.h src/sys/ia64/include ansi.h endian.h src/sys/powerpc/
Message-ID:  <20010916052904.D29852-100000@delplex.bde.org>
In-Reply-To: <20010915114153.A70624@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 15 Sep 2001, David O'Brien wrote:

> On Wed, Aug 29, 2001 at 05:04:19PM -0700, Mike Barcroft wrote:
> > mike        2001/08/29 17:04:19 PDT
> >
> >   Modified files:
> >     lib/libc/net         byteorder.3
> >     sys/alpha/include    ansi.h endian.h
> >     sys/arm/include      ansi.h
> >     sys/i386/include     ansi.h endian.h
> >     sys/ia64/include     ansi.h endian.h
> >     sys/powerpc/include  ansi.h endian.h
> >     sys/sparc64/include  ansi.h endian.h
> >     sys/sys              types.h
> >   Log:
> >   o Change byteorder(3) prototypes to use standards compliant uint32_t
> >     (spelled __uint32_t to reduce namespace pollution).
>
> Why not spell it the C99 Standard way of "uint32_t"?

That would tend to increase namespace pollution, especially if done before
the C99 infrastructure is implemented.

> ISO/IEC 9899:1999(E)
> 7.18.1.1 Exact-width interger types
>
> 1  The typedef name intN_t designates a signed integer type with width N,
>    no padding bits, and a two's complement representation. Thus, int8_t
>    denotes a signed integer type with a width of exactly 8 bits.
> 2  The typedef name uintN_t designates an unsigned integer type with
>    width N. Thus, uint24_t denotes an unsigned integer type with a width
>    of exactly 24 bits.
> 3  These types are optional. However, if an implementation provides
>    integer types with widths of 8, 16, 32, or 64 bits, it shall define
>    the corresponding typedef names.
>
> We could follow the NetBSD lead of putting these in <sys/stdint.h> and
> <stdint.h>.

The headers that declare the ntohl functions (<arpa/inet.h> and
<netinet/in.h> in POSIX.1-200x) are not permitted to include <stdint.h>.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010916052904.D29852-100000>