<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Patch manually typed in (please attach patches in the future so e-mail tools don't mess with the patch).</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">-- Jeff J.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2026 at 6:01 PM Keith Thompson <<a href="mailto:Keith.S.Thompson@gmail.com">Keith.S.Thompson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The isspace(3) man page incorrectly states that isspace(c) is defined<br>
only when isascii(c) is true or c is EOF.<br>
<br>
In fact, ISO C (going back to C89/C90) requires isspace(c) to work<br>
correctly when c is either within the range of unsigned char or equal<br>
to EOF (almost certainly 0..255 or -1 for systems supported by<br>
newlib). The implementation of isspace() is correct; this is only a<br>
documentation issue.<br>
<br>
The other is*() functions work correctly and are documented correctly.<br>
<br>
The following patch fixes this by copying the wording from isalpha().<br>
<br>
I have *not* updated it to clarify just what "whitespace" means, but<br>
it would probably be a good idea.<br>
<br>
commit 932bca35395f3fc920b8d90b1f4bc07dc13efb93 (HEAD -> isspace-man-page)<br>
Author: Keith Thompson <<a href="mailto:Keith.S.Thompson@gmail.com" target="_blank">Keith.S.Thompson@gmail.com</a>><br>
Date: 2026-08-07 14:50:36 -0700<br>
<br>
Correct isspace(3) man page (copied wording from isalpha(3))<br>
<br>
diff --git newlib/libc/ctype/isspace.c newlib/libc/ctype/isspace.c<br>
index 0def2c0ce..784f4d7ae 100644<br>
--- newlib/libc/ctype/isspace.c<br>
+++ newlib/libc/ctype/isspace.c<br>
@@ -18,7 +18,8 @@ SYNOPSIS<br>
DESCRIPTION<br>
<<isspace>> is a macro which classifies singlebyte charset values by table<br>
lookup. It is a predicate returning non-zero for whitespace<br>
-characters, and 0 for other characters. It is defined only when<br>
<<isascii>>(<[c]>) is true or <[c]> is EOF.<br>
+characters, and 0 for other characters. It is defined only if<br>
+<[c]> is representable as an unsigned char or if <[c]> is EOF.<br>
<br>
<<isspace_l>> is like <<isspace>> but performs the check based on the<br>
locale specified by the locale object locale. If <[locale]> is<br>
<br>
</blockquote></div>