From: Nicholas Clark Date: Sat, 21 Oct 2006 23:01:45 +0000 (+0000) Subject: Add PERLIO_INIT and PERLIO_TERM to PERL_SYS_INIT* and PERL_SYS_TERM* X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac5a684e91b96c66e134bedef4a18360ad57a796;p=p5sagit%2Fp5-mst-13.2.git Add PERLIO_INIT and PERLIO_TERM to PERL_SYS_INIT* and PERL_SYS_TERM* in */*ish.h headers. p4raw-id: //depot/perl@29077 --- diff --git a/epoc/epocish.h b/epoc/epocish.h index a971a8e..34121ef 100644 --- a/epoc/epocish.h +++ b/epoc/epocish.h @@ -108,11 +108,13 @@ /* 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) \ + MALLOC_CHECK_TAINT2(*c,*v) putenv(".dummy=foo"); putenv(".dummy"); \ + PERLIO_INIT; MALLOC_INIT #endif #ifndef PERL_SYS_TERM -#define PERL_SYS_TERM() MALLOC_TERM +#define PERL_SYS_TERM() PERLIO_TERM; MALLOC_TERM #endif #define BIT_BUCKET "/dev/null" diff --git a/mpeix/mpeixish.h b/mpeix/mpeixish.h index 165aae7..8364720 100644 --- a/mpeix/mpeixish.h +++ b/mpeix/mpeixish.h @@ -111,11 +111,11 @@ #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) PERL_FPU_INIT; PERLIO_INIT; MALLOC_INIT #endif #ifndef PERL_SYS_TERM -#define PERL_SYS_TERM() MALLOC_TERM +#define PERL_SYS_TERM() PERLIO_TERM; MALLOC_TERM #endif #define BIT_BUCKET "/dev/null" diff --git a/os2/os2ish.h b/os2/os2ish.h index b3b3ed0..b27a631 100644 --- a/os2/os2ish.h +++ b/os2/os2ish.h @@ -228,22 +228,26 @@ void Perl_OS2_term(void **excH, int exitstatus, int flags); MALLOC_CHECK_TAINT(*argcp, *argvp, *envp) \ _response(argcp, argvp); \ _wildcard(argcp, argvp); \ - Perl_OS2_init3(*envp, xreg, 0) + Perl_OS2_init3(*envp, xreg, 0); \ + PERLIO_INIT # define PERL_SYS_INIT(argcp, argvp) { \ { void *xreg[2]; \ _response(argcp, argvp); \ _wildcard(argcp, argvp); \ - Perl_OS2_init3(NULL, xreg, 0) + Perl_OS2_init3(NULL, xreg, 0); \ + PERLIO_INIT #else /* Compiling embedded Perl or Perl extension */ # define PERL_SYS_INIT3(argcp, argvp, envp) \ { void *xreg[2]; \ - Perl_OS2_init3(*envp, xreg, 0) + Perl_OS2_init3(*envp, xreg, 0); \ + PERLIO_INIT # define PERL_SYS_INIT(argcp, argvp) { \ { void *xreg[2]; \ - Perl_OS2_init3(NULL, xreg, 0) + Perl_OS2_init3(NULL, xreg, 0); \ + PERLIO_INIT #endif #define FORCE_EMX_DEINIT_EXIT 1 @@ -252,6 +256,7 @@ void Perl_OS2_term(void **excH, int exitstatus, int flags); #define PERL_SYS_TERM2(xreg,flags) \ Perl_OS2_term(xreg, 0, flags); \ + PERLIO_TERM; \ MALLOC_TERM #define PERL_SYS_TERM1(xreg) \ diff --git a/plan9/plan9ish.h b/plan9/plan9ish.h index c3ae067..20db6e9 100644 --- a/plan9/plan9ish.h +++ b/plan9/plan9ish.h @@ -104,9 +104,10 @@ #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) \ + MALLOC_CHECK_TAINT2(*c,*v) PERLIO_INIT; MALLOC_INIT #define dXSUB_SYS -#define PERL_SYS_TERM() MALLOC_TERM +#define PERL_SYS_TERM() PERLIO_TERM; MALLOC_TERM /* * fwrite1() should be a routine with the same calling sequence as fwrite(), diff --git a/vms/vmsish.h b/vms/vmsish.h index 243277b..328da31 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -397,8 +397,8 @@ struct interp_intern { #else #define BIT_BUCKET "/dev/null" #endif -#define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); MALLOC_INIT -#define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; MALLOC_TERM +#define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT +#define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM #define dXSUB_SYS #define HAS_KILL #define HAS_WAIT