If it doesn't exist, provide a definition based on memcpy.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
+2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+
+ * configure.ac: Add check for mempcpy.
+
2017-02-09 Mark Wielaard <mark@klomp.org>
* configure.ac: Add check for adding -D_FORTIFY_SOURCE=2 to CFLAGS.
[#define _GNU_SOURCE
#include <string.h>])
AC_CHECK_DECLS([powerof2],[],[],[#include <sys/param.h>])
+AC_CHECK_DECLS([mempcpy],[],[],
+ [#define _GNU_SOURCE
+ #include <string.h>])
AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl
AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+ * system.h: Provide mempcpy if it doesn't exist.
+ * xstrndup.c: Include system.h.
+
+2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+
* crc32_file.c: Use _SC_PAGESIZE rather than _SC_PAGE_SIZE.
2017-02-14 Ulf Hermann <ulf.hermann@qt.io>
#define powerof2(x) (((x) & ((x) - 1)) == 0)
#endif
+#if !HAVE_DECL_MEMPCPY
+#define mempcpy(dest, src, n) \
+ ((void *) ((char *) memcpy (dest, src, n) + (size_t) n))
+#endif
+
/* A special gettext function we use if the strings are too short. */
#define sgettext(Str) \
({ const char *__res = strrchr (gettext (Str), '|'); \
#include <stdint.h>
#include <string.h>
#include "libeu.h"
-
+#include "system.h"
/* Return a newly allocated copy of STRING. */
char *
+2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+
+ * disasm_str.c: Include system.h.
+
2015-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
* asm_align.c: Remove sys/param.h include.
#endif
#include <string.h>
-
+#include <system.h>
#include "libasmP.h"
2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+ * linux-kernel-modules.c: Include system.h.
+
+2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+
* linux-kernel-modules.c: Use sysconf(_SC_PAGESIZE) to get page size.
* linux-proc-maps.c: Likewise.
#endif
#include <config.h>
+#include <system.h>
#include "libdwflP.h"
#include <inttypes.h>
+2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+
+ * eblmachineflagname.c: Include system.h.
+ * eblopenbackend.c: Likewise.
+
2016-07-08 Mark Wielaard <mjw@redhat.com>
* Makefile.am (gen_SOURCES): Remove eblstrtab.c.
#include <stdio.h>
#include <string.h>
+#include <system.h>
#include <libeblP.h>
#include <string.h>
#include <stdio.h>
+#include <system.h>
#include <libeblP.h>
+2017-02-15 Ulf Hermann <ulf.hermann@qt.io>
+
+ * elfstrmerge.c: Include system.h.
+
2017-02-09 Ulf Hermann <ulf.hermann@qt.io>
* backtrace.c: Add an option to allow unknown symbols in the trace
#include <inttypes.h>
#include <unistd.h>
+#include <system.h>
#include <gelf.h>
#include ELFUTILS_HEADER(dwelf)
#include "elf-knowledge.h"