file.h 779 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _SYS_FILE_H
  2. #define _SYS_FILE_H
  3. #include <features.h>
  4. #include <fcntl.h>
  5. #ifndef L_SET
  6. #define L_SET 0 /* absolute offset */
  7. #define L_INCR 1 /* relative to current offset */
  8. #define L_XTND 2 /* relative to end of file */
  9. #endif
  10. #ifndef LOCK_SH
  11. /* Operations for the `flock' call. */
  12. #define LOCK_SH 1 /* Shared lock. */
  13. #define LOCK_EX 2 /* Exclusive lock. */
  14. #define LOCK_UN 8 /* Unlock. */
  15. /* Can be OR'd in to one of the above. */
  16. #define LOCK_NB 4 /* Don't block when locking. */
  17. #endif
  18. __BEGIN_DECLS
  19. /* Apply or remove an advisory lock, according to OPERATION,
  20. on the file FD refers to. */
  21. extern int flock __P ((int __fd, int __operation));
  22. __END_DECLS
  23. #endif