Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 14:46:47 +0900
From:      "Akinori MUSHA" <knu@iDaemons.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Sheldon Hearn <sheldonh@starjuice.net>, Brian Somers <brian@freebsd-services.com>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/share/man/man1 builtin.1 src/bin/sh Makefile builtins.def sh.1 src/usr.bin/printf printf.1 
Message-ID:  <86k7wjz7aw.wl@archon.local.idaemons.org>
In-Reply-To: <20011122015842.T9998-100000@delplex.bde.org>
References:  <31642.1006340930@axl.seasidesoftware.co.za> <20011122015842.T9998-100000@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Thu, 22 Nov 2001 02:11:08 +1100 (EST),
Bruce Evans wrote:
> On Wed, 21 Nov 2001, Sheldon Hearn wrote:
> 
> > On Wed, 21 Nov 2001 10:58:12 GMT, Brian Somers wrote:
> >
> > > I would have thought it useful to leave both test & printf as
> > > builtins... it's only a few k of space after all.
> 
> I would have thought that it is so obviously wrong to remove printf
> as a builtin that no one would actually do it.

NetBSD folks did it, though.  Actually, I was not eager to do that
unless someone popped up and actually complained about the bloat that
test introduced, but Sheldon urged me on that. :)

In any case, do you see any actual bad effect caused by the printf
removal?  We removed that assuming printf(1) is only rarely used from
a shell script or a Makefile.

> > *shrug*  I don't care about the bloat.  I just figured some rancid
> > floppy jockey would pipe up. :-)
> 
> The bloat in /bin/sh has very little to do with having printf in it.
> It has grown from 90K text in FreeBSD-1 to 590K text today.  It is
> now 50% larger than the 3.5-year old bash-1 that I normally use.
> Most of the bloat is in libraries, mostly for getpwnam() (a null
> program statically linked to getpwnam() has size 300K text).
> getpwnam() is used solely for expansion of "~".  This feature was
> left out of FreeBSD-1 to save 50K or so (getpwnam() was much less
> bloated in FreeBSD-1).

Looks like NetBSD's sh (ash) is >210K smaller, OpenBSD's sh (ksh)
>120K smaller, and sash is >300K smaller than our sh with lots of
builtins included: (quote from pkg-descr)

Shell includes: echo pwd cd mkdir mknod rmdir sync rm chmod
                chown chgrp touch mv ln cp cmp more exit
                setenv printenv umask kill where

Commands include: dd ed grep gzip ls tar file find mount chattr 


So, if we really take the bloat as highly considerable, we must get
serious and research the shells mentioned above and check up our
libraries as you point out.

As we share the thought, I believe printf/test are not really a
problem from this point of view.

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Somewhere out of a memory.. of lighted streets on quiet nights.."

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86k7wjz7aw.wl>