history library can now read history from non-regular files; fix for readline char search and macros; better fix for PROMPT_COMMAND and aliases ending in newlines; fix for casting COMMAND * and SIMPLE_COM * when parsing |&; fix to avoid undefined behavior when performing left and right arithmetic shifts

This commit is contained in:
Chet Ramey
2025-08-01 16:26:31 -04:00
parent 01070d4324
commit c1d9c08853
19 changed files with 217 additions and 45 deletions
+4 -3
View File
@@ -188,7 +188,8 @@ strptime_builtin (WORD_LIST *list)
{
char *s;
struct tm t, *tm;
time_t now, secs;
time_t now;
intmax_t secs;
char *datestr, *format;
int i, opt;
@@ -227,7 +228,7 @@ strptime_builtin (WORD_LIST *list)
if (STREQ (datestr, date_time_modifiers[i].shorthand))
{
secs = now + date_time_modifiers[i].incr;
printf ("%ld\n", secs);
printf ("%jd\n", secs);
return (EXECUTION_SUCCESS);
}
}
@@ -265,7 +266,7 @@ strptime_builtin (WORD_LIST *list)
if (s && *s)
builtin_warning("%s: not completely converted (%s)", datestr, s);
printf ("%ld\n", secs);
printf ("%jd\n", secs);
return (EXECUTION_SUCCESS);
}