Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/io/natFileDescriptorWin32.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// natFileDescriptorWin32.cc - Native part of FileDescriptor class.
    22
    3 /* Copyright (C) 1998, 1999, 2000, 2001  Free Software Foundation, Inc.
     3/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003  Free Software
     4   Foundation, Inc.
    45
    56   This file is part of libgcj.
     
    3334#include <java/io/FileNotFoundException.h>
    3435
     36
     37
     38
    3539void
    3640java::io::FileDescriptor::init(void)
     
    119123    }
    120124
     125
     126
     127
     128
     129
     130
     131
    121132  return (jint)handle;
    122133}
     
    177188}
    178189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
    179242jint
    180243java::io::FileDescriptor::seek (jlong pos, jint whence, jboolean eof_trunc)
     
    227290
    228291  if (! ReadFile ((HANDLE)fd, &buf, 1, &read, NULL))
    229     throw new IOException (JvNewStringLatin1 (winerr ()));
     292    {
     293      if (GetLastError () == ERROR_BROKEN_PIPE)
     294        return -1;
     295      else
     296        throw new IOException (JvNewStringLatin1 (winerr ()));
     297    }
     298
    230299  if (! read)
    231300    return -1;
     
    244313    throw new java::lang::ArrayIndexOutOfBoundsException;
    245314
     315
     316
     317
     318
    246319  jbyte *bytes = elements (buffer) + offset;
    247320
    248321  DWORD read;
    249322  if (! ReadFile((HANDLE)fd, bytes, count, &read, NULL))
    250     throw new IOException (JvNewStringLatin1 (winerr ()));
     323    {
     324      if (GetLastError () == ERROR_BROKEN_PIPE)
     325        return -1;
     326      else
     327        throw new IOException (JvNewStringLatin1 (winerr ()));
     328    }
    251329
    252330  if (read == 0) return -1;
     331
    253332  return (jint)read;
    254333}
Note: See TracChangeset for help on using the changeset viewer.