diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-14 23:40:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-14 23:40:45 +0200 |
commit | a9f8ee05f46f2d6621a3719cd15150155d33eed4 (patch) | |
tree | ced769a1f4240f0d5ecebcd76441cdaa22b802d9 /src | |
parent | 60104f183cc639d2a5295ba157d4ec66ac19fa53 (diff) |
patch 8.0.0946: using PATH_MAX does not work well on some systemsv8.0.0946
Problem: Using PATH_MAX does not work well on some systems.
Solution: use MAXPATHL instead. (James McCoy, closes #1973)
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 4b787a334b..c6b103e5e9 100644 --- a/src/main.c +++ b/src/main.c @@ -2473,10 +2473,10 @@ scripterror: */ if (vim_strpbrk(p, "\\:") != NULL && !path_with_url(p)) { - char posix_path[PATH_MAX]; + char posix_path[MAXPATHL]; # if CYGWIN_VERSION_DLL_MAJOR >= 1007 - cygwin_conv_path(CCP_WIN_A_TO_POSIX, p, posix_path, PATH_MAX); + cygwin_conv_path(CCP_WIN_A_TO_POSIX, p, posix_path, MAXPATHL); # else cygwin_conv_to_posix_path(p, posix_path); # endif @@ -3598,10 +3598,10 @@ set_progpath(char_u *argv0) char_u *val = argv0; # ifdef PROC_EXE_LINK - char buf[PATH_MAX + 1]; + char buf[MAXPATHL + 1]; ssize_t len; - len = readlink(PROC_EXE_LINK, buf, PATH_MAX); + len = readlink(PROC_EXE_LINK, buf, MAXPATHL); if (len > 0) { buf[len] = NUL; diff --git a/src/version.c b/src/version.c index d616e2567f..f3e5a3ad35 100644 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 946, +/**/ 945, /**/ 944, |