From: Igor Sysoev Date: Mon, 4 Aug 2008 15:32:10 +0000 (+0000) Subject: Solaris directio() X-Git-Tag: release-0.7.8~1 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=b83f893c75abab921a7f3cbacd92377cf203164a;p=nginx.git Solaris directio() --- diff --git a/auto/os/features b/auto/os/features index ffb27a481..8efed75a2 100644 --- a/auto/os/features +++ b/auto/os/features @@ -190,3 +190,14 @@ ngx_feature_path= ngx_feature_libs= ngx_feature_test="fcntl(0, F_NOCACHE, 1);" . auto/feature + + +ngx_feature="directio()" +ngx_feature_name="NGX_HAVE_DIRECTIO" +ngx_feature_run=no +ngx_feature_incs="#include + #include " +ngx_feature_path= +ngx_feature_libs= +ngx_feature_test="directio(0, DIRECTIO_ON);" +. auto/feature diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h index 62af63bce..7e8407086 100644 --- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h @@ -199,6 +199,11 @@ ngx_int_t ngx_directio(ngx_fd_t fd); #define ngx_directio(fd) fcntl(fd, F_NOCACHE, 1) #define ngx_directio_n "fcntl(F_NOCACHE)" +#elif (NGX_HAVE_DIRECTIO) + +#define ngx_directio(fd) directio(fd, DIRECTIO_ON) +#define ngx_directio_n "directio(DIRECTIO_ON)" + #else #define ngx_directio(fd) 0