-/*
- * 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)
#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