OpenBSD 3.4 isspace() b0rked

John xd890cc2b41c31d74 at f4n.org
Mon Jan 24 19:41:38 CET 2005


On Mon, Jan 24, 2005 at 16:03:05 +0100, Matthias Andree wrote:
> Does the C standard allow isspace() extensions in the C locale?  The
> latest C99 draft doesn't, and .
As I said: "Still, it's a really bad idea to not conform to the C
standard, which reads as their docs (as posted earlier)."; as far as I
know isspace has been specifically defined to the set of characters
mentioned earlier, unless modified by the locale, ever since K&R
(although K&R didn't mention anything about the locale).

> > I believe the reason OpenBSD decided to include extra characters is
> > their lacking locale support (again, just an ot fyi).
> 
> I don't care why this is done until I am shown a strong proof that this
> is allowed. Until that happens, bogofilter is unsupported on
> OpenBSD. The workaround I posted happens to be easier readable too so
> I'll leave it in.
That's why I said it was "an ot fyi", take it or leave it.

Regarding the localedef-input cited from the POSIX-standard, it seems
pretty clear to me that it's meant to be a copy-and-paste _example_.
What's relevant is the note on isspace
http://www.opengroup.org/onlinepubs/000095399/functions/isspace.html
which says:
"Extension to the ISO C standard 
The functionality described is an extension to the ISO C standard.
Application writers may make use of an extension as it is supported on
all IEEE Std 1003.1-2001-conforming systems.

With each function or header from the ISO C standard, a statement to
the effect that ``any conflict is unintentional'' is included. That is
intended to refer to a direct conflict. IEEE Std 1003.1-2001 acts in
part as a profile of the ISO C standard, and it may choose to further
constrain behaviors allowed to vary by the ISO C standard. Such
limitations are not considered conflicts.

Where additional semantics apply to a function or header, the material
is identified by use of the CX margin legend."

Since the POSIX ctype extends, not restricts, the C ctype I suppose
this should be considered as an unintentional conflict, but I'll leave
that and the possible resolution to the language lawyers.



More information about the Bogofilter mailing list