Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!amdahl!kucharsk From: kucharsk@uts.amdahl.com (William Kucharski) Newsgroups: comp.unix.questions Subject: Re: SysV bcopy? Summary: Using memcpy(3) might not work in some cases... Keywords: bcopy SysV BSD Message-ID: <0eqxk1d9CO1010rd0EQ@amdahl.uts.amdahl.com> Date: 20 Mar 89 21:36:10 GMT References: <114@sherpa.UUCP> <9876@smoke.BRL.MIL> Reply-To: kucharsk@amdahl.uts.amdahl.com (William Kucharski) Organization: Amdahl Coup, UTS Products Hen House Lines: 26 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@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.