From: Christos Zoulas Date: Tue, 4 Nov 2008 16:48:42 +0000 (+0000) Subject: don't let gcc throw out our ident strings. X-Git-Tag: FILE5_05~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e2385c5140eebade39a38d71a4a91299cbbdeb4;p=file don't let gcc throw out our ident strings. --- diff --git a/src/file.h b/src/file.h index 541d934b..375477d7 100644 --- a/src/file.h +++ b/src/file.h @@ -27,7 +27,7 @@ */ /* * file.h - definitions for file(1) program - * @(#)$File: file.h,v 1.112 2008/10/30 09:51:46 rrt Exp $ + * @(#)$File: file.h,v 1.113 2008/11/04 16:48:42 christos Exp $ */ #ifndef __file_h__ @@ -411,12 +411,14 @@ int asprintf(char **ptr, const char *format_string, ...); #ifndef __cplusplus #ifdef __GNUC__ -static const char *rcsid(const char *) __attribute__((__used__)); -#endif +#define FILE_RCSID(id) \ +static const char rcsid[] __attribute__((__used__)) = id; +#else #define FILE_RCSID(id) \ static const char *rcsid(const char *p) { \ return rcsid(p = id); \ } +#endif #else #define FILE_RCSID(id) #endif