/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* */ #ifndef __XR_sys_stat_h #define __XR_sys_stat_h #include #include #include struct XR_stat { XR_dev_t st_dev; XR_ino_t st_ino; XR_mode_t st_mode; short st_nlink; XR_uid_t st_uid; XR_gid_t st_gid; XR_dev_t st_rdev; XR_off_t st_size; XR_time_t st_atime; int st_spare1; XR_time_t st_mtime; int st_spare2; XR_time_t st_ctime; int st_spare3; long st_blksize; long st_blocks; long st_spare4[2]; }; #define XR_S_ISUID 0004000 /* set user id on execution */ #define XR_S_ISGID 0002000 /* set group id on execution */ #define XR_S_ISVTX 0001000 /* save swapped text even after use */ #define XR_S_IFMT 0170000 #define XR_S_IFDIR 0040000 /* directory */ #define XR_S_IFCHR 0020000 /* character special */ #define XR_S_IFBLK 0060000 /* block special */ #define XR_S_IFREG 0100000 /* regular */ #define XR_S_IFLNK 0120000 /* symbolic link */ #define XR_S_IFSOCK 0140000 /* socket */ #define XR_S_IFIFO 0010000 /* fifo */ #define XR_S_IRWXU 0000700 /* rwx, owner */ #define XR_S_IRUSR 0000400 /* read permission, owner */ #define XR_S_IWUSR 0000200 /* write permission, owner */ #define XR_S_IXUSR 0000100 /* execute/search permission, owner */ #define XR_S_IRWXG 0000070 /* rwx, group */ #define XR_S_IRGRP 0000040 /* read permission, group */ #define XR_S_IWGRP 0000020 /* write permission, grougroup */ #define XR_S_IXGRP 0000010 /* execute/search permission, group */ #define XR_S_IRWXO 0000007 /* rwx, other */ #define XR_S_IROTH 0000004 /* read permission, other */ #define XR_S_IWOTH 0000002 /* write permission, other */ #define XR_S_IXOTH 0000001 /* execute/search permission, other */ #if defined(PCR_OS_SUNOS4) #define XR_sys_stat_ModeToHost(m) (m) /* cheat */ #define XR_sys_stat_ModeFromHost(m) (m) /* cheat */ extern void XR_sys_stat_StatFromHost(struct XR_stat *xs, struct stat *s); extern void XR_sys_stat_StatFromPCR(struct XR_stat *xs, struct PCR_stat *ps); #elif defined(PCR_OS_SUNOS5) #define XR_sys_stat_ModeToHost(m) (m) /* cheat */ #define XR_sys_stat_ModeFromHost(m) (m) /* cheat */ extern void XR_sys_stat_StatFromHost(struct XR_stat *xs, struct stat *s); extern void XR_sys_stat_StatFromPCR(struct XR_stat *xs, struct PCR_stat *ps); #else # error os #endif #endif /* !__XR_sys_stat_h */