Change 19878 by [EMAIL PROTECTED] on 2003/06/29 09:28:58

        Move the PL_earlytaint initialization to the PERL_SYS_INIT()
        as per suggestion from Sarathy.

Affected files ...

... //depot/perl/dosish.h#41 edit
... //depot/perl/epoc/epocish.h#15 edit
... //depot/perl/miniperlmain.c#39 edit
... //depot/perl/mpeix/mpeixish.h#9 edit
... //depot/perl/os2/os2ish.h#44 edit
... //depot/perl/perl.h#519 edit
... //depot/perl/plan9/plan9ish.h#13 edit
... //depot/perl/unixish.h#33 edit
... //depot/perl/vms/vmsish.h#59 edit

Differences ...

==== //depot/perl/dosish.h#41 (text) ====
Index: perl/dosish.h
--- perl/dosish.h#40~19831~     Fri Jun 20 00:31:11 2003
+++ perl/dosish.h       Sun Jun 29 02:28:58 2003
@@ -16,7 +16,7 @@
 #ifdef DJGPP
 #  define BIT_BUCKET "nul"
 #  define OP_BINARY O_BINARY
-#  define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) Perl_DJGPP_init(c,v)
+#  define PERL_SYS_INIT(c,v) EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
Perl_DJGPP_init(c,v)
 #  define init_os_extras Perl_init_os_extras
 #  include <signal.h>
 #  define HAS_UTIME
@@ -29,15 +29,15 @@
 #  define PERL_FS_VER_FMT      "%d_%d_%d"
 #else  /* DJGPP */
 #  ifdef WIN32
-#    define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) Perl_win32_init(c,v)
+#    define PERL_SYS_INIT(c,v) EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
Perl_win32_init(c,v)
 #    define PERL_SYS_TERM()    Perl_win32_term()
 #    define BIT_BUCKET "nul"
 #  else
 #       ifdef NETWARE
-#      define PERL_SYS_INIT(c,v)       MALLOC_CHECK_TAINT2(*c,*v) Perl_nw5_init(c,v)
+#      define PERL_SYS_INIT(c,v)       EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
Perl_nw5_init(c,v)
 #      define BIT_BUCKET "nwnul"
 #    else
-#      define PERL_SYS_INIT(c,v)       MALLOC_CHECK_TAINT2(*c,*v)
+#      define PERL_SYS_INIT(c,v)       EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v)
 #      define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" 
*/
 #    endif /* NETWARE */
 #  endif

==== //depot/perl/epoc/epocish.h#15 (text) ====
Index: perl/epoc/epocish.h
--- perl/epoc/epocish.h#14~19831~       Fri Jun 20 00:31:11 2003
+++ perl/epoc/epocish.h Sun Jun 29 02:28:58 2003
@@ -108,7 +108,7 @@
 
 /* epocemx setenv bug workaround */
 #ifndef PERL_SYS_INIT
-#    define PERL_SYS_INIT(c,v)    MALLOC_CHECK_TAINT2(*c,*v) putenv(".dummy=foo"); 
putenv(".dummy"); MALLOC_INIT
+#    define PERL_SYS_INIT(c,v)    EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
putenv(".dummy=foo"); putenv(".dummy"); MALLOC_INIT
 #endif
 
 #ifndef PERL_SYS_TERM

==== //depot/perl/miniperlmain.c#39 (text) ====
Index: perl/miniperlmain.c
--- perl/miniperlmain.c#38~19863~       Fri Jun 27 01:15:11 2003
+++ perl/miniperlmain.c Sun Jun 29 02:28:58 2003
@@ -56,9 +56,6 @@
     /* noop unless Configure is given -Accflags=-DPERL_GPROF_CONTROL */
     PERL_GPROF_MONCONTROL(0);
 
-    /* To be used instead PL_taining before perl_parse() */
-    PL_earlytaint = doing_taint(argc, argv, env);
-
     PERL_SYS_INIT3(&argc,&argv,&env);
 
 #if defined(USE_ITHREADS)

==== //depot/perl/mpeix/mpeixish.h#9 (text) ====
Index: perl/mpeix/mpeixish.h
--- perl/mpeix/mpeixish.h#8~19602~      Fri May 23 10:02:28 2003
+++ perl/mpeix/mpeixish.h       Sun Jun 29 02:28:58 2003
@@ -113,7 +113,7 @@
 #define Mkdir(path,mode)   mkdir((path),(mode))
 
 #ifndef PERL_SYS_INIT
-#  define PERL_SYS_INIT(c,v) PERL_FPU_INIT MALLOC_INIT
+#  define PERL_SYS_INIT(c,v) EARLY_INIT2(*c,*v) PERL_FPU_INIT MALLOC_INIT
 #endif
 
 #ifndef PERL_SYS_TERM

