This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix warning from missing POSIX::setvbuf()
authorChip Salzenberg <chip@perl.com>
Mon, 3 Feb 1997 22:37:26 +0000 (10:37 +1200)
committerChip Salzenberg <chip@atlantic.net>
Mon, 10 Feb 1997 19:29:00 +0000 (07:29 +1200)
ext/IO/IO.xs

index 8611b2d..5efbf24 100644 (file)
@@ -268,8 +268,8 @@ setvbuf(handle, buf, type, size)
        int             type
        int             size
     CODE:
-#ifdef PERLIO_IS_STDIO
-#ifdef _IOFBF   /* Should be HAS_SETVBUF once Configure tests for that */
+/* Should check HAS_SETVBUF once Configure tests for that */
+#if defined(PERLIO_IS_STDIO) && defined(_IOFBF)
        if (handle)
            RETVAL = setvbuf(handle, buf, type, size);
        else {
@@ -277,10 +277,7 @@ setvbuf(handle, buf, type, size)
            errno = EINVAL;
        }
 #else
-           RETVAL = (SysRet) not_here("IO::Handle::setvbuf");
-#endif /* _IOFBF */
-#else
-           not_here("IO::Handle::setvbuf");
+       RETVAL = (SysRet) not_here("IO::Handle::setvbuf");
 #endif
     OUTPUT:
        RETVAL