2009-06-05 08:50:51 +00:00
|
|
|
#ifndef __CONFIG_H
|
|
|
|
#define __CONFIG_H
|
|
|
|
|
2009-07-24 12:32:58 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
#include <AvailabilityMacros.h>
|
|
|
|
#endif
|
|
|
|
|
2009-06-07 18:22:43 +00:00
|
|
|
/* test for malloc_size() */
|
2009-06-05 08:50:51 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
#include <malloc/malloc.h>
|
2009-06-07 18:22:43 +00:00
|
|
|
#define HAVE_MALLOC_SIZE 1
|
2009-06-05 08:50:51 +00:00
|
|
|
#define redis_malloc_size(p) malloc_size(p)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* define redis_fstat to fstat or fstat64() */
|
2009-07-24 12:32:58 +00:00
|
|
|
#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
|
2009-06-05 08:50:51 +00:00
|
|
|
#define redis_fstat fstat64
|
|
|
|
#define redis_stat stat64
|
|
|
|
#else
|
|
|
|
#define redis_fstat fstat
|
|
|
|
#define redis_stat stat
|
|
|
|
#endif
|
|
|
|
|
2009-06-07 18:22:43 +00:00
|
|
|
/* test for backtrace() */
|
|
|
|
#if defined(__APPLE__) || defined(__linux__)
|
|
|
|
#define HAVE_BACKTRACE 1
|
|
|
|
#endif
|
|
|
|
|
2009-11-23 17:50:39 +00:00
|
|
|
/* test for polling API */
|
|
|
|
#ifdef __linux__
|
|
|
|
#define HAVE_EPOLL 1
|
|
|
|
#endif
|
|
|
|
|
2009-11-28 19:48:53 +00:00
|
|
|
#if (defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__NetBSD__)
|
2009-11-28 13:46:21 +00:00
|
|
|
#define HAVE_KQUEUE 1
|
|
|
|
#endif
|
|
|
|
|
2009-06-05 08:50:51 +00:00
|
|
|
#endif
|