It appears that apr_file_info_get() on os2 and netware do not call
apr_file_flush() as is done for Unix and Win32 platforms.

The attached patch fixes this.

Best,
Blair

-- 
Blair Zajac <[EMAIL PROTECTED]>
Plots of your system's performance - http://www.orcaware.com/orca/
Index: file_io/netware/filestat.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/netware/filestat.c,v
retrieving revision 1.26
diff -u -r1.26 filestat.c
--- file_io/netware/filestat.c  7 Feb 2003 18:02:03 -0000       1.26
+++ file_io/netware/filestat.c  2 Apr 2003 21:00:23 -0000
@@ -115,6 +115,12 @@
 {
     struct stat info;
 
+    if (thefile->buffered) {
+        apr_status_t rv = apr_file_flush(thefile);
+        if (rv != APR_SUCCESS)
+            return rv;
+    }
+
     if (fstat(thefile->filedes, &info) == 0) {
         finfo->pool = thefile->pool;
         finfo->fname = thefile->fname;
Index: file_io/os2/filestat.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/os2/filestat.c,v
retrieving revision 1.35
diff -u -r1.35 filestat.c
--- file_io/os2/filestat.c      31 Mar 2003 12:31:40 -0000      1.35
+++ file_io/os2/filestat.c      2 Apr 2003 21:00:23 -0000
@@ -130,6 +130,12 @@
     ULONG rc;
     FILESTATUS3 fstatus;
 
+    if (thefile->buffered) {
+        apr_status_t rv = apr_file_flush(thefile);
+        if (rv != APR_SUCCESS)
+            return rv;
+    }
+
     if (thefile->isopen)
         rc = DosQueryFileInfo(thefile->filedes, FIL_STANDARD, &fstatus, 
sizeof(fstatus));
     else

Reply via email to