<?xml version="1.0" encoding="utf-8"?>
<!--RSS generated by Flaimo.com RSS Builder [2026-12-06 16:06:48]-->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><docs>http://austingroupbugs.net/</docs><link>http://austingroupbugs.net/</link><description><![CDATA[Austin Group Issue Tracker - Issues]]></description><title>Austin Group Issue Tracker - Issues</title><image><title>Austin Group Issue Tracker - Issues</title><url>http://austingroupbugs.net/images/AG_HEADER.png</url><link>http://austingroupbugs.net/</link><description><![CDATA[Austin Group Issue Tracker - Issues]]></description></image><language>en</language><category>All Projects</category><ttl>10</ttl><dc:language>en</dc:language><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><item><title>0002019: grep -s and unreadable pattern files</title><author></author><link>http://austingroupbugs.net/view.php?id=2019</link><description><![CDATA[The -s option of grep is specified as:&lt;br /&gt;
&lt;br /&gt;
&gt; Suppress the error messages ordinarily written for nonexistent or unreadable files.&lt;br /&gt;
&gt; Other error messages shall not be suppressed.&lt;br /&gt;
&lt;br /&gt;
Which is unclear as to whether &quot;files&quot; refers to any file or only the input files (passed as argument or stdin). It's also unclear whether &quot;unreadable&quot; is only about failure to read those files, or also covers errors for opening the files for reading other than for &quot;nonexistence&quot;.&lt;br /&gt;
&lt;br /&gt;
Testing the GNU, busybox, toybox, ast-open, FreeBSD implementations, with -s, they all suppress errors about opening or reading *input* files, but not about *opening* pattern files.&lt;br /&gt;
&lt;br /&gt;
ast-open's and FreeBSD's seem not to report errors about *reading* files (at least for the EISDIR case which is the easy one I tested), with or without -s, whether that's for the input or pattern files, but I would say that's undesirable and could be considered a bug.]]></description><category>Shell and Utilities</category><pubDate>Sat, 05 Dec 2026 08:46:06 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2019</guid><comments>http://austingroupbugs.net/view.php?id=2019#bugnotes</comments></item><item><title>0002018: CSS: tt element contents ends up in sans-serif rather than monospace</title><author></author><link>http://austingroupbugs.net/view.php?id=2018</link><description><![CDATA[The html pages inlines the following CSS code:&lt;br /&gt;
&lt;pre&gt;
* { font-family: &quot;Open Sans&quot;; } 
h1, h2, h3, h4, h5 { font-family: &quot;Open Sans&quot;; } 
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
And while the pre, code, samp, kbd, … elements do have override to monospace in the bootstrap css file, tt doesn't.]]></description><category>Aardvark 2025</category><pubDate>Thu, 03 Dec 2026 01:46:27 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2018</guid><comments>http://austingroupbugs.net/view.php?id=2018#bugnotes</comments></item><item><title>0001999: Session timeouts too short</title><author></author><link>http://austingroupbugs.net/view.php?id=1999</link><description><![CDATA[I just spent an hour or two filling in an issue report (a long one)&lt;br /&gt;
only for when I submitted it to be told there was an invalid security&lt;br /&gt;
token, either I had submitted twice (no) or the session had timed&lt;br /&gt;
out (possible, given it had taken a LONG time to get all the details&lt;br /&gt;
page numbers, line numbers, ... inserted properly. And to decide&lt;br /&gt;
what exactly I needed to report.&lt;br /&gt;
&lt;br /&gt;
It told me to press the back button on my browser. I did. All the&lt;br /&gt;
text I had entered was gone (in previous interfaces that didn't happen,&lt;br /&gt;
I could create a new report, and cut and paste everything from the old&lt;br /&gt;
to the new, which would take much less time, and no timeout would&lt;br /&gt;
occur - it has been ages since my last interaction with this, I had forgotten&lt;br /&gt;
this issue.]]></description><category>Aardvark 2025</category><pubDate>Thu, 03 Dec 2026 01:38:42 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1999</guid><comments>http://austingroupbugs.net/view.php?id=1999#bugnotes</comments></item><item><title>0002016: Utility Syntax Guidelines: Include long options as in GNU's getopt_long()</title><author></author><link>http://austingroupbugs.net/view.php?id=2016</link><description><![CDATA[I propose extending subchapter 12.2 of the Base Definitions to include &quot;long options&quot;, as implemented by the GNU C Library. Technical specifics:&lt;br /&gt;
&lt;a href=&quot;https://www.sourceware.org/glibc/manual/latest/html_node/Getopt-Long-Options.html&quot; rel=&quot;noopener&quot;&gt;https://www.sourceware.org/glibc/manual/latest/html_node/Getopt-Long-Options.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://man7.org/linux/man-pages/man3/getopt_long.3.html&quot; rel=&quot;noopener&quot;&gt;https://man7.org/linux/man-pages/man3/getopt_long.3.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://man7.org/linux/man-pages/man3/getopt_long_only.3.html&quot; rel=&quot;noopener&quot;&gt;https://man7.org/linux/man-pages/man3/getopt_long_only.3.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If implemented, the function getopt_long() should be simultaneously incorporated into unistd.h (not getopt.h, as seen in glibc). The functionality of getopt_long_only() is equally desirable, but I suggest transforming it into a feature of getopt_long(), if possible. A feature which doesn't change the behavior of getopt_long() from the prespective of existing programs (expanding the expressiveness of has_arg in struct option, perhaps).&lt;br /&gt;
&lt;br /&gt;
Rationale:&lt;br /&gt;
1. Expanding the space of available options allows the application to assign more fitting options to its features.&lt;br /&gt;
2. Long options' names usually suggest their meaning, which is helpful to inexperienced and occasional users of the application. That includes the use of the long options in documentation.&lt;br /&gt;
3. Long options with no short counterparts can serve as a safety measure, making it very hard for the application user to activate a feature by accident.&lt;br /&gt;
4. The application may require more options than the alphanumeric repertoire of the Portable Character Set affords.&lt;br /&gt;
5. Long options with no short counterparts may be employed as markers of rarely used functionality, which may alleviate the difficulty of searching for an option in a list of all options.]]></description><category>Base Definitions and Headers</category><pubDate>Thu, 03 Dec 2026 01:32:34 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2016</guid><comments>http://austingroupbugs.net/view.php?id=2016#bugnotes</comments></item><item><title>0002017: string.h: Add mempcpy(), analog of stpncpy()</title><author></author><link>http://austingroupbugs.net/view.php?id=2017</link><description><![CDATA[I propose adding the function mempcpy() into string.h, as known from the GNU C Library. See:&lt;br /&gt;
&lt;a href=&quot;https://man7.org/linux/man-pages/man3/mempcpy.3.html&quot; rel=&quot;noopener&quot;&gt;https://man7.org/linux/man-pages/man3/mempcpy.3.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It will complement well the recently added stpcpy() and stpncpy() (or, rather, the other way around).&lt;br /&gt;
&lt;br /&gt;
Desired Action doesn't include the obligatory function prototype in the section on string.h.]]></description><category>System Interfaces</category><pubDate>Wed, 02 Dec 2026 15:30:08 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2017</guid><comments>http://austingroupbugs.net/view.php?id=2017#bugnotes</comments></item><item><title>0002014: strerror_r(): Error message length limit</title><author></author><link>http://austingroupbugs.net/view.php?id=2014</link><description><![CDATA[As shown in issue 2013, strerror_r() may be the only feasible means of obtaining an error string. The string may have an arbitrary size, however, so if an application wants to ensure that the full string is obtained, a loop is required, which re-reallocates the target buffer, if it isn't large enough. And there's no guarantee that any particular size will be sufficient. Moreover, the function is extremely useful when combined with a buffer on the stack.&lt;br /&gt;
&lt;br /&gt;
The proposal doesn't impose a direct length cap on the error string, instead allowing the implementation to space-optimize by setting the length cap itself, within bounds. For consistency, the limit is imposed on all the strerror*() functions.]]></description><category>System Interfaces</category><pubDate>Mon, 30 Nov 2026 14:05:02 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2014</guid><comments>http://austingroupbugs.net/view.php?id=2014#bugnotes</comments></item><item><title>0002015: strerror*(): Inconsistencies re. behavior on error</title><author></author><link>http://austingroupbugs.net/view.php?id=2015</link><description><![CDATA[The section on strerror*() says:&lt;br /&gt;
&lt;br /&gt;
&quot;If the value of errnum is a valid error number, the message string shall indicate what error occurred; if the value of errnum is zero, the message string shall either be an empty string or indicate that no error occurred; otherwise, if these functions complete successfully, the message string shall indicate that an unknown error occurred.&quot;&lt;br /&gt;
&lt;br /&gt;
It should be made clear that strerror() does return strings in said format, but isn't one of &quot;these functions&quot;, because &quot;strerror() shall map any value of type int to a message&quot; and &quot;whether successful or not, strerror() shall return a pointer to the generated message string&quot;. The sentence (quoted in full) is the only place in the whole Description which deals with the specific contents of the returned string, so it's tempting to try and fit strerror() into that (whole) sentence.&lt;br /&gt;
&lt;br /&gt;
As for strerror_l(), &quot;if these functions complete successfully, the message string shall indicate that an unknown error occurred&quot;, so when EINVAL is the outcome, it may not have returned a valid string. But later: &quot;If errnum is not a valid error number, errno may be set to [EINVAL], but a pointer to a message string shall still be returned&quot;. It's hard to tell which of these two behaviors is intended.&lt;br /&gt;
&lt;br /&gt;
Elsewhere: &quot;strerror_l() is required to return a string for some errors&quot; may again be wrong, see above.&lt;br /&gt;
&lt;br /&gt;
strerror_r() seems clear: in the EINVAL situation, a non-zero may or may not be returned, but when it isn't, a string was returned.&lt;br /&gt;
&lt;br /&gt;
In Rationale, this sentence provides no new information or advice: &quot;Since no return value is reserved to indicate a strerror() error, but all calls (whether successful or not) must return a pointer to a message string, on error strerror() can return a pointer to an empty string or a pointer to a meaningful string that can be printed.&quot;]]></description><category>System Interfaces</category><pubDate>Sun, 29 Nov 2026 17:18:15 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2015</guid><comments>http://austingroupbugs.net/view.php?id=2015#bugnotes</comments></item><item><title>0002012: strerror_l(): "use strerror_l() rather than strerror() [...] to avoid thread safety"</title><author></author><link>http://austingroupbugs.net/view.php?id=2012</link><description><![CDATA[The section on strerror*() says in Application Usage: &quot;use strerror_l() rather than strerror() or strerror_r() to avoid thread safety&quot;.]]></description><category>System Interfaces</category><pubDate>Sun, 29 Nov 2026 15:24:16 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2012</guid><comments>http://austingroupbugs.net/view.php?id=2012#bugnotes</comments></item><item><title>0002013: Necessity of strerror_r()</title><author></author><link>http://austingroupbugs.net/view.php?id=2013</link><description><![CDATA[Consider the simple programming task: in a multi-threaded environment, obtain the error string corresponding to an error number using any of the standard strerror*() function(s). The string is to follow the current locale (thread-specific one, if set, global, if not). Assumptions: 1. strerror() is thread-safe, 2. strerror_l()'s output buffer can never become ovewritten or invalidated by strerror() (see issue 2011), 3. strerror_l()'s output buffer in a thread can never become ovewritten or invalidated by strerror_l() in another thread (though this is not what thread-safety is defined as). These complications would not change the meaning of this issue.&lt;br /&gt;
&lt;br /&gt;
The informative part of the section on strerror*() of the standard declares strerror_r() unnecessary and recommends strerror_l().&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
const locale_t curloc = uselocale(0);
if (curloc == LC_GLOBAL_LOCALE) {
    curloc = duplocale(curloc);
    if (! curloc) fatal();
}
result = strerror_l(errnr, curloc);
freelocale(curloc);
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The possibility of ENOMEM in duplocale() makes this path unusable. Let's try to involve strerror() then. It vaguely appears, after all, that the purpose of the *_l() functions in general is not the simple case when the current locale is called for.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
const locale_t curloc = uselocale(0);
if (curloc != LC_GLOBAL_LOCALE)
    result = strerror_l(errnr, curloc);
