Re: [PATCH 1 of 2] Configure: fix tests with multi-level relative build directory
On Wed, Jun 10, 2015 at 07:19:29PM -0700, Piotr Sikora wrote: # HG changeset patch # User Piotr Sikora pi...@cloudflare.com # Date 1433989099 25200 # Wed Jun 10 19:18:19 2015 -0700 # Node ID 4ee03ff4811708bafd07e84c5a71165a52b38299 # Parent c041f1e0655f786db5cf1a3e79ca1f464fec0258 Configure: fix tests with multi-level relative build directory. Signed-off-by: Piotr Sikora pi...@cloudflare.com diff -r c041f1e0655f -r 4ee03ff48117 auto/unix --- a/auto/unix Wed Jun 10 19:18:20 2015 +0300 +++ b/auto/unix Wed Jun 10 19:18:19 2015 -0700 @@ -510,7 +510,7 @@ case $NGX_AUTO_CONFIG_H in NGX_INCLUDE_AUTO_CONFIG_H=#include \$NGX_AUTO_CONFIG_H\ ;; *) -NGX_INCLUDE_AUTO_CONFIG_H=#include \../$NGX_AUTO_CONFIG_H\ +NGX_INCLUDE_AUTO_CONFIG_H=#include \$PWD/$NGX_AUTO_CONFIG_H\ ;; esac How's this instead? diff --git a/auto/unix b/auto/unix --- a/auto/unix +++ b/auto/unix @@ -505,14 +505,7 @@ ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_s # POSIX types -case $NGX_AUTO_CONFIG_H in -/*) -NGX_INCLUDE_AUTO_CONFIG_H=#include \$NGX_AUTO_CONFIG_H\ -;; -*) -NGX_INCLUDE_AUTO_CONFIG_H=#include \../$NGX_AUTO_CONFIG_H\ -;; -esac +NGX_INCLUDE_AUTO_CONFIG_H=#include \ngx_auto_config.h\ ngx_type=uint64_t; ngx_types=u_int64_t; . auto/types/typedef ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: [PATCH 2 of 2] Configure: create missing intermediates for build directory
On Wed, Jun 10, 2015 at 07:19:30PM -0700, Piotr Sikora wrote: # HG changeset patch # User Piotr Sikora pi...@cloudflare.com # Date 1433989099 25200 # Wed Jun 10 19:18:19 2015 -0700 # Node ID f160d72d2dadc117b8e2dc25eca3d39a346a8eb8 # Parent 4ee03ff4811708bafd07e84c5a71165a52b38299 Configure: create missing intermediates for build directory. Signed-off-by: Piotr Sikora pi...@cloudflare.com diff -r 4ee03ff48117 -r f160d72d2dad auto/configure --- a/auto/configure Wed Jun 10 19:18:19 2015 -0700 +++ b/auto/configure Wed Jun 10 19:18:19 2015 -0700 @@ -11,7 +11,7 @@ export LC_ALL . auto/init . auto/sources -test -d $NGX_OBJS || mkdir $NGX_OBJS +test -d $NGX_OBJS || mkdir -p $NGX_OBJS echo $NGX_AUTO_HEADERS_H echo $NGX_AUTOCONF_ERR Looks good. ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: [PATCH 1 of 2] Configure: fix tests with multi-level relative build directory
Hello! On Thu, Jun 11, 2015 at 11:51:57AM +0300, Ruslan Ermilov wrote: On Wed, Jun 10, 2015 at 07:19:29PM -0700, Piotr Sikora wrote: # HG changeset patch # User Piotr Sikora pi...@cloudflare.com # Date 1433989099 25200 # Wed Jun 10 19:18:19 2015 -0700 # Node ID 4ee03ff4811708bafd07e84c5a71165a52b38299 # Parent c041f1e0655f786db5cf1a3e79ca1f464fec0258 Configure: fix tests with multi-level relative build directory. Signed-off-by: Piotr Sikora pi...@cloudflare.com diff -r c041f1e0655f -r 4ee03ff48117 auto/unix --- a/auto/unix Wed Jun 10 19:18:20 2015 +0300 +++ b/auto/unix Wed Jun 10 19:18:19 2015 -0700 @@ -510,7 +510,7 @@ case $NGX_AUTO_CONFIG_H in NGX_INCLUDE_AUTO_CONFIG_H=#include \$NGX_AUTO_CONFIG_H\ ;; *) -NGX_INCLUDE_AUTO_CONFIG_H=#include \../$NGX_AUTO_CONFIG_H\ +NGX_INCLUDE_AUTO_CONFIG_H=#include \$PWD/$NGX_AUTO_CONFIG_H\ ;; esac How's this instead? diff --git a/auto/unix b/auto/unix --- a/auto/unix +++ b/auto/unix @@ -505,14 +505,7 @@ ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_s # POSIX types -case $NGX_AUTO_CONFIG_H in -/*) -NGX_INCLUDE_AUTO_CONFIG_H=#include \$NGX_AUTO_CONFIG_H\ -;; -*) -NGX_INCLUDE_AUTO_CONFIG_H=#include \../$NGX_AUTO_CONFIG_H\ -;; -esac +NGX_INCLUDE_AUTO_CONFIG_H=#include \ngx_auto_config.h\ ngx_type=uint64_t; ngx_types=u_int64_t; . auto/types/typedef Shouldn't it be just a string in auto/types/sizeof then? -- Maxim Dounin http://nginx.org/ ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: [PATCH 1 of 2] Configure: fix tests with multi-level relative build directory
Hey Maxim, Shouldn't it be just a string in auto/types/sizeof then? That was my original thought as well, but maybe there are nginx+ or 3rd-party modules that rely on NGX_INCLUDE_AUTO_CONFIG_H? I'm not sure whether it should make a difference, really. Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[nginx] Removed unused ngx_http_get_time() declaration.
details: http://hg.nginx.org/nginx/rev/c61210e2e081 branches: changeset: 6179:c61210e2e081 user: Maxim Dounin mdou...@mdounin.ru date: Thu Jun 11 20:42:24 2015 +0300 description: Removed unused ngx_http_get_time() declaration. diffstat: src/http/ngx_http.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diffs (12 lines): diff --git a/src/http/ngx_http.h b/src/http/ngx_http.h --- a/src/http/ngx_http.h +++ b/src/http/ngx_http.h @@ -149,8 +149,6 @@ void ngx_http_clean_header(ngx_http_requ time_t ngx_http_parse_time(u_char *value, size_t len); -size_t ngx_http_get_time(char *buf, time_t t); - ngx_int_t ngx_http_discard_request_body(ngx_http_request_t *r); ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[nginx] Moved ngx_http_parse_time() to core, renamed accordingly.
details: http://hg.nginx.org/nginx/rev/8b6fa4842133 branches: changeset: 6180:8b6fa4842133 user: Maxim Dounin mdou...@mdounin.ru date: Thu Jun 11 20:42:31 2015 +0300 description: Moved ngx_http_parse_time() to core, renamed accordingly. The function is now called ngx_parse_http_time(), and can be used by any code to parse HTTP-style date and time. In particular, it will be used for OCSP stapling. For compatibility, a macro to map ngx_http_parse_time() to the new name provided for a while. diffstat: auto/sources | 3 +- src/core/ngx_core.h| 1 + src/core/ngx_parse_time.c | 3 +- src/core/ngx_parse_time.h | 22 ++ src/http/modules/ngx_http_dav_module.c | 2 +- src/http/modules/ngx_http_headers_filter_module.c | 2 +- src/http/modules/ngx_http_not_modified_filter_module.c | 4 +- src/http/modules/ngx_http_range_filter_module.c| 2 +- src/http/ngx_http.h| 3 -- src/http/ngx_http_core_module.c| 4 +- src/http/ngx_http_upstream.c | 6 ++-- 11 files changed, 36 insertions(+), 16 deletions(-) diffs (206 lines): diff --git a/auto/sources b/auto/sources --- a/auto/sources +++ b/auto/sources @@ -19,6 +19,7 @@ CORE_DEPS=src/core/nginx.h \ src/core/ngx_queue.h \ src/core/ngx_string.h \ src/core/ngx_parse.h \ + src/core/ngx_parse_time.h \ src/core/ngx_inet.h \ src/core/ngx_file.h \ src/core/ngx_crc.h \ @@ -53,6 +54,7 @@ CORE_SRCS=src/core/nginx.c \ src/core/ngx_output_chain.c \ src/core/ngx_string.c \ src/core/ngx_parse.c \ + src/core/ngx_parse_time.c \ src/core/ngx_inet.c \ src/core/ngx_file.c \ src/core/ngx_crc32.c \ @@ -303,7 +305,6 @@ HTTP_SRCS=src/http/ngx_http.c \ src/http/ngx_http_script.c \ src/http/ngx_http_upstream.c \ src/http/ngx_http_upstream_round_robin.c \ - src/http/ngx_http_parse_time.c \ src/http/modules/ngx_http_static_module.c \ src/http/modules/ngx_http_index_module.c \ src/http/modules/ngx_http_chunked_filter_module.c \ diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h @@ -54,6 +54,7 @@ typedef void (*ngx_connection_handler_pt #include ngx_process.h #include ngx_user.h #include ngx_parse.h +#include ngx_parse_time.h #include ngx_log.h #include ngx_alloc.h #include ngx_palloc.h diff --git a/src/http/ngx_http_parse_time.c b/src/core/ngx_parse_time.c rename from src/http/ngx_http_parse_time.c rename to src/core/ngx_parse_time.c --- a/src/http/ngx_http_parse_time.c +++ b/src/core/ngx_parse_time.c @@ -7,13 +7,12 @@ #include ngx_config.h #include ngx_core.h -#include ngx_http.h static ngx_uint_t mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t -ngx_http_parse_time(u_char *value, size_t len) +ngx_parse_http_time(u_char *value, size_t len) { u_char *p, *end; ngx_int_tmonth; diff --git a/src/core/ngx_parse_time.h b/src/core/ngx_parse_time.h new file mode 100644 --- /dev/null +++ b/src/core/ngx_parse_time.h @@ -0,0 +1,22 @@ + +/* + * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. + */ + + +#ifndef _NGX_PARSE_TIME_H_INCLUDED_ +#define _NGX_PARSE_TIME_H_INCLUDED_ + + +#include ngx_config.h +#include ngx_core.h + + +time_t ngx_parse_http_time(u_char *value, size_t len); + +/* compatibility */ +#define ngx_http_parse_time(value, len) ngx_parse_http_time(value, len) + + +#endif /* _NGX_PARSE_TIME_H_INCLUDED_ */ diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c --- a/src/http/modules/ngx_http_dav_module.c +++ b/src/http/modules/ngx_http_dav_module.c @@ -255,7 +255,7 @@ ngx_http_dav_put_handler(ngx_http_reques ext.log = r-connection-log; if (r-headers_in.date) { -date = ngx_http_parse_time(r-headers_in.date-value.data, +date = ngx_parse_http_time(r-headers_in.date-value.data, r-headers_in.date-value.len); if (date != NGX_ERROR) { diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c --- a/src/http/modules/ngx_http_headers_filter_module.c +++ b/src/http/modules/ngx_http_headers_filter_module.c @@ -498,7 +498,7 @@ ngx_http_set_last_modified(ngx_http_requ } r-headers_out.last_modified_time = -(value-len) ? ngx_http_parse_time(value-data, value-len) : -1; +(value-len) ? ngx_parse_http_time(value-data, value-len) : -1; return NGX_OK; } diff --git a/src/http/modules/ngx_http_not_modified_filter_module.c
[nginx] OCSP stapling: avoid sending expired responses (ticket #...
details: http://hg.nginx.org/nginx/rev/6893a1007a7c branches: changeset: 6181:6893a1007a7c user: Maxim Dounin mdou...@mdounin.ru date: Thu Jun 11 20:42:39 2015 +0300 description: OCSP stapling: avoid sending expired responses (ticket #425). diffstat: src/event/ngx_event_openssl_stapling.c | 68 +++--- 1 files changed, 62 insertions(+), 6 deletions(-) diffs (154 lines): diff --git a/src/event/ngx_event_openssl_stapling.c b/src/event/ngx_event_openssl_stapling.c --- a/src/event/ngx_event_openssl_stapling.c +++ b/src/event/ngx_event_openssl_stapling.c @@ -32,6 +32,7 @@ typedef struct { X509*issuer; time_t valid; +time_t refresh; unsigned verify:1; unsigned loading:1; @@ -93,6 +94,8 @@ static int ngx_ssl_certificate_status_ca static void ngx_ssl_stapling_update(ngx_ssl_stapling_t *staple); static void ngx_ssl_stapling_ocsp_handler(ngx_ssl_ocsp_ctx_t *ctx); +static time_t ngx_ssl_stapling_time(ASN1_GENERALIZEDTIME *asn1time); + static void ngx_ssl_stapling_cleanup(void *data); static ngx_ssl_ocsp_ctx_t *ngx_ssl_ocsp_start(void); @@ -462,7 +465,9 @@ ngx_ssl_certificate_status_callback(ngx_ staple = data; rc = SSL_TLSEXT_ERR_NOACK; -if (staple-staple.len) { +if (staple-staple.len + staple-valid = ngx_time()) +{ /* we have to copy ocsp response as OpenSSL will free it by itself */ p = OPENSSL_malloc(staple-staple.len); @@ -490,7 +495,7 @@ ngx_ssl_stapling_update(ngx_ssl_stapling ngx_ssl_ocsp_ctx_t *ctx; if (staple-host.len == 0 -|| staple-loading || staple-valid = ngx_time()) +|| staple-loading || staple-refresh = ngx_time()) { return; } @@ -532,6 +537,7 @@ ngx_ssl_stapling_ocsp_handler(ngx_ssl_oc u_char*p; intn; size_t len; +time_t now, valid; ngx_str_t response; X509_STORE*store; STACK_OF(X509)*chain; @@ -542,6 +548,7 @@ ngx_ssl_stapling_ocsp_handler(ngx_ssl_oc ASN1_GENERALIZEDTIME *thisupdate, *nextupdate; staple = ctx-data; +now = ngx_time(); ocsp = NULL; basic = NULL; id = NULL; @@ -629,17 +636,28 @@ ngx_ssl_stapling_ocsp_handler(ngx_ssl_oc goto error; } +valid = ngx_ssl_stapling_time(nextupdate); +if (valid == (time_t) NGX_ERROR) { +ngx_log_error(NGX_LOG_ERR, ctx-log, 0, + invalid nextUpdate time in certificate status); +goto error; +} + OCSP_CERTID_free(id); OCSP_BASICRESP_free(basic); OCSP_RESPONSE_free(ocsp); +id = NULL; +basic = NULL; +ocsp = NULL; + /* copy the response to memory not in ctx-pool */ response.len = len; response.data = ngx_alloc(response.len, ctx-log); if (response.data == NULL) { -goto done; +goto error; } ngx_memcpy(response.data, ctx-response-pos, response.len); @@ -653,11 +671,15 @@ ngx_ssl_stapling_ocsp_handler(ngx_ssl_oc } staple-staple = response; +staple-valid = valid; -done: +/* + * refresh before the response expires, + * but not earlier than in 5 minutes, and at least in an hour + */ staple-loading = 0; -staple-valid = ngx_time() + 3600; /* ssl_stapling_valid */ +staple-refresh = ngx_max(ngx_min(valid - 300, now + 3600), now + 300); ngx_ssl_ocsp_done(ctx); return; @@ -665,7 +687,7 @@ done: error: staple-loading = 0; -staple-valid = ngx_time() + 300; /* ssl_stapling_err_valid */ +staple-refresh = now + 300; if (id) { OCSP_CERTID_free(id); @@ -683,6 +705,40 @@ error: } +static time_t +ngx_ssl_stapling_time(ASN1_GENERALIZEDTIME *asn1time) +{ +u_char *value; +size_t len; +time_t time; +BIO *bio; + +/* + * OpenSSL doesn't provide a way to convert ASN1_GENERALIZEDTIME + * into time_t. To do this, we use ASN1_GENERALIZEDTIME_print(), + * which uses the MMM DD HH:MM:SS [GMT] format (e.g., + * Feb 3 00:55:52 2015 GMT), and parse the result. + */ + +bio = BIO_new(BIO_s_mem()); +if (bio == NULL) { +return NGX_ERROR; +} + +/* fake weekday prepended to match C asctime() format */ + +BIO_write(bio, Tue , sizeof(Tue ) - 1); +ASN1_GENERALIZEDTIME_print(bio, asn1time); +len = BIO_get_mem_data(bio, value); + +time = ngx_parse_http_time(value, len); + +BIO_free(bio); + +return time; +} + + static void ngx_ssl_stapling_cleanup(void *data) { ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: Fix windows issue with multiple workers
Hi, I've forgotten to free the shmem, thus enclosed an amendment with clean-up, relative last changeset. Regards, sebres. 10.06.2015 21:48, Sergey Brester: Hi, enclosed you will find an attached changeset, that contains fix for windows issue with multiple workers (once listening - only one made any work). If someone needs a git version of it: https://github.com/sebres/nginx/pull/1/files [2] Here [3] you may find a benchmark comparison for that (1 worker column - measured before fix). -- Shortly about fix algorithm (changes related are marked as [*], unchanged - [-]): - master process create all listener; - [cycle] master process create a worker; * [win32] master calls `ngx_share_listening_sockets`: each listener share (inheritance) info for pid of this worker (cloned via WSADuplicateSocket), that will be saved in shmem; - master process wait until worker will send an event worker_nnn; * [win32] worker process executes `ngx_get_listening_share_info` to obtain shared info, protocol structure that can be used to create a new socket descriptor for a shared socket; * [win32] worker process creates all listener sockets using given shared info of master; - worker process sets an event worker_nnn; - master process create next worker, repeat [cycle]. -- @Maxim Dounin: 1) your suggested way with shared handle and bInheritHandle does not work, because of: [quote] Sockets. No error is returned, but the duplicate handle may not be recognized by Winsock at the target process. Also, using DUPLICATEHANDLE interferes with internal reference counting on the underlying object. To duplicate a socket handle, use the WSADUPLICATESOCKET function. [/quote] 2) proposal to use an environment instead of shared memory can not work also, because sharing via WSADuplicateSocket should already know a pid of target process, that uses this handle - specially shared for each worker. BTW, using of `accept_mutex` was disallowed for win32, cause of possible deadlock if grabbed by a process which can't accept connections. Because, this is fixed now, I have removed this restriction in separated commit. But I think, accept_mutex is not needed in win32 resp. with accept_mutex it is much slower as without him. So, whats about set default of `accept_mutex` to `off` on windows platform? BTW[2], I have executed extensive tests of this fix, also with reloading (increase/decrease `worker_processes`), restarting, as well as auto-restarting of worker, if it was crashed (ex.: have sporadically killed some worker). Regards, Serg G. Brester (aka sebres). ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel [1] Links: -- [1] http://mailman.nginx.org/mailman/listinfo/nginx-devel [2] https://github.com/sebres/nginx/pull/1/files [3] https://github.com/sebres/nginx/pull/1 # HG changeset patch # User sebres serg.bres...@sebres.de # Date 1434027119 -7200 # Thu Jun 11 14:51:59 2015 +0200 # Node ID 76ee2fe9300bdcf0dbf4a05e3ed7a1136b324eb7 # Parent e40ee60150e47616d86fdee90f62f0f88c4b1e80 clean-up amendment for windows issue with multiple workers: free shared memory for inherited protocol info; diff -r e40ee60150e4 -r 76ee2fe9300b src/core/ngx_connection.c --- a/src/core/ngx_connection.c Wed Jun 10 19:39:18 2015 +0200 +++ b/src/core/ngx_connection.c Thu Jun 11 14:51:59 2015 +0200 @@ -641,6 +641,12 @@ ngx_open_listening_sockets(ngx_cycle_t * return NGX_ERROR; } +#if (NGX_WIN32) +if (ngx_process NGX_PROCESS_MASTER) { +ngx_free_listening_share(cycle); +} +#endif + return NGX_OK; } @@ -906,6 +912,10 @@ ngx_close_listening_sockets(ngx_cycle_t ngx_log_debug2(NGX_LOG_DEBUG_CORE, cycle-log, 0, [%d] close %d listener(s), ngx_process, cycle-listening.nelts); +#if (NGX_WIN32) +ngx_free_listening_share(cycle); +#endif + ngx_accept_mutex_held = 0; ngx_use_accept_mutex = 0; diff -r e40ee60150e4 -r 76ee2fe9300b src/os/win32/ngx_socket.c --- a/src/os/win32/ngx_socket.c Wed Jun 10 19:39:18 2015 +0200 +++ b/src/os/win32/ngx_socket.c Thu Jun 11 14:51:59 2015 +0200 @@ -79,6 +79,17 @@ ngx_int_t ngx_get_listening_share(ngx_cy } +void ngx_free_listening_share(ngx_cycle_t *cycle) +{ +if (shm_listener.addr) { + +ngx_shm_free(shm_listener); +shm_listener.addr = NULL; + +} +} + + ngx_shared_socket_info ngx_get_listening_share_info(ngx_cycle_t *cycle, ngx_pid_t pid) { diff -r e40ee60150e4 -r 76ee2fe9300b src/os/win32/ngx_socket.h --- a/src/os/win32/ngx_socket.h Wed Jun 10 19:39:18 2015 +0200 +++ b/src/os/win32/ngx_socket.h Thu Jun 11 14:51:59 2015 +0200 @@ -211,6 +211,7 @@ typedef WSAPROTOCOL_INFO * ngx_shared_so ngx_shared_socket_info ngx_get_listening_share_info(ngx_cycle_t *cycle, ngx_pid_t pid); +void
Re: [PATCH 1 of 2] Configure: fix tests with multi-level relative build directory
Hello! On Thu, Jun 11, 2015 at 11:29:38PM +0300, Ruslan Ermilov wrote: On Thu, Jun 11, 2015 at 05:18:16PM +0300, Maxim Dounin wrote: On Thu, Jun 11, 2015 at 11:51:57AM +0300, Ruslan Ermilov wrote: On Wed, Jun 10, 2015 at 07:19:29PM -0700, Piotr Sikora wrote: # HG changeset patch # User Piotr Sikora pi...@cloudflare.com # Date 1433989099 25200 # Wed Jun 10 19:18:19 2015 -0700 # Node ID 4ee03ff4811708bafd07e84c5a71165a52b38299 # Parent c041f1e0655f786db5cf1a3e79ca1f464fec0258 Configure: fix tests with multi-level relative build directory. Signed-off-by: Piotr Sikora pi...@cloudflare.com diff -r c041f1e0655f -r 4ee03ff48117 auto/unix --- a/auto/unix Wed Jun 10 19:18:20 2015 +0300 +++ b/auto/unix Wed Jun 10 19:18:19 2015 -0700 @@ -510,7 +510,7 @@ case $NGX_AUTO_CONFIG_H in NGX_INCLUDE_AUTO_CONFIG_H=#include \$NGX_AUTO_CONFIG_H\ ;; *) -NGX_INCLUDE_AUTO_CONFIG_H=#include \../$NGX_AUTO_CONFIG_H\ +NGX_INCLUDE_AUTO_CONFIG_H=#include \$PWD/$NGX_AUTO_CONFIG_H\ ;; esac How's this instead? diff --git a/auto/unix b/auto/unix --- a/auto/unix +++ b/auto/unix @@ -505,14 +505,7 @@ ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_s # POSIX types -case $NGX_AUTO_CONFIG_H in -/*) -NGX_INCLUDE_AUTO_CONFIG_H=#include \$NGX_AUTO_CONFIG_H\ -;; -*) -NGX_INCLUDE_AUTO_CONFIG_H=#include \../$NGX_AUTO_CONFIG_H\ -;; -esac +NGX_INCLUDE_AUTO_CONFIG_H=#include \ngx_auto_config.h\ ngx_type=uint64_t; ngx_types=u_int64_t; . auto/types/typedef Shouldn't it be just a string in auto/types/sizeof then? Originally I've implemented it exactly like you say, but then thought that I'd probably worth to preserve the optimization -- i.e. we only include ngx_auto_config.h for types that we might have typedef'ed earlier. Well, I'm fine either way. Feel free to commit. -- Maxim Dounin http://nginx.org/ ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel