From: Vladimír Marek Date: Sun, 21 Jun 2026 14:58:30 +0000 (+0000) Subject: patch 9.2.0690: Solaris: swap file names are too long X-Git-Tag: v9.2.0690^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2196f85009201bf547db330537585a38968262a;p=thirdparty%2Fvim.git patch 9.2.0690: Solaris: swap file names are too long Problem: Solaris: dirent.h exposes MAXNAMLEN as 512, but the usable file name component limit is 255 (defined in param.h). Vim derives BASENAMELEN for generated swap file names from MAXNAMLEN, so it creates overlong components and fails to rename the swap file with ENAMETOOLONG (Vladimír Marek). Solution: Override MAXNAMLEN to the effective Solaris component limit of 255 for swap file name generation. closes: #20573 Signed-off-by: Vladimír Marek Signed-off-by: Christian Brabandt --- diff --git a/src/os_unix.h b/src/os_unix.h index a507392277..476c9c21c3 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -122,6 +122,11 @@ typedef void (*sighandler_T) SIGPROTOARG; # define MAXNAMLEN NAME_MAX // for Linux before .99p3 #endif +#if defined(__sun) +# undef MAXNAMLEN +# define MAXNAMLEN 255 +#endif + /* * Note: if MAXNAMLEN has the wrong value, you will get error messages * for not being able to open the swap file. diff --git a/src/version.c b/src/version.c index eb88baacac..745f523abe 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 690, /**/ 689, /**/