else result = strerror(errnr);
// at this point, because of strerror(), result may point to an invalid string [CX]or even be an invalid pointer[/CX]
fatal();
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Again, this path is unusable. Hence, strerror_r() is necessary, or at least useful. its target buffer can concievably be allocated on the stack.]]></description><category>System Interfaces</category><pubDate>Sun, 29 Nov 2026 14:16:10 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2013</guid><comments>http://austingroupbugs.net/view.php?id=2013#bugnotes</comments></item><item><title>0002011: strerror*(): Redundant and/or missing statement reg. repeated call</title><author></author><link>http://austingroupbugs.net/view.php?id=2011</link><description><![CDATA[The section on strerror*() mentions twice, in the 3rd and 4th paragraph of the Description, that the string returned by strerror() may be overwritten &quot;by a subsequent call to strerror_l() in the same thread&quot;.&lt;br /&gt;
&lt;br /&gt;
Note that while the Description clearly states that strerror() may use the same buffer on each call, it never makes such a statement about strerror_l(). It is strongly suggested, but not stated plainly. If strerror_l() may re-use a buffer, it should be made explicit.]]></description><category>System Interfaces</category><pubDate>Sun, 29 Nov 2026 12:39:41 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2011</guid><comments>http://austingroupbugs.net/view.php?id=2011#bugnotes</comments></item><item><title>0002010: strerror_l(): Allowed to be called by other POSIX functions?</title><author></author><link>http://austingroupbugs.net/view.php?id=2010</link><description><![CDATA[In the section on strerror*(), the standard says: &quot;The implementation shall behave as if no function defined in this volume of POSIX.1-2024 calls strerror().&quot; The reason for this, I suppose, is to give the user a level of control over the buffer. To guarantee that the contents of the buffer will not change by a call to an arbitrary function. If that is indeed the motivation, the same guarantee is in order about strerror_l().]]></description><category>System Interfaces</category><pubDate>Sat, 28 Nov 2026 23:38:14 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2010</guid><comments>http://austingroupbugs.net/view.php?id=2010#bugnotes</comments></item><item><title>0002009: Improve phrasing on the shell's -e requrement</title><author></author><link>http://austingroupbugs.net/view.php?id=2009</link><description><![CDATA[According to the standard:&lt;br /&gt;
&lt;br /&gt;
&quot;The execution line shall then be executed by a shell as if it were passed as the argument to the system() interface, except that if errors are not being ignored then the shell -e option shall also be in effect. If errors are being ignored for the command (as a result of the -i option, a '-' command prefix, or a .IGNORE special target), the shell -e option shall not be in effect.&quot;&lt;br /&gt;
&lt;br /&gt;
The wording around set -e being or not being in effect is too definitive. A precise reading may suggest that executing set +e inside the shell is not permitted or possible when errors are ignored and set -e is not permitted or possible otherwise.]]></description><category>Shell and Utilities</category><pubDate>Mon, 23 Nov 2026 01:54:00 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2009</guid><comments>http://austingroupbugs.net/view.php?id=2009#bugnotes</comments></item><item><title>0002007: regular expression repetition modifier '?' in case of no match</title><author></author><link>http://austingroupbugs.net/view.php?id=2007</link><description><![CDATA[new text in &lt;a href=&quot;https://austingroupbugs.net/view.php?id=1857#c7130&quot; rel=&quot;noopener&quot;&gt;https://austingroupbugs.net/view.php?id=1857#c7130&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
 2. If an ERE contains repetitions with and without the repetition modifier '?', the precedence between the repetitions shall be:&lt;br /&gt;
    a. Each leftmost shortest match shall match the leftmost shortest sequence in the string, in descending priority from left to right.&lt;br /&gt;
 ...&lt;br /&gt;
 ... the ERE &quot;(aaa??)*&quot; matches only the first four characters of the string &quot;aaaaa&quot;, ...&lt;br /&gt;
