[tlbuild] 2010 builds

Karl Berry karl at freefriends.org
Thu Jun 10 02:34:13 CEST 2010


Working on netbsd 5.0.2, I observe that the problem is definitely
isspace().  I put in printf's that showed that the \264 char was getting
"normalized" to a space by the conditional around line 848 in
FindErrs.c.

A tiny test program shows that isspace('\264') indeed returns true
(specifically, it returns 8), independent of LC_ALL=C or any other
setting I could think of.

NetBSD is probably standards-compliant in doing this (not that it really
matters -- it does what it does), since POSIX
(http://www.opengroup.org/onlinepubs/9699919799/functions/isspace.html)
has made it explicitly locale-dependent, hence must be considered
backward-incompatible for any traditional use.

Therefore, the only solution is to define our own isspace that
actually does something consistent across platforms.

I added this code to ChkTeX.h before the #define LOOP (it could go anywhere):

#undef c_isspace
#define c_isspace(c) \
  ({ int __c = (c); \
     (__c == ' ' || __c == '\t' \
      || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \
   })
#undef isspace
#define isspace c_isspace

And with that, make check passed for me on netbsd.

Jukka, can you confirm?

By the way, the attached tiny one-line file might be easier to work with
for debugging than the full Test.tex.  At least it was for me.

karl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: quoteline.tex.gz
Type: application/octet-stream
Size: 45 bytes
Desc: not available
URL: <http://tug.org/pipermail/tlbuild/attachments/20100610/00714bbb/attachment-0001.obj>


More information about the tlbuild mailing list