- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libjava/java/io/natFileDescriptorWin32.cc (modified) (6 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/java/io/natFileDescriptorWin32.cc
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 1 // natFileDescriptorWin32.cc - Native part of FileDescriptor class. 2 2 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. 4 5 5 6 This file is part of libgcj. … … 33 34 #include <java/io/FileNotFoundException.h> 34 35 36 37 38 35 39 void 36 40 java::io::FileDescriptor::init(void) … … 119 123 } 120 124 125 126 127 128 129 130 131 121 132 return (jint)handle; 122 133 } … … 177 188 } 178 189 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 179 242 jint 180 243 java::io::FileDescriptor::seek (jlong pos, jint whence, jboolean eof_trunc) … … 227 290 228 291 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 230 299 if (! read) 231 300 return -1; … … 244 313 throw new java::lang::ArrayIndexOutOfBoundsException; 245 314 315 316 317 318 246 319 jbyte *bytes = elements (buffer) + offset; 247 320 248 321 DWORD read; 249 322 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 } 251 329 252 330 if (read == 0) return -1; 331 253 332 return (jint)read; 254 333 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
