Push current state to work on failing tests
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 11 Nov 2016 15:39:03 +0000 (16:39 +0100)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 11 Nov 2016 15:39:03 +0000 (16:39 +0100)
Configure
metaconfig.h
perl.c
uconfig.h

index 84a34bf..592cc0d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20636,16 +20636,22 @@ a shared directory. This can lead to executing unexpected code.
 
 EOM
 
+# When changing to exclude by default:
+#case "$default_inc_excludes_dot" in
+#    $undef|false|[nN]*) dflt="n" ;;
+#    *)                  dflt="y" ;;
+#esac
+# For now:
 case "$default_inc_excludes_dot" in
-    $define|true|[yY]*) dflt="n" ;;
-    *)                  dflt='y' ;;
+    $define|true|[yY]*) dflt="y" ;;
+    *)                  dflt="n" ;;
 esac
 
-rp='Provide '.' in @INC by default? '
+rp='Exclude '.' from @INC by default? '
 . ./myread
 case "$ans" in
-    [nN]*|define) default_inc_excludes_dot="$define" ;;
-    *)            default_inc_excludes_dot="$undef"  ;;
+    [nN]|undef) default_inc_excludes_dot="$undef"  ;;
+    *)          default_inc_excludes_dot="$define" ;;
 esac
 
 : Check what kind of inf/nan your system has
index a5538d8..720c370 100644 (file)
@@ -11,6 +11,7 @@
  * in Configure, this is the way to force them into availability.
  *
  * BOOTSTRAP_CHARSET
+ * DEFAULT_INC_EXCLUDES_DOT
  * DOUBLEKIND
  * HAS_ACOSH
  * HAS_ASCTIME64
diff --git a/perl.c b/perl.c
index aa7d8b6..f1501c1 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -4644,8 +4644,13 @@ S_init_perllib(pTHX)
 #endif
 #endif /* !PERL_IS_MINIPERL */
 
-    if (!TAINTING_get)
-       S_incpush(aTHX_ STR_WITH_LEN("."), 0);
+    if (!TAINTING_get) {
+#if !defined(PERL_IS_MINIPERL) && defined(DEFAULT_INC_EXCLUDES_DOT)
+        const char * const unsafe = PerlEnv_getenv("PERL_USE_UNSAFE_INC");
+        if (unsafe && strEQ(unsafe, "1"))
+#endif
+          S_incpush(aTHX_ STR_WITH_LEN("."), 0);
+    }
 }
 
 #if defined(DOSISH) || defined(__SYMBIAN32__)
index 1540513..0600ebd 100644 (file)
--- a/uconfig.h
+++ b/uconfig.h
 #endif
 
 /* Generated from:
- * 9743712ac45ccdcff0ac2d1335543fd3775cc9cdc5cdc686ad9091d22b3c2126 config_h.SH
- * 4145d7916a5873433a2a9e6c68b1ce00b0f46df11a359453e5010576ef149634 uconfig.sh
+ * a0cea6273c16c1c5d8625665c84bda01926ce960c26873d4e5596b5b02a53e92 config_h.SH
+ * 0413c6aa363e543b4bfdf09337a7ebf8319009504ac71e1168e74a23141bfe3c uconfig.sh
  * ex: set ro: */