aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in1
-rw-r--r--io.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e00a3b445e..1489c598b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 3 21:33:58 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: disable fdatasync again on Mac OS X.
+ [ruby-core:35493][Bug #4500]
+
Sun Apr 3 21:16:20 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* io.c (io_reopen): IO#close releases GVL if possible.
diff --git a/configure.in b/configure.in
index 01e59f9f3f..8a4e97e339 100644
--- a/configure.in
+++ b/configure.in
@@ -940,6 +940,7 @@ AS_CASE(["$target_os"],
fi
ac_cv_type_getgroups=gid_t # getgroups() on Rosetta fills garbage
ac_cv_lib_crypt_crypt=no
+ ac_cv_func_fdatasync=no # Mac OS X wrongly reports it has fdatasync()
AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
[AC_TRY_RUN([
#include <stdio.h>
diff --git a/io.c b/io.c
index 322505f992..331420097a 100644
--- a/io.c
+++ b/io.c
@@ -1414,8 +1414,9 @@ rb_io_fsync(VALUE io)
*
* Immediately writes all buffered data in <em>ios</em> to disk.
*
- * <code>NotImplementedError</code> is raised
- * if the underlying operating system does not support <em>fdatasync(2)</em>.
+ * If the underlying operating system does not support <em>fdatasync(2)</em>,
+ * <code>IO#fsync</code> is called instead (which might raise a
+ * <code>NotImplementedError</code>).
*/
static VALUE