Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4cacc82b
Commit
4cacc82b
authored
Dec 08, 2013
by
doko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Issue #19736: Add module-level statvfs constants defined for GNU/glibc
based systems.
parent
63c2bb8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
Doc/library/os.rst
Doc/library/os.rst
+15
-0
Misc/NEWS
Misc/NEWS
+3
-0
Modules/posixmodule.c
Modules/posixmodule.c
+29
-0
No files found.
Doc/library/os.rst
View file @
4cacc82b
...
@@ -1980,11 +1980,26 @@ features:
...
@@ -1980,11 +1980,26 @@ features:
read-only, and if :const:`ST_NOSUID` is set, the semantics of
read-only, and if :const:`ST_NOSUID` is set, the semantics of
setuid/setgid bits are disabled or not supported.
setuid/setgid bits are disabled or not supported.
Additional module-level constants are defined for GNU/glibc based systems.
These are :const:`ST_NODEV` (disallow access to device special files),
:const:`ST_NOEXEC` (disallow program execution), :const:`ST_SYNCHRONOUS`
(writes are synced at once), :const:`ST_MANDLOCK` (allow mandatory locks on an FS),
:const:`ST_WRITE` (write on file/directory/symlink), :const:`ST_APPEND`
(append-only file), :const:`ST_IMMUTABLE` (immutable file), :const:`ST_NOATIME`
(do not update access times), :const:`ST_NODIRATIME` (do not update directory access
times), :const:`ST_RELATIME` (update atime relative to mtime/ctime).
This function can support :ref:`specifying a file descriptor <path_fd>`.
This function can support :ref:`specifying a file descriptor <path_fd>`.
.. versionchanged:: 3.2
.. versionchanged:: 3.2
The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added.
The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added.
.. versionchanged:: 3.4
The :const:`ST_NODEV`, :const:`ST_NOEXEC`, :const:`ST_SYNCHRONOUS`,
:const:`ST_MANDLOCK`, :const:`ST_WRITE`, :const:`ST_APPEND`,
:const:`ST_IMMUTABLE`, :const:`ST_NOATIME`, :const:`ST_NODIRATIME`,
and :const:`ST_RELATIME` constants were added.
Availability: Unix.
Availability: Unix.
.. versionadded:: 3.3
.. versionadded:: 3.3
...
...
Misc/NEWS
View file @
4cacc82b
...
@@ -10,6 +10,9 @@ Release date: 2014-01-05
...
@@ -10,6 +10,9 @@ Release date: 2014-01-05
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #19736: Add module-level statvfs constants defined for GNU/glibc
based systems.
- Issue #19729: In str.format(), fix recursive expansion in format spec.
- Issue #19729: In str.format(), fix recursive expansion in format spec.
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
...
...
Modules/posixmodule.c
View file @
4cacc82b
...
@@ -11858,6 +11858,35 @@ all_ins(PyObject *m)
...
@@ -11858,6 +11858,35 @@ all_ins(PyObject *m)
if
(
PyModule_AddIntMacro
(
m
,
ST_NOSUID
))
return
-
1
;
if
(
PyModule_AddIntMacro
(
m
,
ST_NOSUID
))
return
-
1
;
#endif
/* ST_NOSUID */
#endif
/* ST_NOSUID */
/* GNU extensions */
#ifdef ST_NODEV
if
(
PyModule_AddIntMacro
(
m
,
ST_NODEV
))
return
-
1
;
#endif
/* ST_NODEV */
#ifdef ST_NOEXEC
if
(
PyModule_AddIntMacro
(
m
,
ST_NOEXEC
))
return
-
1
;
#endif
/* ST_NOEXEC */
#ifdef ST_SYNCHRONOUS
if
(
PyModule_AddIntMacro
(
m
,
ST_SYNCHRONOUS
))
return
-
1
;
#endif
/* ST_SYNCHRONOUS */
#ifdef ST_MANDLOCK
if
(
PyModule_AddIntMacro
(
m
,
ST_MANDLOCK
))
return
-
1
;
#endif
/* ST_MANDLOCK */
#ifdef ST_WRITE
if
(
PyModule_AddIntMacro
(
m
,
ST_WRITE
))
return
-
1
;
#endif
/* ST_WRITE */
#ifdef ST_APPEND
if
(
PyModule_AddIntMacro
(
m
,
ST_APPEND
))
return
-
1
;
#endif
/* ST_APPEND */
#ifdef ST_NOATIME
if
(
PyModule_AddIntMacro
(
m
,
ST_NOATIME
))
return
-
1
;
#endif
/* ST_NOATIME */
#ifdef ST_NODIRATIME
if
(
PyModule_AddIntMacro
(
m
,
ST_NODIRATIME
))
return
-
1
;
#endif
/* ST_NODIRATIME */
#ifdef ST_RELATIME
if
(
PyModule_AddIntMacro
(
m
,
ST_RELATIME
))
return
-
1
;
#endif
/* ST_RELATIME */
/* FreeBSD sendfile() constants */
/* FreeBSD sendfile() constants */
#ifdef SF_NODISKIO
#ifdef SF_NODISKIO
if
(
PyModule_AddIntMacro
(
m
,
SF_NODISKIO
))
return
-
1
;
if
(
PyModule_AddIntMacro
(
m
,
SF_NODISKIO
))
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment