added config.h for #ifdef business isolation, added fstat64 for Mac OS X

This commit is contained in:
antirez
2009-06-05 10:50:51 +02:00
parent ec93bba353
commit dde65f3f3c
4 changed files with 25 additions and 10 deletions

20
config.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef __CONFIG_H
#define __CONFIG_H
/* malloc_size() */
#ifdef __APPLE__
#include <malloc/malloc.h>
#define HAVE_MALLOC_SIZE
#define redis_malloc_size(p) malloc_size(p)
#endif
/* define redis_fstat to fstat or fstat64() */
#ifdef __APPLE__
#define redis_fstat fstat64
#define redis_stat stat64
#else
#define redis_fstat fstat
#define redis_stat stat
#endif
#endif