Mercurial > hg > nginx
comparison src/core/ngx_buf.h @ 6734:0c572ed91b36
Modules compatibility: compatibility with NGX_HAVE_FILE_AIO.
With this change it is now possible to load modules compiled without
the "--with-file-aio" configure option into nginx binary compiled with it,
and vice versa, assuming both use the "--with-compat" option.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Oct 2016 18:44:17 +0300 |
parents | adc2414856b1 |
children | 2f9214713666 |
comparison
equal
deleted
inserted
replaced
6733:adc2414856b1 | 6734:0c572ed91b36 |
---|---|
70 | 70 |
71 typedef struct ngx_output_chain_ctx_s ngx_output_chain_ctx_t; | 71 typedef struct ngx_output_chain_ctx_s ngx_output_chain_ctx_t; |
72 | 72 |
73 typedef ngx_int_t (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in); | 73 typedef ngx_int_t (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in); |
74 | 74 |
75 #if (NGX_HAVE_FILE_AIO) | |
76 typedef void (*ngx_output_chain_aio_pt)(ngx_output_chain_ctx_t *ctx, | 75 typedef void (*ngx_output_chain_aio_pt)(ngx_output_chain_ctx_t *ctx, |
77 ngx_file_t *file); | 76 ngx_file_t *file); |
78 #endif | |
79 | 77 |
80 struct ngx_output_chain_ctx_s { | 78 struct ngx_output_chain_ctx_s { |
81 ngx_buf_t *buf; | 79 ngx_buf_t *buf; |
82 ngx_chain_t *in; | 80 ngx_chain_t *in; |
83 ngx_chain_t *free; | 81 ngx_chain_t *free; |
88 unsigned unaligned:1; | 86 unsigned unaligned:1; |
89 unsigned need_in_memory:1; | 87 unsigned need_in_memory:1; |
90 unsigned need_in_temp:1; | 88 unsigned need_in_temp:1; |
91 unsigned aio:1; | 89 unsigned aio:1; |
92 | 90 |
93 #if (NGX_HAVE_FILE_AIO) | 91 #if (NGX_HAVE_FILE_AIO || NGX_COMPAT) |
94 ngx_output_chain_aio_pt aio_handler; | 92 ngx_output_chain_aio_pt aio_handler; |
95 #if (NGX_HAVE_AIO_SENDFILE) | 93 #if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT) |
96 ssize_t (*aio_preload)(ngx_buf_t *file); | 94 ssize_t (*aio_preload)(ngx_buf_t *file); |
97 #endif | 95 #endif |
98 #endif | 96 #endif |
99 | 97 |
100 #if (NGX_THREADS || NGX_COMPAT) | 98 #if (NGX_THREADS || NGX_COMPAT) |