X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/e74bec56fab1c8e5cbf86c61a70aa153f85f1bc8..f1466e11cd1c2c41f01e505e54f465d0eb4b4f42:/src/config.h diff --git a/src/config.h b/src/config.h index 136fd40c..617682fc 100644 --- a/src/config.h +++ b/src/config.h @@ -38,6 +38,13 @@ #define HAVE_KQUEUE 1 #endif +#ifdef __sun +#include +#ifdef _DTRACE_VERSION +#define HAVE_EVPORT 1 +#endif +#endif + /* Define aof_fsync to fdatasync() in Linux and fsync() for all the rest */ #ifdef __linux__ #define aof_fsync fdatasync @@ -45,6 +52,14 @@ #define aof_fsync fsync #endif +/* Define rdb_fsync_range to sync_file_range() on Linux, otherwise we use + * the plain fsync() call. */ +#ifdef __linux__ +#define rdb_fsync_range(fd,off,size) sync_file_range(fd,off,size,SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE) +#else +#define rdb_fsync_range(fd,off,size) fsync(fd) +#endif + /* Byte ordering detection */ #include /* This will likely define BYTE_ORDER */