glibc/time
Paul Eggert 20aa581958 Make mktime etc. compatible with __time64_t
Keep these functions compatible with Gnulib while adding
__time64_t support.  The basic idea is to move private API
declarations from include/time.h to time/mktime-internal.h, since
the former file cannot easily be shared with Gnulib whereas the
latter can.
Also, do some other minor cleanup while in the neighborhood.
* include/time.h: Include stdbool.h, time/mktime-internal.h.
(__mktime_internal): Move this prototype to time/mktime-internal.h,
since Gnulib needs it.
(__localtime64_r, __gmtime64_r) [__TIMESIZE == 64]:
Move these macros to time/mktime-internal.h, since Gnulib needs them.
(__mktime64, __timegm64) [__TIMESIZE != 64]: New prototypes.
(in_time_t_range): New static function.
* posix/bits/types.h (__time64_t) [__TIMESIZE == 64 && !defined __LIBC]:
Do not define as a macro in this case, so that portable code is
less tempted to use __time64_t.
* time/mktime-internal.h: Rewrite so that it does both glibc
and Gnulib work.  Include time.h if not _LIBC.
(mktime_offset_t) [!_LIBC]: Define for gnulib.
(__time64_t, __gmtime64_r, __localtime64_r, __mktime64, __timegm64)
[!_LIBC || __TIMESIZE == 64]: New macros, mostly moved here
from include/time.h.
(__gmtime_r, __localtime_r, __mktime_internal) [!_LIBC]:
New macros, taken from GNulib.
(__mktime_internal): New prototype, moved here from include/time.h.
* time/mktime.c (mktime_min, mktime_max, convert_time)
(ranged_convert, __mktime_internal, __mktime64):
* time/timegm.c (__timegm64):
Use __time64_t, not time_t.
* time/mktime.c: Stop worrying about whether time_t is floating-point.
(__mktime64) [! (_LIBC && __TIMESIZE != 64)]:
Rename from mktime.
(mktime) [_LIBC && __TIMESIZE != 64]: New function.
* time/timegm.c [!_LIBC]: Include libc-config.h, not config.h,
for libc_hidden_def.
Include errno.h.
(__timegm64) [! (_LIBC && __TIMESIZE != 64)]:
Rename from timegm.
(timegm) [_LIBC && __TIMESIZE != 64]: New function.

First cut at publicizing __time64_t
2019-04-30 09:02:17 -07:00
..
bits/types Use _STRUCT_TIMESPEC as guard in <bits/types/struct_timespec.h> [BZ #23349] 2018-06-28 13:12:16 +02:00
sys Break some lines before not after operators. 2019-02-22 01:32:36 +00:00
adjtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
alt_digit.c Break some lines before not after operators. 2019-02-22 01:32:36 +00:00
asctime.c Break some lines before not after operators. 2019-02-22 01:32:36 +00:00
bug-asctime_r.c
bug-asctime.c
bug-getdate1.c support: Introduce new subdirectory for test infrastructure 2016-12-09 08:18:27 +01:00
bug-mktime1.c
bug-mktime4.c mktime: new test for mktime failure 2018-11-15 22:59:33 +01:00
clock.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
clocktest.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
ctime_r.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ctime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
datemsk
Depend
difftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dysize.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
era.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getdate.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getitimer.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
gettimeofday.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
gmtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
lc-time-cleanup.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
localtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Makefile time: Add tests for Minguo calendar [BZ #24293] 2019-04-02 16:42:04 +09:00
mktime-internal.h Make mktime etc. compatible with __time64_t 2019-04-30 09:02:17 -07:00
mktime.c Make mktime etc. compatible with __time64_t 2019-04-30 09:02:17 -07:00
offtime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setitimer.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
settimeofday.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
stime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strftime_l.c Fix a few whitespace arrangement inconsistencies in time/strftime_l.c 2019-02-11 12:13:55 +09:00
strftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strptime_l.c Fix strptime era handling, add more strftime tests [BZ #24394] 2019-04-01 14:19:16 -04:00
strptime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
test_time.c Add some spaces before '('. 2019-02-27 13:55:45 +00:00
time.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
time.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timegm.c Make mktime etc. compatible with __time64_t 2019-04-30 09:02:17 -07:00
timespec_get.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst_wcsftime.c
tst-ftime_l.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-ftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-getdate.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-mktime2.c time/tst-mktime2: Improve test error reporting 2018-10-23 11:25:05 +02:00
tst-mktime3.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-mktime.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-posixtz.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
tst-strftime2.c ja_JP locale: Add entry for the new Japanese era [BZ #22964] 2019-04-02 16:46:55 +09:00
tst-strftime3.c time/tst-strftime3.c: Disable snprintf warning. 2019-04-03 17:49:43 -04:00
tst-strftime.c Fix BZ #18985 -- out of range data to strftime() causes a segfault 2015-09-26 13:27:48 -07:00
tst-strptime2.c Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
tst-strptime3.c time: ensure failing strptime() tests are reported correctly 2015-03-06 06:06:26 -05:00
tst-strptime-whitespace.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-strptime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-tzname.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-y2039.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tzfile.c Break more lines before not after operators. 2019-02-25 13:19:19 +00:00
tzset.c time: Use int, not long int, for internal GMT offsets 2019-02-03 09:55:41 +01:00
Versions
wcsftime_l.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wcsftime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00