Permalink
Browse files

Teach Configure about "procselfexe" on Solaris and NetBSD

Configure would already find /proc/self/exe on NetBSD, where /proc/self is
a symlink to /proc/curproc. However, the revised probe avoids the extra
symlink traversal. Configure did not previously probe for the
relevant path on Solaris, /proc/self/path/a.out

Rename the description of /proc/curproc/file from BSD to FreeBSD, as it seems
that of the "big 3" BSDs, only FreeBSD uses this path.

Based on a patch from Johann 'Myrkraverk' Oskarsson.
  • Loading branch information...
1 parent 698ca84 commit 9e68546f79174957f317b4b7abcf8be457602a6d Nicholas Clark committed Sep 27, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 Configure
View
@@ -16048,7 +16048,9 @@ procselfexe=''
val="$undef"
case "$d_readlink" in
"$define")
- set Linux /proc/self/exe BSD /proc/curproc/file
+ : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
+ : more tidy to avoid an extra level of symlink
+ set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
while test $# -gt 0; do
type=$1; try=$2
shift; shift

0 comments on commit 9e68546

Please sign in to comment.