]> git.saurik.com Git - redis.git/blobdiff - config.h
added config.h for #ifdef business isolation, added fstat64 for Mac OS X
[redis.git] / config.h
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..79240b7
--- /dev/null
+++ b/config.h
@@ -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