From e6fb11a14106a86ffdf95f93ccfd98591d99afc8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 28 Feb 2006 05:35:08 +0000 Subject: sync with glibc --- libc/sysdeps/linux/alpha/bits/stat.h | 68 ++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 26 deletions(-) (limited to 'libc/sysdeps/linux/alpha/bits') diff --git a/libc/sysdeps/linux/alpha/bits/stat.h b/libc/sysdeps/linux/alpha/bits/stat.h index 921283a51..a9adf6b64 100644 --- a/libc/sysdeps/linux/alpha/bits/stat.h +++ b/libc/sysdeps/linux/alpha/bits/stat.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,11 +25,27 @@ #define _STAT_VER_KERNEL 0 #define _STAT_VER_GLIBC2 1 #define _STAT_VER_GLIBC2_1 2 -#define _STAT_VER _STAT_VER_GLIBC2_1 +#define _STAT_VER_KERNEL64 3 +#define _STAT_VER_GLIBC2_3_4 3 +#define _STAT_VER _STAT_VER_GLIBC2_3_4 /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 + +/* Nanosecond resolution timestamps are stored in a format equivalent to + 'struct timespec'. This is the type used whenever possible but the + Unix namespace rules do not allow the identifier 'timespec' to appear + in the header. Therefore we have to handle the use of + this header in strictly standard-compliant sources special. + + Use neat tidy anonymous unions and structures when possible. */ + +#define __ST_TIME(X) \ + __time_t st_##X##time; \ + unsigned long st_##X##timensec + + struct stat { __dev_t st_dev; /* Device. */ @@ -36,28 +53,26 @@ struct stat __ino64_t st_ino; /* File serial number. */ #else __ino_t st_ino; /* File serial number. */ - int __pad1; + int __pad0; /* 64-bit st_ino. */ #endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __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 number, if device. */ __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - __time_t st_mtime; /* Time of last modification. */ - __time_t st_ctime; /* Time of last status change. */ #ifdef __USE_FILE_OFFSET64 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ #else __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ - int __pad2; + int __pad1; /* 64-bit st_blocks. */ #endif + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ __blksize_t st_blksize; /* Optimal block size for I/O. */ - unsigned int st_flags; - unsigned int st_gen; - int __pad3; - long __unused[4]; + __nlink_t st_nlink; /* Link count. */ + int __pad2; /* Real padding. */ + __ST_TIME(a); /* Time of last access. */ + __ST_TIME(m); /* Time of last modification. */ + __ST_TIME(c); /* Time of last status change. */ + long __unused[3]; }; #ifdef __USE_LARGEFILE64 @@ -66,27 +81,28 @@ struct stat64 { __dev_t st_dev; /* Device. */ __ino64_t st_ino; /* File serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __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 number, if device. */ __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - __time_t st_mtime; /* Time of last modification. */ - __time_t st_ctime; /* Time of last status change. */ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ __blksize_t st_blksize; /* Optimal block size for I/O. */ - unsigned int st_flags; - unsigned int st_gen; - int __pad3; - long __unused[4]; + __nlink_t st_nlink; /* Link count. */ + int __pad0; /* Real padding. */ + __ST_TIME(a); /* Time of last access. */ + __ST_TIME(m); /* Time of last modification. */ + __ST_TIME(c); /* Time of last status change. */ + long __unused[3]; }; #endif +#undef __ST_TIME + /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV +#define _STATBUF_ST_NSEC /* Encoding of the file mode. */ -- cgit v1.2.3