BSD 4_4_Lite2 release
[unix-history] / usr / src / sys / sys / stat.h
index 4a5d946..c471bdc 100644 (file)
@@ -7,9 +7,35 @@
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- *     @(#)stat.h      8.9 (Berkeley) %G%
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)stat.h      8.12 (Berkeley) 6/16/95
  */
 
 #ifndef _SYS_STAT_H_
  */
 
 #ifndef _SYS_STAT_H_
@@ -45,20 +71,31 @@ struct stat {
        uid_t     st_uid;               /* user ID of the file's owner */
        gid_t     st_gid;               /* group ID of the file's group */
        dev_t     st_rdev;              /* device type */
        uid_t     st_uid;               /* user ID of the file's owner */
        gid_t     st_gid;               /* group ID of the file's group */
        dev_t     st_rdev;              /* device type */
+#ifndef _POSIX_SOURCE
        struct  timespec st_atimespec;  /* time of last access */
        struct  timespec st_mtimespec;  /* time of last data modification */
        struct  timespec st_ctimespec;  /* time of last file status change */
        struct  timespec st_atimespec;  /* time of last access */
        struct  timespec st_mtimespec;  /* time of last data modification */
        struct  timespec st_ctimespec;  /* time of last file status change */
+#else
+       time_t    st_atime;             /* time of last access */
+       long      st_atimensec;         /* nsec of last access */
+       time_t    st_mtime;             /* time of last data modification */
+       long      st_mtimensec;         /* nsec of last data modification */
+       time_t    st_ctime;             /* time of last file status change */
+       long      st_ctimensec;         /* nsec of last file status change */
+#endif
        off_t     st_size;              /* file size, in bytes */
        off_t     st_size;              /* file size, in bytes */
-       quad_t    st_blocks;            /* blocks allocated for file */
+       int64_t   st_blocks;            /* blocks allocated for file */
        u_int32_t st_blksize;           /* optimal blocksize for I/O */
        u_int32_t st_flags;             /* user defined flags for file */
        u_int32_t st_gen;               /* file generation number */
        int32_t   st_lspare;
        u_int32_t st_blksize;           /* optimal blocksize for I/O */
        u_int32_t st_flags;             /* user defined flags for file */
        u_int32_t st_gen;               /* file generation number */
        int32_t   st_lspare;
-       quad_t    st_qspare[2];
+       int64_t   st_qspare[2];
 };
 };
+#ifndef _POSIX_SOURCE
 #define st_atime st_atimespec.ts_sec
 #define st_mtime st_mtimespec.ts_sec
 #define st_ctime st_ctimespec.ts_sec
 #define st_atime st_atimespec.ts_sec
 #define st_mtime st_mtimespec.ts_sec
 #define st_ctime st_ctimespec.ts_sec
+#endif
 
 #define        S_ISUID 0004000                 /* set user id on execution */
 #define        S_ISGID 0002000                 /* set group id on execution */
 
 #define        S_ISUID 0004000                 /* set user id on execution */
 #define        S_ISGID 0002000                 /* set group id on execution */