/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* $Id$ $Date$ */ #ifndef __PCR_stat_h #define __PCR_stat_h 1 #ifndef PCR_NO_RENAME # undef chmod /* defined in both unistd.h and sys/stat.h */ #endif #ifndef _PCR_OS_h # include #endif #include #if defined(PCR_OS_SUNOS5) /* * The fields st_{a,m,c}time are **macro-defined**, * e.g. #define st_atime st_atim.tv_sec * thereby preventing me from using them as field names. * Is this POSIX compliant? I don't think so ... */ # undef st_atime # undef st_mtime # undef st_ctime # define PCR_stat_host_atime st_atim.tv_sec # define PCR_stat_host_mtime st_mtim.tv_sec # define PCR_stat_host_ctime st_ctim.tv_sec #else # define PCR_stat_host_atime st_atime # define PCR_stat_host_mtime st_mtime # define PCR_stat_host_ctime st_ctime #endif struct PCR_stat { mode_t st_mode; ino_t st_ino; dev_t st_dev; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; off_t st_size; time_t st_atime; time_t st_mtime; time_t st_ctime; }; extern int PCR_chmod(const char *path, mode_t mode); extern int PCR_fstat(int fd, struct PCR_stat *sbuf); extern int PCR_mkdir(const char *path, mode_t mode); extern int PCR_mkfifo(const char *path, mode_t mode); extern int PCR_stat(const char *path, struct PCR_stat *sbuf); extern mode_t PCR_umask(mode_t mask); #ifndef PCR_NO_RENAME # undef chmod # undef fstat # undef mkdir # undef mkfifo # undef stat # undef umask # define chmod PCR_chmod # define fstat PCR_fstat # define mkdir PCR_mkdir # define mkfifo PCR_mkfifo # define stat PCR_stat # define umask PCR_umask #endif /* PCR_NO_RENAME */ #ifdef PCR_NO_RENAME extern void PCR_stat_FromStat( struct PCR_stat *to, const struct stat *from ); #endif /* PCR_NO_RENAME */ #endif /* !__PCR_stat_h */ /* $Log$ */