Patch 8.0.0109
Problem: Still checking if memcmp() exists while every system should have
it now.
Solution: Remove vim_memcmp(). (James McCoy, closes #1295)
Files: src/config.h.in, src/configure.ac, src/misc2.c, src/os_vms_conf.h,
src/osdef1.h.in, src/search.c, src/tag.c, src/vim.h
*** ../vim-8.0.0108/src/config.h.in 2016-11-12 21:12:48.538182233 +0100
--- src/config.h.in 2016-12-01 17:08:35.738390168 +0100
***************
*** 154,160 ****
#undef BAD_GETCWD
/* Define if you the function: */
- #undef HAVE_BCMP
#undef HAVE_FCHDIR
#undef HAVE_FCHOWN
#undef HAVE_FSEEKO
--- 154,159 ----
***************
*** 170,176 ****
#undef HAVE_ICONV
#undef HAVE_NL_LANGINFO_CODESET
#undef HAVE_LSTAT
- #undef HAVE_MEMCMP
#undef HAVE_MEMSET
#undef HAVE_MKDTEMP
#undef HAVE_NANOSLEEP
--- 169,174 ----
*** ../vim-8.0.0108/src/configure.ac 2016-11-12 21:12:48.534182259 +0100
--- src/configure.ac 2016-12-01 17:08:35.742390142 +0100
***************
*** 3594,3601 ****
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 \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
--- 3594,3601 ----
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(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 \
*** ../vim-8.0.0108/src/misc2.c 2016-11-26 15:13:29.410218034 +0100
--- src/misc2.c 2016-12-01 17:08:35.742390142 +0100
***************
*** 1740,1766 ****
}
#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
/*
--- 1740,1745 ----
*** ../vim-8.0.0108/src/os_vms_conf.h 2016-11-04 20:35:27.352945991 +0100
--- src/os_vms_conf.h 2016-12-01 17:08:35.742390142 +0100
***************
*** 101,107 ****
#define HAVE_STRTOL
#define HAVE_TGETENT
#define HAVE_MEMSET
- #define HAVE_MEMCMP
#define HAVE_STRERROR
#define HAVE_FCHOWN
#define HAVE_RENAME
--- 101,106 ----
*** ../vim-8.0.0108/src/osdef1.h.in 2016-01-23 22:35:31.000000000 +0100
--- src/osdef1.h.in 2016-12-01 17:08:35.742390142 +0100
***************
*** 50,61 ****
#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
--- 50,56 ----
*** ../vim-8.0.0108/src/search.c 2016-10-15 17:06:42.090912729 +0200
--- src/search.c 2016-12-01 17:10:38.673588854 +0100
***************
*** 1695,1701 ****
}
else
{
! if (vim_memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 &&
stop)
break;
}
stop = TRUE;
--- 1695,1702 ----
}
else
{
! if (memcmp(p + col, lastc_bytes, lastc_bytelen) == 0
! && stop)
break;
}
stop = TRUE;
*** ../vim-8.0.0108/src/tag.c 2016-10-15 17:06:42.090912729 +0200
--- src/tag.c 2016-12-01 17:08:35.742390142 +0100
***************
*** 2400,2406 ****
mfp2 = ((struct match_found **)
(ga_match[mtt].ga_data))[i];
if (mfp2->len == mfp->len
! && vim_memcmp(mfp2->match, mfp->match,
(size_t)mfp->len) == 0)
break;
fast_breakcheck();
--- 2400,2406 ----
mfp2 = ((struct match_found **)
(ga_match[mtt].ga_data))[i];
if (mfp2->len == mfp->len
! && memcmp(mfp2->match, mfp->match,
(size_t)mfp->len) == 0)
break;
fast_breakcheck();
*** ../vim-8.0.0108/src/vim.h 2016-11-24 17:33:12.430669286 +0100
--- src/vim.h 2016-12-01 17:08:35.742390142 +0100
***************
*** 1733,1749 ****
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
--- 1733,1738 ----
*** ../vim-8.0.0108/src/version.c 2016-12-01 16:41:47.296864891 +0100
--- src/version.c 2016-12-01 17:09:45.649934472 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 109,
/**/
--
I got a new desk stapler. It broke on the first desk I tried.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.