summaryrefslogtreecommitdiffstats
path: root/Modules/fcntlmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-08-07 18:51:38 (GMT)
committerGuido van Rossum <guido@python.org>2008-08-07 18:51:38 (GMT)
commitd69390107a7e5e42c2cfae34fa79282a751d2dac (patch)
treeb150d553ba348a9bf39907c5f3391d927df7574e /Modules/fcntlmodule.c
parent74022ab0130c84ca3bbe567dccffaf4cd4cb0452 (diff)
downloadcpython-d69390107a7e5e42c2cfae34fa79282a751d2dac.zip
cpython-d69390107a7e5e42c2cfae34fa79282a751d2dac.tar.gz
cpython-d69390107a7e5e42c2cfae34fa79282a751d2dac.tar.bz2
Patch by Ian Charnas from issue 3517.
Add F_FULLFSYNC if it exists (OS X only so far).
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r--Modules/fcntlmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 0c85f47..ab7f22d 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -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;