[Python-checkins] r59172 - in python/trunk: Doc/library/os.rst Modules/posixmodule.c

georg.brandl python-checkins at python.org
Sat Nov 24 14:56:09 CET 2007


Author: georg.brandl
Date: Sat Nov 24 14:56:09 2007
New Revision: 59172

Modified:
   python/trunk/Doc/library/os.rst
   python/trunk/Modules/posixmodule.c
Log:
#1735632: add O_NOATIME constant to os module.
Also document a few other O_ constants that were missing from documentation.


Modified: python/trunk/Doc/library/os.rst
==============================================================================
--- python/trunk/Doc/library/os.rst	(original)
+++ python/trunk/Doc/library/os.rst	Sat Nov 24 14:56:09 2007
@@ -703,14 +703,7 @@
 
 
 .. data:: O_BINARY
-
-   Option for the *flag* argument to the :func:`open` function. This can be
-   bit-wise OR'd together with those listed above. Availability: Windows.
-
-   .. % XXX need to check on the availability of this one.
-
-
-.. data:: O_NOINHERIT
+          O_NOINHERIT
           O_SHORT_LIVED
           O_TEMPORARY
           O_RANDOM
@@ -721,6 +714,15 @@
    bit-wise OR'd together. Availability: Windows.
 
 
+.. data:: O_DIRECT
+          O_DIRECTORY
+          O_NOFOLLOW
+          O_NOATIME
+
+   Options for the *flag* argument to the :func:`open` function. These are
+   GNU extensions and not present if they are not defined by the C library.
+
+
 .. data:: SEEK_SET
           SEEK_CUR
           SEEK_END

Modified: python/trunk/Modules/posixmodule.c
==============================================================================
--- python/trunk/Modules/posixmodule.c	(original)
+++ python/trunk/Modules/posixmodule.c	Sat Nov 24 14:56:09 2007
@@ -8658,6 +8658,10 @@
         /* Do not follow links.	 */
         if (ins(d, "O_NOFOLLOW", (long)O_NOFOLLOW)) return -1;
 #endif
+#ifdef O_NOATIME
+	/* Do not update the access time. */
+	if (ins(d, "O_NOATIME", (long)O_NOATIME)) return -1;
+#endif
 
 	/* These come from sysexits.h */
 #ifdef EX_OK


More information about the Python-checkins mailing list