summaryrefslogtreecommitdiffstats
path: root/src/os_unix.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-26 21:36:34 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-26 21:36:34 +0100
commit52c0de1de196120976fef82cbbaaeafbedd9c62f (patch)
tree65c1c343ccaa03c1674fde48c9bde5fc069690f1 /src/os_unix.h
parent4f7090b93d9b2c2e1724466a2e069e97a5e91808 (diff)
patch 8.0.0241: fallback implementation of mch_memmove is unusedv8.0.0241
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)
Diffstat (limited to 'src/os_unix.h')
-rw-r--r--src/os_unix.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/os_unix.h b/src/os_unix.h
index d28aa4dde4..695affaea9 100644
--- 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