* space. The other alternative would be to provide STDAUX and STDPRN
* filehandles.
*/
- (void)fclose(stdaux);
- (void)fclose(stdprn);
+ (void)PerlIO_close(PerlIO_importFILE(stdaux, 0));
+ (void)PerlIO_close(PerlIO_importFILE(stdprn, 0));
#endif
}
PL_fdpid = newAV(); /* for remembering popen pids by fd */
PL_modglobal = newHV(); /* pointers to per-interpreter module globals */
PL_errors = newSVpvn("",0);
-
+#ifdef USE_ITHREADS
+ PL_regex_padav = newAV();
+#endif
+#ifdef USE_REENTRANT_API
+ New(31337, PL_reentrant_buffer,1, REBUF);
+ New(31337, PL_reentrant_buffer->tmbuff,1, struct tm);
+#endif
ENTER;
}
PL_thrsv = Nullsv;
#endif /* USE_THREADS */
+#ifdef USE_REENTRANT_API
+ Safefree(PL_reentrant_buffer->tmbuff);
+ Safefree(PL_reentrant_buffer);
+#endif
+
sv_free_arenas();
/* As the absolutely last thing, free the non-arena SV for mess() */
S_usage(pTHX_ char *name) /* XXX move this out into a module ? */
{
/* This message really ought to be max 23 lines.
- * Removed -h because the user already knows that opton. Others? */
+ * Removed -h because the user already knows that option. Others? */
static char *usage_msg[] = {
"-0[octal] specify record separator (\\0, if no argument)",
} /* else what? */
}
#endif /* NEED_ENVIRON_DUP_FOR_MODIFY */
- for (; *env; env++) {
+ if (env)
+ for (; *env; env++) {
if (!(s = strchr(*env,'=')))
continue;
*s++ = '\0';
sv = newSVpv(s--,0);
(void)hv_store(hv, *env, s - *env, sv, 0);
*s = '=';
- }
+ }
#ifdef NEED_ENVIRON_DUP_FOR_MODIFY
if (dup_env_base) {
char **dup_env;