Add another approach to FC_PRGNAME for Solaris 10 or before
Patch from Raimund Steger
This commit is contained in:
parent
000ca9ccb0
commit
5400bb4fb4
|
@ -141,7 +141,7 @@ AC_TYPE_PID_T
|
|||
# Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MMAP
|
||||
AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s getopt getopt_long getprogname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
|
||||
AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
|
||||
|
||||
dnl AC_CHECK_FUNCS doesn't check for header files.
|
||||
dnl posix_fadvise() may be not available in older libc.
|
||||
|
|
|
@ -147,6 +147,9 @@ retry:
|
|||
else
|
||||
prgname = FcStrdup ("");
|
||||
#else
|
||||
# if defined (HAVE_GETEXECNAME)
|
||||
const char *p = getexecname ();
|
||||
# else
|
||||
char buf[PATH_MAX + 1];
|
||||
int len;
|
||||
char *p = NULL;
|
||||
|
@ -157,7 +160,7 @@ retry:
|
|||
buf[len] = '\0';
|
||||
p = buf;
|
||||
}
|
||||
|
||||
# endif
|
||||
if (p)
|
||||
{
|
||||
char *r = strrchr (p, '/');
|
||||
|
|
Loading…
Reference in New Issue