[comp.unix.xenix] memcpy

chad@lakesys.UUCP (D. Chadwick Gibbons) (02/12/89)

	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@lakesys.lakesys.com, ...!uunet!marque!lakesys!chad