]>
Commit | Line | Data |
---|---|---|
1 | #ifndef __CONFIG_H | |
2 | #define __CONFIG_H | |
3 | ||
4 | #ifdef __APPLE__ | |
5 | #include <AvailabilityMacros.h> | |
6 | #endif | |
7 | ||
8 | /* test for malloc_size() */ | |
9 | #ifdef __APPLE__ | |
10 | #include <malloc/malloc.h> | |
11 | #define HAVE_MALLOC_SIZE 1 | |
12 | #define redis_malloc_size(p) malloc_size(p) | |
13 | #endif | |
14 | ||
15 | /* define redis_fstat to fstat or fstat64() */ | |
16 | #if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6) | |
17 | #define redis_fstat fstat64 | |
18 | #define redis_stat stat64 | |
19 | #else | |
20 | #define redis_fstat fstat | |
21 | #define redis_stat stat | |
22 | #endif | |
23 | ||
24 | /* test for backtrace() */ | |
25 | #if defined(__APPLE__) || defined(__linux__) | |
26 | #define HAVE_BACKTRACE 1 | |
27 | #endif | |
28 | ||
29 | #endif |