Skip site navigation (1)Skip section navigation (2)
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>
In-Reply-To: <20010813094549.A94831@dragon.nuxi.com>; from obrien@FreeBSD.ORG on Mon, Aug 13, 2001 at 09:45:49AM -0700
References:  <20010813165753.A74504@sunbay.com> <20010813174114.A26468@phantom.cris.net> <20010813094549.A94831@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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