fcntl.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef _PPC_FCNTL_H
  2. #define _PPC_FCNTL_H
  3. /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
  4. located on an ext2 file system */
  5. #define O_CREAT 0100 /* not fcntl */
  6. #define O_EXCL 0200 /* not fcntl */
  7. #define O_NOCTTY 0400 /* not fcntl */
  8. #define O_TRUNC 01000 /* not fcntl */
  9. #define O_APPEND 02000
  10. #define O_NONBLOCK 04000
  11. #define O_NDELAY O_NONBLOCK
  12. #define O_SYNC 010000
  13. #define FASYNC 020000 /* fcntl, for BSD compatibility */
  14. #define O_DIRECTORY 040000 /* must be a directory */
  15. #define O_NOFOLLOW 0100000 /* don't follow links */
  16. #define O_LARGEFILE 0200000
  17. #define O_DIRECT 0400000 /* direct disk access hint */
  18. #define O_NOATIME 01000000
  19. #define F_GETLK 5
  20. #define F_SETLK 6
  21. #define F_SETLKW 7
  22. #define F_SETOWN 8 /* for sockets. */
  23. #define F_GETOWN 9 /* for sockets. */
  24. #define F_SETSIG 10 /* for sockets. */
  25. #define F_GETSIG 11 /* for sockets. */
  26. #ifndef __powerpc64__
  27. #define F_GETLK64 12 /* using 'struct flock64' */
  28. #define F_SETLK64 13
  29. #define F_SETLKW64 14
  30. #endif
  31. /* for posix fcntl() and lockf() */
  32. #define F_RDLCK 0
  33. #define F_WRLCK 1
  34. #define F_UNLCK 2
  35. /* for old implementation of bsd flock () */
  36. #define F_EXLCK 4 /* or 3 */
  37. #define F_SHLCK 8 /* or 4 */
  38. /* for leases */
  39. #define F_INPROGRESS 16
  40. struct flock {
  41. short l_type;
  42. short l_whence;
  43. off_t l_start;
  44. off_t l_len;
  45. pid_t l_pid;
  46. };
  47. #ifndef __powerpc64__
  48. struct flock64 {
  49. short l_type;
  50. short l_whence;
  51. loff_t l_start;
  52. loff_t l_len;
  53. pid_t l_pid;
  54. };
  55. #endif
  56. #include <asm-generic/fcntl.h>
  57. #endif /* _PPC_FCNTL_H */