diff src/os_unix.h @ 10702:24a1fbd78b76 v8.0.0241

patch 8.0.0241: fallback implementation of mch_memmove is unused commit https://github.com/vim/vim/commit/52c0de1de196120976fef82cbbaaeafbedd9c62f Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 26 21:36:34 2017 +0100 patch 8.0.0241: fallback implementation of mch_memmove is unused Problem: Vim defines a mch_memmove() function but it doesn't work, thus is always unused. Solution: Remove the mch_memmove implementation. (suggested by Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Thu, 26 Jan 2017 21:45:04 +0100
parents 299f1669c20e
children 65c29bd4548b
line wrap: on
line diff
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -423,21 +423,17 @@ typedef struct dsc$descriptor   DESC;
 # endif
 #endif
 
-/* memmove is not present on all systems, use memmove, bcopy, memcpy or our
- * own version */
-/* Some systems have (void *) arguments, some (char *). If we use (char *) it
+/* memmove() is not present on all systems, use memmove, bcopy or memcpy.
+ * Some systems have (void *) arguments, some (char *). If we use (char *) it
  * works for all */
-#ifdef USEMEMMOVE
+#if defined(USEMEMMOVE) || (!defined(USEBCOPY) && !defined(USEMEMCPY))
 # define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len)
 #else
 # ifdef USEBCOPY
 #  define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len)
 # else
-#  ifdef USEMEMCPY
+    /* ifdef USEMEMCPY */
 #   define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len)
-#  else
-#   define VIM_MEMMOVE	    /* found in misc2.c */
-#  endif
 # endif
 #endif