summaryrefslogtreecommitdiff
path: root/uconfig.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-21 14:32:58 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-27 22:23:10 +0200
commit2982a345b7a1edb63720282eef0fba5c61d0e6b5 (patch)
tree8fffd4f1ff976c438b5e9028adba2364cca3b07d /uconfig.h
parent2480ae1c1b2fa11085b45f96de55cb16c3bcc343 (diff)
downloadperl-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 'uconfig.h')
-rw-r--r--uconfig.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/uconfig.h b/uconfig.h
index 1013423664..c5f19f7e08 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -2656,6 +2656,13 @@
*/
/*#define EBCDIC / **/
+/* USE_KERN_PROC_PATHNAME:
+ * This symbol, if defined, 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.
+ */
+/*#define USE_KERN_PROC_PATHNAME / **/
+
/* Fpos_t:
* This symbol holds the type used to declare file positions in libc.
* It can be fpos_t, long, uint, etc... It may be necessary to include
@@ -4704,6 +4711,6 @@
#endif
/* Generated from:
- * 5c3a0864433ad4da7f3248b108cf8e17c19bd4d71799cd56b6c2a73bb647561a config_h.SH
- * e5d6d7ffdf6717946996c0807aa7a247b46adf41f2d98c62cdd7c1bb8ffe19f2 uconfig.sh
+ * e6513dfa5f1449ab9266aee521d6d5908873d1dc68bf4f049316ebc4921732e1 config_h.SH
+ * e940950d07a2be0354d6ae7e4316ec8465ed581607bbb958d8bfda024b9941fe uconfig.sh
* ex: set ro: */