Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23e1ecb

Browse files
author
Charles-François Natali
committed
Issue #13324: fcntlmodule: Add the F_NOCACHE flag. Patch by Alex Stewart.
1 parent ca897e9 commit 23e1ecb

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ Joel Stanley
919919
Oliver Steele
920920
Greg Stein
921921
Chris Stern
922+
Alex Stewart
922923
Victor Stinner
923924
Richard Stoakley
924925
Peter Stoehr

Modules/fcntlmodule.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,13 @@ all_ins(PyObject* d)
540540
if (ins(d, "F_SHLCK", (long)F_SHLCK)) return -1;
541541
#endif
542542

543-
/* OS X (and maybe others) let you tell the storage device to flush to physical media */
543+
/* OS X specifics */
544544
#ifdef F_FULLFSYNC
545545
if (ins(d, "F_FULLFSYNC", (long)F_FULLFSYNC)) return -1;
546546
#endif
547+
#ifdef F_NOCACHE
548+
if (ins(d, "F_NOCACHE", (long)F_NOCACHE)) return -1;
549+
#endif
547550

548551
/* For F_{GET|SET}FL */
549552
#ifdef FD_CLOEXEC

0 commit comments

Comments
 (0)