apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r794484 - in /apr/apr/branches/1.4.x: ./ configure.in file_io/unix/readwrite.c
Date Thu, 16 Jul 2009 01:31:17 GMT
Author: bojan
Date: Thu Jul 16 01:31:17 2009
New Revision: 794484

URL: http://svn.apache.org/viewvc?rev=794484&view=rev
Log:
Backport r793192 and r794118 from the trunk.
Link again on OS X, where fdatasync() does not seem to exist.

* configure.in
  Add check for fdatasync.
* file_io/unix/readwrite.c
  (apr_file_datasync): Use fsync when fdatasync is not available.

Move check for fdatasync out of extended file descriptor handling block.

Modified:
    apr/apr/branches/1.4.x/   (props changed)
    apr/apr/branches/1.4.x/configure.in
    apr/apr/branches/1.4.x/file_io/unix/readwrite.c

Propchange: apr/apr/branches/1.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 16 01:31:17 2009
@@ -1 +1 @@
-/apr/apr/trunk:733052,747990,748361,748371,748565,748888,748988,749810,782838,783398,783958,784633,784773,788588
+/apr/apr/trunk:733052,747990,748361,748371,748565,748888,748988,749810,782838,783398,783958,784633,784773,788588,793192,794118

Modified: apr/apr/branches/1.4.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/configure.in?rev=794484&r1=794483&r2=794484&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/configure.in (original)
+++ apr/apr/branches/1.4.x/configure.in Thu Jul 16 01:31:17 2009
@@ -795,6 +795,9 @@
    AC_DEFINE([HAVE_SOCK_CLOEXEC], 1, [Define if the SOCK_CLOEXEC flag is supported])
 fi
 
+dnl ----------------------------- Checking for fdatasync: OS X doesn't have it
+AC_CHECK_FUNCS(fdatasync)
+
 dnl ----------------------------- Checking for missing POSIX thread functions
 AC_CHECK_FUNCS([getpwnam_r getpwuid_r getgrnam_r getgrgid_r])
 

Modified: apr/apr/branches/1.4.x/file_io/unix/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/file_io/unix/readwrite.c?rev=794484&r1=794483&r2=794484&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/file_io/unix/readwrite.c (original)
+++ apr/apr/branches/1.4.x/file_io/unix/readwrite.c Thu Jul 16 01:31:17 2009
@@ -381,7 +381,11 @@
         }
     }
 
+#ifdef HAVE_FDATASYNC
     if (fdatasync(thefile->filedes)) {
+#else
+    if (fsync(thefile->filedes)) {
+#endif
         rv = apr_get_os_error();
     }
 



Mime
View raw message