]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Rename static_assert macro to avoid clash with any preexisting static_assert
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 9 Aug 2012 13:09:16 +0000 (15:09 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 9 Aug 2012 13:09:16 +0000 (15:09 +0200)
manifest.c

index 335874b78d1b6a4aae05bedac2d5de2523502076..7f02ede0c574d865801b2267e7f6cab9c1be1e81 100644 (file)
@@ -66,7 +66,8 @@ static const uint32_t MAGIC = 0x63436d46U;
 static const uint8_t  VERSION = 0;
 static const uint32_t MAX_MANIFEST_ENTRIES = 100;
 
-#define static_assert(e) do { enum { static_assert__ = 1/(e) }; } while (0)
+#define ccache_static_assert(e) \
+       do { enum { ccache_static_assert__ = 1/(e) }; } while (0)
 
 struct file_info {
        /* Index to n_files. */
@@ -106,7 +107,7 @@ struct manifest {
 static unsigned int
 hash_from_file_info(void *key)
 {
-       static_assert(sizeof(struct file_info) == 24); /* No padding. */
+       ccache_static_assert(sizeof(struct file_info) == 24); /* No padding. */
        return murmurhashneutral2(key, sizeof(struct file_info), 0);
 }