Do not rely on the underlying type of time_t in date(1) and touch(1)

Use LLONG_MAX unconditionally.  In practice this only causes trouble
with systems that are not 2038 ready.
This commit is contained in:
sin 2015-02-08 23:45:03 +00:00
parent d6b3890af6
commit 8f5d77d8c7
2 changed files with 2 additions and 2 deletions

2
date.c
View File

@ -26,7 +26,7 @@ main(int argc, char *argv[])
t = time(NULL);
ARGBEGIN {
case 'd':
t = estrtonum(EARGF(usage()), 0, MIN(LLONG_MAX, (time_t)-1));
t = estrtonum(EARGF(usage()), 0, LLONG_MAX);
break;
case 'u':
tztime = gmtime;

View File

@ -73,7 +73,7 @@ main(int argc, char *argv[])
t = st.st_mtime;
break;
case 't':
t = estrtonum(EARGF(usage()), 0, MIN(LLONG_MAX, (time_t)-1));
t = estrtonum(EARGF(usage()), 0, LLONG_MAX);
break;
default:
usage();