Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2008 01:19:24 +0200
From:      Max Laier <max@love2party.net>
To:        freebsd-hackers@freebsd.org
Cc:        Nanno Langstraat <nlcom_os@ii.nl>
Subject:   Re: Standard byteorder functions across BSD / Linux
Message-ID:  <200806050119.24405.max@love2party.net>
In-Reply-To: <4847182F.80105@ii.nl>
References:  <4847182F.80105@ii.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 05 June 2008 00:33:19 Nanno Langstraat wrote:
> My question to FreeBSD:
> I don't use FreeBSD myself, but I'll prepare a patch if you like the
> idea and if you indicate what you'll accept:
>
>     * <endian.h> or <sys/endian.h> ?
>       I maintain that it should be <endian.h> for user applications:
>       IMHO <sys/> is for the user-kernel API, and byteorder belongs to
>       libc not the kernel API.
>       glibc apparently agrees, OpenBSD disagreed.

Not sure about this.  There might be namespace issues with this approach, 
though there probably shouldn't.  It's obviously not a problem to have 
both, but getting rid of sys/endian.h now is too late for sure.

>     * You're OK with userspace applications standardizing on OpenBSD's
>       original betoh64() instead of FreeBSD's derivate be64toh() ?

I'm all for this.  We should keep the both for backward compatibility and 
it will probably take some fixing to hunt down all ported code that does 
define betoh64 on its own.

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News



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