diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-03-13 10:27:41 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-03-13 10:27:41 -0500 |
commit | 3b965a237ce987d9c7e2918acf3ce5c0d068fc9c (patch) | |
tree | d8d56cb8426af3a29017d3981ee37c8bd236e5c4 | |
parent | fe1c471cb17b059d12d4cd293c7be1850206f755 (diff) | |
download | cpython-git-3b965a237ce987d9c7e2918acf3ce5c0d068fc9c.tar.gz |
expose O_PATH if possible
-rw-r--r-- | Doc/library/os.rst | 1 | ||||
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/posixmodule.c | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index d854474ad9..344218c431 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -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. @@ -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. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 0586da338a..3ddeef455e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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 |