Minor Cygwin patches

JonY 10walls@gmail.com
Mon Jul 15 01:16:00 GMT 2013


On 7/15/2013 06:02, Kai Tietz wrote:
> 2013/7/13 JonY <10walls@gmail.com>:
>> On 7/10/2013 20:43, JonY wrote:
>>> Hi,
>>>
>>> Attached are some minor patches, comments?
>>>
>>
>> Kai, ping?
> 
> 
> Please sent each patch as separate mail, and please add ChangeLogs for
> them too.  Additionally it would be fine to read some lines about
> cause for those patches.
> 

Changelog


2013-03-08  Yaakov Selkowitz <yselkowitz@users.sourceforge.net>

    PR 35536
    * (libjava/gnu/java/nio/channels/natFileChannelPosix.cc): FIONREAD
returns EINVAL on the errno variable instead of ENOTTY on Cygwin.

-------------- next part --------------
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536

--- origsrc/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc	2007-04-02 20:05:50.000000000 -0500
+++ src/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc	2010-10-27 13:39:34.044718100 -0500
@@ -386,7 +386,7 @@ FileChannelImpl::available (void)
 
 #if defined (FIONREAD)
   r = ::ioctl (fd, FIONREAD, &num);
-  if (r == -1 && errno == ENOTTY)
+  if (r == -1 && (errno == ENOTTY || errno == EINVAL))
     {
       // If the ioctl doesn't work, we don't care.
       r = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130715/c419d6b0/attachment.sig>


More information about the Gcc-patches mailing list