bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: aligned-malloc, rmdir-errno: Sanitize configuration test result


From: Paul Eggert
Subject: Re: aligned-malloc, rmdir-errno: Sanitize configuration test result
Date: Thu, 15 Jun 2023 18:08:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 6/15/23 15:40, Bruno Haible wrote:
I don't see that command substitution in general needs to output "text".

You're right there's nothing explicit about that. However, I doubt whether $(X) will work portably if X outputs arbitrary binary data. Although the POSIX spec for $(...) says only that X's output cannot contain NUL bytes, the spec for sh says that its input must be a text file, and arguably that requirement extends to commands like ". X" and "$(X)". I suspect that if we asked for clarification here, the POSIX folks would say that the behavior is unspecified if X outputs non-text.


I remember the times, 20-30 years ago, when 'sed' would have problems with
files that did not end in a newline.

It's a little tricky even today, as 'printf x | grep x' behaves differently on GNU platforms than on others (I just checked Solaris 10).


using "wb" causes problems on z/OS [1].

We could surround the "b" with an appropriate ifdef. Admittedly it's klunky. Perhaps its better to leave it alone after all.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]