Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / sgen / sgen-protocol.h
index 3fe848878ec8e212ef60bf6ab411e5b3f3306706..8b82dc3794aee3a4eb19c7bf3b06da97f34115db 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * sgen-protocol.h: Binary protocol of internal activity, to aid
- * debugging.
+/**
+ * \file
+ * Binary protocol of internal activity, to aid debugging.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
 #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