summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/lib/libos.tex6
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/posixmodule.c6
3 files changed, 14 insertions, 1 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index bf6e5d6..d38e9be 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -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}
diff --git a/Misc/NEWS b/Misc/NEWS
index b27b169..4d8f3b1 100644
--- 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.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 1ca131e..79d5e71 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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