mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.0.0946: using PATH_MAX does not work well on some systems
Problem: Using PATH_MAX does not work well on some systems. Solution: use MAXPATHL instead. (James McCoy, closes #1973)
This commit is contained in:
@@ -2473,10 +2473,10 @@ scripterror:
|
|||||||
*/
|
*/
|
||||||
if (vim_strpbrk(p, "\\:") != NULL && !path_with_url(p))
|
if (vim_strpbrk(p, "\\:") != NULL && !path_with_url(p))
|
||||||
{
|
{
|
||||||
char posix_path[PATH_MAX];
|
char posix_path[MAXPATHL];
|
||||||
|
|
||||||
# if CYGWIN_VERSION_DLL_MAJOR >= 1007
|
# 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
|
# else
|
||||||
cygwin_conv_to_posix_path(p, posix_path);
|
cygwin_conv_to_posix_path(p, posix_path);
|
||||||
# endif
|
# endif
|
||||||
@@ -3598,10 +3598,10 @@ set_progpath(char_u *argv0)
|
|||||||
char_u *val = argv0;
|
char_u *val = argv0;
|
||||||
|
|
||||||
# ifdef PROC_EXE_LINK
|
# ifdef PROC_EXE_LINK
|
||||||
char buf[PATH_MAX + 1];
|
char buf[MAXPATHL + 1];
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
|
|
||||||
len = readlink(PROC_EXE_LINK, buf, PATH_MAX);
|
len = readlink(PROC_EXE_LINK, buf, MAXPATHL);
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
buf[len] = NUL;
|
buf[len] = NUL;
|
||||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
946,
|
||||||
/**/
|
/**/
|
||||||
945,
|
945,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user