]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch by Ian Charnas from issue 3517.
authorGuido van Rossum <guido@python.org>
Thu, 7 Aug 2008 18:51:38 +0000 (18:51 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 7 Aug 2008 18:51:38 +0000 (18:51 +0000)
Add F_FULLFSYNC if it exists (OS X only so far).

Modules/fcntlmodule.c

index 0c85f477e9140f3701ae03242fcc3e65ff0c9ead..ab7f22d37fe2ca72a8e72eece4c2090236b3ec4c 100644 (file)
@@ -530,6 +530,11 @@ all_ins(PyObject* d)
         if (ins(d, "F_SHLCK", (long)F_SHLCK)) return -1;
 #endif
 
+/* OS X (and maybe others) let you tell the storage device to flush to physical media */
+#ifdef F_FULLFSYNC
+        if (ins(d, "F_FULLFSYNC", (long)F_FULLFSYNC)) return -1;
+#endif
+
 /* For F_{GET|SET}FL */
 #ifdef FD_CLOEXEC
         if (ins(d, "FD_CLOEXEC", (long)FD_CLOEXEC)) return -1;