aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stat-time.h
diff options
context:
space:
mode:
authorPaul Eggert2018-01-09 15:21:44 -0800
committerPaul Eggert2018-01-09 15:22:37 -0800
commit7668717d6fecd610d71b54a33708038b2ede8cce (patch)
treecb635acfc8273c0adf5ef567e57de345244eb76f /lib/stat-time.h
parent9e4d523427782ea4e49f4f13b2b99b09660516cc (diff)
downloademacs-7668717d6fecd610d71b54a33708038b2ede8cce.tar.gz
emacs-7668717d6fecd610d71b54a33708038b2ede8cce.zip
Merge from Gnulib
This incorporates: 2018-01-05 maint: Add encoding marker for Emacs to non-ASCII sources 2018-01-04 update-copyright: Handle use of © 2018-01-04 pthread_sigmask: Avoid compilation error on mingw 2018-01-02 stat-time: silence -Wunused-parameter regression * build-aux/config.guess, build-aux/config.sub: * build-aux/update-copyright, doc/misc/texinfo.tex, lib/gnulib.mk.in: * lib/md5.c, lib/md5.h, lib/sha1.c, lib/sha1.h, lib/sha256.c: * lib/sha256.h, lib/sha512.c, lib/sha512.h, lib/signal.in.h: * lib/stat-time.h: Copy from Gnulib, or regenerate.
Diffstat (limited to 'lib/stat-time.h')
-rw-r--r--lib/stat-time.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 5f8bf4e126f..104f5376682 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -102,15 +102,13 @@ get_stat_mtime_ns (struct stat const *st)
102 102
103/* Return the nanosecond component of *ST's birth time. */ 103/* Return the nanosecond component of *ST's birth time. */
104_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE 104_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
105get_stat_birthtime_ns (struct stat const *st) 105get_stat_birthtime_ns (struct stat const *st _GL_UNUSED)
106{ 106{
107# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 107# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
108 return STAT_TIMESPEC (st, st_birthtim).tv_nsec; 108 return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
109# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 109# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
110 return STAT_TIMESPEC_NS (st, st_birthtim); 110 return STAT_TIMESPEC_NS (st, st_birthtim);
111# else 111# else
112 /* Avoid a "parameter unused" warning. */
113 (void) st;
114 return 0; 112 return 0;
115# endif 113# endif
116} 114}
@@ -160,7 +158,7 @@ get_stat_mtime (struct stat const *st)
160/* Return *ST's birth time, if available; otherwise return a value 158/* Return *ST's birth time, if available; otherwise return a value
161 with tv_sec and tv_nsec both equal to -1. */ 159 with tv_sec and tv_nsec both equal to -1. */
162_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE 160_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
163get_stat_birthtime (struct stat const *st) 161get_stat_birthtime (struct stat const *st _GL_UNUSED)
164{ 162{
165 struct timespec t; 163 struct timespec t;
166 164
@@ -184,8 +182,6 @@ get_stat_birthtime (struct stat const *st)
184 /* Birth time is not supported. */ 182 /* Birth time is not supported. */
185 t.tv_sec = -1; 183 t.tv_sec = -1;
186 t.tv_nsec = -1; 184 t.tv_nsec = -1;
187 /* Avoid a "parameter unused" warning. */
188 (void) st;
189#endif 185#endif
190 186
191#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ 187#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
@@ -212,7 +208,7 @@ get_stat_birthtime (struct stat const *st)
212 errno to EOVERFLOW if normalization overflowed. This function 208 errno to EOVERFLOW if normalization overflowed. This function
213 is intended to be private to this .h file. */ 209 is intended to be private to this .h file. */
214_GL_STAT_TIME_INLINE int 210_GL_STAT_TIME_INLINE int
215stat_time_normalize (int result, struct stat *st) 211stat_time_normalize (int result, struct stat *st _GL_UNUSED)
216{ 212{
217#if defined __sun && defined STAT_TIMESPEC 213#if defined __sun && defined STAT_TIMESPEC
218 if (result == 0) 214 if (result == 0)