00001 /* Imitation sys/stat.h. */ 00002 00003 #ifndef __SYS_STAT_H__ 00004 #define __SYS_STAT_H__ 00005 00006 #include <sys/types.h> 00007 #include <time.h> 00008 00009 struct stat { 00010 dev_t st_dev; 00011 ino_t st_ino; 00012 mode_t st_mode; 00013 short st_nlink; 00014 uid_t st_uid; 00015 gid_t st_gid; 00016 dev_t st_rdev; 00017 off_t st_size; 00018 off_t st_rsize; 00019 time_t st_atime; 00020 int st_spare1; 00021 time_t st_mtime; 00022 int st_spare2; 00023 time_t st_ctime; 00024 int st_spare3; 00025 long st_blksize; 00026 long st_blocks; 00027 long st_spare4[2]; 00028 }; 00029 00030 #define S_IFMT 0170000L 00031 #define S_IFDIR 0040000L 00032 #define S_IFREG 0100000L 00033 #define S_IREAD 0400 00034 #define S_IWRITE 0200 00035 #define S_IEXEC 0100 00036 00037 #define S_IFIFO 010000 /* FIFO special */ 00038 #define S_IFCHR 020000 /* character special */ 00039 #define S_IFBLK 030000 /* block special */ 00040 00041 int stat (char *path, struct stat *buf); 00042 int fstat (int fd, struct stat *buf); 00043 00044 #endif /* __SYS_STAT_H___ */
1.5.6