Subject: Re: CVS commit: basesrc
To: None <hubert@feyrer.de>
From: Todd Vierling <tv@wasabisystems.com>
List: source-changes
Date: 10/09/2000 10:26:32
On Mon, 9 Oct 2000 hubert@feyrer.de wrote:

: > Include <string.h> to get prototype for memcpy().  Fixed compile problems
: > on alpha (and other LP64 archs?).
: > 
: > XXX: Can't gcc be fixed so that it doesn't auto-prototype mem*()??
: 
: We also see a lot of this in pkgsrc
: (ftp://jumbo.hamachi.org/pub/NetBSD/pkgstat/last/broken.html), and it
: makes me wonder a bit why this only bites on 64bit archs...

It's because memcpy, memcmp, etc., use size_t, which is unsigned long on
alpha, 64 bits, and a non-prototyped function will use [unsigned] int, 32
bits.

It may work errattically on alpha by ignoring the warning, but that's only
by virtue of the way arguments are laid out in memory thanks to little
endianness.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  http://www.wasabisystems.com/
-- Speed, stability, security, and support.  Wasabi NetBSD:  Run with it.