After the recent round of -i fixes to sed, certain ports will no longer make configure (gaim being a prime example). The problem is that mf_fgets() is unnecessarily overwriting sp->len. The attached patch corrects the problem while still allowing -i to work on multiple files.
As a ports committer, I can't do anything but let you guys (and gals) know. Thanks. Joe
diff -u -r1.23 main.c --- usr.bin/sed/main.c 2002/06/14 02:20:05 1.23 +++ usr.bin/sed/main.c 2002/06/16 04:38:31 @@ -315,7 +315,8 @@ firstfile = 1; } - sp->len = 0; + if (lastline) + sp->len = 0; for (;;) { if (f != NULL && (c = getc(f)) != EOF) { (void)ungetc(c, f);
signature.asc
Description: This is a digitally signed message part