bjh 01/04/23 08:18:37
Modified: file_io/os2 readwrite.c
Log:
OS/2: Return APR_EOF where appropriate from apr_file_read().
Revision Changes Path
1.42 +6 -0 apr/file_io/os2/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/readwrite.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- readwrite.c 2001/02/19 13:03:54 1.41
+++ readwrite.c 2001/04/23 15:18:30 1.42
@@ -107,6 +107,11 @@
*nbytes = rc == 0 ? pos - (char *)buf : 0;
apr_lock_release(thefile->mutex);
+
+ if (*nbytes == 0 && rc == 0) {
+ return APR_EOF;
+ }
+
return APR_OS2_STATUS(rc);
} else {
if (thefile->pipe)
@@ -130,6 +135,7 @@
if (bytesread == 0) {
thefile->eof_hit = TRUE;
+ return APR_EOF;
}
return APR_SUCCESS;