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
98977d53
Commit
98977d53
authored
Dec 28, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fcntl.h constants from glibc 2.2.4. Fixes #496171.
parent
749d270f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
Modules/fcntlmodule.c
Modules/fcntlmodule.c
+70
-0
No files found.
Modules/fcntlmodule.c
View file @
98977d53
...
...
@@ -344,6 +344,20 @@ all_ins(PyObject* d)
if
(
ins
(
d
,
"LOCK_EX"
,
(
long
)
LOCK_EX
))
return
-
1
;
if
(
ins
(
d
,
"LOCK_NB"
,
(
long
)
LOCK_NB
))
return
-
1
;
if
(
ins
(
d
,
"LOCK_UN"
,
(
long
)
LOCK_UN
))
return
-
1
;
/* GNU extensions, as of glibc 2.2.4 */
#ifdef LOCK_MAND
if
(
ins
(
d
,
"LOCK_MAND"
,
(
long
)
LOCK_MAND
))
return
-
1
;
#endif
#ifdef LOCK_READ
if
(
ins
(
d
,
"LOCK_READ"
,
(
long
)
LOCK_READ
))
return
-
1
;
#endif
#ifdef LOCK_WRITE
if
(
ins
(
d
,
"LOCK_WRITE"
,
(
long
)
LOCK_WRITE
))
return
-
1
;
#endif
#ifdef LOCK_RW
if
(
ins
(
d
,
"LOCK_RW"
,
(
long
)
LOCK_RW
))
return
-
1
;
#endif
#ifdef F_DUPFD
if
(
ins
(
d
,
"F_DUPFD"
,
(
long
)
F_DUPFD
))
return
-
1
;
#endif
...
...
@@ -389,6 +403,62 @@ all_ins(PyObject* d)
#ifdef F_UNLCK
if
(
ins
(
d
,
"F_UNLCK"
,
(
long
)
F_UNLCK
))
return
-
1
;
#endif
/* LFS constants */
#ifdef F_GETLK64
if
(
ins
(
d
,
"F_GETLK64"
,
(
long
)
F_GETLK64
))
return
-
1
;
#endif
#ifdef F_SETLK64
if
(
ins
(
d
,
"F_SETLK64"
,
(
long
)
F_SETLK64
))
return
-
1
;
#endif
#ifdef F_SETLKW64
if
(
ins
(
d
,
"F_SETLKW64"
,
(
long
)
F_SETLKW64
))
return
-
1
;
#endif
/* GNU extensions, as of glibc 2.2.4. */
#ifdef F_SETLEASE
if
(
ins
(
d
,
"F_SETLEASE"
,
(
long
)
F_SETLEASE
))
return
-
1
;
#endif
#ifdef F_GETLEASE
if
(
ins
(
d
,
"F_GETLEASE"
,
(
long
)
F_GETLEASE
))
return
-
1
;
#endif
#ifdef F_NOTIFY
if
(
ins
(
d
,
"F_NOTIFY"
,
(
long
)
F_NOTIFY
))
return
-
1
;
#endif
/* Old BSD flock(). */
#ifdef F_EXLCK
if
(
ins
(
d
,
"F_EXLCK"
,
(
long
)
F_EXLCK
))
return
-
1
;
#endif
#ifdef F_SHLCK
if
(
ins
(
d
,
"F_SHLCK"
,
(
long
)
F_SHLCK
))
return
-
1
;
#endif
/* For F_{GET|SET}FL */
#ifdef FD_CLOEXEC
if
(
ins
(
d
,
"FD_CLOEXEC"
,
(
long
)
FD_CLOEXEC
))
return
-
1
;
#endif
/* For F_NOTIFY */
#ifdef DN_ACCESS
if
(
ins
(
d
,
"DN_ACCESS"
,
(
long
)
DN_ACCESS
))
return
-
1
;
#endif
#ifdef DN_MODIFY
if
(
ins
(
d
,
"DN_MODIFY"
,
(
long
)
DN_MODIFY
))
return
-
1
;
#endif
#ifdef DN_CREATE
if
(
ins
(
d
,
"DN_CREATE"
,
(
long
)
DN_CREATE
))
return
-
1
;
#endif
#ifdef DN_DELETE
if
(
ins
(
d
,
"DN_DELETE"
,
(
long
)
DN_DELETE
))
return
-
1
;
#endif
#ifdef DN_RENAME
if
(
ins
(
d
,
"DN_RENAME"
,
(
long
)
DN_RENAME
))
return
-
1
;
#endif
#ifdef DN_ATTRIB
if
(
ins
(
d
,
"DN_ATTRIB"
,
(
long
)
DN_ATTRIB
))
return
-
1
;
#endif
#ifdef DN_MULTISHOT
if
(
ins
(
d
,
"DN_MULTISHOT"
,
(
long
)
DN_MULTISHOT
))
return
-
1
;
#endif
return
0
;
}
...
...
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