X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/078e2213d1e79935a637aef6d5b7bc38aa6954fe..43238333f6674ef9c6ddbca3f9fa1132b09521f1:/perl.c?ds=sidebyside diff --git a/perl.c b/perl.c index 1823c99..d1018f3 100644 --- a/perl.c +++ b/perl.c @@ -1500,6 +1500,14 @@ perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, char **env) } } #endif /* #if defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT) */ + +#if defined(__amigaos4__) + { + struct NameTranslationInfo nti; + __translate_amiga_to_unix_path_name(&argv[0],&nti); + } +#endif + PL_origargc = argc; PL_origargv = argv; @@ -2515,7 +2523,7 @@ Perl_get_av(pTHX_ const char *name, I32 flags) Returns the HV of the specified Perl hash. C are passed to C. If C is set and the Perl variable does not exist then it will be created. If C is zero -and the variable does not exist then NULL is returned. +and the variable does not exist then C is returned. =cut */ @@ -2589,7 +2597,7 @@ Perl_get_cv(pTHX_ const char *name, I32 flags) =for apidoc p||call_argv Performs a callback to the specified named and package-scoped Perl subroutine -with C (a NULL-terminated array of strings) as arguments. See +with C (a C-terminated array of strings) as arguments. See L. Approximate Perl equivalent: C<&{"$sub_name"}(@$argv)>. @@ -2666,7 +2674,7 @@ Perl_call_method(pTHX_ const char *methname, I32 flags) Performs a callback to the Perl sub specified by the SV. -If neither the C or C flag is supplied, the +If neither the C nor C flag is supplied, the SV may be any of a CV, a GV, a reference to a CV, a reference to a GV or C will be used as the name of the sub to call. @@ -2820,7 +2828,7 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags) =for apidoc p||eval_sv Tells Perl to C the string in the SV. It supports the same flags -as C, with the obvious exception of G_EVAL. See L. +as C, with the obvious exception of C. See L. =cut */ @@ -3135,10 +3143,10 @@ Perl_moreswitches(pTHX_ const char *s) s--; } PL_rs = newSVpvs(""); - SvGROW(PL_rs, (STRLEN)(UNISKIP(rschar) + 1)); + SvGROW(PL_rs, (STRLEN)(UVCHR_SKIP(rschar) + 1)); tmps = (U8*)SvPVX(PL_rs); uvchr_to_utf8(tmps, rschar); - SvCUR_set(PL_rs, UNISKIP(rschar)); + SvCUR_set(PL_rs, UVCHR_SKIP(rschar)); SvUTF8_on(PL_rs); } else { @@ -3796,10 +3804,10 @@ S_open_script(pTHX_ const char *scriptname, bool dosearch, bool *suidscript) CopFILE(PL_curcop), Strerror(errno)); } fd = PerlIO_fileno(rsfp); -#if defined(HAS_FCNTL) && defined(F_SETFD) +#if defined(HAS_FCNTL) && defined(F_SETFD) && defined(FD_CLOEXEC) if (fd >= 0) { /* ensure close-on-exec */ - if (fcntl(fd, F_SETFD, 1) < 0) { + if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { Perl_croak(aTHX_ "Can't open perl script \"%s\": %s\n", CopFILE(PL_curcop), Strerror(errno)); }