** evans 2001-08-26 - updated from http://www.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html
*/
/*
** struct stat replaces POSIX version - more required fields in Unix
*/
/*@-redef@*/ /*@-matchfields@*/
struct stat {
dev_t st_dev; /* ID of device containing file */
ino_t st_ino; /* file serial number */
mode_t st_mode; /* mode of file (see below) */
nlink_t st_nlink; /* number of links to the file */
uid_t st_uid; /* user ID of file */
gid_t st_gid; /* group ID of file */
dev_t st_rdev; /* device ID (if file is character or block special) */
off_t st_size; /* file size in bytes (if file is a regular file) */
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last data modification */
time_t st_ctime; /* time of last status change */
blksize_t st_blksize; /* a filesystem-specific preferred I/O block size for
this object. In some filesystem types, this may
vary from file to file */
blkcnt_t st_blocks; /* number of blocks allocated for this object */
} ;
/*@=redef@*/ /*@=matchfields@*/
/*@constant mode_t S_IFMT@*/
/*@constant mode_t S_IFBLK@*/
/*@constant mode_t S_IFCHR@*/
/*@constant mode_t S_IFIFO@*/
/*@constant mode_t S_IFREG@*/
/*@constant mode_t S_IFDIR@*/
/*@constant mode_t S_IFLNK@*/
/*@constant mode_t S_IRWXU@*/
/*@constant mode_t S_IRUSR@*/
/*@-incondefs@*/ /*: probably wrong in posix.h? */
/*@constant mode_t S_IWUSR@*/
/*@constant mode_t S_IXUSR@*/
/*@constant mode_t S_IRWXG@*/
/*@constant mode_t S_IRGRP@*/
/*@constant mode_t S_IWGRP@*/
/*@constant mode_t S_IXGRP@*/
/*@constant mode_t S_IRWXO@*/
/*@constant mode_t S_IROTH@*/
/*@constant mode_t S_IWOTH@*/
/*@constant mode_t S_IXOTH@*/
/*@constant mode_t S_ISUID@*/
/*@constant mode_t S_ISGID@*/
/*@constant mode_t S_ISVTX@*/
/*@=incondefs@*/
# if 0
/*These are the old definitions - they don't appear to be in the Single UNIX Specification */
/*@constant int S_ISTXT@*/
/*@constant int S_IREAD@*/
/*@constant int S_IWRITE@*/
/*@constant int S_IEXEC@*/
/*@constant int S_IFMT@*/
/*@constant int S_IFIFO@*/
/*@constant int S_IFCHR@*/
/*@constant int S_IFDIR@*/
/*@constant int S_IFBLK@*/
/*@constant int S_IFREG@*/
/*@constant int S_IFLNK@*/
/*@constant int S_IFSOCK@*/
/*@constant int S_ISVTX@*/
/*@constant int S_ISVTX@*/
/*@constant int SF_SETTABLE@*/
/*@constant int SF_ARCHIVED@*/
/*@constant int ACCESSPERMS@*/
/*@constant int ALLPERMS@*/
/*@constant int DEFFILEMODE@*/
/*@constant int S_BLKSIZE@*/
/*@constant int SF_IMMUTABLE@*/
/*@constant int SF_APPEND@*/
/*@constant int UF_NODUMP@*/
/*@constant int UF_IMMUTABLE@*/
/*@constant int UF_APPEND@*/
# endif
int /*@alt lltX_bool@*/ S_ISBLK (/*@sef@*/ mode_t m) /*@*/;
int /*@alt lltX_bool@*/ S_ISCHR (/*@sef@*/ mode_t m) /*@*/;
int /*@alt lltX_bool@*/ S_ISDIR (/*@sef@*/ mode_t m) /*@*/;
int /*@alt lltX_bool@*/ S_ISFIFO (/*@sef@*/ mode_t m) /*@*/;
int /*@alt lltX_bool@*/ S_ISREG (/*@sef@*/ mode_t m) /*@*/;
int /*@alt lltX_bool@*/ S_ISLNK (/*@sef@*/ mode_t m) /*@*/;
int /*@alt lltX_bool@*/ S_TYPEISMQ (/*@sef@*/ struct stat *buf) /*@*/ ;
int /*@alt lltX_bool@*/ S_TYPEISSEM (/*@sef@*/ struct stat *buf) /*@*/ ;
int /*@alt lltX_bool@*/ S_TYPEISSHM (/*@sef@*/ struct stat *buf) /*@*/ ;
/* in POSIX: chmod, fstat, mkdir, mkfifo, stat, umask */
int lstat(const char *, /*@out@*/ struct stat *)
/*:errorcode -1:*/
/*@modifies errno@*/ ;
int mknod (const char *, mode_t, dev_t)
/*@warn portability "The only portable use of mknod is to create FIFO-special file. If mode is not S_IFIFO or dev is not 0, the behaviour of mknod() is unspecified."@*/
/*:errorcode -1:*/
/*@modifies errno@*/ ;
int chflags (const char *path, u_long flags)
/*@warn unixstandard "Not in Single UNIX Specification Version 2"@*/
/*@modifies fileSystem, errno@*/;
int fchflags (int fd, u_long flags)
/*@warn unixstandard "Not in Single UNIX Specification Version 2"@*/