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