1
0

stat.h 1.3 KB

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