]> granicus.if.org Git - python/commitdiff
Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel
authorChristian Heimes <christian@cheimes.de>
Fri, 16 Aug 2013 12:35:09 +0000 (14:35 +0200)
committerChristian Heimes <christian@cheimes.de>
Fri, 16 Aug 2013 12:35:09 +0000 (14:35 +0200)
3.11 or newer. It's only defined on system with 3.11 uapi headers, too.

Doc/library/os.rst
Misc/NEWS
Modules/posixmodule.c

index 5d8ecfbee1aeae205ba5b0ec65e7f641a13ca84d..cfcb062d40c5e7f2fb63ce004622bad8d7191398 100644 (file)
@@ -919,6 +919,7 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
           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.
index 229a25900b4bed9369f3020aed43433ee90ab638..93b60b2c9aea29ad8d6557669e8c0adc23720da1 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -28,6 +28,9 @@ Core and Builtins
 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.
 
index ccba5f99814eef220a69c2559db5b27ab7276429..ab3e9f0b033fc65a34c5b7888bc66cc0345b6a66 100644 (file)
@@ -11245,6 +11245,9 @@ all_ins(PyObject *m)
 #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