This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove obsolete FCRYPT ifdefs and associated PL_cryptseen (#17624)
authorRichard Leach <richardleach@users.noreply.github.com>
Thu, 30 Jul 2020 22:18:41 +0000 (23:18 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jul 2020 22:18:41 +0000 (16:18 -0600)
Co-authored-by: Karl Williamson <khw@cpan.org>
embedvar.h
intrpvar.h
makedef.pl
perl.h
pp.c
sv.c
toke.c

index f9706b1..4427e07 100644 (file)
 #define PL_comppad_name_floor  (vTHX->Icomppad_name_floor)
 #define PL_constpadix          (vTHX->Iconstpadix)
 #define PL_cop_seqmax          (vTHX->Icop_seqmax)
-#define PL_cryptseen           (vTHX->Icryptseen)
 #define PL_curcop              (vTHX->Icurcop)
 #define PL_curcopdb            (vTHX->Icurcopdb)
 #define PL_curlocales          (vTHX->Icurlocales)
index 7ac68e4..7f86954 100644 (file)
@@ -743,6 +743,9 @@ PERLVARI(I, underlying_numeric_obj, locale_t, NULL)
 #  endif
 #endif /* !USE_LOCALE_NUMERIC */
 
+PERLVAR(I, pad_reset_pending, bool)    /* reset pad on next attempted alloc */
+PERLVAR(I, srand_called, bool)
+
 /* Array of signal handlers, indexed by signal number, through which the C
    signal handler dispatches.  */
 PERLVAR(I, psig_ptr,   SV **)
index 41cfecb..9af199d 100644 (file)
@@ -219,7 +219,6 @@ sub readvar {
 
 if ($ARGS{PLATFORM} ne 'os2') {
     ++$skip{$_} foreach qw(
-                    PL_cryptseen
                     PL_opsave
                     Perl_dump_fds
                     Perl_my_bcopy
diff --git a/perl.h b/perl.h
index 2007bae..88d0511 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4956,9 +4956,6 @@ EXTCONST char PL_bincompat_options[] =
 #  ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
                             " DEBUG_LEAKING_SCALARS_FORK_DUMP"
 #  endif
-#  ifdef FCRYPT
-                            " FCRYPT"
-#  endif
 #  ifdef HAS_TIMES
                             " HAS_TIMES"
 #  endif
diff --git a/pp.c b/pp.c
index 727aa7e..8dc8b3a 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -3684,11 +3684,8 @@ PP(pp_crypt)
 #    endif /* HAS_CRYPT_R */
 #  endif /* USE_ITHREADS */
 
-#  ifdef FCRYPT
-    sv_setpv(TARG, fcrypt(tmps, SvPV_nolen_const(right)));
-#  else
     sv_setpv(TARG, PerlProc_crypt(tmps, SvPV_nolen_const(right)));
-#  endif
+
     SvUTF8_off(TARG);
     SETTARG;
     RETURN;
diff --git a/sv.c b/sv.c
index b23163b..a3238fc 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -15334,10 +15334,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
 
     PL_cv_has_eval     = proto_perl->Icv_has_eval;
 
-#ifdef FCRYPT
-    PL_cryptseen       = proto_perl->Icryptseen;
-#endif
-
 #ifdef USE_LOCALE_COLLATE
     PL_collation_ix    = proto_perl->Icollation_ix;
     PL_collation_standard      = proto_perl->Icollation_standard;
diff --git a/toke.c b/toke.c
index 52f3786..27273d9 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7675,12 +7675,7 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct
         UNI(OP_CALLER);
 
     case KEY_crypt:
-#ifdef FCRYPT
-        if (!PL_cryptseen) {
-            PL_cryptseen = TRUE;
-            init_des();
-        }
-#endif
+
         LOP(OP_CRYPT,XTERM);
 
     case KEY_chmod: