summaryrefslogtreecommitdiff
path: root/Cython/Includes/posix/fcntl.pxd
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Includes/posix/fcntl.pxd')
-rw-r--r--Cython/Includes/posix/fcntl.pxd34
1 files changed, 26 insertions, 8 deletions
diff --git a/Cython/Includes/posix/fcntl.pxd b/Cython/Includes/posix/fcntl.pxd
index 9afc33a36..f7bec9e37 100644
--- a/Cython/Includes/posix/fcntl.pxd
+++ b/Cython/Includes/posix/fcntl.pxd
@@ -1,8 +1,11 @@
-# http://www.opengroup.org/onlinepubs/009695399/basedefs/fcntl.h.html
+# https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
+
+from posix.types cimport mode_t, off_t, pid_t
cdef extern from "<fcntl.h>" nogil:
enum: F_DUPFD
+ enum: F_DUPFD_CLOEXEC
enum: F_GETFD
enum: F_SETFD
enum: F_GETFL
@@ -23,11 +26,14 @@ cdef extern from "<fcntl.h>" nogil:
enum: SEEK_CUR
enum: SEEK_END
+ enum: O_CLOEXEC
enum: O_CREAT
enum: O_DIRECT
+ enum: O_DIRECTORY
enum: O_EXCL
enum: O_NOCTTY
enum: O_TRUNC
+ enum: O_TTY_INIT
enum: O_APPEND
enum: O_DSYNC
@@ -37,9 +43,17 @@ cdef extern from "<fcntl.h>" nogil:
enum: O_ACCMODE # O_RDONLY|O_WRONLY|O_RDWR
+ enum: O_EXEC
enum: O_RDONLY
enum: O_WRONLY
enum: O_RDWR
+ enum: O_SEARCH
+
+ enum: AT_FDCWD
+ enum: AT_EACCESS
+ enum: AT_SYMLINK_NOFOLLOW
+ enum: AT_SYMLINK_FOLLOW
+ enum: AT_REMOVEDIR
enum: S_IFMT
enum: S_IFBLK
@@ -50,9 +64,12 @@ cdef extern from "<fcntl.h>" nogil:
enum: S_IFLNK
enum: S_IFSOCK
- ctypedef int mode_t
- ctypedef signed pid_t
- ctypedef signed off_t
+ enum: POSIX_FADV_DONTNEED
+ enum: POSIX_FADV_NOREUSE
+ enum: POSIX_FADV_NORMAL
+ enum: POSIX_FADV_RANDOM
+ enum: POSIX_FADV_SEQUENTIAL
+ enum: POSIX_FADV_WILLNEED
struct flock:
short l_type
@@ -61,8 +78,9 @@ cdef extern from "<fcntl.h>" nogil:
off_t l_len
pid_t l_pid
- int creat(char *, mode_t)
+ int creat(const char *, mode_t)
int fcntl(int, int, ...)
- int open(char *, int, ...)
- #int open (char *, int, mode_t)
-
+ int open(const char *, int, ...)
+ int openat(int, const char *, int, ...)
+ int posix_fadvise(int, off_t, off_t, int)
+ int posix_fallocate(int, off_t, off_t)