use uint64_t instead of long long for GNUNET_ntohll/GNUNET_htonll
authorChristian Grothoff <christian@grothoff.org>
Tue, 6 Dec 2011 13:54:18 +0000 (13:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 6 Dec 2011 13:54:18 +0000 (13:54 +0000)
src/arm/gnunet-service-arm_interceptor.c
src/include/gnunet_common.h
src/util/common_endian.c

index 24dd4ad25c4657f964885d0c39a319dccf127d22..021baa67391c2ab1152b0b28a2d0bc947585c3a9 100644 (file)
@@ -989,7 +989,6 @@ acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     return;
   GNUNET_CONTAINER_DLL_remove (serviceListeningInfoList_head,
                                serviceListeningInfoList_tail, sli);
-#ifndef MINGW
   use_lsocks = GNUNET_NO;
   if (GNUNET_YES ==
       GNUNET_CONFIGURATION_have_value (cfg, sli->serviceName,
@@ -997,9 +996,6 @@ acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     use_lsocks =
         GNUNET_CONFIGURATION_get_value_yesno (cfg, sli->serviceName,
                                               "DISABLE_SOCKET_FORWARDING");
-#else
-  use_lsocks = GNUNET_YES;
-#endif
   if (GNUNET_NO != use_lsocks)
   {
     accept_and_forward (sli);
index 49b176ff147dda538ff464daa1d0380e4126c26b..7eed22fdc0f377c6a4123c515a4d07867388f97b 100644 (file)
@@ -417,20 +417,20 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
 /* ************************* endianess conversion ****************** */
 
 /**
- * Convert a long-long to host-byte-order.
+ * Convert unsigned 64-bit integer to host-byte-order.
  * @param n the value in network byte order
  * @return the same value in host byte order
  */
-unsigned long long
-GNUNET_ntohll (unsigned long long n);
+uint64_t
+GNUNET_ntohll (uint64_t n);
 
 /**
- * Convert a long long to network-byte-order.
+ * Convert unsigned 64-bit integer to network-byte-order.
  * @param n the value in host byte order
  * @return the same value in network byte order
  */
-unsigned long long
-GNUNET_htonll (unsigned long long n);
+uint64_t
+GNUNET_htonll (uint64_t n);
 
 
 /* ************************* allocation functions ****************** */
index 5d7aa50d5cb2cb337693fc7b6e3eaddd781e91c2..f4641445d0112632d3cd147753c502344d506a1e 100644 (file)
 
 #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__)
 
-unsigned long long
-GNUNET_ntohll (unsigned long long n)
+uint64_t
+GNUNET_ntohll (uint64_t)
 {
 #if __BYTE_ORDER == __BIG_ENDIAN
   return n;
 #else
-  return (((unsigned long long) ntohl (n)) << 32) + ntohl (n >> 32);
+  return (((uint64_t) ntohl (n)) << 32) + ntohl (n >> 32);
 #endif
 }
 
-unsigned long long
-GNUNET_htonll (unsigned long long n)
+uint64_t
+GNUNET_htonll (uint64_t n)
 {
 #if __BYTE_ORDER == __BIG_ENDIAN
   return n;
 #else
-  return (((unsigned long long) htonl (n)) << 32) + htonl (n >> 32);
+  return (((uint64_t) htonl (n)) << 32) + htonl (n >> 32);
 #endif
 }