From owner-freebsd-arch@FreeBSD.ORG Fri Apr 17 17:10:25 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 622945B2; Fri, 17 Apr 2015 17:10:25 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 41D45EE1; Fri, 17 Apr 2015 17:10:25 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id DE11DA5F; Fri, 17 Apr 2015 10:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1429290622; bh=u/r50BqH2KuLWFZy0vc8nq33V77hnA1fDOpQcFugHAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dMPpaKEw+Nc418K7bK7N1UAX7jas4ZPcmGA9LZomnxp0VVGDT//8szKoNH0ljjPHQ YWidlMtI333fm7r9OnAuWEHkZ4ZDy3GD/RT63ZFlwfPqeIHtYhhex6BT43+NsWaAq6 FLE10jooaGnw+RqMmbiPjGvZJ3U3akw2H1vF3NP0= From: Peter Wemm To: John Baldwin , Oliver Pinter Cc: freebsd-arch@freebsd.org, Stefan Esser , Konstantin Belousov , "freebsd-arch@freebsd.org" Subject: Re: Removal of the 6.x kernel compat code from libc Date: Fri, 17 Apr 2015 10:10:13 -0700 Message-ID: <2754569.tvBmmIXdDx@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <14081053.n6WdaDRXXc@ralph.baldwin.cx> References: <20150417075942.GI2390@kib.kiev.ua> <5531059F.4060500@freebsd.org> <14081053.n6WdaDRXXc@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2048332.VMDmWzcjbt"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2015 17:10:25 -0000 --nextPart2048332.VMDmWzcjbt Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Friday, April 17, 2015 09:28:24 AM John Baldwin wrote: > On Friday, April 17, 2015 03:07:43 PM Stefan Esser wrote: > > Could we get rid of check_utility_compat(3) on that occasion? > >=20 > > It is only used (AFAIK) to select FreeBSD-4 compatible behaviour of= > > expr(1), which can also be selected with option "-e" and env variab= le > > COMPAT_EXPR. > >=20 > > I doubt that anybody relies on non-POSIX behaviour that has been > > deprecated for some 15 years ... > >=20 > > We'll need to preserve a stub function for check_utility_compat(3),= > > I'm afraid, but I think we can remove the environment variable and > > the actual checking for a sym-link named "/etc/compat-FreeBSD-4-uti= l" > > at startup of expr. (I bet, nobody even knew that the behaviour of > > expr could be changed with above sym-link ...) > >=20 > > If there is consensus, I could prepare a patch to remove the check > > and to update the man-page for expr (just for -CURRENT, no MFC). >=20 > I would not be surprised if Y!BSD depends on this and uses it in 11 F= WIW. :) I'm sorry to say, but yes. We do actually us this on 10.x and 11.x at = work,=20 although it's worse than you can imagine. I just did a quick diff and = I see: =3D=3D=3D=3D //depot/vendor/FreeBSD/stable/10/bin/expr/expr.y#2 (text+k= o) -=20 //depot/yahoo/ybsd_10/src/bin/expr/expr.y#3 (text+ko) =3D=3D=3D=3D cont= ent @@ -270,6 +270,8 @@ int c; =20 setlocale(LC_ALL, ""); + if (getenv("NO_EXPR_COMPAT") =3D=3D NULL) + setenv("EXPR_COMPAT", "1", 1); if (getenv("EXPR_COMPAT") !=3D NULL || check_utility_compat("expr")) { av =3D argv + 1; I'm not going to do an annotate to see who did that.. However, we can=20= maintain patches locally if needed. I'm not even sure *why* its there. I might have removed the code that=20= depended on it. Let me do some research. With a bit of luck, it might= be=20 academic for us now. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2048332.VMDmWzcjbt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVMT51AAoJEDXWlwnsgJ4EpKYH/jejxWMydHinWK6Q6cMCoax+ 2o66d0Ugy1NutELJrgXd+JyWaY+ES/TSDrILG+zDiqma4GQS8sTaklfwZlgET12u yW63IbiZWcmYIlczK6Wb2/gXAg4LH6LGxwjDheIWDco0zJFZjijKwdNglX2bH4o6 TsJSCm5UW5tX7ry/nqXfDh/g0ZUcSZ3Z/gpQAN0PHo8+U4e6Vj6zJi2fLZRu2rI5 Fe30mQCS9GFdw57lL/hJcNAhnefe9CVkTbrw0ZDh9Z2MLVWcoP8gk5CIrRIDrSES geyuachUoeBNB9U+H36AyNxj4yiBIaTyyJYHl9y7mXZQ+2L7Tq/XLaetnTZ4+2Q= =nptq -----END PGP SIGNATURE----- --nextPart2048332.VMDmWzcjbt--