From owner-freebsd-hackers@FreeBSD.ORG Mon May 11 18:58:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D945E1065673; Mon, 11 May 2009 18:58:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 78C788FC08; Mon, 11 May 2009 18:58:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1M3ahd-000F4H-Ub; Mon, 11 May 2009 21:58:17 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n4BIwFgc027346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 May 2009 21:58:15 +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.3/8.14.3) with ESMTP id n4BIwFA9082936; Mon, 11 May 2009 21:58:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n4BIwEtk082935; Mon, 11 May 2009 21:58:14 +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: Mon, 11 May 2009 21:58:14 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20090511185814.GD1948@deviant.kiev.zoral.com.ua> References: <46FDBAFC.1010000@gmail.com> <200905111405.07289.jhb@freebsd.org> <20090511183309.GB1948@deviant.kiev.zoral.com.ua> <200905111446.14439.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8nuB+PMTZvqSz3PP" Content-Disposition: inline In-Reply-To: <200905111446.14439.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 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 X-Virus-Scanned: mail.terabit.net.ua 1M3ahd-000F4H-Ub 3ac93a7942003afc1726dc909ec4642c X-Terabit: YES Cc: freebsd-hackers@freebsd.org, Ighighi Subject: Re: POSIXfy readlink() call X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2009 18:58:20 -0000 --8nuB+PMTZvqSz3PP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 11, 2009 at 02:46:14PM -0400, John Baldwin wrote: > On Monday 11 May 2009 2:33:09 pm Kostik Belousov wrote: > > On Mon, May 11, 2009 at 02:05:07PM -0400, John Baldwin wrote: > > > On Friday 28 September 2007 10:39:56 pm Ighighi wrote: > > ^^^^^ >=20 > Yes, I had this stuck in the back of my head from when it first appeared. >=20 > > > > The POXIX prototype for readlink(2) is: > > > > ssize_t readlink(const char *restrict path, char *restrict buf, siz= e_t=20 > > > > bufsize); > > >=20 > > > It can't simply be corrected as it would change the ABI and thus requ= ires=20 > a=20 > > > new system call, etc. However, do you really expect a symlink to be= =20 > longer=20 > > > than 2^31 on a 64-bit machine? > >=20 > > Yes, I agree that this is ABI change. > >=20 > > Meantime, > > r176215 | ru | 2008-02-12 22:09:04 +0200 (Tue, 12 Feb 2008) | 5 lines > >=20 > > Change readlink(2)'s return type and type of the last argument > > to match POSIX. > >=20 > > Prodded by: Alexey Lyashkov > >=20 > > I tried to convince ru@ that ABI breakage is not good, but has not > > succeeded. >=20 > Ugh, is this only in HEAD? If so, I will back it out for 8.0. If this m= ade=20 > it into a release then this is a far bigger mess. Oh, good, this is only= in=20 > 8. I will fix this ASAP. I can just add the new syscall I guess. You need to symver the syscalls. It requires some ugly games with our syscall stubs, because gnu ld only honor .symver in the same object where the symbol is defined. I did prototyped this some time ago, by including a file with appropriate .symver from all stubs. --8nuB+PMTZvqSz3PP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoIdUYACgkQC3+MBN1Mb4ifzACgrLpVJ3GBpJiibydOVyKaPbZY v/YAnAo8BjIyRA0+wApIBZong+B3aHWf =7S0J -----END PGP SIGNATURE----- --8nuB+PMTZvqSz3PP--