OS/2: found the _fd_flags() prototype.
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index 5ff5c92..c199cf7 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -827,7 +827,9 @@ PP(pp_tie)
     if (sv_isobject(sv)) {
        sv_unmagic(varsv, how);
        /* Croak if a self-tie on an aggregate is attempted. */
-       if (varsv == SvRV(sv) && how == PERL_MAGIC_tied)
+       if (varsv == SvRV(sv) &&
+           (SvTYPE(sv) == SVt_PVAV ||
+            SvTYPE(sv) == SVt_PVHV))
            Perl_croak(aTHX_
                       "Self-ties of arrays and hashes are not supported");
        sv_magic(varsv, sv, how, Nullch, 0);
@@ -2182,9 +2184,6 @@ PP(pp_ioctl)
 #else
        retval = fcntl(PerlIO_fileno(IoIFP(io)), func, s);
 #endif
-#else
-       DIE(aTHX_ "fcntl is not implemented");
-#endif
 
     if (SvPOK(argsv)) {
        if (s[SvCUR(argsv)] != 17)
@@ -2203,6 +2202,10 @@ PP(pp_ioctl)
        PUSHp(zero_but_true, ZBTLEN);
     }
     RETURN;
+
+#else
+    DIE(aTHX_ "fcntl is not implemented");
+#endif
 }
 
 PP(pp_flock)