diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-12 11:51:25 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-12 11:51:25 +0000 |
commit | 2f42fcb0c2cd8c2699589848aee7b8ee07b30c4f (patch) | |
tree | ada8ea9f2ed4be699d066737eab622e87b4ba42c /perl.c | |
parent | a25ef67de93be431e21193a0e7ed5fca8bc883f7 (diff) | |
download | perl-2f42fcb0c2cd8c2699589848aee7b8ee07b30c4f.tar.gz |
Apply much of Ilya's microperl patch, but instead of
implementing the opendir()/readdir()/closedir() using
external commands give up "ANSI-pureness" and define them
in uconfig.sh, also define other stuff like rename() and putenv().
Leave out the $| emulation in my_fork() since we are
not supposed to have fork() under microperl.
p4raw-id: //depot/perl@20646
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -263,8 +263,10 @@ perl_construct(pTHXx) ("__environ", (unsigned long *) &environ_pointer, NULL); #endif /* environ */ -#ifdef USE_ENVIRON_ARRAY +#ifndef PERL_MICRO +# ifdef USE_ENVIRON_ARRAY PL_origenviron = environ; +# endif #endif /* Use sysconf(_SC_CLK_TCK) if available, if not @@ -409,6 +411,7 @@ perl_destruct(pTHXx) /* if PERL_USE_SAFE_PUTENV is defined environ will not have been copied * so we certainly shouldn't free it here */ +#ifndef PERL_MICRO #if defined(USE_ENVIRON_ARRAY) && !defined(PERL_USE_SAFE_PUTENV) if (environ != PL_origenviron #ifdef USE_ITHREADS @@ -428,6 +431,7 @@ perl_destruct(pTHXx) environ = PL_origenviron; } #endif +#endif /* !PERL_MICRO */ #ifdef USE_ITHREADS /* the syntax tree is shared between clones @@ -1445,9 +1449,7 @@ print \" \\@INC:\\n @INC\\n\";"); boot_core_PerlIO(); boot_core_UNIVERSAL(); -#ifndef PERL_MICRO boot_core_xsutils(); -#endif if (xsinit) (*xsinit)(aTHX); /* in case linked C routines want magical variables */ @@ -2875,6 +2877,9 @@ S_open_script(pTHX_ char *scriptname, bool dosearch, SV *sv, int *fdscript) } else if (PL_preprocess) { char *cpp_cfg = CPPSTDIN; + + if (cpp_cfg[0] == 0) /* PERL_MICRO? */ + Perl_croak(aTHX_ "Can't run with cpp -P with CPPSTDIN undefined"); SV *cpp = newSVpvn("",0); SV *cmd = NEWSV(0,0); @@ -3734,6 +3739,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register GvMULTI_on(PL_envgv); hv = GvHVn(PL_envgv); hv_magic(hv, Nullgv, PERL_MAGIC_env); +#ifndef PERL_MICRO #ifdef USE_ENVIRON_ARRAY /* Note that if the supplied env parameter is actually a copy of the global environ then it may now point to free'd memory @@ -3765,6 +3771,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register mg_set(sv); } #endif /* USE_ENVIRON_ARRAY */ +#endif /* !PERL_MICRO */ } TAINT_NOT; if ((tmpgv = gv_fetchpv("$",TRUE, SVt_PV))) { |