[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: This rcsId variable in GDL2
From: |
Pascal Bourguignon |
Subject: |
Re: This rcsId variable in GDL2 |
Date: |
Thu, 2 Jan 2003 02:01:00 +0100 |
Markus Hitter writes:
>
> Am Mittwoch, 01.01.03 um 17:17 Uhr schrieb Pascal Bourguignon:
>
> >>> | //static char rcsId[] = "$Id: EODatabaseContext.m,v 1.9 2002/12/29
> >>> | 15:13:05 mirko Exp $";
> >>> |
> >>> | Gcc complains a lot about this unused variable ...
> >>
> >> No code use it. I think you can comment it.
> >
> > Yes some code use it: the 'what' command!
> >
> > When I use this syntax (with -Wall):
> >
> > static const char rcsid[]="$Id: MTDictionary.m,v 1.11 2002/04/22
> > 01:10:56 mppjb Exp $";
> >
> > there's no warning, and the literal is included in the object files
> > and collected into the executable.
>
> Indeed, the additional "const" makes the compiler quiet.
>
> > As soon as you use CVS (or old RCS or SCCS) such a 'what' command ...
>
> *grin* what a ...
>
> Are there additional requirements for this to work? Like variable name,
> type etc? Or is it more like a "grep -a '$Id:' <binary>"?
The original sccs what command was specific to sccs, but IIRC, was
basically a string|grep of the sccs identity string pattern "@(#)".
The variable name does not matter, this works on a stripped binary as
well.
http://www.utexas.edu/cc/unix/OurSCCS.html
http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?what+1
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
There is a fault in reality. Do not adjust your minds. -- Salman Rushdie