Subject: Re: arm32 sed problems
To: Curt Sampson <cjs@portal.ca>
From: Todd Vierling <tv@pobox.com>
List: port-arm32
Date: 06/16/1998 11:10:48
On Sun, 14 Jun 1998, Curt Sampson wrote:

: There seems to be a problem with the 1.3 (1.3.2) sed on the arm32
: port.

: Any thoughts on what could be causing this?

It is just what my gut feeling expected:  `unsigned char' uncleanliness.
Unfortunately, the problem is in libc _and_ the <ctype.h> header, which
_should_ have been pulled up to 1.3.2 release, but apparently was not.

The difference lies in the definition of the ctype macros in <ctype.h>:

#define isalpha(c)  ((int)((_ctype_ + 1)[c] & (_U|_L))) /* 1.3.x */

#define isalpha(c)  ((int)((_ctype_ + 1)[(int)(c)] & (_U|_L))) /* current */

This subtle difference threw off sed (and, incidentally, anything using
<ctype.h> working with high-ASCII characters).

I've put a temporary "hotfix" version of sed up at:
    ftp://ftp.netbsd.org/pub/NetBSD/arch/arm32/sed_fix

The proper fix is to update libc.so.12.20 and /usr/include/ctype.h.  I shall
pull down a tree and recompile libc, making it available with a fixed
ctype.h shortly.  If you don't download the hacked sed above, replacing libc
will also solve the problem.  Watch this space for announcements.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)