Leaked source code of windows server 2003
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.

59 lines
1.3 KiB

  1. /***
  2. *sys\stat.h - defines structure used by stat() and fstat()
  3. *
  4. * Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the structure used by the stat() and fstat()
  8. * routines.
  9. * [System V]
  10. *
  11. ****/
  12. #if defined(_DLL) && !defined(_MT)
  13. #error Cannot define _DLL without _MT
  14. #endif
  15. #ifdef _MT
  16. #define _FAR_ _far
  17. #else
  18. #define _FAR_
  19. #endif
  20. #ifndef _TIME_T_DEFINED
  21. typedef long time_t;
  22. #define _TIME_T_DEFINED
  23. #endif
  24. /* define structure for returning status information */
  25. #ifndef _STAT_DEFINED
  26. struct stat {
  27. dev_t st_dev;
  28. ino_t st_ino;
  29. unsigned short st_mode;
  30. short st_nlink;
  31. short st_uid;
  32. short st_gid;
  33. dev_t st_rdev;
  34. off_t st_size;
  35. time_t st_atime;
  36. time_t st_mtime;
  37. time_t st_ctime;
  38. };
  39. #define _STAT_DEFINED
  40. #endif
  41. #define S_IFMT 0170000 /* file type mask */
  42. #define S_IFDIR 0040000 /* directory */
  43. #define S_IFCHR 0020000 /* character special */
  44. #define S_IFREG 0100000 /* regular */
  45. #define S_IREAD 0000400 /* read permission, owner */
  46. #define S_IWRITE 0000200 /* write permission, owner */
  47. #define S_IEXEC 0000100 /* execute/search permission, owner */
  48. /* function prototypes */
  49. int _FAR_ _cdecl fstat(int, struct stat _FAR_ *);
  50. int _FAR_ _cdecl stat(char _FAR_ *, struct stat _FAR_ *);