This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[ID 20001203.001] Not OK: perl v5.7.0 +DEVEL7965 on os2-64int-ld 2.30 (UNINSTALLED)
authorYitzchak Scott-Thoennes <sthoenna@efn.org>
Sun, 3 Dec 2000 19:06:53 +0000 (11:06 -0800)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 4 Dec 2000 16:13:53 +0000 (16:13 +0000)
Message-Id: <200012040306.eB436rE18922@garcia.efn.org>

p4raw-id: //depot/perl@7976

os2/os2.c
perlio.c

index 6faa415..66e48c4 100644 (file)
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -22,6 +22,7 @@
 #include <fcntl.h>
 
 #define PERLIO_NOT_STDIO 0
+
 #include "EXTERN.h"
 #include "perl.h"
 
index b0517e3..41d4a8e 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -1493,12 +1493,20 @@ IV
 PerlIOStdio_close(PerlIO *f)
 {
  dTHX;
+#ifdef HAS_SOCKET
  int optval, optlen = sizeof(int);
+#endif
  FILE *stdio = PerlIOSelf(f,PerlIOStdio)->stdio;
  return(
+#ifdef HAS_SOCKET
    (getsockopt(PerlIO_fileno(f), SOL_SOCKET, SO_TYPE, (char *)&optval, &optlen) < 0) ?
        PerlSIO_fclose(stdio) :
-       close(PerlIO_fileno(f)));
+       close(PerlIO_fileno(f))
+#else
+   PerlSIO_fclose(stdio)
+#endif
+     );
+
 }
 
 IV