]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
expose O_PATH if possible
authorBenjamin Peterson <benjamin@python.org>
Wed, 13 Mar 2013 15:27:41 +0000 (10:27 -0500)
committerBenjamin Peterson <benjamin@python.org>
Wed, 13 Mar 2013 15:27:41 +0000 (10:27 -0500)
Doc/library/os.rst
Misc/NEWS
Modules/posixmodule.c

index d854474ad9dd503348659f71c9e54a7a1d9f6744..344218c4311bb8bbd13acd531312d459d7dfbb2e 100644 (file)
@@ -1137,6 +1137,7 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
           O_DIRECTORY
           O_NOFOLLOW
           O_NOATIME
+          O_PATH
 
    These constants are GNU extensions and not present if they are not defined by
    the C library.
index a2068b192abce7a09797397104ffb7d511212562..ddb39d46cde0622a9814a258dcf7eb35b71af715 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -277,6 +277,8 @@ Core and Builtins
 Library
 -------
 
+- Expose the O_PATH constant in the os module if it is available.
+
 - Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused
   a failure while decoding empty object literals when object_pairs_hook was
   specified.
index 0586da338a059e625728645b8dab354d1bdc5849..3ddeef455e3b1f5841c5ea93b2588bd18f906dbc 100644 (file)
@@ -10858,6 +10858,9 @@ all_ins(PyObject *d)
 #ifdef O_SEARCH
     if (ins(d, "O_SEARCH", (long)O_SEARCH)) return -1;
 #endif
+#ifdef O_PATH
+    if (ins(d, "O_PATH", (long)O_PATH)) return -1;
+#endif
 #ifdef O_TTY_INIT
     if (ins(d, "O_TTY_INIT", (long)O_TTY_INIT)) return -1;
 #endif