Home | History | Annotate | Download | only in import

Lines Matching refs:st

42 /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
43 struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST,
44 ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
52 # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
54 # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
57 # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
59 # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec)
61 # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec)
64 /* Return the nanosecond component of *ST's access time. */
66 get_stat_atime_ns (struct stat const *st)
69 return STAT_TIMESPEC (st, st_atim).tv_nsec;
71 return STAT_TIMESPEC_NS (st, st_atim);
77 /* Return the nanosecond component of *ST's status change time. */
79 get_stat_ctime_ns (struct stat const *st)
82 return STAT_TIMESPEC (st, st_ctim).tv_nsec;
84 return STAT_TIMESPEC_NS (st, st_ctim);
90 /* Return the nanosecond component of *ST's data modification time. */
92 get_stat_mtime_ns (struct stat const *st)
95 return STAT_TIMESPEC (st, st_mtim).tv_nsec;
97 return STAT_TIMESPEC_NS (st, st_mtim);
103 /* Return the nanosecond component of *ST's birth time. */
105 get_stat_birthtime_ns (_GL_UNUSED struct stat const *st)
108 return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
110 return STAT_TIMESPEC_NS (st, st_birthtim);
116 /* Return *ST's access time. */
118 get_stat_atime (struct stat const *st)
121 return STAT_TIMESPEC (st, st_atim);
124 t.tv_sec = st->st_atime;
125 t.tv_nsec = get_stat_atime_ns (st);
130 /* Return *ST's status change time. */
132 get_stat_ctime (struct stat const *st)
135 return STAT_TIMESPEC (st, st_ctim);
138 t.tv_sec = st->st_ctime;
139 t.tv_nsec = get_stat_ctime_ns (st);
144 /* Return *ST's data modification time. */
146 get_stat_mtime (struct stat const *st)
149 return STAT_TIMESPEC (st, st_mtim);
152 t.tv_sec = st->st_mtime;
153 t.tv_nsec = get_stat_mtime_ns (st);
158 /* Return *ST's birth time, if available; otherwise return a value
161 get_stat_birthtime (_GL_UNUSED struct stat const *st)
167 t = STAT_TIMESPEC (st, st_birthtim);
169 t.tv_sec = st->st_birthtime;
170 t.tv_nsec = st->st_birthtimensec;
176 t = st->st_ctim;
178 t.tv_sec = st->st_ctime;
206 in *ST, in case this platform suffers from the Solaris 11 bug where
211 stat_time_normalize (int result, _GL_UNUSED struct stat *st)
223 struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]);