]> granicus.if.org Git - vim/commitdiff
patch 8.0.0946: using PATH_MAX does not work well on some systems v8.0.0946
authorBram Moolenaar <Bram@vim.org>
Mon, 14 Aug 2017 21:40:45 +0000 (23:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 14 Aug 2017 21:40:45 +0000 (23:40 +0200)
Problem:    Using PATH_MAX does not work well on some systems.
Solution:   use MAXPATHL instead. (James McCoy, closes #1973)

src/main.c
src/version.c

index 4b787a334ba7efc46961a562a56b43106eb5dfe9..c6b103e5e9195caf043442a59ad41356e40ff0b6 100644 (file)
@@ -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;
index d616e2567f91126d8957fdc3fe70a6a9bb4f2099..f3e5a3ad3507a8e91dcdda384a95b8f7306dcf68 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    946,
 /**/
     945,
 /**/