diff options
author | Jim Meyering <jim@meyering.net> | 1997-11-12 17:19:21 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-11-12 17:19:21 +0000 |
commit | c0cc0c26ed0e459bba2889db858aa04cf3fcd6e9 (patch) | |
tree | bbb73ead1d3ac05e4ffb7ef2d7bcbdc12901aa9f | |
parent | b74c9a14fdda36b4b47b29bb19ae4320d079c633 (diff) | |
download | coreutils-c0cc0c26ed0e459bba2889db858aa04cf3fcd6e9.tar.xz |
[!HAVE_MEMPCPY] (mempcpy): Define.
-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 |