fcntl.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-09-02 Meco Man First version
  9. */
  10. #ifndef __FCNTL_H__
  11. #define __FCNTL_H__
  12. #include_next <fcntl.h>
  13. #define O_CREAT 0100
  14. #define O_EXCL 0200
  15. #define O_NOCTTY 0400
  16. #define O_TRUNC 01000
  17. #define O_APPEND 02000
  18. #define O_NONBLOCK 04000
  19. #define O_DSYNC 010000
  20. #define O_SYNC 04010000
  21. #define O_RSYNC 04010000
  22. #define O_CLOEXEC 02000000
  23. #define O_ASYNC 020000
  24. #define O_NOATIME 01000000
  25. #define O_PATH 010000000
  26. #define O_NDELAY O_NONBLOCK
  27. #ifndef O_LARGEFILE
  28. #define O_LARGEFILE 0400000
  29. #endif
  30. #ifndef O_DIRECT
  31. #define O_DIRECT 0200000
  32. #endif
  33. #ifndef O_TMPFILE
  34. #define O_TMPFILE 020040000
  35. #endif
  36. #ifndef O_NOFOLLOW
  37. #define O_NOFOLLOW 0100000
  38. #endif
  39. #ifndef O_DIRECTORY
  40. #define O_DIRECTORY 040000
  41. #endif
  42. #ifndef O_BINARY
  43. #define O_BINARY 00
  44. #endif
  45. #ifndef O_SEARCH
  46. #define O_SEARCH O_PATH
  47. #endif /* O_SEARCH */
  48. #ifndef O_EXEC
  49. #define O_EXEC O_PATH
  50. #endif /* O_EXEC */
  51. #endif