apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject svn commit: r793192 - in /apr/apr/trunk: configure.in file_io/unix/readwrite.c
Date Sat, 11 Jul 2009 16:11:29 GMT
Author: striker
Date: Sat Jul 11 16:11:29 2009
New Revision: 793192

URL: http://svn.apache.org/viewvc?rev=793192&view=rev
Log:
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.

Modified:
    apr/apr/trunk/configure.in
    apr/apr/trunk/file_io/unix/readwrite.c

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=793192&r1=793191&r2=793192&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Sat Jul 11 16:11:29 2009
@@ -799,7 +799,7 @@
 fi
 
 dnl ----------------------------- Checking for extended file descriptor handling
-AC_CHECK_FUNCS(dup3 accept4 epoll_create1)
+AC_CHECK_FUNCS(dup3 accept4 epoll_create1 fdatasync)
 
 AC_CACHE_CHECK([for SOCK_CLOEXEC support], [apr_cv_sock_cloexec],
 [AC_TRY_RUN([

Modified: apr/apr/trunk/file_io/unix/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/readwrite.c?rev=793192&r1=793191&r2=793192&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/readwrite.c (original)
+++ apr/apr/trunk/file_io/unix/readwrite.c Sat Jul 11 16:11:29 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