Subject: port-arm/32734: Fallback ntohl &co are defined to bswap regardless of endianness
To: None <port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <uwe@netbsd.org>
List: netbsd-bugs
Date: 02/04/2006 22:00:01
>Number: 32734
>Category: port-arm
>Synopsis: Fallback ntohl &co are defined to bswap regardless of endianness
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-arm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 04 22:00:01 +0000 2006
>Originator: Valeriy E. Ushakov
>Release: -current
>Organization:
>Environment:
>Description:
common/lib/libc/arch/arm/gen/byte_swap_2.S
uncodintionally defines ntohs and htons as
atlernative entry points into bswap16
Ditto for bswap32.
That should be conditionalized on endianness
and for big endian no-op versions should be provided.
I guess nobody has ever encountered this bug
as the ntohl &co are inlined.
>How-To-Repeat:
Source code inspection.
>Fix:
THis is trivial to fix with come cpp logic similar to
sys/lib/libkern/arch/sh3/byte_swap_2.S
My arm fu is too weak to fix this myself.