On Wed, 28 Nov 2001, Ian Abbott wrote:
> However, the Linux man page for bcopy(3) do not say the strings can overlap and in
>fact
> suggest that it be replaced with memcpy in new programs! Linux has memmove so that
>does
> not matter, but perhaps rolling our own memmove as Daniel suggested would be the
>safest
> option. Another difference between bcopy() and memmove() is that bcopy() returns
>void
> whereas memmove returns a pointer, but in the one place in the Wget source where
> memmove() is called, the return value is not used.
Presumably the man page is incorrect or at least unclear as Linux even in
the pre-glibc-2.0 days always used a glibc derivative and here is what
glibc's info page on bcopy states:
- Function: void bcopy (const void *FROM, void *TO, size_t SIZE)
This is a partially obsolete alternative for `memmove', derived
from BSD. Note that it is not quite equivalent to `memmove',
because the arguments are not in the same order and there is no
return value.
The best way to verify is to look at the libc 4/5 implementation.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [EMAIL PROTECTED], PGP key available +