From owner-freebsd-hackers Mon Oct 16 03:31:26 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id DAA04162 for hackers-outgoing; Mon, 16 Oct 1995 03:31:26 -0700 Received: from sovcom.kiae.su (sovcom.kiae.su [144.206.136.1]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id DAA04136 for ; Mon, 16 Oct 1995 03:30:49 -0700 Received: by sovcom.kiae.su id AA17403 (5.65.kiae-1 ); Mon, 16 Oct 1995 13:28:14 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Mon, 16 Oct 95 13:28:14 +0300 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.11/8.6.9) id NAA05134; Mon, 16 Oct 1995 13:25:31 +0300 To: Poul-Henning Kamp Cc: bde@zeta.org.au, hackers@freefall.freebsd.org, j@uriah.heep.sax.de, kaleb@x.org References: <214.813831228@critter.tfs.com> In-Reply-To: ; from =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= at Mon, 16 Oct 1995 12:23:35 +0300 (MSK) Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 16 Oct 1995 13:25:31 +0300 (MSK) X-Mailer: Mail/@ [v2.40 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) X-Class: Fast Subject: Re: A couple problems in FreeBSD 2.1.0-950922-SNAP Lines: 52 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1909 Sender: owner-hackers@FreeBSD.org Precedence: bulk In message =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= writes: >In message <214.813831228@critter.tfs.com> Poul-Henning Kamp writes: >>> >Yes, bloat is added even when ENABLE_STARTUP_LOCALE isn't set. Bloat is >>> >added even when no ctype function is called (this is normal for most >>> >programs in /bin and /sbin - grep shows "ctype.h" in only 25 out of 80 >>> >programs in /usr/src/[s]bin. >>> >>> It isn't accurate results. Many libc functions calls ctype >>> indirecly, i.e. strtol, atoi, etc. You additionly need >>> to grep ctype through libc and then grep function you got >>> through bin/sbin. I suspect that 100% of programs use ctype >>> for accurate results. >>Andrey, you have to realize that Bruce reported precise numbers, whereas >>you just "suspect". Please prove you point, and provide hard numbers. >Well, here more accurate results. >I build/install special crt0.o version which not calls reduced_setlocale() >bloat. >Then I rebuild bin/sbin. Then I use following csh script to find ones >which not use ctype at all: >foreach i (*) >nm $i/obj/$i | grep -l -q Locale || echo $i >> /tmp/result >end >running it on bin: >100% use ctype!!! >running it on sbin: >100% use ctype!!! >So my suspection was right. It means that bloat reason is reduced_setlocale body itself. Purposes of reduced_setlocale is making _right_ ctype. Having right ctype is essential. Even Kaleb suggest to have right one (but right for 8859-1 only and broken for others and POSIX). My hack makes it right for any LANG value including 8859-1 and not violates POSIX. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849