X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fbyteorder.h;h=90a71ee400003932746d479137a225b7f26e5140;hb=259ed7e68a0de0887e9aedbe0aa5fdd9404929f9;hp=99e9f5d196f52e7df4af6b617d2798e5fed3b04a;hpb=d9dab0a24eebad142b33d00ccb0f87b083f02195;p=m6w6%2Flibmemcached diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h index 99e9f5d1..90a71ee4 100644 --- a/libmemcached/byteorder.h +++ b/libmemcached/byteorder.h @@ -1,8 +1,24 @@ -#ifndef LIBMEMCACHED_BYTEORDER_H -#define LIBMEMCACHED_BYTEORDER_H +/* 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__ #include "config.h" +#if HAVE_SYS_TYPES_H +#include +#endif + + /* Define this here, which will turn on the visibilty controls while we're * building libmemcached. */ @@ -11,10 +27,13 @@ #include "libmemcached/memcached.h" #ifndef HAVE_HTONLL +#define ntohll(a) memcached_ntohll(a) +#define htonll(a) memcached_htonll(a) + LIBMEMCACHED_LOCAL -uint64_t ntohll(uint64_t); +uint64_t memcached_ntohll(uint64_t); LIBMEMCACHED_LOCAL -uint64_t htonll(uint64_t); +uint64_t memcached_htonll(uint64_t); #endif #ifdef linux @@ -29,4 +48,4 @@ uint64_t htonll(uint64_t); #undef htonl #endif -#endif /* LIBMEMCACHED_BYTEORDER_H */ +#endif /*__LIBMEMCACHED_BYTEORDER_H__ */