[ILUG] Re: SCO v Linux
Lars Hecking
lhecking at nmrc.ucc.ie
Thu Apr 8 14:53:19 IST 1999
Paul Kelly writes:
> Lars Hecking wrote:
> > It doesn't have memcpy().
> > But I trust it did have bcopy()?
>
> It did. I was trying to compile up GNU sh-utils at the time and memcpy()
> was one of the major stumbling blocks. bcopy() wasn't good enough it
> would seem.
This is from the latest fileutils, which are also maintained by
Jim Meyering.
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
# define bcopy(from, to, len) memcpy ((to), (from), (len))
#endif
(Or define it the other way round, as needed)
bcopy() does even more than memcpy(), in most implementations it can
copy overlapping strings, which memcpy() cannot. The ANSI C function
for that is memmove().
More information about the ILUG
mailing list