rpms/apr/devel apr-1.2.2-seekflush.patch, NONE, 1.1 apr.spec, 1.38, 1.39
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Dec 8 17:33:07 UTC 2005
Author: jorton
Update of /cvs/dist/rpms/apr/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv7723
Modified Files:
apr.spec
Added Files:
apr-1.2.2-seekflush.patch
Log Message:
* Thu Dec 8 2005 Joe Orton <jorton at redhat.com> 1.2.2-4
- add apr_file_seek() fixes from upstream (r326593, r326597)
apr-1.2.2-seekflush.patch:
file_io/unix/seek.c | 19 ++++++++++---------
test/testfile.c | 10 ++++++++++
2 files changed, 20 insertions(+), 9 deletions(-)
--- NEW FILE apr-1.2.2-seekflush.patch ---
--- apr-1.2.2/test/testfile.c.seekflush
+++ apr-1.2.2/test/testfile.c
@@ -766,6 +766,16 @@
ABTS_ASSERT(tc, "gets should flush buffered write and fail",
rv != APR_SUCCESS && rv != APR_EOF);
+ /* Likewise for seek. */
+ {
+ apr_off_t offset = 0;
+
+ rv = apr_file_seek(f, APR_SET, &offset);
+ }
+
+ ABTS_ASSERT(tc, "seek should flush buffered write and fail",
+ rv != APR_SUCCESS && rv != APR_EOF);
+
apr_file_close(f);
}
--- apr-1.2.2/file_io/unix/seek.c.seekflush
+++ apr-1.2.2/file_io/unix/seek.c
@@ -19,32 +19,33 @@
static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
{
apr_off_t newbufpos;
- int rc;
+ apr_status_t rv;
if (thefile->direction == 1) {
- apr_file_flush(thefile);
+ rv = apr_file_flush(thefile);
+ if (rv) {
+ return rv;
+ }
thefile->bufpos = thefile->direction = thefile->dataRead = 0;
}
newbufpos = pos - (thefile->filePtr - thefile->dataRead);
if (newbufpos >= 0 && newbufpos <= thefile->dataRead) {
thefile->bufpos = newbufpos;
- rc = 0;
+ rv = APR_SUCCESS;
}
else {
- rc = lseek(thefile->filedes, pos, SEEK_SET);
-
- if (rc != -1 ) {
+ if (lseek(thefile->filedes, pos, SEEK_SET) != -1) {
thefile->bufpos = thefile->dataRead = 0;
thefile->filePtr = pos;
- rc = 0;
+ rv = APR_SUCCESS;
}
else {
- rc = errno;
+ rv = errno;
}
}
- return rc;
+ return rv;
}
Index: apr.spec
===================================================================
RCS file: /cvs/dist/rpms/apr/devel/apr.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- apr.spec 7 Dec 2005 16:28:19 -0000 1.38
+++ apr.spec 8 Dec 2005 17:33:05 -0000 1.39
@@ -3,7 +3,7 @@
Summary: Apache Portable Runtime library
Name: apr
Version: 1.2.2
-Release: 3
+Release: 4
License: Apache Software License
Group: System Environment/Libraries
URL: http://apr.apache.org/
@@ -15,6 +15,7 @@
Patch5: apr-1.2.2-reuseaddr.patch
Patch6: apr-1.2.2-locktimeout.patch
Patch7: apr-1.2.2-libdir.patch
+Patch8: apr-1.2.2-seekflush.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildPrereq: autoconf, libtool, doxygen
Conflicts: subversion < 0.20.1-2
@@ -47,6 +48,7 @@
%patch5 -p1 -b .reuseaddr
%patch6 -p1 -b .locktimeout
%patch7 -p1 -b .libdir
+%patch8 -p1 -b .seekflush
%build
# regenerate configure script etc.
@@ -118,6 +120,9 @@
%{_includedir}/apr-%{aprver}/*.h
%changelog
+* Thu Dec 8 2005 Joe Orton <jorton at redhat.com> 1.2.2-4
+- add apr_file_seek() fixes from upstream (r326593, r326597)
+
* Wed Dec 7 2005 Joe Orton <jorton at redhat.com> 1.2.2-3
- apr-1-config: strip more exports (#175124)
More information about the fedora-cvs-commits
mailing list