SysV bcopy?

William Kucharski kucharsk at uts.amdahl.com
Tue Mar 21 07:36:10 AEST 1989


I just thought I'd add my $.02 to the SYSV bcopy traffic.

Using memcpy(3) will work in most cases on most machines.

However, a problem may occur when doing an overlapping copy:

>From the SYSV man page CAVEATS:

"Character movement is performed differently in different implementations.
 Thus overlapping moves may yield suprises."

The BSD (or at least SunOS 4.0) man page says of bcopy:

"Overlapping strings are handled correctly."

Just a little caveat...

-- 
					William Kucharski

ARPA: kucharsk at uts.amdahl.com
UUCP: ...!{ames,decwrl,sun,uunet}!amdahl!kucharsk

Disclaimer:  The opinions expressed above are my own, and may not agree with
	     those of any other sentient being, not to mention those of my 
	     employer.  So there.



More information about the Comp.unix.questions mailing list