00001 /* 00002 Taken from libmemcached. 00003 */ 00004 00005 /* LibMemcached 00006 * Copyright (C) 2006-2009 Brian Aker 00007 * All rights reserved. 00008 * 00009 * Use and distribution licensed under the BSD license. See 00010 * the COPYING file in the parent directory for full text. 00011 * 00012 * Summary: 00013 * 00014 */ 00015 00016 #ifndef GEARMAN_BYTEORDER_H 00017 #define GEARMAN_BYTEORDER_H 00018 00019 #ifndef HAVE_HTONLL 00020 00021 GEARMAN_INTERNAL_API 00022 uint64_t ntohll(uint64_t); 00023 00024 GEARMAN_INTERNAL_API 00025 uint64_t htonll(uint64_t); 00026 00027 #endif 00028 00029 #ifdef linux 00030 /* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to 00031 * optimize the conversion functions, but the prototypes generate warnings 00032 * from gcc. The conversion methods isn't the bottleneck for my app, so 00033 * just remove the warnings by undef'ing the optimization .. 00034 */ 00035 #undef ntohs 00036 #undef ntohl 00037 #undef htons 00038 #undef htonl 00039 #endif 00040 00041 #endif /* GEARMAN_BYTEORDER_H */