Changeset 6734:0c572ed91b36 in nginx


Ignore:
Timestamp:
10/10/16 15:44:17 (3 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Message:

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.

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/core/ngx_buf.h

    r6733 r6734  
    7373typedef ngx_int_t (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in);
    7474
    75 #if (NGX_HAVE_FILE_AIO)
    7675typedef void (*ngx_output_chain_aio_pt)(ngx_output_chain_ctx_t *ctx,
    7776    ngx_file_t *file);
    78 #endif
    7977
    8078struct ngx_output_chain_ctx_s {
     
    9189    unsigned                     aio:1;
    9290
    93 #if (NGX_HAVE_FILE_AIO)
     91#if (NGX_HAVE_FILE_AIO || NGX_COMPAT)
    9492    ngx_output_chain_aio_pt      aio_handler;
    95 #if (NGX_HAVE_AIO_SENDFILE)
     93#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
    9694    ssize_t                    (*aio_preload)(ngx_buf_t *file);
    9795#endif
  • src/core/ngx_connection.h

    r6733 r6734  
    183183    unsigned            need_last_buf:1;
    184184
    185 #if (NGX_HAVE_AIO_SENDFILE)
     185#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
    186186    unsigned            busy_count:2;
    187187#endif
  • src/core/ngx_file.h

    r6733 r6734  
    3131#endif
    3232
    33 #if (NGX_HAVE_FILE_AIO)
     33#if (NGX_HAVE_FILE_AIO || NGX_COMPAT)
    3434    ngx_event_aio_t           *aio;
    3535#endif
  • src/core/ngx_module.h

    r6733 r6734  
    3636#endif
    3737
    38 #if (NGX_HAVE_FILE_AIO)
     38#if (NGX_HAVE_FILE_AIO || NGX_COMPAT)
    3939#define NGX_MODULE_SIGNATURE_3   "1"
    4040#else
     
    4242#endif
    4343
    44 #if (NGX_HAVE_AIO_SENDFILE)
     44#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
    4545#define NGX_MODULE_SIGNATURE_4   "1"
    4646#else
  • src/event/ngx_event.h

    r6692 r6734  
    153153    ngx_file_t                *file;
    154154
    155 #if (NGX_HAVE_AIO_SENDFILE)
     155#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
    156156    ssize_t                  (*preload_handler)(ngx_buf_t *file);
    157157#endif
  • src/http/ngx_http_core_module.c

    r6719 r6734  
    37613761    ngx_conf_merge_size_value(conf->sendfile_max_chunk,
    37623762                              prev->sendfile_max_chunk, 0);
    3763 #if (NGX_HAVE_FILE_AIO || NGX_THREADS)
    37643763    ngx_conf_merge_value(conf->aio, prev->aio, NGX_HTTP_AIO_OFF);
    37653764    ngx_conf_merge_value(conf->aio_write, prev->aio_write, 0);
    3766 #endif
    37673765#if (NGX_THREADS)
    37683766    ngx_conf_merge_ptr_value(conf->thread_pool, prev->thread_pool, NULL);
Note: See TracChangeset for help on using the changeset viewer.