00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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