Partial patch on pass through to fix issues with trigger writers not
[m6w6/libmemcached] / libmemcached / byteorder.h
1 /* LibMemcached
2 * Copyright (C) 2006-2009 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 *
8 * Summary:
9 *
10 */
11
12 #ifndef LIBMEMCACHED_BYTEORDER_H
13 #define LIBMEMCACHED_BYTEORDER_H
14
15 #include "config.h"
16
17 /* Define this here, which will turn on the visibilty controls while we're
18 * building libmemcached.
19 */
20 #define BUILDING_LIBMEMCACHED 1
21
22 #include "libmemcached/memcached.h"
23
24 #ifndef HAVE_HTONLL
25 LIBMEMCACHED_LOCAL
26 uint64_t ntohll(uint64_t);
27 LIBMEMCACHED_LOCAL
28 uint64_t htonll(uint64_t);
29 #endif
30
31 #ifdef linux
32 /* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to
33 * optimize the conversion functions, but the prototypes generate warnings
34 * from gcc. The conversion methods isn't the bottleneck for my app, so
35 * just remove the warnings by undef'ing the optimization ..
36 */
37 #undef ntohs
38 #undef ntohl
39 #undef htons
40 #undef htonl
41 #endif
42
43 #endif /* LIBMEMCACHED_BYTEORDER_H */