diff options
author | LRN <lrn1986@gmail.com> | 2013-12-19 18:38:55 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-19 18:38:55 +0000 |
commit | a9e7ed1a67e96140bb2d41251de1520fc755f52c (patch) | |
tree | b5e5ddfc5087dd4510b0c73b4b03a9621f4cadbc /src/gns/w32nsp.c | |
parent | 29a3fd0c128715ee22065776e51e8340d1e846d8 (diff) | |
download | gnunet-a9e7ed1a67e96140bb2d41251de1520fc755f52c.tar.gz gnunet-a9e7ed1a67e96140bb2d41251de1520fc755f52c.zip |
W32 NSP: Don't use 64-bit types, link to libgcc statically
Diffstat (limited to 'src/gns/w32nsp.c')
-rw-r--r-- | src/gns/w32nsp.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gns/w32nsp.c b/src/gns/w32nsp.c index d6a589d4f..fcd922560 100644 --- a/src/gns/w32nsp.c +++ b/src/gns/w32nsp.c | |||
@@ -82,18 +82,6 @@ | |||
82 | #define STATE_REPLY 0x04 | 82 | #define STATE_REPLY 0x04 |
83 | #define STATE_GHBN 0x08 | 83 | #define STATE_GHBN 0x08 |
84 | 84 | ||
85 | uint64_t | ||
86 | GNUNET_htonll (uint64_t n) | ||
87 | { | ||
88 | #if __BYTE_ORDER == __BIG_ENDIAN | ||
89 | return n; | ||
90 | #elif __BYTE_ORDER == __LITTLE_ENDIAN | ||
91 | return (((uint64_t) htonl (n)) << 32) + htonl (n >> 32); | ||
92 | #else | ||
93 | #error byteorder undefined | ||
94 | #endif | ||
95 | } | ||
96 | |||
97 | CRITICAL_SECTION records_cs; | 85 | CRITICAL_SECTION records_cs; |
98 | 86 | ||
99 | struct record | 87 | struct record |
@@ -258,10 +246,8 @@ send_name_to_ip_request (LPWSAQUERYSETW lpqsRestrictions, | |||
258 | msg->sc_data1 = htonl (lpqsRestrictions->lpServiceClassId->Data1); | 246 | msg->sc_data1 = htonl (lpqsRestrictions->lpServiceClassId->Data1); |
259 | msg->sc_data2 = htons (lpqsRestrictions->lpServiceClassId->Data2); | 247 | msg->sc_data2 = htons (lpqsRestrictions->lpServiceClassId->Data2); |
260 | msg->sc_data3 = htons (lpqsRestrictions->lpServiceClassId->Data3); | 248 | msg->sc_data3 = htons (lpqsRestrictions->lpServiceClassId->Data3); |
261 | msg->sc_data4 = 0; | ||
262 | for (i = 0; i < 8; i++) | 249 | for (i = 0; i < 8; i++) |
263 | msg->sc_data4 |= ((uint64_t) lpqsRestrictions->lpServiceClassId->Data4[i]) << ((7 - i) * 8); | 250 | msg->sc_data4[i] = lpqsRestrictions->lpServiceClassId->Data4[i]; |
264 | msg->sc_data4 = GNUNET_htonll (msg->sc_data4); | ||
265 | *resolver = connect_to_dns_resolver (); | 251 | *resolver = connect_to_dns_resolver (); |
266 | if (*resolver != INVALID_SOCKET) | 252 | if (*resolver != INVALID_SOCKET) |
267 | { | 253 | { |