Merge trunk
[m6w6/libmemcached] / libmemcached / protocol / common.h
index 036a13f6c49c713dd92c159c847b08f633533022..f606242232f37697ee6a474f396d52e98763e615 100644 (file)
@@ -7,25 +7,12 @@
 #include <assert.h>
 #include <netinet/in.h>
 
-#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
-
-
 /* Define this here, which will turn on the visibilty controls while we're
  * building libmemcached.
  */
 #define BUILDING_LIBMEMCACHED 1
 
+#include <libmemcached/byteorder.h>
 #include <libmemcached/protocol_handler.h>
 #include <libmemcached/protocol/cache.h>