memcpy != bcopy (Was Re: bcopy() bzero())

Mike Scott scott at stl.stc.co.uk
Sat Mar 3 03:45:35 AEST 1990


In article <1990Feb24.233833.14129 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <1990Feb23.225358.375 at sj.ate.slb.com> konath at sj.ate.slb.com (Kannan Konath) writes:
>>In the VAX-VMS-C manual,  it states that memmove() has exactly the same
>>functionality as  memcpy().  Does that mean memmove() does not handle
>>overlapped moves or does that mean memcpy() handles overlapped moves.
>
>ANSI C memcpy must not be handed overlapping arguments, whereas ANSI C
>memmove is required to handle them correctly.  How this corresponds to
>VAX VMS C is another question entirely.

from the VAXC 3.0 manual:

	" In VAXC, memmove and memcpy perform the same function.
	Programs that require portability should use memmove
	if the area pointed at by ... could overlap the area
	pointed at by..."

So the implication is that both functions cope 'properly' with
overlapping objects on VMS.




--
Regards.    Mike Scott       STL, London Road, Harlow, Essex  CM17 9NA, UK
scott at stl.stc.co.uk <or> ...uunet!mcsun!ukc!stl!scott <or>
PSI%234237100122::SCOTT        phone +44-279-29531 xtn 3133.



More information about the Comp.lang.c mailing list