[Glibc-bsd-commits] r1614 - in trunk/glibc-2.3-head/sysdeps/kfreebsd: . bits

Petr Salinger ps-guest at costa.debian.org
Mon Jun 26 13:27:06 UTC 2006


Author: ps-guest
Date: 2006-06-26 13:27:03 +0000 (Mon, 26 Jun 2006)
New Revision: 1614

Modified:
   trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat.h
   trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat16.h
   trunk/glibc-2.3-head/sysdeps/kfreebsd/stat16conv.c
Log:
* sync bits/stat.h with Linux version



Modified: trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat.h
===================================================================
--- trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat.h	2006-06-25 08:08:46 UTC (rev 1613)
+++ trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat.h	2006-06-26 13:27:03 UTC (rev 1614)
@@ -51,12 +51,27 @@
 
     __dev_t st_rdev;		/* Device number, if device.  */
 
+#ifdef __USE_MISC
+    /* 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.  */
+    struct timespec st_atim;		/* Time of last access.  */
+    struct timespec st_mtim;		/* Time of last modification.  */
+    struct timespec st_ctim;		/* Time of last status change.  */
+# define st_atime st_atim.tv_sec	/* Backward compatibility.  */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
     __time_t st_atime;		/* Time of last access.  */
     long int st_atimensec;	/* Nanoseconds of last access.  */
     __time_t st_mtime;		/* Time of last modification.  */
     long int st_mtimensec;	/* Nanoseconds of last modification.  */
     __time_t st_ctime;		/* Time of last status change.  */
     long int st_ctimensec;	/* Nanoseconds of last status change.  */
+#endif
 
     __off_t st_size;		/* Size of file, in bytes.  */
 
@@ -86,12 +101,27 @@
 
     __dev_t st_rdev;		/* Device number, if device.  */
 
+#ifdef __USE_MISC
+    /* 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.  */
+    struct timespec st_atim;		/* Time of last access.  */
+    struct timespec st_mtim;		/* Time of last modification.  */
+    struct timespec st_ctim;		/* Time of last status change.  */
+# define st_atime st_atim.tv_sec	/* Backward compatibility.  */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
     __time_t st_atime;		/* Time of last access.  */
     long int st_atimensec;	/* Nanoseconds of last access.  */
     __time_t st_mtime;		/* Time of last modification.  */
     long int st_mtimensec;	/* Nanoseconds of last modification.  */
     __time_t st_ctime;		/* Time of last status change.  */
     long int st_ctimensec;	/* Nanoseconds of last status change.  */
+#endif
 
     __off_t st_size;		/* Size of file, in bytes.  */
 

Modified: trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat16.h
===================================================================
--- trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat16.h	2006-06-25 08:08:46 UTC (rev 1613)
+++ trunk/glibc-2.3-head/sysdeps/kfreebsd/bits/stat16.h	2006-06-26 13:27:03 UTC (rev 1614)
@@ -32,12 +32,9 @@
 
     __dev_t st_rdev;		/* Device number, if device.  */
 
-    long int st_atime;		/* Time of last access.  */
-    long int st_atimensec;	/* Nanoseconds of last access.  */
-    long int st_mtime;		/* Time of last modification.  */
-    long int st_mtimensec;	/* Nanoseconds of last modification.  */
-    long int st_ctime;		/* Time of last status change.  */
-    long int st_ctimensec;	/* Nanoseconds of last 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 */
 
     __off_t st_size;		/* Size of file, in bytes.  */
 

Modified: trunk/glibc-2.3-head/sysdeps/kfreebsd/stat16conv.c
===================================================================
--- trunk/glibc-2.3-head/sysdeps/kfreebsd/stat16conv.c	2006-06-25 08:08:46 UTC (rev 1613)
+++ trunk/glibc-2.3-head/sysdeps/kfreebsd/stat16conv.c	2006-06-26 13:27:03 UTC (rev 1614)
@@ -39,12 +39,9 @@
   q->st_uid = p16->st_uid;
   q->st_gid = p16->st_gid;
   q->st_rdev = p16->st_rdev;
-  q->st_atime = p16->st_atime;
-  q->st_atimensec = p16->st_atimensec;
-  q->st_mtime = p16->st_mtime;
-  q->st_mtimensec = p16->st_mtimensec;
-  q->st_ctime = p16->st_ctime;
-  q->st_ctimensec = p16->st_ctimensec;
+  q->st_atim = p16->st_atimespec;
+  q->st_mtim = p16->st_mtimespec;
+  q->st_ctim = p16->st_ctimespec;
   q->st_size = p16->st_size;
   q->st_blocks = p16->st_blocks;
   q->st_blksize = p16->st_blksize;
@@ -66,12 +63,9 @@
   q->st_uid = p16->st_uid;
   q->st_gid = p16->st_gid;
   q->st_rdev = p16->st_rdev;
-  q->st_atime = p16->st_atime;
-  q->st_atimensec = p16->st_atimensec;
-  q->st_mtime = p16->st_mtime;
-  q->st_mtimensec = p16->st_mtimensec;
-  q->st_ctime = p16->st_ctime;
-  q->st_ctimensec = p16->st_ctimensec;
+  q->st_atim = p16->st_atimespec;
+  q->st_mtim = p16->st_mtimespec;
+  q->st_ctim = p16->st_ctimespec;
   q->st_size = p16->st_size;
   q->st_blocks = p16->st_blocks;
   q->st_blksize = p16->st_blksize;




More information about the Glibc-bsd-commits mailing list