diff options
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h index 34687e1a1..e60ee53fe 100644 --- a/src/system.h +++ b/src/system.h @@ -405,3 +405,17 @@ char *strstr (); #endif #include "xalloc.h" + +#ifndef HAVE_MEMPCPY +# if defined (__GNUC__) +/* Use an inline function with GNU C so we don't get the warning that + `value computed is not used'. */ +static __inline__ void* +mempcpy (void *d, const void *s, size_t n) +{ + return (char *) memcpy (d, s, n) + n; +} +# else +# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) +# endif +#endif |