Bash-5.3-alpha release

This commit is contained in:
Chet Ramey
2024-04-22 10:33:38 -04:00
parent f3b6bd1945
commit 622d318652
700 changed files with 136534 additions and 96420 deletions
+9 -4
View File
@@ -3,7 +3,7 @@
/* See Makefile for compilation details. */
/*
Copyright (C) 1999-2009 Free Software Foundation, Inc.
Copyright (C) 1999-2009,2022-2023 Free Software Foundation, Inc.
This file is part of GNU Bash.
Bash is free software: you can redistribute it and/or modify
@@ -37,8 +37,7 @@
#include "bashgetopt.h"
int
strftime_builtin (list)
WORD_LIST *list;
strftime_builtin (WORD_LIST *list)
{
char *format, *tbuf;
size_t tbsize, tsize;
@@ -68,7 +67,7 @@ strftime_builtin (list)
if (list && list->word->word)
{
n = legal_number (list->word->word, &i);
n = valid_number (list->word->word, &i);
if (n == 0 || i < 0 || i != (time_t)i)
{
sh_invalidnum (list->word->word);
@@ -81,6 +80,12 @@ strftime_builtin (list)
secs = NOW;
t = localtime (&secs);
if (t == 0)
{
builtin_error ("%s: timestamp out of range", list && list->word->word ? list->word->word : "now");
return (EXECUTION_FAILURE);
}
tbsize = strlen (format) * 4;
tbuf = 0;