comparison 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
comparison
equal deleted inserted replaced
10701:fe97b963559c 10702:24a1fbd78b76
421 # ifndef DFLT_MAXMEMTOT 421 # ifndef DFLT_MAXMEMTOT
422 # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ 422 # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */
423 # endif 423 # endif
424 #endif 424 #endif
425 425
426 /* memmove is not present on all systems, use memmove, bcopy, memcpy or our 426 /* memmove() is not present on all systems, use memmove, bcopy or memcpy.
427 * own version */ 427 * Some systems have (void *) arguments, some (char *). If we use (char *) it
428 /* Some systems have (void *) arguments, some (char *). If we use (char *) it
429 * works for all */ 428 * works for all */
430 #ifdef USEMEMMOVE 429 #if defined(USEMEMMOVE) || (!defined(USEBCOPY) && !defined(USEMEMCPY))
431 # define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) 430 # define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len)
432 #else 431 #else
433 # ifdef USEBCOPY 432 # ifdef USEBCOPY
434 # define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len) 433 # define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len)
435 # else 434 # else
436 # ifdef USEMEMCPY 435 /* ifdef USEMEMCPY */
437 # define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len) 436 # define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len)
438 # else
439 # define VIM_MEMMOVE /* found in misc2.c */
440 # endif
441 # endif 437 # endif
442 #endif 438 #endif
443 439
444 #ifndef PROTO 440 #ifndef PROTO
445 # ifdef HAVE_RENAME 441 # ifdef HAVE_RENAME