1*2159047fSniklas /* Imitation sys/stat.h. */ 2*2159047fSniklas 3*2159047fSniklas #ifndef __SYS_STAT_H__ 4*2159047fSniklas #define __SYS_STAT_H__ 5*2159047fSniklas 6*2159047fSniklas #include <sys/types.h> 7*2159047fSniklas #include <time.h> 8*2159047fSniklas 9*2159047fSniklas struct stat { 10*2159047fSniklas dev_t st_dev; 11*2159047fSniklas ino_t st_ino; 12*2159047fSniklas mode_t st_mode; 13*2159047fSniklas short st_nlink; 14*2159047fSniklas uid_t st_uid; 15*2159047fSniklas gid_t st_gid; 16*2159047fSniklas dev_t st_rdev; 17*2159047fSniklas off_t st_size; 18*2159047fSniklas off_t st_rsize; 19*2159047fSniklas time_t st_atime; 20*2159047fSniklas int st_spare1; 21*2159047fSniklas time_t st_mtime; 22*2159047fSniklas int st_spare2; 23*2159047fSniklas time_t st_ctime; 24*2159047fSniklas int st_spare3; 25*2159047fSniklas long st_blksize; 26*2159047fSniklas long st_blocks; 27*2159047fSniklas long st_spare4[2]; 28*2159047fSniklas }; 29*2159047fSniklas 30*2159047fSniklas #define S_IFMT 0170000L 31*2159047fSniklas #define S_IFDIR 0040000L 32*2159047fSniklas #define S_IFREG 0100000L 33*2159047fSniklas #define S_IREAD 0400 34*2159047fSniklas #define S_IWRITE 0200 35*2159047fSniklas #define S_IEXEC 0100 36*2159047fSniklas 37*2159047fSniklas #define S_IFIFO 010000 /* FIFO special */ 38*2159047fSniklas #define S_IFCHR 020000 /* character special */ 39*2159047fSniklas #define S_IFBLK 030000 /* block special */ 40*2159047fSniklas 41*2159047fSniklas int stat (char *path, struct stat *buf); 42*2159047fSniklas int fstat (int fd, struct stat *buf); 43*2159047fSniklas 44*2159047fSniklas #endif /* __SYS_STAT_H___ */ 45