diff options
-rw-r--r-- | src/config.h.in | 2 | ||||
-rw-r--r-- | src/configure.ac | 4 | ||||
-rw-r--r-- | src/misc2.c | 21 | ||||
-rw-r--r-- | src/os_vms_conf.h | 1 | ||||
-rw-r--r-- | src/osdef1.h.in | 5 | ||||
-rw-r--r-- | src/search.c | 3 | ||||
-rw-r--r-- | src/tag.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 11 |
9 files changed, 7 insertions, 44 deletions
diff --git a/src/config.h.in b/src/config.h.in index 5baac7d6b..38b0ccf53 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -154,7 +154,6 @@ #undef BAD_GETCWD /* Define if you the function: */ -#undef HAVE_BCMP #undef HAVE_FCHDIR #undef HAVE_FCHOWN #undef HAVE_FSEEKO @@ -170,7 +169,6 @@ #undef HAVE_ICONV #undef HAVE_NL_LANGINFO_CODESET #undef HAVE_LSTAT -#undef HAVE_MEMCMP #undef HAVE_MEMSET #undef HAVE_MKDTEMP #undef HAVE_NANOSLEEP diff --git a/src/configure.ac b/src/configure.ac index f6a44691f..3a31f97bf 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -3594,8 +3594,8 @@ fi dnl Check for functions in one big call, to reduce the size of configure. dnl Can only be used for functions that do not require any include. -AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \ - getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +AC_CHECK_FUNCS(fchdir fchown fsync getcwd getpseudotty \ + getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ diff --git a/src/misc2.c b/src/misc2.c index 7f23c43e9..baa614db1 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1740,27 +1740,6 @@ vim_memset(void *ptr, int c, size_t size) } #endif -#ifdef VIM_MEMCMP -/* - * Return zero when "b1" and "b2" are the same for "len" bytes. - * Return non-zero otherwise. - */ - int -vim_memcmp(void *b1, void *b2, size_t len) -{ - char_u *p1 = (char_u *)b1, *p2 = (char_u *)b2; - - for ( ; len > 0; --len) - { - if (*p1 != *p2) - return 1; - ++p1; - ++p2; - } - return 0; -} -#endif - /* skipped when generating prototypes, the prototype is in vim.h */ #ifdef VIM_MEMMOVE /* diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h index 5c110f206..9aa7526e7 100644 --- a/src/os_vms_conf.h +++ b/src/os_vms_conf.h @@ -101,7 +101,6 @@ #define HAVE_STRTOL #define HAVE_TGETENT #define HAVE_MEMSET -#define HAVE_MEMCMP #define HAVE_STRERROR #define HAVE_FCHOWN #define HAVE_RENAME diff --git a/src/osdef1.h.in b/src/osdef1.h.in index a11e6ea50..5519104c9 100644 --- a/src/osdef1.h.in +++ b/src/osdef1.h.in @@ -50,12 +50,7 @@ extern int poll(struct pollfd *, long, int); #ifdef HAVE_MEMSET extern void *memset(void *, int, size_t); #endif -#ifdef HAVE_BCMP -extern int bcmp(void *, void *, size_t); -#endif -#ifdef HAVE_MEMCMP extern int memcmp(const void *, const void *, size_t); -#endif #ifdef HAVE_STRPBRK extern char *strpbrk(const char *, const char *); #endif diff --git a/src/search.c b/src/search.c index cedcad9eb..36410e50f 100644 --- a/src/search.c +++ b/src/search.c @@ -1695,7 +1695,8 @@ searchc(cmdarg_T *cap, int t_cmd) } else { - if (vim_memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 && stop) + if (memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 + && stop) break; } stop = TRUE; @@ -2400,7 +2400,7 @@ parse_line: mfp2 = ((struct match_found **) (ga_match[mtt].ga_data))[i]; if (mfp2->len == mfp->len - && vim_memcmp(mfp2->match, mfp->match, + && memcmp(mfp2->match, mfp->match, (size_t)mfp->len) == 0) break; fast_breakcheck(); diff --git a/src/version.c b/src/version.c index c4977dea7..e234f86ab 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 109, +/**/ 108, /**/ 107, @@ -1733,17 +1733,6 @@ void mch_memmove(void *, void *, size_t); void *vim_memset(void *, int, size_t); #endif -#ifdef HAVE_MEMCMP -# define vim_memcmp(p1, p2, len) memcmp((p1), (p2), (len)) -#else -# ifdef HAVE_BCMP -# define vim_memcmp(p1, p2, len) bcmp((p1), (p2), (len)) -# else -int vim_memcmp(void *, void *, size_t); -# define VIM_MEMCMP -# endif -#endif - #if defined(UNIX) || defined(FEAT_GUI) || defined(VMS) \ || defined(FEAT_CLIENTSERVER) # define USE_INPUT_BUF |