projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Treat __strftime__ and __strfmon__ like __scanf__.
[gnulib.git]
/
lib
/
stat-time.h
diff --git
a/lib/stat-time.h
b/lib/stat-time.h
index
f72faf9
..
5fd18c1
100644
(file)
--- a/
lib/stat-time.h
+++ b/
lib/stat-time.h
@@
-1,6
+1,6
@@
/* stat-related time functions.
/* stat-related time functions.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005
, 2007
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-21,7
+21,7
@@
#ifndef STAT_TIME_H
#define STAT_TIME_H 1
#ifndef STAT_TIME_H
#define STAT_TIME_H 1
-#include
"timespec.h"
+#include
<time.h>
/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST,
/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST,
@@
-31,7
+31,11
@@
These macros are private to stat-time.h. */
#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
These macros are private to stat-time.h. */
#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
-# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
+# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
+# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
+# else
+# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
+# endif
#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC