From: Jarkko Hietaniemi Date: Fri, 23 Nov 2001 18:31:13 +0000 (+0000) Subject: Add probing for BSD-like /proc/curproc/file. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f24dbf840a7182a9da07820ccca23bd6e2a4550e;p=p5sagit%2Fp5-mst-13.2.git Add probing for BSD-like /proc/curproc/file. p4raw-id: //depot/perl@13213 --- diff --git a/Configure b/Configure index 87ba29c..a3246da 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Fri Nov 23 21:08:41 EET 2001 [metaconfig 3.0 PL70] +# Generated on Fri Nov 23 21:31:36 EET 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 +procselfexe='' val="$undef" case "$d_readlink" in "$define") if $issymlink /proc/self/exe ; then $ls -l /proc/self/exe > reflect if $contains /`basename $ls` reflect >/dev/null 2>&1; then - val="$define" echo "You have Linux-like /proc/self/exe." + procselfexe=/proc/self/exe + val="$define" + break + fi + fi + if $issymlink /proc/curproc/file ; then + $ls -l /proc/curproc/file > reflect + if $contains /`basename $ls` reflect >/dev/null 2>&1; then + echo "You have BSD-like /proc/curproc/file." + procselfexe=/proc/curproc/file + val="$define" + break fi - $rm reflect fi ;; esac +$rm reflect set d_procselfexe eval $setvar @@ -17453,6 +17465,7 @@ prefix='$prefix' prefixexp='$prefixexp' privlib='$privlib' privlibexp='$privlibexp' +procselfexe='$procselfexe' prototype='$prototype' ptrsize='$ptrsize' quadkind='$quadkind' diff --git a/config_h.SH b/config_h.SH index 381d258..bc2f6b4 100644 --- a/config_h.SH +++ b/config_h.SH @@ -3524,10 +3524,13 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_nl_langinfo HAS_NL_LANGINFO /**/ /* HAS_PROCSELFEXE: - * This symbol is defined if /proc/self/exe is a symlink - * to the executing program. + * This symbol is defined if PROCSELFEXE_PATH is a symlink + * to the absolute pathname of the executing program. */ #$d_procselfexe HAS_PROCSELFEXE /**/ +#if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH) +#define PROCSELFEXE_PATH $procselfexe /**/ +#endif /* HAS_SIGPROCMASK: * This symbol, if defined, indicates that the sigprocmask