Subject: Re: nbsed broken on Solaris?
To: Urban Boquist <urban@boquist.net>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 09/09/2004 00:51:38
On Wed, Sep 08, 2004 at 05:35:26PM +0200, Urban Boquist wrote:
>
> I'm seeing a problem where nbsed built (by pkgsrc/bootstrap) on
> Solaris seems unable to handle really long lines in files, after 1024
> chars it adds an extra zero char.
>
> Has anyone else seen this?
>
> "1" below is a file with a single line, 2298 chars long:
>
> $ /bin/sed 's/notinthefile/foo/g' < 1 > 2
> $ diff 1 2
> $ nbsed 's/notinthefile/foo/g' < 1 > 2
> $ diff 1 2
> Binary files 1 and 2 differ
> $ ll 1 2
> -rw-rw-r-- 1 qurbboq users 2298 Sep 8 16:36 1
> -rw-rw-r-- 1 qurbboq users 2300 Sep 8 16:37 2
>
> nbsed has added one zero char at offset 1024 and one more at offset 2048.
>
> I get this on two different machines, running Solaris 2.8 and 2.9.
>
> This is a bit troublesome since it is the bootstrap script that
> decides to use nbsed because the Solaris sed is useless... :)
Could you post your test case so we can use it as a regression test
for nbsed?
Thanks,
-- Johnny Lam <jlam@NetBSD.org>