[runtime] Use double-underscored attributes.
[mono.git] / mono / sgen / sgen-protocol.h
index 3fe848878ec8e212ef60bf6ab411e5b3f3306706..f0da36fd73def734e02e7740f24c1207215781f0 100644 (file)
 #include "sgen-gc.h"
 
 #define PROTOCOL_HEADER_CHECK 0xde7ec7ab1ec0de
-#define PROTOCOL_HEADER_VERSION 1
+/*
+ * The version needs to be bumped every time we introduce breaking changes (like
+ * adding new protocol entries or various format changes). The latest protocol grepper
+ * should be able to handle all the previous versions, while an old grepper will
+ * be able to tell if it cannot handle the format.
+ */
+#define PROTOCOL_HEADER_VERSION 2
 
 /* Special indices returned by MATCH_INDEX. */
 #define BINARY_PROTOCOL_NO_MATCH (-1)
@@ -77,7 +83,7 @@ enum {
 #define PROTOCOL_PACK_STRUCTS
 
 #if defined(__GNUC__)
-#define PROTOCOL_STRUCT_ATTR __attribute__ ((packed))
+#define PROTOCOL_STRUCT_ATTR __attribute__ ((__packed__))
 #else
 #define PROTOCOL_STRUCT_ATTR
 #endif