Lines Matching defs:time_t
3 /* Convert timestamp from time_t to struct tm. */
92 This tells us to #define time_t to an internal type timex_t that is
95 to a static function that returns the redefined time_t.
104 # undef time_t
105 # define time_t timex_t
280 static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t,
285 static struct tm *timesub(time_t const *, int_fast32_t, struct state const *,
732 /* Read transitions, discarding those out of time_t range.
741 time_t attime
742 = ((TYPE_SIGNED(time_t) ? at < TIME_T_MIN : at < 0)
743 ? TIME_T_MIN : (time_t)at);
786 /* Read leap seconds, discarding those out of time_t range. */
813 sp->lsis[leapcnt].ls_trans = (time_t)tr;
1490 sp->ats[i] += (time_t)
1493 sp->ats[i] += (time_t)
1693 localsub(struct state const *sp, time_t const *timep, int_fast32_t setname,
1699 const time_t t = *timep;
1707 time_t newt;
1709 register time_t years;
1717 be close to the maximum time_t. */
1718 years = (time_t)(seconds / SECSPERREPEAT
1720 seconds = (time_t)(years * AVGSECSPERYEAR);
1723 newt = (time_t)(t + seconds + SECSPERREPEAT);
1725 newt = (time_t)(t - seconds - SECSPERREPEAT);
1796 localtime_rz(struct state *__restrict sp, time_t const *__restrict timep,
1804 localtime_tzset(time_t const *timep, struct tm *tmp, bool setname)
1819 localtime(const time_t *timep)
1828 localtime_r(const time_t *__restrict timep, struct tm *__restrict tmp)
1839 gmtsub(ATTRIBUTE_MAYBE_UNUSED struct state const *sp, time_t const *timep,
1865 gmtime_r(time_t const *__restrict timep, struct tm *__restrict tmp)
1872 gmtime(const time_t *timep)
1886 offtime(const time_t *timep, long offset)
1897 offtime_r(const time_t *timep, long offset, struct tm *tmp)
1911 static time_t
1912 leaps_thru_end_of_nonneg(time_t y)
1917 static time_t
1918 leaps_thru_end_of(time_t y)
1926 timesub(const time_t *timep, int_fast32_t offset,
1930 register time_t tdays;
1935 time_t y;
1955 time_t is unsigned. */
1956 tdays = (time_t)(*timep / SECSPERDAY);
1965 for localtime values before 1970 when time_t is unsigned. */
1968 y = (time_t)(EPOCH_YEAR - YEARSPERREPEAT
1981 time_t newy = (time_t)(y + ydelta);
1996 if (!TYPE_SIGNED(time_t) && y < TM_YEAR_BASE) {
1999 } else if ((!TYPE_SIGNED(time_t) || INT_MIN + TM_YEAR_BASE <= y)
2044 ** It does a binary search of the time_t space. Since time_t's are
2050 # define WRONG ((time_t)-1)
2079 increment_overflow_time_iinntt(time_t *tp, iinntt j)
2085 ? (TYPE_SIGNED(time_t) ? *tp < TIME_T_MIN - j : *tp <= -1 - j)
2105 ? (TYPE_SIGNED(time_t) ? TIME_T_MIN - j <= *tp : -1 - j < *tp)
2146 static time_t
2148 struct tm *(*funcp)(struct state const *, time_t const *,
2157 register time_t lo;
2158 register time_t hi;
2160 time_t ilo;
2163 time_t newt;
2164 time_t t;
2261 ** Do a binary search (this works whatever time_t's type is).
2299 time_t off;
2343 time_t xaltt = (time_t)altt;
2372 newt = (time_t)(t + sp->ttis[j].tt_utoff -
2404 static time_t
2406 struct tm *(*funcp)(struct state const *, time_t const *,
2412 time_t t;
2423 static time_t
2425 struct tm *(*funcp)(struct state const *, time_t const *,
2430 register time_t t;
2506 static time_t
2520 time_t
2523 time_t t;
2538 time_t
2548 time_t
2556 time_t
2576 EXTERN_TIMEOFF time_t
2587 time_t
2590 time_t t;
2639 NETBSD_INSPIRED_EXTERN time_t
2640 time2posix_z(struct state *sp, time_t t)
2642 return (time_t)(t - leapcorr(sp, t));
2645 time_t
2646 time2posix(time_t t)
2656 t = (time_t)(t - leapcorr(__lclptr, t));
2661 NETBSD_INSPIRED_EXTERN time_t
2662 posix2time_z(struct state *sp, time_t t)
2664 time_t x;
2665 time_t y;
2672 x = (time_t)(t + leapcorr(sp, t));
2673 y = (time_t)(x - leapcorr(sp, x));
2677 y = (time_t)(x - leapcorr(sp, x));
2683 y = (time_t)(x - leapcorr(sp, x));
2690 time_t
2691 posix2time(time_t t)
2714 /* Convert from the underlying system's time_t to the ersatz time_tz,
2715 which is called 'time_t' in this file. Typically, this merely
2721 returns time_t, the macros in private.h cause this code to actually
2725 time_t
2726 time(time_t *p)
2729 if (r != (time_t) -1) {
2738 *p = (time_t)r;
2739 return (time_t)r;