diff options
-rwxr-xr-x | Configure | 24 | ||||
-rw-r--r-- | Cross/config.sh-arm-linux | 1 | ||||
-rw-r--r-- | NetWare/config.wc | 1 | ||||
-rw-r--r-- | Porting/Glossary | 3 | ||||
-rw-r--r-- | Porting/config.sh | 1 | ||||
-rwxr-xr-x | config_h.SH | 6 | ||||
-rw-r--r-- | configure.com | 1 | ||||
-rw-r--r-- | plan9/config_sh.sample | 1 | ||||
-rw-r--r-- | symbian/config.sh | 1 | ||||
-rw-r--r-- | uconfig.h | 6 | ||||
-rw-r--r-- | uconfig.sh | 1 | ||||
-rw-r--r-- | uconfig64.sh | 1 | ||||
-rw-r--r-- | win32/config.ce | 1 | ||||
-rw-r--r-- | win32/config.gc | 1 | ||||
-rw-r--r-- | win32/config.vc | 1 |
15 files changed, 50 insertions, 0 deletions
@@ -937,6 +937,7 @@ d_wcstombs='' d_wcsxfrm='' d_wctomb='' d_writev='' +default_inc_excludes_dot='' dlext='' bin_ELF='' cccdlflags='' @@ -20625,6 +20626,28 @@ EOCP ;; esac +: Include . in @INC +$cat <<EOM + +Historically Perl has provided a final fallback of the current working +directory '.' when searching for a library. This, however, can lead to +problems when a Perl program which loads optional modules is called from +a shared directory. This can lead to executing unexpected code. + +EOM + +case "$default_inc_excludes_dot" in + $define|true|[yY]*) dflt="n" ;; + *) dflt='y' ;; +esac + +rp='Provide '.' in @INC by default? ' +. ./myread +case "$ans" in + [nN]*|define) default_inc_excludes_dot="$define" ;; + *) default_inc_excludes_dot="$undef" ;; +esac + : Check what kind of inf/nan your system has $echo "Checking the kind of infinities and nans you have..." >&4 $echo "(The following tests may crash. That's okay.)" >&4 @@ -24913,6 +24936,7 @@ db_prefixtype='$db_prefixtype' db_version_major='$db_version_major' db_version_minor='$db_version_minor' db_version_patch='$db_version_patch' +default_inc_excludes_dot='$default_inc_excludes_dot' direntrytype='$direntrytype' dlext='$dlext' dlsrc='$dlsrc' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 2626400cdb..a20d723879 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -637,6 +637,7 @@ db_prefixtype='size_t' db_version_major='' db_version_minor='' db_version_patch='' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='so' dlsrc='dl_dlopen.xs' diff --git a/NetWare/config.wc b/NetWare/config.wc index 176a86592e..8535885611 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -628,6 +628,7 @@ db_version_minor='0' db_version_patch='0' def_perlroot='sys:\perl\scripts' def_temp='sys:\perl\temp' +default_inc_excludes_dot='' direntrytype='DIR' dlext='nlm' dlsrc='dl_netware.xs' diff --git a/Porting/Glossary b/Porting/Glossary index 522d3562ef..1d2a6ea988 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -2959,6 +2959,9 @@ db_version_patch (i_db.U): Berkeley DB found in the <db.h> header file. For DB version 1 this is always 0. +default_inc_excludes_dot (defaultincdot.U): + When defined, remove the legacy '.' from @INC + direntrytype (i_dirent.U): This symbol is set to 'struct direct' or 'struct dirent' depending on whether dirent is available or not. You should use this pseudo type to diff --git a/Porting/config.sh b/Porting/config.sh index ff6a5fe3ee..c9aa2c2f1f 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -650,6 +650,7 @@ db_prefixtype='int' db_version_major='1' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='bundle' dlsrc='dl_dlopen.xs' diff --git a/config_h.SH b/config_h.SH index c722657e2e..e9b144f02b 100755 --- a/config_h.SH +++ b/config_h.SH @@ -3736,6 +3736,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_writev HAS_WRITEV /**/ +/* DEFAULT_INC_EXCLUDES_DOT: + * This symbol, if defined, removes the legacy default behavior of + * including '.' at the end of @INC. + */ +#$default_inc_excludes_dot DEFAULT_INC_EXCLUDES_DOT /**/ + /* USE_DYNAMIC_LOADING: * This symbol, if defined, indicates that dynamic loading of * some sort is available. diff --git a/configure.com b/configure.com index 888d2d08f9..090d2efc8b 100644 --- a/configure.com +++ b/configure.com @@ -6452,6 +6452,7 @@ $ WC "db_version_minor='" + "'" $ WC "db_version_patch='" + "'" $ WC "dbgprefix='" + dbgprefix + "'" $ WC "devtype='" + devtype + "'" +$ WC "default_inc_excludes_dot=''" $ WC "direntrytype='struct dirent'" $ WC "dlext='" + dlext + "'" $ WC "dlobj='" + dlobj + "'" diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 9851e22de4..e7078a0313 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -636,6 +636,7 @@ db_prefixtype='size_t' db_version_major='' db_version_minor='' db_version_patch='' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='none' dlsrc='dl_none.xs' diff --git a/symbian/config.sh b/symbian/config.sh index 1c08bd3989..e6ca7fb2c6 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -583,6 +583,7 @@ db_prefixtype='size_t' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='dll' dlsrc='dl_symbian.xs' @@ -3701,6 +3701,12 @@ */ /*#define HAS_WRITEV / **/ +/* DEFAULT_INC_EXCLUDES_DOT: + * This symbol, if defined, removes the legacy default behavior of + * including '.' at the end of @INC. + */ +# DEFAULT_INC_EXCLUDES_DOT /**/ + /* USE_DYNAMIC_LOADING: * This symbol, if defined, indicates that dynamic loading of * some sort is available. diff --git a/uconfig.sh b/uconfig.sh index 3174bba1eb..a7b2615b2f 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -574,6 +574,7 @@ db_prefixtype='size_t' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f' doublekind='3' diff --git a/uconfig64.sh b/uconfig64.sh index 1eb7eac170..27d4a180a8 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -575,6 +575,7 @@ db_prefixtype='size_t' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f' doublekind='3' diff --git a/win32/config.ce b/win32/config.ce index 47042d88c2..3005086aef 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -624,6 +624,7 @@ db_prefixtype='int' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct direct' dlext='dll' dlsrc='dl_win32.xs' diff --git a/win32/config.gc b/win32/config.gc index 34b670e000..b726e7d3d9 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -625,6 +625,7 @@ db_prefixtype='int' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct direct' dlext='dll' dlltool='~ARCHPREFIX~dlltool' diff --git a/win32/config.vc b/win32/config.vc index cfac6e7ca2..5731b88dde 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -625,6 +625,7 @@ db_prefixtype='int' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct direct' dlext='dll' dlsrc='dl_win32.xs' |