home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / stat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  2.6 KB  |  68 lines

  1.  
  2. /*
  3.  *    @(#) stat.h 2.2 88/05/18 
  4.  *
  5.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
  6.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
  7.  *    This Module contains Proprietary Information of
  8.  *    The Santa Cruz Operation, Microsoft Corporation
  9.  *    and AT&T, and should be treated as Confidential.
  10.  */
  11.  
  12. /*
  13.  * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
  14.  * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
  15.  * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
  16.  * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
  17.  */
  18.  
  19. /***    stat -- structure returned by stat, fstat system calls.
  20.  *
  21.  */
  22.  
  23. struct stat {    /* see stat(2) */
  24.     dev_t    st_dev;        /* id of device containing directory entry */
  25.     ino_t    st_ino;        /* inode number */
  26.     ushort    st_mode;    /* file mode, see mknod(2) */
  27.     short    st_nlink;    /* # of links */
  28.     ushort    st_uid;        /* owner uid */
  29.     ushort    st_gid;        /* owner gid */
  30.     dev_t    st_rdev;    /* id of device.  Only defined for character
  31.                  * and block special files.
  32.                  */
  33.     off_t    st_size;    /* file size in bytes */
  34.         /* all times measured in seconds since 'the epoch' */
  35.     time_t    st_atime;    /* time of last access */
  36.     time_t    st_mtime;    /* time of last data modification */
  37.     time_t    st_ctime;    /* time of last file status 'change' */
  38. };
  39.  
  40. #define    S_IFMT    0170000        /* type of file */
  41. #define        S_IFDIR    0040000    /* directory */
  42. #define        S_IFCHR    0020000    /* character special */
  43. #define        S_IFBLK    0060000    /* block special */
  44. #define        S_IFREG    0100000    /* regular */
  45. #define        S_IFIFO    0010000    /* fifo */
  46. #define        S_IFNAM    0050000    /* name space entry */
  47. #define    S_INSEM        01    /* semaphore */
  48. #define    S_INSHD        02    /* shared memory */
  49. #define    S_ISUID    04000        /* set user id on execution */
  50. #define    S_ISGID    02000        /* set group id on execution */
  51. #define    S_ISVTX    01000        /* save swapped text even after use */
  52. #define    S_IREAD    00400        /* read permission, owner */
  53. #define    S_IWRITE    00200    /* write permission, owner */
  54. #define    S_IEXEC    00100        /* execute/search permission, owner */
  55. #define    S_ENFMT    S_ISGID        /* record locking enforcement flag */
  56. #define    S_IRWXU    00700        /* read, write, execute: owner */
  57. #define    S_IRUSR    00400        /* read permission: owner */
  58. #define    S_IWUSR    00200        /* write permission: owner */
  59. #define    S_IXUSR    00100        /* execute permission: owner */
  60. #define    S_IRWXG    00070        /* read, write, execute: group */
  61. #define    S_IRGRP    00040        /* read permission: group */
  62. #define    S_IWGRP    00020        /* write permission: group */
  63. #define    S_IXGRP    00010        /* execute permission: group */
  64. #define    S_IRWXO    00007        /* read, write, execute: other */
  65. #define    S_IROTH    00004        /* read permission: other */
  66. #define    S_IWOTH    00002        /* write permission: other */
  67. #define    S_IXOTH    00001        /* execute permission: other */
  68.