bug#65659: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Paul Eggert
On 2023-08-31 08:35, Eric Blake wrote: Typing-wise, %#s as a synonym for %b is probably going to be easier (less shell escaping needed). Is there any interest in a patch to coreutils or bash that would add such a synonym, to make it easier to leave that functionality in place for POSIX Issue 9

bug#65659: [PATCH] printf: add %#s alias to %b

2023-08-31 Thread Pádraig Brady
On 31/08/2023 19:31, Eric Blake wrote: POSIX Issue 8 will be obsoleting %b (escape sequence interpolation) so that future Issue 9 can change to having %b (binary literal output) that aligns with C2x. But since escape interpolation may still remain useful, POSIX suggested %#s (which is undefined

bug#65659: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Chet Ramey
On 8/31/23 11:35 AM, Eric Blake wrote: In today's Austin Group call, we discussed the fact that printf(1) has mandated behavior for %b (escape sequence processing similar to XSI echo) that will eventually conflict with C2x's desire to introduce %b to printf(3) (to produce 0b000... binary

bug#65659: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:10:58PM -0400, Chet Ramey wrote: > On 8/31/23 11:35 AM, Eric Blake wrote: > > In today's Austin Group call, we discussed the fact that printf(1) has > > mandated behavior for %b (escape sequence processing similar to XSI > > echo) that will eventually conflict with C2x's

bug#65659: [PATCH] printf: add %#s alias to %b

2023-08-31 Thread Eric Blake
POSIX Issue 8 will be obsoleting %b (escape sequence interpolation) so that future Issue 9 can change to having %b (binary literal output) that aligns with C2x. But since escape interpolation may still remain useful, POSIX suggested %#s (which is undefined in all versions of C) as a possible

bug#65659: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Emanuele Torre
On Thu, Aug 31, 2023 at 03:02:22PM -0500, Eric Blake wrote: > On Thu, Aug 31, 2023 at 03:10:58PM -0400, Chet Ramey wrote: > > Why not standardize another character, like %B? I suppose I'll have to look > > at the etherpad for the discussion. I think that came up on the mailing > > list, but I

bug#65599: mv and cp give a pointless warning when moving/copying a directory

2023-08-31 Thread Bruno Haible
Thanks for looking into this, Paul. But there's a big misunderstanding. This is not on Android. It's on Linux with glibc (Ubuntu 22.04, to be precise), as can be seen from the log file: openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 and from the fact that I could

bug#65617: coreutils 9.4: seg.fault in readutmp with systemd

2023-08-31 Thread Bruno Haible
Paul Eggert wrote: > I installed the attached patch into Gnulib > and this should appear in the next coreutils release. Unfortunately, this patch introduces a memory leak: If num_sessions == 0 and sessions != NULL (which can happen, according to the man page), we need to call free (sessions).

bug#65659: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Eric Blake
In today's Austin Group call, we discussed the fact that printf(1) has mandated behavior for %b (escape sequence processing similar to XSI echo) that will eventually conflict with C2x's desire to introduce %b to printf(3) (to produce 0b000... binary literals). For POSIX Issue 8, we plan to mark