From owner-freebsd-arch@FreeBSD.ORG Wed May 2 14:47:17 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 103EE106564A; Wed, 2 May 2012 14:47:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 09C418FC08; Wed, 2 May 2012 14:47:15 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q42El6eY092548; Wed, 2 May 2012 17:47:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q42El61A050203; Wed, 2 May 2012 17:47:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q42El6Cd050202; Wed, 2 May 2012 17:47:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 May 2012 17:47:06 +0300 From: Konstantin Belousov To: Baptiste Daroussin Message-ID: <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4TmI2E81ZwFURtAX" Content-Disposition: inline In-Reply-To: <20120502134546.GM31034@azathoth.lan> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-arch@freebsd.org Subject: Re: Switching /etc/*.db from bdb to tinycdb X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2012 14:47:17 -0000 --4TmI2E81ZwFURtAX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 03:45:47PM +0200, Baptiste Daroussin wrote: > On Wed, May 02, 2012 at 04:02:35PM +0200, Luigi Rizzo wrote: > > On Wed, May 02, 2012 at 02:31:49PM +0200, Baptiste Daroussin wrote: > > ... > > > > > Why importing to libc? to allow all the get*ent to parse the /etc= /*.db > > > > > files > > > > > > > > >=20 > > > > just curious, where do we have the bdb 1.85 routines now ? > > > > Are they all in libc, or split between libc and libutil ? > > >=20 > > > All in libc > >=20 > > ok then it makes sense to preserve the structure and have > > everything in libc as des suggested. Just a curiosity again, > > any estimate of code size ? > >=20 >=20 > That is pretty small: > 545 cdb.c > 76 cdb_find.c > 81 cdb_findnext.c > 19 cdb_hash.c > 113 cdb_init.c > 184 cdb_make.c > 50 cdb_make_add.c > 204 cdb_make_put.c > 100 cdb_seek.c > 29 cdb_seq.c > 18 cdb_unpack.c > 126 cdb.h > 41 cdb_int.h > 1586 total > regards, > Bapt I do not think that the size matters at all, as far as it fits into tens of KB of compiled code. What I do care a lot there, is the namespace pollution. I would strongly object against exposing cdb symbols from libc, even in the private namespace. Having the symbols hidden in libc is fine. The reasoning is that we do not want our libc unneccessary interpose symbols from third-party libs, and do not want to make a surprise for somebody who wants to use the never version of the same library, or use a symbol not documented in SUSv4 etc while linking to libc/libpthread only. --4TmI2E81ZwFURtAX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+hSOkACgkQC3+MBN1Mb4jatwCeNx/nPsr+Fe8xWzaFUasXNQEw uhgAmwcU5SQCaG/5Kzlm9JH3Tza8Jd4v =AEki -----END PGP SIGNATURE----- --4TmI2E81ZwFURtAX--