From: Anders F Björklund Date: Sun, 16 Sep 2018 16:31:20 +0000 (+0200) Subject: Don't use reserved id macros in the headers X-Git-Tag: v3.5~26^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79a85ebb17ceddef5b5f093549681506abf524c2;p=thirdparty%2Fccache.git Don't use reserved id macros in the headers With an exception for the generated config.h --- diff --git a/configure.ac b/configure.ac index 50211d85a..af0e6323c 100644 --- a/configure.ac +++ b/configure.ac @@ -195,9 +195,20 @@ AC_OUTPUT cat <config.h.tmp #ifndef CCACHE_CONFIG_H #define CCACHE_CONFIG_H +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" +#endif + EOF cat config.h >>config.h.tmp -echo '#endif' >>config.h.tmp +cat <>config.h.tmp + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif +#endif // ifndef CCACHE_CONFIG_H +EOF mv config.h.tmp config.h AC_MSG_NOTICE(now build ccache by running make) diff --git a/src/hashtable.h b/src/hashtable.h index 428000752..91fb387d8 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -29,8 +29,8 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __HASHTABLE_CWC22_H__ -#define __HASHTABLE_CWC22_H__ +#ifndef HASHTABLE_CWC22_H +#define HASHTABLE_CWC22_H #include "config.h" @@ -194,7 +194,7 @@ hashtable_count(struct hashtable *h); void hashtable_destroy(struct hashtable *h, int free_values); -#endif /* __HASHTABLE_CWC22_H__ */ +#endif /* HASHTABLE_CWC22_H */ /* * Copyright (c) 2002, Christopher Clark diff --git a/src/hashtable_itr.h b/src/hashtable_itr.h index 9523b14a4..a0ac22cbc 100644 --- a/src/hashtable_itr.h +++ b/src/hashtable_itr.h @@ -1,7 +1,7 @@ /* Copyright (C) 2002, 2004 Christopher Clark */ -#ifndef __HASHTABLE_ITR_CWC22__ -#define __HASHTABLE_ITR_CWC22__ +#ifndef HASHTABLE_ITR_CWC22_H +#define HASHTABLE_ITR_CWC22_H #include "hashtable.h" #include "hashtable_private.h" /* needed to enable inlining */ @@ -86,7 +86,7 @@ int fnname (struct hashtable_itr *i, struct hashtable *h, keytype *k) \ -#endif /* __HASHTABLE_ITR_CWC22__*/ +#endif /* HASHTABLE_ITR_CWC22_H */ /* * Copyright (c) 2002, 2004, Christopher Clark diff --git a/src/hashtable_private.h b/src/hashtable_private.h index a81afca88..5d765d62d 100644 --- a/src/hashtable_private.h +++ b/src/hashtable_private.h @@ -1,7 +1,7 @@ /* Copyright (C) 2002, 2004 Christopher Clark */ -#ifndef __HASHTABLE_PRIVATE_CWC22_H__ -#define __HASHTABLE_PRIVATE_CWC22_H__ +#ifndef HASHTABLE_PRIVATE_CWC22_H +#define HASHTABLE_PRIVATE_CWC22_H #include "hashtable.h" @@ -49,7 +49,7 @@ indexFor(unsigned int tablelength, unsigned int hashvalue) /*****************************************************************************/ -#endif /* __HASHTABLE_PRIVATE_CWC22_H__*/ +#endif /* HASHTABLE_PRIVATE_CWC22_H */ /* * Copyright (c) 2002, Christopher Clark