change#16723 broke the ioctl() return value on platforms
Gurusamy Sarathy [Sat, 17 May 2003 04:53:06 +0000 (04:53 +0000)]
that have ioctl() but no fcntl() (e.g. windows)

change#17577 then attempted to fix the bustage, but got
it wrong
p4raw-link: @17577 on //depot/perl: c214f4ad8bbb376b6ebfcb9c9173169f2cc8986f
p4raw-link: @16723 on //depot/perl: 4808266b7a2aefa68f681e0378316e43728b49d8

p4raw-id: //depot/perl@19534

pp_sys.c

index 13ddfae..ae6d986 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2175,7 +2175,9 @@ PP(pp_ioctl)
 #else
        retval = fcntl(PerlIO_fileno(IoIFP(io)), func, s);
 #endif
+#endif
 
+#if defined(HAS_IOCTL) || defined(HAS_FCNTL)
     if (SvPOK(argsv)) {
        if (s[SvCUR(argsv)] != 17)
            DIE(aTHX_ "Possible memory corruption: %s overflowed 3rd argument",