From: Georg Brandl Date: Sat, 24 Nov 2007 13:56:09 +0000 (+0000) Subject: #1735632: add O_NOATIME constant to os module. X-Git-Tag: v2.6a1~1001 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b67da6ed2b182d2ef0b4e86e1dd402d27c53422d;p=thirdparty%2FPython%2Fcpython.git #1735632: add O_NOATIME constant to os module. Also document a few other O_ constants that were missing from documentation. --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 3843b53deb45..7d12488e3185 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -703,14 +703,7 @@ platforms. For descriptions of their availability and use, consult .. 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 @@ platforms. For descriptions of their availability and use, consult 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 diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 7c25a05b4807..5fcc521d7a47 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -8658,6 +8658,10 @@ all_ins(PyObject *d) /* 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