[Python-checkins] cpython: Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel

christian.heimes python-checkins at python.org
Fri Aug 16 14:38:01 CEST 2013


http://hg.python.org/cpython/rev/f6034602410c
changeset:   85188:f6034602410c
user:        Christian Heimes <christian at cheimes.de>
date:        Fri Aug 16 14:35:09 2013 +0200
summary:
  Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel
3.11 or newer. It's only defined on system with 3.11 uapi headers, too.

files:
  Doc/library/os.rst    |  1 +
  Misc/NEWS             |  3 +++
  Modules/posixmodule.c |  3 +++
  3 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -919,6 +919,7 @@
           O_NOFOLLOW
           O_NOATIME
           O_PATH
+          O_TMPFILE
 
    These constants are GNU extensions and not present if they are not defined by
    the C library.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -28,6 +28,9 @@
 Library
 -------
 
+- Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel
+  3.11 or newer. It's only defined on system with 3.11 uapi headers, too.
+
 - Issue #18532: Change the builtin hash algorithms' names to lower case names
   as promised by hashlib's documentation.
 
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -11245,6 +11245,9 @@
 #ifdef O_TTY_INIT
     if (PyModule_AddIntMacro(m, O_TTY_INIT)) return -1;
 #endif
+#ifdef O_TMPFILE
+    if (PyModule_AddIntMacro(m, O_TMPFILE)) return -1;
+#endif
 #ifdef PRIO_PROCESS
     if (PyModule_AddIntMacro(m, PRIO_PROCESS)) return -1;
 #endif

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list