fcntl.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _PPC_FCNTL_H
  2. #define _PPC_FCNTL_H
  3. #define O_DIRECTORY 040000 /* must be a directory */
  4. #define O_NOFOLLOW 0100000 /* don't follow links */
  5. #define O_LARGEFILE 0200000
  6. #define O_DIRECT 0400000 /* direct disk access hint */
  7. #define F_GETLK 5
  8. #define F_SETLK 6
  9. #define F_SETLKW 7
  10. #define F_SETOWN 8 /* for sockets. */
  11. #define F_GETOWN 9 /* for sockets. */
  12. #define F_SETSIG 10 /* for sockets. */
  13. #define F_GETSIG 11 /* for sockets. */
  14. #ifndef __powerpc64__
  15. #define F_GETLK64 12 /* using 'struct flock64' */
  16. #define F_SETLK64 13
  17. #define F_SETLKW64 14
  18. #endif
  19. /* for posix fcntl() and lockf() */
  20. #define F_RDLCK 0
  21. #define F_WRLCK 1
  22. #define F_UNLCK 2
  23. /* for old implementation of bsd flock () */
  24. #define F_EXLCK 4 /* or 3 */
  25. #define F_SHLCK 8 /* or 4 */
  26. /* for leases */
  27. #define F_INPROGRESS 16
  28. struct flock {
  29. short l_type;
  30. short l_whence;
  31. off_t l_start;
  32. off_t l_len;
  33. pid_t l_pid;
  34. };
  35. #ifndef __powerpc64__
  36. struct flock64 {
  37. short l_type;
  38. short l_whence;
  39. loff_t l_start;
  40. loff_t l_len;
  41. pid_t l_pid;
  42. };
  43. #endif
  44. #include <asm-generic/fcntl.h>
  45. #endif /* _PPC_FCNTL_H */