Subject: Re: tools/compat configure does not find htole*
To: None <tech-toolchain@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-toolchain
Date: 01/02/2006 17:39:14
On Mon, Jan 02, 2006 at 15:31:16 +0100, Martin Husemann wrote:
> I'm not sure this causes any problems, but just in case:
> While looking at some strange C compiler warnings about duplicate defintions
> I came along this output from the src/tools/compat configure:
>
> configure:7660: checking for htole16
> configure:7717: cc -o conftest -O conftest.c -lz >&5
> /var/tmp//ccYmqDa7.o(.text+0x8): In function `main':
> : undefined reference to `htole16'
> /var/tmp//ccYmqDa7.o(.text+0xc): In function `main':
> : undefined reference to `htole16'
> /var/tmp//ccYmqDa7.o(.data+0x0): undefined reference to `htole16'
>
> and it does not define HAVE_HTOLE16 then.
>
> This is on sparc64, -current as of a few hours ago, and of course there is
> a htole16() macro in <sys/endian.h> (or <machine/endian.h>).
>
> Should this be fixed?
This is a very, very old problem. ISTR, wrong autoconf macros used to
test for htole* &co, but last time I looked I decided I don't have
enough of autoconf fu to fix it properly and it doesn't really bother
me that much.
Since we provide re-implementation anyway, the easiest way is to alway
use out own version, I'd guess.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen