-fix
[oweals/gnunet.git] / src / include / gnunet_common.h
index 3221ad868fe0c10cc84003df8b1eb36df89dc25c..141df1a5dba8ed58556299d6272f73662f0ba05b 100644 (file)
@@ -49,7 +49,7 @@
 /**
  * Version of the API (for entire gnunetutil.so library).
  */
-#define GNUNET_UTIL_VERSION 0x00090100
+#define GNUNET_UTIL_VERSION 0x00090200
 
 /**
  * Named constants for return values.  The following
  */
 #define GNUNET_PACKED __attribute__((packed))
 
+/**
+ * gcc-ism to get gcc bitfield layout when compiling with -mms-bitfields
+ */
+#if MINGW
+#define GNUNET_GCC_STRUCT_LAYOUT __attribute__((gcc_struct))
+#else
+#define GNUNET_GCC_STRUCT_LAYOUT
+#endif
+
 /**
  * gcc-ism to document unused arguments
  */
@@ -199,27 +208,25 @@ struct GNUNET_MessageHeader
   uint16_t type GNUNET_PACKED;
 
 };
-GNUNET_NETWORK_STRUCT_END
+
 
 /**
  * @brief 512-bit hashcode
  */
-typedef struct
+typedef struct GNUNET_HashCode
 {
   uint32_t bits[512 / 8 / sizeof (uint32_t)];   /* = 16 */
 }
 GNUNET_HashCode;
 
 
-GNUNET_NETWORK_STRUCT_BEGIN
-
 /**
  * The identity of the host (basically the SHA-512 hashcode of
  * it's public key).
  */
 struct GNUNET_PeerIdentity
 {
-  GNUNET_HashCode hashPubKey GNUNET_PACKED;
+  GNUNET_HashCode hashPubKey;
 };
 GNUNET_NETWORK_STRUCT_END