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