diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-09-21 14:32:58 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-27 22:23:10 +0200 |
commit | 2982a345b7a1edb63720282eef0fba5c61d0e6b5 (patch) | |
tree | 8fffd4f1ff976c438b5e9028adba2364cca3b07d /Porting | |
parent | 2480ae1c1b2fa11085b45f96de55cb16c3bcc343 (diff) | |
download | perl-2982a345b7a1edb63720282eef0fba5c61d0e6b5.tar.gz |
Where available, use sysctl() with KERN_PROC_PATHNAME to make $^X absolute.
In Configure, check whether sysctl() and KERN_PROC_PATHNAME can be used
to find the absolute pathname of the executable. If so, set
usekernprocpathname in config.sh and USE_KERN_PROC_PATHNAME in config.h.
If this is set, then use this approach in S_set_caret_X() to canonicalise
$^X as an absolute path. This approach works on (at least) FreeBSD, and
doesn't rely on the /proc filesystem existing, or /proc/curproc/file being
present.
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/Glossary | 5 | ||||
-rw-r--r-- | Porting/config.sh | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Porting/Glossary b/Porting/Glossary index ceed6a5e58..1ed4ef87cb 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -5015,6 +5015,11 @@ useithreads (usethreads.U): and indicates that Perl should be built to use the interpreter-based threading implementation. +usekernprocpathname (usekernprocpathname.U) + This variable, indicates that we can use sysctl with + KERN_PROC_PATHNAME to get a full path for the executable, and hence + convert $^X to an absolute path. + uselargefiles (uselfs.U): This variable conditionally defines the USE_LARGE_FILES symbol, and indicates that large file interfaces should be used when diff --git a/Porting/config.sh b/Porting/config.sh index 2c7c2aa8ac..9244924dbd 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -1046,6 +1046,7 @@ usedl='define' usedtrace='undef' usefaststdio='undef' useithreads='undef' +usekernprocpathname='undef' uselargefiles='define' uselongdouble='undef' usemallocwrap='define' |