projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b74c9a1
)
[!HAVE_MEMPCPY] (mempcpy): Define.
author
Jim Meyering
<jim@meyering.net>
Wed, 12 Nov 1997 17:19:21 +0000
(17:19 +0000)
committer
Jim Meyering
<jim@meyering.net>
Wed, 12 Nov 1997 17:19:21 +0000
(17:19 +0000)
src/system.h
patch
|
blob
|
history
diff --git
a/src/system.h
b/src/system.h
index
34687e1
..
e60ee53
100644
(file)
--- 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