]> granicus.if.org Git - libexpat/commitdiff
Assume memmove(3) exists.
authorBenjamin Peterson <benjamin@python.org>
Mon, 10 Sep 2018 16:36:22 +0000 (09:36 -0700)
committerSebastian Pipping <sebastian@pipping.org>
Thu, 20 Sep 2018 19:24:17 +0000 (21:24 +0200)
memmove is specified since POSIX.1-2001 and C89, and bcopy is deprecated.

expat/ConfigureChecks.cmake
expat/configure.ac
expat/expat_config.h.cmake
expat/lib/winconfig.h
expat/lib/xmlparse.c

index 818d2492d2cb18705fbf321cac49df806de4974a..1e245da016b979388062c940552846dce8ab6473 100644 (file)
@@ -18,8 +18,6 @@ check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
 check_include_file("unistd.h" HAVE_UNISTD_H)\r
 \r
 check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)\r
-check_symbol_exists("bcopy" "strings.h" HAVE_BCOPY)\r
-check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)\r
 check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)\r
 check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)\r
 \r
index 12f66422c28f948c8c52ee2b8601eb097a03f616..07b170d2286c4406b5cec7b42bac359e5a7404f1 100644 (file)
@@ -106,8 +106,6 @@ AC_C_BIGENDIAN_CROSS
 
 AC_C_CONST
 AC_TYPE_SIZE_T
-AC_CHECK_FUNCS(memmove bcopy)
-
 
 AC_ARG_WITH([xmlwf], [
 AS_HELP_STRING([--without-xmlwf], [do not build xmlwf])], [], [with_xmlwf=yes])
index 3e23f4873fda40129b3f21df86521150ecab0fbb..f1f51440a937652f49f6dfd62fbd47f34eae013e 100644 (file)
@@ -9,9 +9,6 @@
 /* Define to 1 if you have the `arc4random_buf' function. */\r
 #cmakedefine HAVE_ARC4RANDOM_BUF\r
 \r
-/* Define to 1 if you have the `bcopy' function. */\r
-#cmakedefine HAVE_BCOPY\r
-\r
 /* Define to 1 if you have the <dlfcn.h> header file. */\r
 #cmakedefine HAVE_DLFCN_H\r
 \r
@@ -30,9 +27,6 @@
 /* Define to 1 if you have the `bsd' library (-lbsd). */\r
 #cmakedefine HAVE_LIBBSD\r
 \r
-/* Define to 1 if you have the `memmove' function. */\r
-#cmakedefine HAVE_MEMMOVE\r
-\r
 /* Define to 1 if you have the <memory.h> header file. */\r
 #cmakedefine HAVE_MEMORY_H\r
 \r
index 17fea4689001f4daaf9523ffb657c706ba1e329c..28a043c6044ca4b1f88d356b49de632dace6ce2a 100644 (file)
 /* we will assume all Windows platforms are little endian */
 #define BYTEORDER 1234
 
-/* Windows has memmove() available. */
-#define HAVE_MEMMOVE
-
-
 #endif /* !defined(HAVE_EXPAT_CONFIG_H) */
 
 
index c4f3ffc215c9ef9b3f385a9fc6e3199236e99b5a..eaefb6f4763496a1f0ad83c80a3aa6ad8a5b9e05 100644 (file)
@@ -164,15 +164,6 @@ typedef char ICHAR;
 /* Do safe (NULL-aware) pointer arithmetic */
 #define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
 
-/* Handle the case where memmove() doesn't exist. */
-#ifndef HAVE_MEMMOVE
-#ifdef HAVE_BCOPY
-#define memmove(d,s,l) bcopy((s),(d),(l))
-#else
-#error memmove does not exist on this platform, nor is a substitute available
-#endif /* HAVE_BCOPY */
-#endif /* HAVE_MEMMOVE */
-
 #include "internal.h"
 #include "xmltok.h"
 #include "xmlrole.h"