1
// ***************************************************************** -*- C++ -*-
3
* Copyright (C) 2004, 2005 Andreas Huggel <ahuggel@gmx.net>
5
* This program is part of the Exiv2 distribution.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
@brief Define an RCS id string in every object file compiled from a source
24
file that includes rcsid.hpp.
26
This is a simplified version of the ACE_RCSID macro that is used in the
27
<a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE(TM)</a> distribution.
30
@author Andreas Huggel (ahu)
31
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
32
@date 02-Feb-04, ahu: created
37
#if !defined (EXIV2_RCSID)
39
@brief Macro to store version information in each object file.
41
Use this macro by including the following two lines at the beginning of
42
each *.cpp file. See the ident(1) manual pages for more information.
46
EXIV2_RCSID("@(#) $Id$");
49
The macro hack itself has the following purposes:
50
-# To define the RCS id string variable in the local namespace, so
51
that there won't be any duplicate extern symbols at link time.
52
-# To avoid warnings of the type "variable declared and never used".
55
#define EXIV2_RCSID(id) \
57
inline const char* getRcsId(const char*) { return id ; } \
58
const char* rcsId = getRcsId(rcsId); \
61
#endif // #if !defined (EXIV2_RCSID)
62
#endif // #ifndef RCSID_HPP_