]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add O_SHLOCK & O_EXLOCK. Closes patch #1103951.
authorSkip Montanaro <skip@pobox.com>
Mon, 16 May 2005 02:42:22 +0000 (02:42 +0000)
committerSkip Montanaro <skip@pobox.com>
Mon, 16 May 2005 02:42:22 +0000 (02:42 +0000)
Doc/lib/libos.tex
Misc/NEWS
Modules/posixmodule.c

index bf6e5d6c0626558c687201c5d1b18cde2b701545..d38e9be09695974510235641e6a9f495d5683d06 100644 (file)
@@ -594,7 +594,9 @@ its \method{write()} method.
 
 
 The following data items are available for use in constructing the
-\var{flags} parameter to the \function{open()} function.
+\var{flags} parameter to the \function{open()} function.  Some items will
+not be available on all platforms.  For descriptions of their availability
+and use, consult \manpage{open}{2}.
 
 \begin{datadesc}{O_RDONLY}
 \dataline{O_WRONLY}
@@ -614,6 +616,8 @@ Availability: Macintosh, \UNIX, Windows.
 \dataline{O_NDELAY}
 \dataline{O_NONBLOCK}
 \dataline{O_NOCTTY}
+\dataline{O_SHLOCK}
+\dataline{O_EXLOCK}
 More options for the \var{flag} argument to the \function{open()} function.
 Availability: Macintosh, \UNIX.
 \end{datadesc}
index b27b169971b31e879fd86c4708f5029b8837ff23..4d8f3b15bd25ca2f9ad650bcf10b2196007e60cb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -81,6 +81,9 @@ Core and builtins
 Extension Modules
 -----------------
 
+- Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
+  available on the platform.
+
 - Bug #1166660: The readline module could segfault if hook functions
   were set in a different thread than that which called readline.
 
index 1ca131e337a53d696e587496fe76a247bfec9d78..79d5e718c966ef15e9b9d3dd7ee2dcb4357cdf33 100644 (file)
@@ -7718,6 +7718,12 @@ all_ins(PyObject *d)
 #ifdef O_LARGEFILE
         if (ins(d, "O_LARGEFILE", (long)O_LARGEFILE)) return -1;
 #endif
+#ifdef O_SHLOCK
+        if (ins(d, "O_SHLOCK", (long)O_SHLOCK)) return -1;
+#endif
+#ifdef O_EXLOCK
+        if (ins(d, "O_EXLOCK", (long)O_EXLOCK)) return -1;
+#endif
 
 /* MS Windows */
 #ifdef O_NOINHERIT