X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fbyteorder.h;h=92687c1d7b6430223250938c9480b9d52f7dc159;hb=19fae5d41322f8230ed5e0697ec0ce51e1ccdeaa;hp=f78790a83dce1822b196d4bd9f4c596d7955b5ed;hpb=67456d74f5bd4f354a360d70da503dc58cbe5971;p=m6w6%2Flibmemcached diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h index f78790a8..92687c1d 100644 --- a/libmemcached/byteorder.h +++ b/libmemcached/byteorder.h @@ -37,36 +37,16 @@ #pragma once -#if HAVE_SYS_TYPES_H -#include -#endif - -#ifndef HAVE_HTONLL -#define ntohll(a) memcached_ntohll(a) -#define htonll(a) memcached_htonll(a) - #ifdef __cplusplus extern "C" { #endif LIBMEMCACHED_LOCAL uint64_t memcached_ntohll(uint64_t); + LIBMEMCACHED_LOCAL uint64_t memcached_htonll(uint64_t); + #ifdef __cplusplus } #endif - -#endif - -#ifdef linux -/* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to - * optimize the conversion functions, but the prototypes generate warnings - * from gcc. The conversion methods isn't the bottleneck for my app, so - * just remove the warnings by undef'ing the optimization .. - */ -#undef ntohs -#undef ntohl -#undef htons -#undef htonl -#endif