Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1989-1996 Microsoft Corporation
  3. Module Name:
  4. stat.h
  5. Abstract:
  6. This module contains the stat structure described in section 5.6.1
  7. of IEEE P1003.1/Draft 13.
  8. --*/
  9. #ifndef _SYS_STAT_
  10. #define _SYS_STAT_
  11. #include <sys/types.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. struct stat {
  16. mode_t st_mode;
  17. ino_t st_ino;
  18. dev_t st_dev;
  19. nlink_t st_nlink;
  20. uid_t st_uid;
  21. gid_t st_gid;
  22. off_t st_size;
  23. time_t st_atime;
  24. time_t st_mtime;
  25. time_t st_ctime;
  26. };
  27. /*
  28. * Type bits for mode field
  29. */
  30. #define S_IFMT 000770000
  31. #define S_IFIFO 000010000
  32. #define S_IFCHR 000020000
  33. #define S_IFDIR 000040000
  34. #define S_IFBLK 000060000
  35. #define S_IFREG 000100000
  36. /*
  37. * Set Id Bits for mode
  38. */
  39. #define S_ISUID 000004000
  40. #define S_ISGID 000002000
  41. /*
  42. * Protection Bits for mode
  43. */
  44. #define _S_PROT 000000777
  45. #define S_IRWXU 000000700
  46. #define S_IRUSR 000000400
  47. #define S_IWUSR 000000200
  48. #define S_IXUSR 000000100
  49. #define S_IRWXG 000000070
  50. #define S_IRGRP 000000040
  51. #define S_IWGRP 000000020
  52. #define S_IXGRP 000000010
  53. #define S_IRWXO 000000007
  54. #define S_IROTH 000000004
  55. #define S_IWOTH 000000002
  56. #define S_IXOTH 000000001
  57. #define S_ISDIR(m) ( ((m) & S_IFMT) == S_IFDIR )
  58. #define S_ISCHR(m) ( ((m) & S_IFMT) == S_IFCHR )
  59. #define S_ISBLK(m) ( ((m) & S_IFMT) == S_IFBLK )
  60. #define S_ISREG(m) ( ((m) & S_IFMT) == S_IFREG )
  61. #define S_ISFIFO(m) ( ((m) & S_IFMT) == S_IFIFO )
  62. mode_t __cdecl umask(mode_t);
  63. int __cdecl mkdir(const char *, mode_t);
  64. int __cdecl mkfifo(const char *, mode_t);
  65. int __cdecl stat(const char *, struct stat *);
  66. int __cdecl fstat(int, struct stat *);
  67. int __cdecl chmod(const char *, mode_t);
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif /* _SYS_STAT_ */