interface_v0.c \
interface_v1.c
memcached_light_LDADD= $(top_builddir)/libmemcached/protocol/libmemcachedprotocol.la
+memcached_light_DEPENDENCIES= $(top_builddir)/libmemcached/protocol/libmemcachedprotocol.la
+if BUILD_BYTEORDER
+memcached_light_LDADD+=$(top_builddir)/libmemcached/libbyteorder.la
+memcached_light_DEPENDENCIES+= $(top_builddir)/libmemcached/libbyteorder.la
+endif
+++ /dev/null
-#ifndef EXAMPLE_COMMON_H
-#define EXAMPLE_COMMON_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
-
-#endif
#include <string.h>
#include <libmemcached/protocol_handler.h>
-#include "common.h"
+#include <libmemcached/byteorder.h>
#include "storage.h"
static protocol_binary_response_status noop_command_handler(const void *cookie,
#include <string.h>
#include <libmemcached/protocol_handler.h>
-#include "common.h"
+#include <libmemcached/byteorder.h>
#include "storage.h"
static protocol_binary_response_status add_handler(const void *cookie,
#include <poll.h>
#include <libmemcached/protocol_handler.h>
-#include "common.h"
+#include <libmemcached/byteorder.h>
#include "storage.h"
extern struct memcached_binary_protocol_callback_st interface_v0_impl;
EXTRA_DIST = libmemcached_probes.d memcached/README.txt libmemcached.ver \
memcached_configure.h.in
-SUBDIRS = protocol
+SUBDIRS = . protocol
EXTRA_HEADERS =
BUILT_SOURCES=
extern 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 */
lib_LTLIBRARIES=libmemcachedprotocol.la
-noinst_HEADERS = common.h
+noinst_HEADERS = common.h
libmemcachedprotocol_la_SOURCES= protocol_handler.c cache.c pedantic.c
libmemcachedprotocol_la_LDFLAGS= -version-info $(MEMCACHEDPROTOCOL_LIBRARY_VERSION) $(LD_PROTOCOL_VERSION_SCRIPT)
+
+if BUILD_BYTEORDER
+libmemcachedprotocol_la_LIBADD=$(top_builddir)/libmemcached/libbyteorder.la
+libmemcachedprotocol_la_DEPENDENCIES= $(top_builddir)/libmemcached/libbyteorder.la
+endif
#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>