# system checks
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
check_header(alloca.h)
check_header(arpa/inet.h)
check_header(dlfcn.h)
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
+ *
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
#ifndef swap64
static inline uint64_t swap64(uint64_t in)
{
-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
/* Little endian, flip the bytes around until someone makes a faster/better
* way to do this. */
uint64_t rv= 0;
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
+ *
* HashKit library
*
* Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
uint32_t hashkit_jenkins(const char *key, size_t length, void *)
{
uint32_t a,b,c; /* internal state */
-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
union { const void *ptr; size_t i; } u;
u.ptr = key;
#endif
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + JENKINS_INITVAL;
-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
if ((u.i & 0x3) == 0)
{
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
case 0 : return c;
default : return c;
}
-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
}
#endif
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
+ *
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
#ifndef swap64
static inline uint64_t swap64(uint64_t in)
{
-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
/* Little endian, flip the bytes around until someone makes a faster/better
* way to do this. */
uint64_t rv= 0;
#define LIBMEMCACHED_WITH_SASL_PWDB "@LIBMEMCACHED_WITH_SASL_PWDB@"
#define LIBMEMCACHED_WITH_SASL_CONF "@LIBMEMCACHED_WITH_SASL_CONF@"
+#cmakedefine WORDS_BIGENDIAN 1
+
#cmakedefine HAVE_C_STDATOMIC 1
#cmakedefine HAVE_CXX_STDATOMIC 1
#cmakedefine HAVE_WINSOCK2_H 1
#cmakedefine HAVE_WS2TCPIP_H 1
-
#cmakedefine HAVE_CINTTYPES 1
#cmakedefine HAVE_CSTDINT 1
#if defined(__cplusplus)