FrameWorks/OmniBase.framework/Versions/Current/Headers/rcsid.h

00001 // Copyright 1997-2005 Omni Development, Inc.  All rights reserved.
00002 //
00003 // This software may only be used and reproduced according to the
00004 // terms in the file OmniSourceLicense.html, which should be
00005 // distributed with this project and can also be found at
00006 // <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>.
00007 //
00008 // $Header: svn+ssh://source.omnigroup.com/Source/svn/Omni/tags/SourceRelease_2005-11-18/OmniGroup/Frameworks/OmniBase/rcsid.h 69189 2005-10-12 18:02:34Z kc $
00009 //
00010 // Define a wrapper macro for rcs_id generation that doesn't produce warnings on any platform.  The old hack of rcs_id = (rcs_id, string) is no longer warning free.
00011 
00012 #if defined(__GNUC__)
00013 #if __GNUC__ > 2
00014 
00015 #define RCS_ID(rcsIdString) \
00016         static __attribute__((used, section("__TEXT,rcsid"))) const char rcs_id[] = rcsIdString;
00017 #define NAMED_RCS_ID(name, rcsIdString) \
00018         static __attribute__((used, section("__TEXT,rcsid"))) const char rcs_id_ ## name [] = rcsIdString;
00019 
00020 #endif
00021 #endif
00022 
00023 #ifndef RCS_ID
00024 
00025 #define RCS_ID(rcsIdString) \
00026         static const void *rcs_id = rcsIdString; \
00027         static const void *__rcs_id_hack() { __rcs_id_hack(); return rcs_id; }
00028 
00029 #define NAMED_RCS_ID(name, rcsIdString) \
00030         static const void *rcs_id_ ## name = rcsIdString; \
00031         static const void *__rcs_id_ ## name ## _hack() { __rcs_id_ ## name ## _hack(); return rcs_id_ ## name; }
00032 
00033 #endif

Generated on Sat Aug 26 21:14:12 2006 for MacTrek by  doxygen 1.4.7