1
0

unistd.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _SYS_UNISTD_H
  2. #define _SYS_UNISTD_H
  3. #ifdef RT_USING_DFS
  4. #include <dfs_posix.h>
  5. #else
  6. #define _FREAD 0x0001 /* read enabled */
  7. #define _FWRITE 0x0002 /* write enabled */
  8. #define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
  9. #define _FMARK 0x0010 /* internal; mark during gc() */
  10. #define _FDEFER 0x0020 /* internal; defer for next gc pass */
  11. #define _FASYNC 0x0040 /* signal pgrp when data ready */
  12. #define _FSHLOCK 0x0080 /* BSD flock() shared lock present */
  13. #define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */
  14. #define _FCREAT 0x0200 /* open with file create */
  15. #define _FTRUNC 0x0400 /* open with truncation */
  16. #define _FEXCL 0x0800 /* error on open if file exists */
  17. #define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */
  18. #define _FSYNC 0x2000 /* do all writes synchronously */
  19. #define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
  20. #define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */
  21. #define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
  22. #define O_RDONLY 0 /* +1 == FREAD */
  23. #define O_WRONLY 1 /* +1 == FWRITE */
  24. #define O_RDWR 2 /* +1 == FREAD|FWRITE */
  25. #define O_APPEND _FAPPEND
  26. #define O_CREAT _FCREAT
  27. #define O_TRUNC _FTRUNC
  28. #define O_EXCL _FEXCL
  29. #define O_SYNC _FSYNC
  30. #endif
  31. #endif /* _SYS_UNISTD_H */