Date: Fri, 14 Dec 2012 10:45:36 -0600 From: Brooks Davis <brooks@freebsd.org> To: Jilles Tjoelker <jilles@stack.nl> Cc: freebsd-arch@freebsd.org Subject: Re: [CFT] Importing NetBSD's vis/unvis(3) Message-ID: <20121214164536.GH40927@lor.one-eyed-alien.net> In-Reply-To: <20121214134652.GB89880@stack.nl> References: <20121211202925.GA40927@lor.one-eyed-alien.net> <20121214134652.GB89880@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--ZYOWEO2dMm2Af3e3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 14, 2012 at 02:46:52PM +0100, Jilles Tjoelker wrote: > On Tue, Dec 11, 2012 at 02:29:25PM -0600, Brooks Davis wrote: > > As part of importing NetBSD's mtree I need to add more vis(3) API > > functions from NetBSD. The easiest path seems to be a wholesale import > > of their code with the addition of VIS_GLOB support for compatibility. > > The attached patch accomplishes this. Please review or test. >=20 > > The ABI of unvis changes slightly so I've added a compatibility shim for > > it. >=20 > Looks like NetBSD changed it such that it cannot be kept compatible this > time, by using vis(3) flags for unvis(3) which must collide with our old > unvis(3) flags. Are you agreeing that the shim is required or hinting that I got it wrong? > > Note that old files must be removed in addition to applying the patch so > > Make finds the right files. >=20 > > http://people.freebsd.org/~brooks/patches/vis.diff >=20 > > [snip] > > diff -ruN contrib/libc-vis/unvis.c contrib/libc-vis/unvis.c > > --- contrib/libc-vis/unvis.c 1969-12-31 18:00:00.000000000 -0600 > > +++ contrib/libc-vis/unvis.c 2012-10-20 09:22:09.000000000 -0500 > > @@ -0,0 +1,562 @@ > > [snip] > > +/* > > + * RFC 1866 > > + */ > > +static const struct nv { > > + const char *name; > > + uint8_t value; > > +} nv[] =3D { > > + { "AElig", 198 }, /* capital AE diphthong (ligature) */ > > + { "Aacute", 193 }, /* capital A, acute accent */ > > + { "Acirc", 194 }, /* capital A, circumflex accent */ > > [snip] > > +}; >=20 > Please avoid adding 100 relative relocations, for example by changing > const char *name to char name[7]. >=20 > RTLD will have to adjust 100 pointers for the load address of libc.so.7, > and even in a static library the pointers take up a disproportionate > amount of space. I'll submit a patch for this upstream. Thanks, Brooks --ZYOWEO2dMm2Af3e3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQy1evXY6L6fI4GtQRAs2NAJ95PXUm41riZGNdx+0FMqiu3d4O1gCg43QC SS12Ad9L9TVhjc+OE0mw0gY= =Hf3D -----END PGP SIGNATURE----- --ZYOWEO2dMm2Af3e3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121214164536.GH40927>