delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/10/22/22:35:54

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <035a01c15b6b$e7788c70$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-developers AT cygwin DOT com>
References: <20011022142729 DOT A10309 AT redhat DOT com> <20011022192430 DOT 3581 DOT qmail AT lizard DOT curl DOT com> <20011022193036 DOT 3609 DOT qmail AT lizard DOT curl DOT com> <20011022203136 DOT 5144 DOT qmail AT lizard DOT curl DOT com> <20011022203747 DOT 5162 DOT qmail AT lizard DOT curl DOT com> <02a201c15b5b$7910a4d0$0200a8c0 AT lifelesswks> <20011022204740 DOT B18754 AT redhat DOT com> <20011023005236 DOT 7136 DOT qmail AT lizard DOT curl DOT com> <20011022205828 DOT C18754 AT redhat DOT com> <02ea01c15b5f$7e673bc0$0200a8c0 AT lifelesswks> <20011022212759 DOT A19493 AT redhat DOT com>
Subject: Re: 1.3.4 status?
Date: Tue, 23 Oct 2001 12:39:13 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 23 Oct 2001 02:43:55.0380 (UTC) FILETIME=[8ED1E340:01C15B6C]

What about this:

Index: fhandler_console.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_console.cc,v
retrieving revision 1.66
diff -u -p -r1.66 fhandler_console.cc
--- fhandler_console.cc 2001/10/22 18:39:22     1.66
+++ fhandler_console.cc 2001/10/23 02:35:14
@@ -198,9 +198,6 @@ fhandler_console::set_cursor_maybe ()
 int
 fhandler_console::read (void *pv, size_t buflen)
 {
-  if (!buflen)
-    return 0;
-
   HANDLE h = get_io_handle ();

 #define buf ((char *) pv)
Index: syscalls.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/syscalls.cc,v
retrieving revision 1.162
diff -u -p -r1.162 syscalls.cc
--- syscalls.cc 2001/10/22 18:31:00     1.162
+++ syscalls.cc 2001/10/23 02:35:15
@@ -290,6 +290,9 @@ _read (int fd, void *ptr, size_t len)
   if (__check_null_invalid_struct_errno (ptr, len))
     return -1;

+  if (!len)
+    return 0;
+
   int res;
   extern int sigcatchers;
   int e = get_errno ();

Check http://www.opengroup.org/onlinepubs/7908799/xsh/read.html if
interested.

Rob

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019