SysV bcopy?

Guy Harris guy at auspex.UUCP
Wed Mar 22 06:15:24 AEST 1989


>Is there a routine in the system V library analogous to BSD's bcopy().

"memcpy".  The differences are:

	1) the first and second arguments are reversed:

		bcopy(from, to, count);

	    becomes

		memcpy(to, from, count);

	2) "memcpy" makes no guarantees that it'll work right if "from"
	   and "to" overlap; I don't have the 4.3-tahoe manual page
	   handy to see whether it guarantees that it'll work, but I
	   think most implementations do guarantee that, and some code
	   relies on it working.  (The SunOS "bcopy" manual page says
	   that "Overlapping strings are handled correctly.")



More information about the Comp.unix.questions mailing list