diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2017-02-25 12:51:51 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2017-02-25 21:03:24 +0000 |
commit | 0eb3848d99441a237ba2a6585a3c054d67f28c53 (patch) | |
tree | 91995f7c937e1f4c65b84a4bfa41c22f56e19098 | |
parent | 1dd57ecb97d47034672678055c2fc814728e134d (diff) |
W32: Splice GNUNET_memcpy macro into NAT and GNS helpers
Including gnunet_common.h is too bothersome, these programs are designed
to be relatively standalone.
-rw-r--r-- | src/gns/w32nsp-resolve.c | 3 | ||||
-rw-r--r-- | src/nat/gnunet-helper-nat-client-windows.c | 2 | ||||
-rw-r--r-- | src/nat/gnunet-helper-nat-server-windows.c | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/gns/w32nsp-resolve.c b/src/gns/w32nsp-resolve.c index 1de1a3657d..82f15c6ccf 100644 --- a/src/gns/w32nsp-resolve.c +++ b/src/gns/w32nsp-resolve.c @@ -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> diff --git a/src/nat/gnunet-helper-nat-client-windows.c b/src/nat/gnunet-helper-nat-client-windows.c index 89dad9e7b1..622f8c961f 100644 --- a/src/nat/gnunet-helper-nat-client-windows.c +++ b/src/nat/gnunet-helper-nat-client-windows.c @@ -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> diff --git a/src/nat/gnunet-helper-nat-server-windows.c b/src/nat/gnunet-helper-nat-server-windows.c index c8e1193e41..09bd025386 100644 --- a/src/nat/gnunet-helper-nat-server-windows.c +++ b/src/nat/gnunet-helper-nat-server-windows.c @@ -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> |