chiark / gitweb /
secnet.h: provide helpful STRING macro (for preprocessor stringification)
[secnet.git] / secnet.h
index 9cc22059ad0272e189a4b54d3b5a505d67b7e71f..6559ef325874406a84267bda3ee9bdcdd4f49ad1 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -438,7 +438,7 @@ struct dh_if {
 /* HASH interface */
 
 typedef void *hash_init_fn(void);
-typedef void hash_update_fn(void *st, uint8_t const *buf, int32_t len);
+typedef void hash_update_fn(void *st, const void *buf, int32_t len);
 typedef void hash_final_fn(void *st, uint8_t *digest);
 struct hash_if {
     int32_t len; /* Hash output length in bytes */
@@ -495,4 +495,7 @@ extern void log_from_fd(int fd, cstring_t prefix, struct log_if *log);
 
 /***** END of log functions *****/
 
+#define STRING2(x) #x
+#define STRING(x) STRING2(x)
+
 #endif /* secnet_h */