&lt;br /&gt;
my reading of 2a implies &quot;(aaa??)*&quot; matches &quot;aaaaa&quot; as (0,0)(-1,-1) and not (0,4)(2,4).&lt;br /&gt;
because a no match (of a??) is more &quot;leftmost shortest&quot; compared to an empty match.&lt;br /&gt;
to consider further rules we need to establish that they are equally &quot;leftmost shortest&quot;, but i did not find text for that.&lt;br /&gt;
&lt;br /&gt;
i.e. if a no match is shorter than an empty match then &quot;(a|aaa??)&quot; only matches the first &quot;a&quot; in &quot;aa&quot;.]]></description><category>Base Definitions and Headers</category><pubDate>Wed, 18 Nov 2026 23:36:40 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2007</guid><comments>http://austingroupbugs.net/view.php?id=2007#bugnotes</comments></item><item><title>0002008: Bold text markers as text</title><author></author><link>http://austingroupbugs.net/view.php?id=2008</link><description><![CDATA[On the web page for the make utility there are two occurrences of the literal text &quot;.B~.PHONY&quot; - these are supposed to be formatting markers for bold text.]]></description><category>Shell and Utilities</category><pubDate>Wed, 18 Nov 2026 20:43:15 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2008</guid><comments>http://austingroupbugs.net/view.php?id=2008#bugnotes</comments></item><item><title>0002000: XSH 3/strfmon misses info and needs attention</title><author></author><link>http://austingroupbugs.net/view.php?id=2000</link><description><![CDATA[&lt;p&gt;&lt;br /&gt;
In the sequel, I shall refer solely to &lt;i&gt;strfmon&lt;/i&gt;(), but everything applies equally to &lt;i&gt;strfmon_l&lt;/i&gt;().&lt;br /&gt;
The mechanism by which the locale data is made available is not material to anything in this defect report.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
The following defects are ordered in decreasing order of importance, as I see them, except with some related issues grouped adjacent to one another.&lt;br /&gt;
All defects (except probably the last) should be corrected however.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;
When issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt; was fixed (the changes made as the result of that I generally agree with) one part of the original issue report seems to have been forgotten.&lt;br /&gt;
It (&lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt;) said:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
However, without a distinction between positive and negative values, and without a visible decimal separator, this behaviour is useless, or even dangerous &lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The issue with positive/negative was (mostly) handled, the issue when there is no visible decimal separator was not, and needs to be.&lt;br /&gt;
See issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt; for an example illustrating the problem.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
Following on from the previous, it is also unclear, even with the text as amended by issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt;,  what should be done when a locale defines non-empty strings to be used as the signs, but specifies the same string for both cases.&lt;br /&gt;
This is effectively the same problem as issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt; dealt with, being unable to determine whether a value is positive, or negative, just in a different way.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Relevant to this, and what makes it different from the empty string case, is that the result might differ when the position of the sign string is different for positive and negative values.&lt;br /&gt;
That is, it is not necessarily simply invalid to use the same non-empty string for both the positive and negative signs.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
It is not always clear in the specification when &lt;i&gt;character&lt;/i&gt; means &lt;b&gt;character&lt;/b&gt; and when it means &lt;b&gt;byte&lt;/b&gt; or perhaps &quot;character from a restricted character set&quot;, or something different entirely.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
That the specification generally means &lt;b&gt;character&lt;/b&gt; is clear from line 69523:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The format is a character string, beginning and ending in its initial state, if any, ...&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
which would make no sense if &lt;i&gt;character&lt;/i&gt; was being used as a synonym for the &lt;b&gt;C&lt;/b&gt; programming language &lt;b&gt;char&lt;/b&gt; data type, or simply a byte, or even a character from the Portable Character Set from the standard (XBD 6.1).&lt;br /&gt;
Those kinds of characters have no state, hence no initial state to require.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
This issue crops up in many places, the most obvious is in (line 69540):&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
An '=' followed by a single character &lt;i&gt;f&lt;/i&gt; which is used as the numeric fill character.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
The text (lines 69541-69542) attempts to add some meaning to this:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
In order to work with precision or width counts, the fill character shall be a single byte character; if not, the behavior is undefined.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
But that makes no sense at all.&lt;br /&gt;
To work with the precision and width counts, the fill character needs to occupy one column position in the output.&lt;br /&gt;
That distinction has nothing at all to do with how many bytes are in the representation of the character.&lt;br /&gt;
A single byte character, in some locales, might be zero-width or occupy multiple columns in the output, even in a constant width font.&lt;br /&gt;
Obvious examples are the &lt;tab&gt; character, and ASCII control characters.&lt;br /&gt;
A &lt;newline&gt; or &lt;carriage-return&gt; would have different, but related, issues.&lt;br /&gt;
It is also unclear why the behaviour should be &lt;b&gt;undefined&lt;/b&gt; should the application not give a suitable character as the fill character value.&lt;br /&gt;
That is a truly machiovellian punishment.&lt;br /&gt;
Would it not be better to simply make it clear than in such cases the intended alignment might not be able to be achieved?&lt;br /&gt;
That is, the implementation should just use whatever character is specified as &lt;i&gt;f&lt;/i&gt; when needed as the fill character, and if that character is not suitable for the purpose, the output will look odd, instead of nice.&lt;br /&gt;
No calling &lt;i&gt;abort&lt;/i&gt;(), or removing all of the user's files, which &quot;undefined behaviour&quot; would permit.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
A similar problem can be found at line 69577:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
A decimal digit string &lt;i&gt;w&lt;/i&gt; specifying a minimum field width in bytes&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
which also makes little sense, if one assumes as the specification seems to imply, at a minimum, that the objective is to be able to align output from multiple calls to &lt;i&gt;strfmon&lt;/i&gt;().&lt;br /&gt;
What matters is the appearance of the final output, not how many bytes of encoded characters are needed to achieve that result.&lt;br /&gt;
The number of bytes is, or should, only be relevant when determining whether the result fits within the &lt;i&gt;maxsize&lt;/i&gt; number of bytes available in the output buffer.&lt;br /&gt;
Everything else should be using &lt;b&gt;character&lt;/b&gt;s, possibly constrained in some cases to be printing or graphic characters, and perhaps sometimes constrained by the widths of the characters concerned.&lt;br /&gt;
This needs to be clear in the specification, with no mention of &lt;b&gt;bytes&lt;/b&gt; in any of the relevant places.&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The same problem arises with everything else inserted into the resulting output string, including the &lt;i&gt;mon_decimal_point&lt;/i&gt; and the &lt;mon_thousands_sep&gt; strings.&lt;br /&gt;
Lines 69592-69594 do explain the idea:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
To ensure alignment, any characters appearing before or after the number in the formatted output such as currency or sign symbols are padded as necessary with &lt;space&gt; characters to make their positive and negative formats an equal length.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
though that text does give rise to the immediately following defect.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
It should also be made clear what other constraints, if any, must be met for the output to be able to be nicely aligned.&lt;br /&gt;
The use of a monospace (constant width) font to display the result is an obvious one, without that achieving alignment requires much more complex mechanisms that simply counting characters, which is all that is available here.&lt;br /&gt;
But is it expected that all the values intended to be able to be aligned have neen formatted using the same locale, or is it intended that output from different locales be able to be intermixed, and remain aligned?&lt;br /&gt;
The answer to that question constrains what constraints should be placed upon what is permitted in locales for the &lt;b&gt;mon_decimal_point&lt;/b&gt; (I have a fake locale, for testing purposes, which uses $'\u3002' as that character, and the font I use for my terminal sessions renders that character in 2 columns).&lt;br /&gt;
Is &lt;i&gt;strfmon&lt;/i&gt;() expected to work with such a value?&lt;br /&gt;
It does, even to aligning (approximately) as intended, as the alighnment is primarily for the value to the left of the radix, which is unaffected by this.&lt;br /&gt;
But something similar might be used as the &lt;b&gt;mon_thousands_sep&lt;/b&gt;.&lt;br /&gt;
Further, different locales might have different &lt;b&gt;mon_grouping&lt;/b&gt; settings.&lt;br /&gt;
My fake locale uses &quot;2;3;2;3;2&quot; which is going to result in a different number of separators being inserted in some values than the more common &quot;3&quot;.&lt;br /&gt;
As one call to &lt;i&gt;strfmon&lt;/i&gt; has no way to communicate decisions to another, nor to predict what locale might be in use when the next call is made, it might seem necessary to constrain the alignment goal to apply only as long as the same locale is used for all relevant &lt;i&gt;strfmon&lt;/i&gt; calls.&lt;br /&gt;
But that might also be too strict, perhaps as long as the locales used all use the same &lt;b&gt;mon_grouping&lt;/b&gt;, and use as their &lt;b&gt;mon_decimal_point&lt;/b&gt; and &lt;b&gt;mon_thousands_sep&lt;/b&gt; strings which occupy the same number of columns as the equivalent setting in all other locales used in a sequence intended to align correctlty, that would be enough?&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Did no-one ever consider any of these questions?&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The text at lines 69592-69594:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
To ensure alignment, any characters appearing before or after the number in the&lt;br /&gt;
formatted output such as currency or sign symbols are padded as necessary with&lt;br /&gt;
&lt;space&gt; characters to make their positive and negative formats an equal length.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
concentrate entirely upon making the positive and negative output forms of equal length, but the text at lines 69582-69584:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
This option can be used to keep the formatted output from multiple calls to the strfmon( ) function aligned in the same columns.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
makes it clear that the aim that is implied by lines 69592-69594 is not sufficient to meet the expectations of the &lt;i&gt;strfmon&lt;/i&gt; specification, and that more precision is required to meet the overall objective.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
That is, if for positive numbers, the sign follows the value, and for negative nnumbers the sign precedes the value, then, to keep the numeric parts of a positive and a negative value aligned, both of them must allocate space in the resulting&lt;br /&gt;
string for the possible negative sign before the value, and the possible positive sign following the value (when positive signs are being included), so that either of them might be used to occupy the sign value.&lt;br /&gt;
What's more, that is what implementations I have seen actually do.&lt;br /&gt;
Simply having the positive and negative formats being of equal length is not suffficient.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
It is also not stated anywhere, but clearly is intended (I hope), that the expected alignment is only achieved if the same format string is used for all the applicable calls to &lt;i&gt;strfmon&lt;/i&gt;().&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
A corollary to the previous two points, is that it should be made explicit that aligned values can only be expected to remain aligned when displayed or printed, if they are rendered in a constant width font, or at least one in which all characters are represented in a non-negative integer multiple of a fixed column width.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The description of &quot;grouping characters&quot; (a term for which incidentally I can find no definition in the standard, though it is obvious that in this context it means the &lt;b&gt;mon_thousands_sep&lt;/b&gt; characters inserted to perform the grouping function of monetary output values, which is a defined operation) and how they apply to the &lt;b&gt;Left Precision&lt;/b&gt; given in lines 69589-69590 is one of the least useful specifications I think I have ever seen.&lt;br /&gt;
It states (lines 69589-69590):&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
If grouping has not been suppressed with the '^' flag, and it is defined for the current locale, grouping separators are inserted before the fill characters (if any) are added.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
The pre-conditions are simple enough, but I would interpret the action as meaning that each &quot;grouping separator&quot; (another undefined term) inserted replaces one (or perhaps more) of the fill characters, which then fill in any remaining unused positions as specified in the previous paragraph (lines 69581-69588).&lt;br /&gt;
The subsequent sentence (line 69591), which ends the paragraph, about the inapplicability of grouping to fill characters, even if they are digits, is clear enough as it stands.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
But as illustrated by the examples (see lines 69640-69642 (or 69643-69645 or 69646-69648) in comparison with lines 69649-69651 which, apart from the use of a non-space fill character in the alternatives of the former, which is immaterial, show the same example, except the former has grouping enabled, and the latter with it suppressed), and from observing what is done by actual implementations, that is not what is intended at all.&lt;br /&gt;
Rather, the value given by the &lt;b&gt;Left Precision&lt;/b&gt; &quot;&lt;i&gt;n&lt;/i&gt;&quot; value, is to be increased by the maximum number of &quot;grouping separators&quot; which would be needed if a value to be formatted generates &lt;i&gt;n&lt;/i&gt; (as specified) digits before the radix character (decimal-point) if any.&lt;br /&gt;
Then the value is formatted, and the number of &quot;grouping separators&quot; required for the actual value are inserted, and finally the increased value of &lt;i&gt;n&lt;/i&gt; is used to fill any remaining unused positions with fill characters.&lt;br /&gt;
That is, the use of grouping can increase the number of fill characters to be used for a particular &lt;i&gt;value&lt;/i&gt;, and the actual left precision width from what is in the conversion specification, but never decrease it, compared to when grouping is not used.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
How, an implementer, or an application writer, is intended to determine the intended behaviour from the written specification bamboozles me.&lt;br /&gt;
It needs rewriting.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Note also, that though the &lt;i&gt;linux&lt;/i&gt; manual page for this function attempts to make this clear, it is not a lot better:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
Next, there may be a left precision of the form &quot;#&quot; followed by a decimal digit string.&lt;br /&gt;
If the number of digits left of the radix character is smaller than this, the representation is padded on the left with the numeric fill character.&lt;br /&gt;
Grouping characters are not counted in this field width.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
That would make it seem as if the number of grouping characters inserted, or which might be inserted, has no effect on the padding inserted by the left precision, which is not correct either.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The &lt;b&gt;ERRORS&lt;/b&gt; section at lines 69628-69630 states the functions shall fail if:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;[EINVAL]&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The '+' flag was included in a conversion specification and the locale's positive_sign and negative_sign values would both be returned by localeconv( ) as empty strings.&lt;br /&gt;
&lt;/blockquote&gt;&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
The &lt;b&gt;APPLICATION USAGE&lt;/b&gt; section, at lines 69672-69676:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The '+' flag should be used with care, because if the locale's positive_sign and negative_sign values are both empty strings, there is no way to distinguish negative from positive values with signs and therefore strfmon( ) fails. If the application has a preference for signs but parentheses are acceptable, it should try strfmon( ) with the '+' flag first, and if it fails with [EINVAL] then repeat the call without the '+' flag.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
and the &lt;b&gt;RATIONALE&lt;/b&gt; at lines 69678-69680:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The [EINVAL] error condition applies only when the '+' flag is used because this flag indicates that the application requires the use of signs, and if there are no signs in the locale data then this requirement cannot be satisfied.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
together expand upon this intended unique use.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
While implementations are generally permitted to add error numbers, and to add meanings to errors the standard specifies, as specified by XSH 2.3 at lines 17831-17833:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
Implementations may support additional errors not included in this list, may generate errors included in this list under circumstances other than those described here, or may contain extensions or limitations that prevent some errors from occurring.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
that same section goes on to place a restriction upon this implementation freedom, at lines 17839-17841 (and following for more restrictions not relevant here):&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
Implementations may generate error numbers listed here under circumstances other than those described, if and only if all those error conditions can always be treated identically to the error conditions as described in this volume of POSIX.1-2024.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Taken together all of this implies, to me anyway, that the implementation may not generate &lt;b&gt;EINVAL&lt;/b&gt; for any error other than the one listed, as an application would then be unable to ascertain that the problem was the '+' in the format string, and offer a different format for the locale in question in that case.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
The problem all this causes for the implementation, is just how it should deal with applications which fail to meet their &lt;b&gt;shall&lt;/b&gt; obligations, for example the one at line 69529:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The application shall ensure that a conversion specification consists of the following sequence:&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
I appreciate that when an application fails to comply with its obligations, implementation behaviour is unspecified, or perhaps even undefined, and is certainly beyond the scope of the standard.&lt;br /&gt;
This however does not help the implementer, who must do something in such cases.&lt;br /&gt;
Further as it seems above, the implementer is prohibited from using the obvious &lt;b&gt;EINVAL&lt;/b&gt; error code in such a situation.&lt;br /&gt;
Further, it does not help the application writer either, if some implementations simply ignore such issues and continue formatting as best they can, others return -1 and a seemingly random error code, and yet others simply call XSH 3 section 3/abort (pages 577-558).&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
At the very least, the specification should offer some guidance in this situation, and probably rewrite the application usage and rationale, so as to no longer constrain &lt;b&gt;EINVAL&lt;/b&gt; such that it cannot be used by the implementation for other issues.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The standard offers no guidance on what should be done, should some of the data expected to be provided by the locale, is not defined there.&lt;br /&gt;
The &lt;b&gt;POSIX&lt;/b&gt; locale is one which does not supply any.&lt;br /&gt;
Particularly after the resolution of issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt;, some of this has&lt;br /&gt;
been dealt with, but not all.&lt;br /&gt;
This includes the lack of a (non-empty) &lt;b&gt;mon_decimal_point&lt;/b&gt;.&lt;br /&gt;
There is also no discussion on what should be done if any of the specified strings are non-empty, but do not contain anything which produces a visible representation in the output.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
There should be.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
Returning to &lt;b&gt;APPLICATION USAGE&lt;/b&gt; section, at lines 69672-69676:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The '+' flag should be used with care, because if the locale's positive_sign and negative_sign values are both empty strings, there is no way to distinguish negative from positive values with signs and therefore strfmon( ) fails. If the application has a preference for signs but parentheses are acceptable, it should try strfmon( ) with the '+' flag first, and if it fails with [EINVAL] then repeat the call without the '+' flag.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
That suggests that simply omitting the '+' flag, will cause &lt;i&gt;stfrmon&lt;/i&gt;() to use parentheses as the indicator for negative values.&lt;br /&gt;
That is not what the post-issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt; standard causes to happen.&lt;br /&gt;
Instead, as stated on lines 69567-69571 when considering the case that&lt;br /&gt;
neither of the '+' nor '(' flags are included in the format:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
If the style cannot be determined from these locale values because a value that needs to be used would be returned by localeconv() as {CHAR_MAX}, the style used shall be that specified for the '+' flag; if this would cause strfmon( ) to fail because the locale's positive_sign and negative_sign values would both be returned by localeconv( ) as empty strings, strfmon( ) shall behave as if the negative_sign value was the string &quot;-&quot;.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
In other words, unless the format specifies the '(' flag (in which case this section is never reached, and its &lt;b&gt;positive_sign&lt;/b&gt; and &lt;b&gt;negative_sign&lt;/b&gt; and sign placement values are all ignored), if the '+' flag is not given, and the locale's default is not to use parentheses to indicate negative values, then the resulting output would use the empty &lt;b&gt;positive_sign&lt;/b&gt; if the &lt;i&gt;value&lt;/i&gt; is non-negative, and use &quot;-&quot; instead of an empty &lt;b&gt;negative_sign&lt;/b&gt; if the &lt;i&gt;value&lt;/i&gt; is negative.&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;br /&gt;
This &lt;b&gt;APPLICATION USAGE&lt;/b&gt; text needs to be rewritten to take that into account.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
At times the standard is too specific in what it specifies.&lt;br /&gt;
For example, at lines 69557-69558:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
If a sign's placement cannot be determined from these locale values because a value that needs to be used would be returned by &lt;i&gt;localeconv&lt;/i&gt;() as 0 or {CHAR_MAX}, ...&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Why is it important what the issue is with the value?&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
The range of values for the sign position are 0 to 4, with 0 not being useful for the situation being discussed in those lines, or {CHAR_MAX} to mean no value is supplied.&lt;br /&gt;
But what if the locale data specifies a value of 7?&lt;br /&gt;
That has no (currently) defined meaning, and hence is not useful for determining the placement of the sign, but it is not &quot;returned by &lt;i&gt;localeconv&lt;/i&gt;() as 0 or {CHAR_MAX}&quot;, so what is the implementation to do?&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
This kind of over specification should be removed, it is not important why the sign placement cannot be determined from the locale values, just that it cannot.&lt;br /&gt;
Note that this is not just a fanciful, perhaps even imagined, impossible case.&lt;br /&gt;
A later version of the standard may add extra possible values to any of the fields for which a set of numeric designated choices are provided, and an older implenentation (an instance of &lt;i&gt;stfrmon&lt;/i&gt; compiled into an existing applicaion for example) may encounter a previously invalid value, and needs to know how to handle that case.&lt;br /&gt;
This is not an instance where &quot;behaviour is unspecified&quot; (or even &quot;undefined&quot;) is an acceptable outcome.&lt;br /&gt;
The standard must be permitted to evolve without invalidating existing applications.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The &lt;b&gt;EXAMPLES&lt;/b&gt; section, page 2132 (lines 69632-69670) assumes the existence of &quot;a locale for the US&quot; and, to make sense of the example output, what that locale must contain.&lt;br /&gt;
I can find no justification in the standard to assume that such a locale exists anywhere.&lt;br /&gt;
I certainly believe that most readers would understand &lt;b&gt;USD&lt;/b&gt; as the international currency symbol for the United States of America, and &lt;b&gt;$&lt;/b&gt; as its national currency symbol, and probably that its &lt;b&gt;frac_digits&lt;/b&gt; and &lt;b&gt;int_frac_digits&lt;/b&gt; would usually both be two.&lt;br /&gt;
I am not sure however that using a &quot;&lt;b&gt;-&lt;/b&gt;&quot; to indicate negative values, and nothing for positive ones, rather than enclosing negative values in parentheses, or use of &lt;b&gt;CR&lt;/b&gt; for positive and &lt;b&gt;DB&lt;/b&gt; for negative, is how such a locale would be defined.&lt;br /&gt;
Nor would I necessarily expect the sign, if used, to precede the currency symbol, rather than follow it.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
If some fictional locale is to be used for examples, regardless of whether that locale might be an actual locale on some system used by one or more of the actual writers of the text, then at least as much of it as is needed to understand the examples should be presented in the specification.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Further, there should certainly be examples given where the &lt;b&gt;POSIX&lt;/b&gt; (aka &lt;b&gt;C&lt;/b&gt;) locale, the only one the standard actually specifies, is used.&lt;br /&gt;
Had there been, some of the problems this specification had before issue &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1199&quot;&gt;0001199&lt;/a&gt; rectified them, and some of the problems it still has, might have been recognised and corrected much sooner than this.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The &lt;b&gt;DESCRIPTION&lt;/b&gt; at lines 69524-69526 contains:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;b&gt;...&lt;/b&gt;, and conversion specifications, each of which shall result in the fetching of zero or more arguments which are converted and formatted.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&quot;Zero or more&quot; ?&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The zero case is obviously for the &lt;b&gt;%%&lt;/b&gt; format conversion specification (which I personally would not treat as a conversion specification at all, but as an escaping mechanism, but that isn't the point here).&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
But &quot;or more&quot; ??&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
One is certainly more than zero, and one (exactly) is what every other format conversion requires.&lt;br /&gt;
Why not just say &quot;zero or one&quot;, and not leave the reader wondering when more than one might be required?&lt;br /&gt;
Of course, if there is some hidden intent to allow indirect specification of the field width, the left precision, or the right precision, or some or all of those, in the way that the printf family of functions permit, which would perhaps be a useful addition, though not supported by any implementation of which I am aware, then the &quot;or more&quot; would be justified.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
In the same paragraph as the previous defect (lines 69524-69526) the text elided at the beginning of the text quoted previously is:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The format is a character string, beginning and ending in its initial state, if any, that contains two types of objects: &lt;i&gt;plain characters&lt;/i&gt;, which are simply copied to the output stream, &lt;b&gt;...&lt;/b&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
but there is no definition anywhere of what is a &lt;i&gt;plain character&lt;/i&gt;.&lt;br /&gt;
The intent is obvious, but standards should not rely upon readers being able to deduce from what appears to be obvious, they should be explicit.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
The locale specification (XBD 7) and the specification of &lt;i&gt;strfmon&lt;/i&gt; seem to lack the ability to format currency amounts in the (old style to be sure) formats previously used in the UK, and other countries including AU and NZ.&lt;br /&gt;
That is, the Lsd format, as in £10/- or £9-19-11 and similar constructions.&lt;br /&gt;
There may be other formats in use, or previously in use, which are similarly neglected.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
There is also no way to specify that other characters, rather than '(' and ')' be used to surround values, further it should be possible to have different characters surrounding positive and negative values - the &lt;b&gt;positive_sign&lt;/b&gt; and &lt;b&gt;negative_sign&lt;/b&gt; settings cannot be used for this, as only one of them is ever used for any particular value, and whichever that is is only ever used once.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
These issues should be fixed, but this is not the place to do it.&lt;br /&gt;
Thus I will not offer potential solutions - the issue is here just so it is clear that the problems are known, and cannot at some future time be dismissed with &quot;We didn't ever consider those possibilities.&quot;&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;]]></description><category>System Interfaces</category><pubDate>Tue, 17 Nov 2026 11:46:44 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2000</guid><comments>http://austingroupbugs.net/view.php?id=2000#bugnotes</comments></item><item><title>0002002: execlp() / execvp() and commands starting with - or +</title><author></author><link>http://austingroupbugs.net/view.php?id=2002</link><description><![CDATA[Similar to &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1440&quot;&gt;0001440&lt;/a&gt;, related to &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1600&quot;&gt;0001600&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/execl.html&quot; rel=&quot;noopener&quot;&gt;https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/execl.html&lt;/a&gt; has:&lt;br /&gt;
&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
In the cases where the other members of the exec family of functions would fail and set errno to [ENOEXEC], the execlp() and execvp() functions shall execute a command interpreter and the environment of the executed command shall be as if the process invoked the sh utility using execl() as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;execl(&lt;shell path&gt;, &lt;name&gt;, file, &lt;args&gt;, (char *)0);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;shell path&gt; is an unspecified pathname for the sh utility, &lt;name&gt; is an unspecified string, file is the process image file, and where &lt;args&gt; is zero or more parameters corresponding to any initial non-null arguments passed after arg0 for execlp() or to any initial non-null members of argv starting at argv[1] for execvp().&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
&lt;br /&gt;
&quot;file is the process image file&quot; should probably be &quot;file is the pathname to the process image file&quot;, but also, if that pathname starts with - or +, such as when invoked as execlp(&quot;-dir-/cmd&quot;,...) or execlp(&quot;+x&quot;,...) and +x was found in the current directory because $PATH contains an empty component, then that path will be taken as an option by sh instead of the path to the file being executed.&lt;br /&gt;
&lt;br /&gt;
There's a similar problem in the resolution of &lt;a href=&quot;http://austingroupbugs.net/view.php?id=1600&quot;&gt;0001600&lt;/a&gt; where&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#! /path/to/sh
${0##*/} &quot;$@&quot;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Should be:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#! /path/to/sh --
&quot;${0##*/}&quot; &quot;$@&quot;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
(leaving that ${0##*/} unquoted to request split+glob also doesn't make sense here)]]></description><category>System Interfaces</category><pubDate>Mon, 16 Nov 2026 20:47:36 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2002</guid><comments>http://austingroupbugs.net/view.php?id=2002#bugnotes</comments></item><item><title>0002006: Inconsistent spelling of "behavior"</title><author></author><link>http://austingroupbugs.net/view.php?id=2006</link><description><![CDATA[The POSIX style is to use American English spelling. However, in two places, the word &quot;behaviour&quot; is spelled in British English style.]]></description><category>System Interfaces</category><pubDate>Mon, 16 Nov 2026 17:41:09 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2006</guid><comments>http://austingroupbugs.net/view.php?id=2006#bugnotes</comments></item><item><title>0002005: scandir() example frees namelist on failure</title><author></author><link>http://austingroupbugs.net/view.php?id=2005</link><description><![CDATA[The description of &lt;i&gt;scandir()&lt;/i&gt; does not place any requirements on the value of *&lt;i&gt;namelist&lt;/i&gt; on error. It could for example be unchanged, set to a null pointer or even point to memory that has already been freed.&lt;br /&gt;
&lt;br /&gt;
The example calls &lt;i&gt;free(namelist)&lt;/i&gt; unconditionally, potentially passing an uninitialized or already freed pointer.]]></description><category>System Interfaces</category><pubDate>Fri, 13 Nov 2026 07:07:53 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2005</guid><comments>http://austingroupbugs.net/view.php?id=2005#bugnotes</comments></item><item><title>0001931: Behavior of scandir() when no entries are selected</title><author></author><link>http://austingroupbugs.net/view.php?id=1931</link><description><![CDATA[The description of `scandir()` does not specify whether `namelist` is expected to be null when no directory entries are selected (i.e. `scandir()` returns 0).&lt;br /&gt;
&lt;br /&gt;
The BSD implementation of `scandir()` allocates the pointer array before reading the directory and returns a non-null pointer which must be freed even if no entries were selected. This has been the case since the initial CSRG version in 1982. In macOS, which uses a direct descendant of this implementation, this is even documented in the manual page. The only difference between the CSRG, FreeBSD, and macOS implementations is the size of this initial allocation: the original implementation tried to guess how many pointers would be needed if all entries were selected, while FreeBSD, and later macOS, switched to an initial allocation size of 32 pointers. Solaris also appears to use a descendant of the CSRG implementation and still tries to preallocate the maximum number of pointers.&lt;br /&gt;
&lt;br /&gt;
Both glibc and musl, on the other hand, delay the allocation until the first entry is selected, so if `scandir()` returns 0, `namelist` is null.&lt;br /&gt;
&lt;br /&gt;
My main worry is that developers working primarily on Linux may treat the return value as trinary and return early if it is 0, failing to free `namelist`, not realizing that this will result in a memory leak when their code is run on e.g. FreeBSD.&lt;br /&gt;
&lt;br /&gt;
I'll also note that the code example in the specification frees `namelist` unconditionally as long as `scandir()` does not fail, but this does not really answer the question since a) the example calls `scandir()` without a selection function, so we can expect at least two entries for `.` and `..`, and b) `free(NULL)` is perfectly safe.]]></description><category>System Interfaces</category><pubDate>Sun, 08 Nov 2026 11:20:58 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1931</guid><comments>http://austingroupbugs.net/view.php?id=1931#bugnotes</comments></item><item><title>0001938: scandir() should set errno to indicate the error</title><author></author><link>http://austingroupbugs.net/view.php?id=1938</link><description><![CDATA[Luca Kellermann on &lt;a href=&quot;https://www.openwall.com/lists/musl/2025/07/21/5&quot; rel=&quot;noopener&quot;&gt;https://www.openwall.com/lists/musl/2025/07/21/5&lt;/a&gt; has noted few things about the current spec, notably including:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
* The RETURN VALUE section does not explicitly say that errno shall&lt;br /&gt;
  be set on error.&lt;br /&gt;
&lt;/blockquote&gt;]]></description><category>System Interfaces</category><pubDate>Sun, 08 Nov 2026 11:20:49 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1938</guid><comments>http://austingroupbugs.net/view.php?id=1938#bugnotes</comments></item><item><title>0001997: cp,mv,pax should not need to diagnose timestamp downresing</title><author></author><link>http://austingroupbugs.net/view.php?id=1997</link><description><![CDATA[When the command ‘mv /a/SOURCE DEST’ crosses file system boundaries, the resulting file DEST can have a timestamp with less low-order information as described by futimens (POSIX.1-2024 page 1075 lines 36821–36822). For example, the source file’s timestamp might be 1786900895.478636836 but the destinations might be on a FAT32 filesystem so its timestamp might be only 1786900895.47, as FAT32 has only 10 ms resolution.&lt;br /&gt;
&lt;br /&gt;
This topic recently came up in a bug report for GNU mv &lt;&lt;a href=&quot;https://bugs.gnu.org/13601#40&gt;&quot; rel=&quot;noopener&quot;&gt;https://bugs.gnu.org/13601#40&gt;.&lt;/a&gt; One commenter there said that this loss of information triggers the clause for mv (page 3199 lines 108114–108115) saying “If the duplication of the file characteristics fails for any reason, mv shall write a diagnostic message to standard error” which means a diagnostic is required.&lt;br /&gt;
&lt;br /&gt;
GNU mv, and I expect all other mv implementations, does not do that. Instead, it uses futimens or utimensat to set DEST’s timestamps, and if that succeeds it does not issue a diagnostic. Checking whether DEST’s timestamp lost low-order info would require another system call, and I don’t know of any mv implementation that does so.&lt;br /&gt;
&lt;br /&gt;
A clarification is needed here for the phrase “duplication of the file characteristic fails for any reason”. Does the phrase mean that (a) a system call like futimens failed, or does it mean that (b) the destination’s characteristics disagree, even slightly, from the source’s? Although implementations have chosen (a) POSIX could be read as requiring (b).&lt;br /&gt;
&lt;br /&gt;
If an implementation wanted to implement (b), for efficiency it would be helpful if utimensat acquired an additional flag to cause the system call to fail if the timestamp is downresed. However, that would be a separate topic from this bug report, and I know of no platform that has such a flag so at this point it would be pure invention on the POSIX committee’s part.&lt;br /&gt;
&lt;br /&gt;
In the DESIRED ACTION I have attempted to word things so that an implementation can do either (a) or (b). (b) is allowed because an implementation can always issue a diagnostic whenever it likes, so long as it does not change the exit status.]]></description><category>Shell and Utilities</category><pubDate>Wed, 04 Nov 2026 14:52:15 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1997</guid><comments>http://austingroupbugs.net/view.php?id=1997#bugnotes</comments></item><item><title>0002001: Zero output after preprocessing on cc17 -E</title><author></author><link>http://austingroupbugs.net/view.php?id=2001</link><description><![CDATA[The -E compiler option POSIX's answer to dependency generation for make, as also explained in the rationale. This report has to do with the description of the -E option in the STDOUT section which is already being amended as per bug report 1925. That amendment does not introduce the issue I am describing here, it inherited it from the current standard, but I thought it was worth pointing out since we have two reports on the same text. With that correction in place, the wording would be as follows:&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
If the -E option is specified, the standard output shall be a text file that represents the results of the preprocessing stage of the language; it may contain extra information appropriate for subsequent compilation passes and shall contain at least one line with the format:&lt;br /&gt;
&lt;br /&gt;
&quot;# %d \&quot;%s\&quot;\n&quot;, &lt;line&gt;, &lt;pathname&gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&quot;# %d \&quot;%s\&quot; %s\n&quot;, &lt;line&gt;, &lt;pathname&gt;, &lt;flags&gt;&lt;br /&gt;
&lt;br /&gt;
for each file processed as a result of a #include directive, unless no other output generated from that file is present in the output, where line is a line number, pathname is the pathname used to open the file, and flags is an implementation-defined string.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
The issue is with the wording &quot;unless no other output generated from that file is present in the output.&quot; My reading of this is that if after preprocessing an included header does not output any tokens then -E should ignore it. Consider however the following example:&lt;br /&gt;
&lt;br /&gt;
// foo.h&lt;br /&gt;
#define FOO 42&lt;br /&gt;
&lt;br /&gt;
// foo.c&lt;br /&gt;
#include &quot;foo.h&quot;&lt;br /&gt;
&lt;br /&gt;
The header produces no output after preprocessing and thus -E will ignore it when used in the process of generating a list of dependencies. Thus foo.h is essentially untracked so if we changed the definition of FOO, a makefile based on the generated dependency list would not know to recompile foo.c]]></description><category>Shell and Utilities</category><pubDate>Wed, 04 Nov 2026 14:50:53 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=2001</guid><comments>http://austingroupbugs.net/view.php?id=2001#bugnotes</comments></item><item><title>0001616: Standardize mktemp utility</title><author></author><link>http://austingroupbugs.net/view.php?id=1616</link><description><![CDATA[The current standard has no reliable and convenient utility to create temporary file or directory, despite that low-level interfaces, mkstemp/mkdtemp, are available for this use case. The mktemp(1) utility is a perfect candidate to fill this gap. Its interface is fairly simple and mostly consistent across various implementations, however not without some differences. I evaluated GNU, LSB, NetBSD, FreeBSD, OpenBSD, Illumos, Solaris, sbase, toybox, busybox implementations and here is what I found:&lt;br /&gt;
&lt;br /&gt;
- FreeBSD, NetBSD accept multiple templates. Others do not.&lt;br /&gt;
- FreeBSD does not specify -p option. Others do.&lt;br /&gt;
- LSB does not specify -d and -p options. Others do.&lt;br /&gt;
- FreeBSD, NetBSD accept parameter for -t option. Others do not.&lt;br /&gt;
- FreeBSD, NetBSD use -t option to specify prefix. Others use it to explicitly tell mktemp to create temporary file in temporary directory rather than in current directory.&lt;br /&gt;
- All have different default value for template.&lt;br /&gt;
- All have different requirements regarding how many Xs template should contain, but it seems they all accept six Xs.&lt;br /&gt;
- sbase, Illumos, Solaris override -p parameter with TMPDIR value if it is set. Others do not.&lt;br /&gt;
- GNU overrides -p parameter with TMPDIR value or /tmp if parameter is empty string. Others do not.&lt;br /&gt;
- OpenBSD, Illumos, Solaris(not sure), toybox do not allow '/' in template if -p option is passed. Others do.&lt;br /&gt;
&lt;br /&gt;
Given that, I think mktemp interface is not completely lost and below is my attempt to make it portable.]]></description><category>Shell and Utilities</category><pubDate>Tue, 03 Nov 2026 17:10:30 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1616</guid><comments>http://austingroupbugs.net/view.php?id=1616#bugnotes</comments></item><item><title>0001961: assert.h lacks static_assert macro</title><author></author><link>http://austingroupbugs.net/view.php?id=1961</link><description><![CDATA[C11 introduced the &lt;i&gt;static_assert&lt;/i&gt;() macro, which C17 kept (and C23 transformed into a keyword).]]></description><category>Base Definitions and Headers</category><pubDate>Tue, 03 Nov 2026 12:11:05 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1961</guid><comments>http://austingroupbugs.net/view.php?id=1961#bugnotes</comments></item><item><title>0001600: Problems with the suggested single-line shell script: $0 "$@"</title><author></author><link>http://austingroupbugs.net/view.php?id=1600</link><description><![CDATA[On the mailing list, Jakub Wilk reported a problem with the rationale in C.1.7 that talks about implementing the 16 (sic) regular built-ins as a single-line shell script:&lt;pre&gt;$0 &quot;$@&quot;&lt;/pre&gt;&lt;br /&gt;
As he pointed out, &quot;This wouldn't actually work: $0 is the absolute path, so the script would recurse indefinitely.&quot;&lt;br /&gt;
&lt;br /&gt;
Another problem is that these external utilities are supposed to be exec-able using &quot;the exec family of functions&quot;, which means all six functions not just execlp() and execvp(), so the script needs a #! line (and can only meet the requirements on systems that support #!).&lt;br /&gt;
&lt;br /&gt;
Finally, the number 16 is out of date, as there are now 20 utilities in the table in XCU 1.7.]]></description><category>Rationale</category><pubDate>Mon, 02 Nov 2026 16:30:23 +0000</pubDate><guid>http://austingroupbugs.net/view.php?id=1600</guid><comments>http://austingroupbugs.net/view.php?id=1600#bugnotes</comments></item></channel></rss>
