nanosecond support for stat

Mike Stump mikestump@comcast.net
Thu Jan 12 19:33:00 GMT 2012


I'd like nanosecond time for stat, seems trivial and enough.  I want to submit some binutils patches for the simulator to make use of these.

The style and names are taken from linux.  Let me know if these go in.

Index: newlib/newlib/libc/include/sys/stat.h
===================================================================
--- newlib/newlib/libc/include/sys/stat.h       (revision 1988)
+++ newlib/newlib/libc/include/sys/stat.h       (working copy)
@@ -46,11 +46,11 @@ struct      stat
   time_t       st_ctime;
 #else
   time_t       st_atime;
-  long         st_spare1;
+  unsigned long        st_atimensec;
   time_t       st_mtime;
-  long         st_spare2;
+  unsigned long        st_mtimensec;
   time_t       st_ctime;
-  long         st_spare3;
+  unsigned long        st_ctimensec;
   long         st_blksize;
   long         st_blocks;
   long st_spare4[2];

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: n1.patch.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20120112/f7b41f0f/attachment.txt>


More information about the Newlib mailing list