svn commit: trunk/uClibc/libc/sysdeps/linux/alpha/bits

vapier at uclibc.org vapier at uclibc.org
Tue Feb 28 05:35:09 UTC 2006


Author: vapier
Date: 2006-02-27 21:35:08 -0800 (Mon, 27 Feb 2006)
New Revision: 14349

Log:
sync with glibc

Modified:
   trunk/uClibc/libc/sysdeps/linux/alpha/bits/stat.h


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/alpha/bits/stat.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/alpha/bits/stat.h	2006-02-28 05:31:57 UTC (rev 14348)
+++ trunk/uClibc/libc/sysdeps/linux/alpha/bits/stat.h	2006-02-28 05:35:08 UTC (rev 14349)
@@ -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 <sys/stat.h> 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 @@
     __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 @@
   {
     __dev_t st_dev;		/* Device.  */
     __ino64_t st_ino;		/* File serial number.  */
+    __dev_t st_rdev;		/* Device number, if device.  */
+    __off_t st_size;		/* Size of file, in bytes.  */
+    __blkcnt64_t st_blocks;	/* Nr. 512-byte blocks allocated.  */
     __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.  */
     __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.  */
 




More information about the uClibc-cvs mailing list