This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix MM_VMS.pm for space-delimited lists
[perl5.git] / globals.c
index 857a32c..9777273 100644 (file)
--- a/globals.c
+++ b/globals.c
@@ -6,6 +6,8 @@
 
 #undef PERLVAR
 #define PERLVAR(x, y)
+#undef PERLVARA
+#define PERLVARA(x, n, y)
 #undef PERLVARI
 #define PERLVARI(x, y, z) PL_##x = z;
 #undef PERLVARIC
@@ -21,28 +23,29 @@ CPerlObj::CPerlObj(IPerlMem* ipM, IPerlEnv* ipE, IPerlStdIO* ipStd,
 #include "intrpvar.h"
 #include "perlvars.h"
 
-    PL_piMem = ipM;
-    PL_piENV = ipE;
-    PL_piStdIO = ipStd;
-    PL_piLIO = ipLIO;
-    PL_piDir = ipD;
-    PL_piSock = ipS;
-    PL_piProc = ipP;
+    PL_Mem = ipM;
+    PL_Env = ipE;
+    PL_StdIO = ipStd;
+    PL_LIO = ipLIO;
+    PL_Dir = ipD;
+    PL_Sock = ipS;
+    PL_Proc = ipP;
 }
 
 void*
 CPerlObj::operator new(size_t nSize, IPerlMem *pvtbl)
 {
-    if(pvtbl != NULL)
-       return pvtbl->Malloc(nSize);
+    if(pvtbl)
+       return pvtbl->pMalloc(pvtbl, nSize);
 
     return NULL;
 }
 
-int&
-CPerlObj::ErrorNo(void)
+void
+CPerlObj::operator delete(void *pPerl, IPerlMem *pvtbl)
 {
-    return errno;
+    if(pvtbl)
+       pvtbl->pFree(pvtbl, pPerl);
 }
 
 void
@@ -52,16 +55,25 @@ CPerlObj::Init(void)
 
 #ifdef WIN32           /* XXX why are these needed? */
 bool
-Perl_do_exec(pTHX_ char *cmd)
+Perl_do_exec(char *cmd)
 {
     return PerlProc_Cmd(cmd);
 }
 
 int
-S_do_aspawn(pTHX_ void *vreally, void **vmark, void **vsp)
+CPerlObj::do_aspawn(void *vreally, void **vmark, void **vsp)
 {
     return PerlProc_aspawn(vreally, vmark, vsp);
 }
 #endif  /* WIN32 */
 
 #endif   /* PERL_OBJECT */
+
+int
+Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
+{
+    dTHX;
+    va_list(arglist);
+    va_start(arglist, format);
+    return PerlIO_vprintf(stream, format, arglist);
+}