fixing 2012: network structure alignment now forced to be correct even on W32 using...
[oweals/gnunet.git] / src / util / crypto_ksk.c
index bec87c803a0817b334bca33900da9b805f29ebb8..0f5a2950709a0a464761edd94a2904665245d44b 100644 (file)
 #include <gcrypt.h>
 #include <limits.h>
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
 /**
  * Log an error message at log-level 'level' that indicates
  * a failure of the command 'cmd' with the message given
  * by gcry_strerror(rc).
  */
-#define LOG_GCRY(level, cmd, rc) do { GNUNET_log(level, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, gcry_strerror(rc)); } while(0);
+#define LOG_GCRY(level, cmd, rc) do { LOG(level, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, gcry_strerror(rc)); } while(0);
 
 
 typedef struct
@@ -461,6 +463,7 @@ generate_kblock_key (KBlock_secret_key *sk, unsigned int nbits,
   gcry_mpi_release (g);
 }
 
+GNUNET_NETWORK_STRUCT_BEGIN
 
 /**
  * Internal representation of the private key.
@@ -480,7 +483,7 @@ struct KskRsaPrivateKeyBinaryEncoded
   uint16_t sizedmq1 GNUNET_PACKED;      /*  in big-endian! */
   /* followed by the actual values */
 };
-
+GNUNET_NETWORK_STRUCT_END
 
 /**
  * Deterministically (!) create a hostkey using only the