From: Christian Grothoff Date: Tue, 6 Dec 2011 13:54:18 +0000 (+0000) Subject: use uint64_t instead of long long for GNUNET_ntohll/GNUNET_htonll X-Git-Tag: initial-import-from-subversion-38251~15724 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=22dca01af96e22856387eb6993b3d357f30ffb1c;p=oweals%2Fgnunet.git use uint64_t instead of long long for GNUNET_ntohll/GNUNET_htonll --- diff --git a/src/arm/gnunet-service-arm_interceptor.c b/src/arm/gnunet-service-arm_interceptor.c index 24dd4ad25..021baa673 100644 --- a/src/arm/gnunet-service-arm_interceptor.c +++ b/src/arm/gnunet-service-arm_interceptor.c @@ -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); diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 49b176ff1..7eed22fdc 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -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 ****************** */ diff --git a/src/util/common_endian.c b/src/util/common_endian.c index 5d7aa50d5..f4641445d 100644 --- a/src/util/common_endian.c +++ b/src/util/common_endian.c @@ -29,23 +29,23 @@ #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 }