for w32 port
[oweals/gnunet.git] / src / include / gnunet_common.h
index cb2ed4c0c9e4e24ee9059d975b2ae30254331bfa..7f8a78f54587b6219a393732f4c2d1cb07bdf4ba 100644 (file)
 #ifndef GNUNET_COMMON_H
 #define GNUNET_COMMON_H
 
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef MINGW
+#include "winproc.h"
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
 /**
  * Version of the API (for entire gnunetutil.so library).
  */
@@ -218,6 +231,16 @@ void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
  */
 const char *GNUNET_h2s (const GNUNET_HashCode *hc);
 
+/**
+ * Convert a hash value to a string (for printing debug messages).
+ * This prints all 104 characters of a hashcode!
+ * This is one of the very few calls in the entire API that is
+ * NOT reentrant!
+ *
+ * @param hc the hash code
+ * @return string
+ */
+const char *GNUNET_h2s_full (const GNUNET_HashCode *hc);
 
 /**
  * Convert a peer identity to a string (for printing debug messages).
@@ -471,7 +494,7 @@ void *GNUNET_xmalloc_unchecked_ (size_t size,
  * memory is available.
  */
 void *GNUNET_xrealloc_ (void *ptr,
-                        const size_t n, const char *filename, int linenumber);
+                        size_t n, const char *filename, int linenumber);
 
 /**
  * Free memory. Merely a wrapper for the case that we