Date: 16 Jun 2002 00:41:42 -0400 From: Joe Marcus Clarke <marcus@FreeBSD.org> To: current@FreeBSD.org Subject: [PATCH] sed is broken in -CURRENT Message-ID: <1024202502.81450.13.camel@shumai.marcuscom.com>
next in thread | raw e-mail | index | archive | help
--=-JlOd5wYurC/dDTJc6eFy
Content-Type: multipart/mixed; boundary="=-f5cnswLhgUZJD4pdt9ez"
--=-f5cnswLhgUZJD4pdt9ez
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
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
--=-f5cnswLhgUZJD4pdt9ez
Content-Disposition: attachment; filename=main.c.diff
Content-Type: text/x-patch; name=main.c.diff; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
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 =3D 1;
}
=20
- sp->len =3D 0;
+ if (lastline)
+ sp->len =3D 0;
for (;;) {
if (f !=3D NULL && (c =3D getc(f)) !=3D EOF) {
(void)ungetc(c, f);
--=-f5cnswLhgUZJD4pdt9ez--
--=-JlOd5wYurC/dDTJc6eFy
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQA9DBcGb2iPiv4Uz4cRAiGQAJ44gVxR3+RKW1cHissaZ8gsJg7icgCfRqUP
tTJZPgi/QTg0/axCh9rWroE=
=zZmA
-----END PGP SIGNATURE-----
--=-JlOd5wYurC/dDTJc6eFy--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1024202502.81450.13.camel>
