I installed the following into both gnulib and coreutils to simplify
the recently added stat-time.h module a bit:
2005-09-16 Paul Eggert <[EMAIL PROTECTED]>
* stat-time.h (set_stat_atime, set_stat_ctime, set_stat_mtime):
Remove; they were buggy in the HAVE_STRUCT_STAT_ST_SPARE1 case,
and they were dubious anyway. I rewrote 'tar' to not use them
any more.
Index: stat-time.h
===================================================================
RCS file: /fetish/cu/lib/stat-time.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -r1.1 -r1.2
--- stat-time.h 16 Sep 2005 07:36:48 -0000 1.1
+++ stat-time.h 17 Sep 2005 06:54:22 -0000 1.2
@@ -127,52 +127,4 @@ get_stat_mtime (struct stat const *st)
#endif
}
-/* Set *ST's access time. */
-static inline void
-set_stat_atime (struct stat *st, struct timespec t)
-{
-#ifdef STAT_TIMESPEC
- STAT_TIMESPEC (st, st_atim) = t;
-#else
- st->st_atime = t.tv_sec;
-# if defined STAT_TIMESPEC_NS
- STAT_TIMESPEC_NS (st, st_atim) = t.tv_nsec;
-# elif defined HAVE_STRUCT_STAT_ST_SPARE1
- st->st_spare1 = t.tv_nsec / 1000;
-# endif
-#endif
-}
-
-/* Set *ST's status change time. */
-static inline void
-set_stat_ctime (struct stat *st, struct timespec t)
-{
-#ifdef STAT_TIMESPEC
- STAT_TIMESPEC (st, st_ctim) = t;
-#else
- st->st_ctime = t.tv_sec;
-# if defined STAT_TIMESPEC_NS
- STAT_TIMESPEC_NS (st, st_ctim) = t.tv_nsec;
-# elif defined HAVE_STRUCT_STAT_ST_SPARE1
- st->st_spare1 = t.tv_nsec / 1000;
-# endif
-#endif
-}
-
-/* Set *ST's data modification time. */
-static inline void
-set_stat_mtime (struct stat *st, struct timespec t)
-{
-#ifdef STAT_TIMESPEC
- STAT_TIMESPEC (st, st_mtim) = t;
-#else
- st->st_mtime = t.tv_sec;
-# if defined STAT_TIMESPEC_NS
- STAT_TIMESPEC_NS (st, st_mtim) = t.tv_nsec;
-# elif defined HAVE_STRUCT_STAT_ST_SPARE1
- st->st_spare1 = t.tv_nsec / 1000;
-# endif
-#endif
-}
-
#endif
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils