Annotation of mstools/posix/h/sys/stat.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1989  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:    stat.h
                      8: 
                      9: Abstract:
                     10: 
                     11:    This module contains the stat structure described in section 5.6.1
                     12:    of IEEE P1003.1/Draft 13.
                     13: 
                     14: Author:
                     15: 
                     16:    Mark Lucovsky (markl) 15-Mar-1989
                     17: 
                     18: Revision History:
                     19: 
                     20: --*/
                     21: 
                     22: #ifndef _SYS_STAT_
                     23: #define _SYS_STAT_
                     24: 
                     25: #include <sys/types.h>
                     26: 
                     27: struct stat {
                     28:     mode_t st_mode;
                     29:     ino_t st_ino;
                     30:     dev_t st_dev;
                     31:     nlink_t st_nlink;
                     32:     uid_t st_uid;
                     33:     gid_t st_gid;
                     34:     off_t st_size;
                     35:     time_t st_atime;
                     36:     time_t st_mtime;
                     37:     time_t st_ctime;
                     38: };
                     39: 
                     40: /*
                     41:  * Type bits for mode field
                     42:  */
                     43: 
                     44: #define S_IFMT     0x01f00000
                     45: 
                     46: #define S_IFDIR     0x00100000
                     47: #define S_IFCHR     0x00200000
                     48: #define S_IFBLK     0x00400000
                     49: #define S_IFREG     0x00800000
                     50: #define S_IFIFO            0x01000000
                     51: 
                     52: /*
                     53:  * Set Id Bits for mode
                     54:  */
                     55: 
                     56: #define S_ISUID     0x00010000
                     57: #define S_ISGID     0x00020000
                     58: 
                     59: /*
                     60:  * Protection Bits for mode
                     61:  */
                     62: 
                     63: #define _S_PROT     000000777
                     64: 
                     65: #define S_IRWXU     000000700
                     66: #define S_IRUSR     000000400
                     67: #define S_IWUSR     000000200
                     68: #define S_IXUSR     000000100
                     69: 
                     70: #define S_IRWXG     000000070
                     71: #define S_IRGRP     000000040
                     72: #define S_IWGRP     000000020
                     73: #define S_IXGRP     000000010
                     74: 
                     75: #define S_IRWXO     000000007
                     76: #define S_IROTH     000000004
                     77: #define S_IWOTH     000000002
                     78: #define S_IXOTH     000000001
                     79: 
                     80: #define S_ISDIR(m) ( (m) & S_IFDIR )
                     81: #define S_ISCHR(m) ( (m) & S_IFCHR )
                     82: #define S_ISBLK(m) ( (m) & S_IFBLK )
                     83: #define S_ISREG(m) ( (m) & S_IFREG )
                     84: #define S_ISFIFO(m) ( (m) & S_IFIFO )
                     85: 
                     86: mode_t _CRTAPI1 umask(mode_t);
                     87: int _CRTAPI1 mkdir(const char *, mode_t);
                     88: int _CRTAPI1 mkfifo(const char *, mode_t);
                     89: int _CRTAPI1 stat(const char *, struct stat *);
                     90: int _CRTAPI1 fstat(int, struct stat *);
                     91: int _CRTAPI1 chmod(const char *, mode_t);
                     92: 
                     93: #endif /* _SYS_STAT_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.