W32: Splice GNUNET_memcpy macro into NAT and GNS helpers
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 25 Feb 2017 12:51:51 +0000 (12:51 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 25 Feb 2017 21:03:24 +0000 (21:03 +0000)
Including gnunet_common.h is too bothersome, these programs are designed
to be relatively standalone.

src/gns/w32nsp-resolve.c
src/nat/gnunet-helper-nat-client-windows.c
src/nat/gnunet-helper-nat-server-windows.c

index 1de1a3657d36e46c0579b7beba8287dd5b675649..82f15c6ccf61b3f5654d09f905024d7eebefd721 100644 (file)
@@ -22,6 +22,9 @@
  * @brief W32 integration for GNS
  * @author LRN
  */
+/* Instead of including gnunet_common.h */
+#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0)
+
 #include <ws2tcpip.h>
 #include <windows.h>
 #include <nspapi.h>
index 89dad9e7b1a8b8aa81b5d5839527c87570048efe..622f8c961f8aed0909f6502fad8ede3c185194be 100644 (file)
@@ -42,6 +42,8 @@
  * - Nathan Evans
  */
 #define _GNU_SOURCE
+/* Instead of including gnunet_common.h */
+#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0)
 
 #define FD_SETSIZE 1024
 #include <winsock2.h>
index c8e1193e416e5c84102b7ba4169f7e4ef1cafba2..09bd025386e1e878450a3e91f0cb287109255b3e 100644 (file)
@@ -41,6 +41,8 @@
  * - Christian Grothoff
  */
 #define _GNU_SOURCE
+/* Instead of including gnunet_common.h */
+#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0)
 
 #define FD_SETSIZE 1024
 #include <winsock2.h>