File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 446446/* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */
447447#undef HAVE_FD_CLOEXEC
448448
449+ /* Define if /proc/self/exe can be read */
450+ #undef HAVE_PROC_SELF_EXE
451+
449452/* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
450453#undef FEAT_CYGWIN_WIN32_CLIPBOARD
451454
Original file line number Diff line number Diff line change @@ -3539,16 +3539,27 @@ set_progpath(char_u *argv0)
35393539{
35403540 char_u * val = argv0 ;
35413541
3542+ # ifdef HAVE_PROC_SELF_EXE
3543+ char buf [PATH_MAX + 1 ];
3544+ ssize_t len ;
3545+
3546+ len = readlink ("/proc/self/exe" , buf , PATH_MAX );
3547+ if (len > 0 )
3548+ {
3549+ buf [len ] = NUL ;
3550+ val = (char_u * )buf ;
3551+ }
3552+ # else
35423553 /* A relative path containing a "/" will become invalid when using ":cd",
35433554 * turn it into a full path.
35443555 * On MS-Windows "vim" should be expanded to "vim.exe", thus always do
35453556 * this. */
3546- # ifdef WIN32
3557+ # ifdef WIN32
35473558 char_u * path = NULL ;
35483559
35493560 if (mch_can_exe (argv0 , & path , FALSE) && path != NULL )
35503561 val = path ;
3551- # else
3562+ # else
35523563 char_u buf [MAXPATHL ];
35533564
35543565 if (!mch_isFullName (argv0 ))
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 450 ,
767769/**/
768770 449 ,
769771/**/
You can’t perform that action at this time.
0 commit comments