* lib/mempcpy.c: Don't define mempcpy if not needed.
2021-01-31 Bruno Haible <bruno@clisp.org>
+ Make it possible to compile mempcpy.c separately, unconditionally.
+ * lib/mempcpy.c: Don't define mempcpy if not needed.
+
Make it possible to compile free.c separately, unconditionally.
* m4/free.m4 (gl_FUNC_FREE): Define HAVE_FREE_POSIX.
* lib/free.c: Don't define rpl_free if not needed.
/* Specification. */
#include <string.h>
+/* A function definition is only needed if HAVE_MEMPCPY is not defined. */
+#if !HAVE_MEMPCPY
+
/* Copy N bytes of SRC to DEST, return pointer to bytes after the
last written byte. */
void *
{
return (char *) memcpy (dest, src, n) + n;
}
+
+#endif