diff options
author | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-23 15:18:30 +0000 |
---|---|---|
committer | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-23 15:18:30 +0000 |
commit | fe936b418d58b3c14aa8e7da6325a49d10aa68bf (patch) | |
tree | 33fb13610028156b8fa6e53b104b707b888da593 /file_io/os2/readwrite.c | |
parent | 75b58238a178dd21bbef33e19ddbce065428dec5 (diff) | |
download | libapr-fe936b418d58b3c14aa8e7da6325a49d10aa68bf.tar.gz |
OS/2: Return APR_EOF where appropriate from apr_file_read().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61547 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2/readwrite.c')
-rw-r--r-- | file_io/os2/readwrite.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c index c3f4d7bb0..b2077486b 100644 --- a/file_io/os2/readwrite.c +++ b/file_io/os2/readwrite.c @@ -107,6 +107,11 @@ apr_status_t apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes) *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 @@ apr_status_t apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes) if (bytesread == 0) { thefile->eof_hit = TRUE; + return APR_EOF; } return APR_SUCCESS; |