You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bj...@apache.org on 2010/03/30 13:18:52 UTC
svn commit: r929082 - /apr/apr/trunk/file_io/os2/readwrite.c
Author: bjh
Date: Tue Mar 30 11:18:52 2010
New Revision: 929082
URL: http://svn.apache.org/viewvc?rev=929082&view=rev
Log:
OS/2: Implement apr_file_sync().
Modified:
apr/apr/trunk/file_io/os2/readwrite.c
Modified: apr/apr/trunk/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/readwrite.c?rev=929082&r1=929081&r2=929082&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/readwrite.c (original)
+++ apr/apr/trunk/file_io/os2/readwrite.c Tue Mar 30 11:18:52 2010
@@ -317,12 +317,22 @@ APR_DECLARE(apr_status_t) apr_file_flush
APR_DECLARE(apr_status_t) apr_file_sync(apr_file_t *thefile)
{
- return APR_ENOTIMPL;
+ apr_status_t rv;
+ int rc;
+
+ rv = apr_file_flush(thefile);
+
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+
+ rc = DosResetBuffer(thefile->filedes);
+ return APR_FROM_OS_ERROR(rc);
}
APR_DECLARE(apr_status_t) apr_file_datasync(apr_file_t *thefile)
{
- return APR_ENOTIMPL;
+ return apr_file_sync(thefile);
}
APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)