==== //depot/perl/os2/os2ish.h#44 (text) ====
Index: perl/os2/os2ish.h
--- perl/os2/os2ish.h#43~19831~ Fri Jun 20 00:31:11 2003
+++ perl/os2/os2ish.h   Sun Jun 29 02:28:58 2003
@@ -218,6 +218,7 @@
 
 #  define PERL_SYS_INIT3(argcp, argvp, envp)   \
   { void *xreg[2];                             \
+    EARLY_INIT3(argcp, argvp, envp)            \
     MALLOC_CHECK_TAINT(*argcp, *argvp, *envp)  \
     _response(argcp, argvp);                   \
     _wildcard(argcp, argvp);                   \
@@ -225,6 +226,7 @@
 
 #  define PERL_SYS_INIT(argcp, argvp)  {       \
   { void *xreg[2];                             \
+    EARLY_INIT2(argcp, argvp)                  \
     _response(argcp, argvp);                   \
     _wildcard(argcp, argvp);                   \
     Perl_OS2_init3(NULL, xreg, 0)
@@ -233,9 +235,11 @@
 
 #  define PERL_SYS_INIT3(argcp, argvp, envp)   \
   { void *xreg[2];                             \
+    EARLY_INIT3(argcp, argvp, envp)            \
     Perl_OS2_init3(*envp, xreg, 0)
 #  define PERL_SYS_INIT(argcp, argvp)  {       \
   { void *xreg[2];                             \
+    EARLY_INIT2(argcp, argvp)                  \
     Perl_OS2_init3(NULL, xreg, 0)
 #endif
 

==== //depot/perl/perl.h#519 (text) ====
Index: perl/perl.h
--- perl/perl.h#518~19875~      Sat Jun 28 11:09:30 2003
+++ perl/perl.h Sun Jun 29 02:28:58 2003
@@ -1942,6 +1942,23 @@
 #  endif
 #endif
 
+/* The PL_earlytaint is to be used instead PL_tainting before
+ * perl_parse() has had the chance to set up PL_tainting. */
+
+#ifndef EARLY_INIT3
+#  define EARLY_INIT3(argvp,argcp,envp) \
+       STMT_START {            \
+               PL_earlytaint = doing_taint(argcp, argvp, envp); \
+       } STMT_END;
+#endif
+
+#ifndef EARLY_INIT2
+#  define EARLY_INIT2(argvp,argcp) \
+       STMT_START {            \
+               PL_earlytaint = doing_taint(argcp, argvp, 0); \
+       } STMT_END;
+#endif
+
 #ifndef PERL_SYS_INIT3
 #  define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp)
 #endif

==== //depot/perl/plan9/plan9ish.h#13 (text) ====
Index: perl/plan9/plan9ish.h
--- perl/plan9/plan9ish.h#12~19831~     Fri Jun 20 00:31:11 2003
+++ perl/plan9/plan9ish.h       Sun Jun 29 02:28:58 2003
@@ -106,7 +106,7 @@
 #define ABORT() kill(PerlProc_getpid(),SIGABRT);
 
 #define BIT_BUCKET "/dev/null"
-#define PERL_SYS_INIT(c,v)     MALLOC_CHECK_TAINT2(*c,*v) MALLOC_INIT
+#define PERL_SYS_INIT(c,v)     EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
MALLOC_INIT
 #define dXSUB_SYS
 #define PERL_SYS_TERM()                MALLOC_TERM
 

==== //depot/perl/unixish.h#33 (text) ====
Index: perl/unixish.h
--- perl/unixish.h#32~19831~    Fri Jun 20 00:31:11 2003
+++ perl/unixish.h      Sun Jun 29 02:28:58 2003
@@ -129,7 +129,7 @@
 #define Mkdir(path,mode)   mkdir((path),(mode))
 
 #ifndef PERL_SYS_INIT
-#  define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT MALLOC_INIT
+#  define PERL_SYS_INIT(c,v) EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
PERL_FPU_INIT MALLOC_INIT
 #endif
 
 #ifndef PERL_SYS_TERM

==== //depot/perl/vms/vmsish.h#59 (text) ====
Index: perl/vms/vmsish.h
--- perl/vms/vmsish.h#58~19831~ Fri Jun 20 00:31:11 2003
+++ perl/vms/vmsish.h   Sun Jun 29 02:28:58 2003
@@ -331,7 +331,7 @@
 #endif
 
 #define BIT_BUCKET "_NLA0:"
-#define PERL_SYS_INIT(c,v)     MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); 
MALLOC_INIT
+#define PERL_SYS_INIT(c,v)     EARLY_INIT2(*c,*v) MALLOC_CHECK_TAINT2(*c,*v) 
vms_image_init((c),(v)); MALLOC_INIT
 #define PERL_SYS_TERM()                OP_REFCNT_TERM; MALLOC_TERM
 #define dXSUB_SYS
 #define HAS_KILL
End of Patch.

Reply via email to