Re: [PATCH] Save more readline state when running compgen

2023-03-23 Thread Chet Ramey
On 3/22/23 4:33 PM, Koichi Murase wrote: Do you think calling `compgen', which leaves the state of `compopt -o filenames', etc., outside the bindable function `compete' would affect any behaviors? That's more or less the question. It's not that compgen leaves modified readline state outside a

[PATCH] Work around GNU/Linux timestamp glitch

2023-03-23 Thread Paul Eggert
Without this patch, Bash can hand out user-visible timestamps that are out of order, because on GNU/Linux the 'time' function uses a different clock than file timestamps and the 'gettimeofday' function. See . * include/posixtime.h (getnow): Ne

$SECONDS and timeout values use realtime `gettimeofday()`

2023-03-23 Thread William Kennington via Bug reports for the GNU Bourne Again SHell
We have systems that start off with inaccurate clocks and at some point after the boot process synchronize with the network and jump forward in time. This has the potential to break any scripts that are sitting in loops, calculating a timeout based on the $SECONDS variable. The current behavior usi

Re: [PATCH] Work around GNU/Linux timestamp glitch

2023-03-23 Thread Koichi Murase
2023年3月24日(金) 9:25 Paul Eggert : > Without this patch, Bash can hand out user-visible timestamps > that are out of order, because on GNU/Linux the 'time' > function uses a different clock than file timestamps > and the 'gettimeofday' function. See >

Bash not portable to C23

2023-03-23 Thread Paul Eggert
I see that Bash won't compile with a C23 compiler, since it still uses old-style function definitions which C23 no longer supports. Is there any effort and/or interest in fixing this portability problem in Bash? It's OK these days to assume C89 or later, so it's OK for Bash to switch to new-st

Re: Bash not portable to C23

2023-03-23 Thread Lawrence Velázquez
On Thu, Mar 23, 2023, at 9:16 PM, Paul Eggert wrote: > I see that Bash won't compile with a C23 compiler, since it still uses > old-style function definitions which C23 no longer supports. Is there > any effort and/or interest in fixing this portability problem in Bash? I believe this was done a

Re: [PATCH] Work around GNU/Linux timestamp glitch

2023-03-23 Thread Paul Eggert
On 3/23/23 17:51, Koichi Murase wrote: By the way, you should prepare patches based on the devel branch of Bash. Thanks for letting me know; I'll resend based on devel.

Re: Bash not portable to C23

2023-03-23 Thread Paul Eggert
On 3/23/23 18:23, Lawrence Velázquez wrote: On Thu, Mar 23, 2023, at 9:16 PM, Paul Eggert wrote: I see that Bash won't compile with a C23 compiler, since it still uses old-style function definitions which C23 no longer supports. Is there any effort and/or interest in fixing this portability prob