1
0

fcntl.h 648 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _FCNTL_H
  2. #define _FCNTL_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define __NEED_off_t
  7. #define __NEED_pid_t
  8. #define __NEED_mode_t
  9. #include <bits/alltypes.h>
  10. #include <bits/fcntl.h>
  11. struct flock
  12. {
  13. short l_type;
  14. short l_whence;
  15. off_t l_start;
  16. off_t l_len;
  17. pid_t l_pid;
  18. };
  19. int creat(const char *, mode_t);
  20. int fcntl(int, int, ...);
  21. int open(const char *, int, ...);
  22. int openat(int, const char *, int, ...);
  23. int posix_fadvise(int, off_t, off_t, int);
  24. int posix_fallocate(int, off_t, off_t);
  25. #undef SEEK_SET
  26. #undef SEEK_CUR
  27. #undef SEEK_END
  28. #define SEEK_SET 0
  29. #define SEEK_CUR 1
  30. #define SEEK_END 2
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif