mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.0464: can't find executable name on Solaris and FreeBSD
Problem: Can't find executable name on Solaris and FreeBSD. Solution: Check for "/proc/self/path/a.out". (Danek Duvall) And for "/proc/curproc/file".
This commit is contained in:
@@ -3539,11 +3539,11 @@ set_progpath(char_u *argv0)
|
||||
{
|
||||
char_u *val = argv0;
|
||||
|
||||
# ifdef HAVE_PROC_SELF_EXE
|
||||
# ifdef PROC_EXE_LINK
|
||||
char buf[PATH_MAX + 1];
|
||||
ssize_t len;
|
||||
|
||||
len = readlink("/proc/self/exe", buf, PATH_MAX);
|
||||
len = readlink(PROC_EXE_LINK, buf, PATH_MAX);
|
||||
if (len > 0)
|
||||
{
|
||||
buf[len] = NUL;
|
||||
|
Reference in New Issue
Block a user