diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-17 06:54:00 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-17 06:54:00 +0000 |
commit | 6b788fbebe9af7b663cef421259c6d4b89193a6e (patch) | |
tree | 71b8e44fdb112886ec9ca3923c7f85af2c89f4bf /lib/stat-time.h | |
parent | 94b8bb4df63aba1e0778325fbec147d06ea2fbe7 (diff) | |
download | gnulib-6b788fbebe9af7b663cef421259c6d4b89193a6e.tar.gz |
(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.
Diffstat (limited to 'lib/stat-time.h')
-rw-r--r-- | lib/stat-time.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/stat-time.h b/lib/stat-time.h index 0e4efcea06..f72faf9187 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -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 |