memcpy()

D. Chadwick Gibbons chad at lakesys.UUCP
Sun Feb 12 14:11:15 AEST 1989


	I am in need of a version of memcpy() that handles alignment
restrictions within pointers.  The few versions of source that I have
work well, except they do not allow you to preform an operation such as:

	char *dst;
	struct magic *src;

	memcpy(dst, src, sizeof(src));

The pointer alignment for the structure does not coincide with that of
the character pointer, and thus the function bombs.

	Why not use the standard library version?  I am running under
XENIX and need to use a far pointer in a small model program...as you
know, you have to write your own versions of the standard library
routines in this situation.  I need to be able to have *dst be a char far
*dst, instead of the normal near pointer.

	I appreciate any information, of course.
-- 
D. Chadwick Gibbons, chad at lakesys.lakesys.com, ...!uunet!marque!lakesys!chad



More information about the Comp.lang.c mailing list