diff options
author | stoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68> | 2004-07-19 15:39:54 +0000 |
---|---|---|
committer | stoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68> | 2004-07-19 15:39:54 +0000 |
commit | c5c33012a88427b398fb2e7b773803db87bf3177 (patch) | |
tree | aefbd42ce3a67c1bed8e6283fa91ce12a3be7f1b | |
parent | aa6ac179595ac177b865f4cf6c1f3c2fc522cdc4 (diff) | |
download | libapr-c5c33012a88427b398fb2e7b773803db87bf3177.tar.gz |
Win32: Fix bug in tracking the file pointer in files opened for overlapped/xthread io
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65283 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | file_io/win32/seek.c | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -5,6 +5,9 @@ Changes for APR 1.1 [Deferring these features when 1.0 is rolled out.] and upgrading it to do SHA-256. Not yet ready for prime time. [Ben Laurie] + *) Win32: Fix bug tracking the file pointer on a file opened for + overlapped/APR_XTHREAD io. [Bill Stoddard] + Changes with APR 1.0 *) Add jlibtool - enabled with '--enable-experimental-libtool' option. diff --git a/file_io/win32/seek.c b/file_io/win32/seek.c index 61fe6264c..b8f2bcfd4 100644 --- a/file_io/win32/seek.c +++ b/file_io/win32/seek.c @@ -82,8 +82,11 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh *offset = thefile->filePtr - thefile->dataRead + thefile->bufpos; return rc; - } - else if (thefile->pOverlapped) { + } + /* A file opened with APR_XTHREAD has been opened for overlapped i/o. + * APR must explicitly track the file pointer in this case. + */ + else if (thefile->pOverlapped || thefile->flags & APR_XTHREAD) { switch(where) { case APR_SET: thefile->filePtr = *offset; |