fcntl.pxd 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # http://www.opengroup.org/onlinepubs/009695399/basedefs/fcntl.h.html
  2. cdef extern from "<fcntl.h>" nogil:
  3. enum: F_DUPFD
  4. enum: F_GETFD
  5. enum: F_SETFD
  6. enum: F_GETFL
  7. enum: F_SETFL
  8. enum: F_GETLK
  9. enum: F_SETLK
  10. enum: F_SETLKW
  11. enum: F_GETOWN
  12. enum: F_SETOWN
  13. enum: FD_CLOEXEC
  14. enum: F_RDLCK
  15. enum: F_UNLCK
  16. enum: F_WRLCK
  17. enum: SEEK_SET
  18. enum: SEEK_CUR
  19. enum: SEEK_END
  20. enum: O_CREAT
  21. enum: O_DIRECT
  22. enum: O_EXCL
  23. enum: O_NOCTTY
  24. enum: O_TRUNC
  25. enum: O_APPEND
  26. enum: O_DSYNC
  27. enum: O_NONBLOCK
  28. enum: O_RSYNC
  29. enum: O_SYNC
  30. enum: O_ACCMODE # O_RDONLY|O_WRONLY|O_RDWR
  31. enum: O_RDONLY
  32. enum: O_WRONLY
  33. enum: O_RDWR
  34. enum: S_IFMT
  35. enum: S_IFBLK
  36. enum: S_IFCHR
  37. enum: S_IFIFO
  38. enum: S_IFREG
  39. enum: S_IFDIR
  40. enum: S_IFLNK
  41. enum: S_IFSOCK
  42. ctypedef int mode_t
  43. ctypedef signed pid_t
  44. ctypedef signed off_t
  45. struct flock:
  46. short l_type
  47. short l_whence
  48. off_t l_start
  49. off_t l_len
  50. pid_t l_pid
  51. int creat(char *, mode_t)
  52. int fcntl(int, int, ...)
  53. int open(char *, int, ...)
  54. #int open (char *, int, mode_t)