This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: no FD_CLOEXEC, no test
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index bb2cc21..aec1568 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -6838,7 +6838,7 @@ Perl_sv_newref(pTHX_ SV *const sv)
 
 Decrement an SV's reference count, and if it drops to zero, call
 C<sv_clear> to invoke destructors and free up any memory used by
-the body; finally, deallocate the SV's head itself.
+the body; finally, deallocating the SV's head itself.
 Normally called via a wrapper macro C<SvREFCNT_dec>.
 
 =cut
@@ -12931,7 +12931,11 @@ Perl_fp_dup(pTHX_ PerlIO *const fp, const char type, CLONE_PARAMS *const param)
        return ret;
 
     /* create anew and remember what it is */
+#ifdef __amigaos4__
+    ret = PerlIO_fdupopen(aTHX_ fp, param, PERLIO_DUP_CLONE|PERLIO_DUP_FD);
+#else
     ret = PerlIO_fdupopen(aTHX_ fp, param, PERLIO_DUP_CLONE);
+#endif
     ptr_table_store(PL_ptr_table, fp, ret);
     return ret;
 }
@@ -14404,9 +14408,11 @@ perl_clone(PerlInterpreter *proto_perl, UV flags)
    /* perlhost.h so we need to call into it
    to clone the host, CPerlHost should have a c interface, sky */
 
+#if !defined(__amigaos4__)
    if (flags & CLONEf_CLONE_HOST) {
        return perl_clone_host(proto_perl,flags);
    }
+#endif
    return perl_clone_using(proto_perl, flags,
                            proto_perl->IMem,
                            proto_perl->IMemShared,
@@ -15359,7 +15365,7 @@ Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding)
 C<encoding> is assumed to be an C<Encode> object, the PV of C<ssv> is
 assumed to be octets in that encoding and decoding the input starts
 from the position which S<C<(PV + *offset)>> pointed to.  C<dsv> will be
-concatenated the decoded UTF-8 string from C<ssv>.  Decoding will terminate
+concatenated with the decoded UTF-8 string from C<ssv>.  Decoding will terminate
 when the string C<tstr> appears in decoding output or the input ends on
 the PV of C<ssv>.  The value which C<offset> points will be modified
 to the last input position on C<ssv>.