X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fbyteorder.h;h=17e66a78f59e0d52ee235b9a08dc53af26cd618e;hb=3107b89b4d3441929835e6f96fda841c76f704fe;hp=0964b61a12313ad253a421bc9b199db1e7bbccf9;hpb=e1a4e5405f227e58347d775022dd38fa2595b20b;p=awesomized%2Flibmemcached diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h index 0964b61a..17e66a78 100644 --- a/libmemcached/byteorder.h +++ b/libmemcached/byteorder.h @@ -1,3 +1,14 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + #ifndef LIBMEMCACHED_BYTEORDER_H #define LIBMEMCACHED_BYTEORDER_H @@ -12,9 +23,21 @@ #ifndef HAVE_HTONLL LIBMEMCACHED_LOCAL -extern uint64_t ntohll(uint64_t); +uint64_t ntohll(uint64_t); LIBMEMCACHED_LOCAL -extern uint64_t htonll(uint64_t); +uint64_t htonll(uint64_t); +#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 #endif /* LIBMEMCACHED_BYTEORDER_H */