From owner-freebsd-arch Mon Aug 13 9:58:39 2001 Delivered-To: freebsd-arch@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 599FA37B407; Mon, 13 Aug 2001 09:58:32 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f7DGwQk00183; Mon, 13 Aug 2001 19:58:26 +0300 (EEST) (envelope-from ru) Date: Mon, 13 Aug 2001 19:58:26 +0300 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: "David O'Brien" <obrien@FreeBSD.ORG> Cc: Alexey Zelkin <phantom@FreeBSD.ORG>, Bruce Evans <bde@FreeBSD.ORG>, arch@FreeBSD.ORG Subject: Re: __RCSID() and __VERSION() macros and their ``static const char'' equivalents Message-ID: <20010813195826.A99201@sunbay.com> Mail-Followup-To: David O'Brien <obrien@FreeBSD.ORG>, Alexey Zelkin <phantom@FreeBSD.ORG>, Bruce Evans <bde@FreeBSD.ORG>, arch@FreeBSD.ORG References: <20010813165753.A74504@sunbay.com> <20010813174114.A26468@phantom.cris.net> <20010813094549.A94831@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010813094549.A94831@dragon.nuxi.com>; from obrien@FreeBSD.ORG on Mon, Aug 13, 2001 at 09:45:49AM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: <freebsd-arch.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-arch> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-arch> X-Loop: FreeBSD.ORG On Mon, Aug 13, 2001 at 09:45:49AM -0700, David O'Brien wrote: > On Mon, Aug 13, 2001 at 05:41:14PM +0300, Alexey Zelkin wrote: > > I raised almost same questions two months ago. We even came to > > conclusion, but David asked to suspend this task until he'll make > > some kinds of this black magic in FreeBSD src tree (to avoid merge > > conflicts). But I still not hear anything back. > > Acutally I am waiting to hear back from you and BDE about the proposals I > made in June (last message I sent on the topic was 21-June-2001). > > > > > What is the reason why we should use the old style VCS ID declarations > > > like this: > > > > > > static const char rcsid[] = > > > "$FreeBSD$"; > > > > > > instead of their modern equivalent, <sys/cdefs.h> __RCSID() macro? > > __RCSID() should be forgotten about. It is a lost cause like using > "$Id$". There is just too much imported and barrowed code that uses > __RCSID for us to try to use it also (I tried). I have a few ideas on > the topic and let see if the small group of us discussing the issue can > flush something out. > I can't see what's wrong with current implementation of __RCSID(), it definitely works. > > > Not only the macro is backwards compatible in the non-gcc or non-ELF > > > case, but it also "produces" more compact objects. > > How is it going to produce more compat objects [all the time for GCC and > non-GCC compilers]. I believe you mean in some implimentations. > Umm, there are two versions of lower level __IDSTRING(): #if defined(__GNUC__) && defined(__ELF__) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") #else #define __IDSTRING(name,string) static const char name[] __unused = string #endif And the version using ``.ident'' produces more compact objects. Just check it! Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message