Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 2 of 2] Core: remove NGX_TIME_T_SIZE

Maxim Dounin
July 07, 2016 09:14PM
Hello!

On Mon, Jun 27, 2016 at 06:30:03PM -0700, Piotr Sikora wrote:

> # HG changeset patch
> # User Piotr Sikora <piotrsikora@google.com>
> # Date 1467064810 25200
> # Mon Jun 27 15:00:10 2016 -0700
> # Node ID a2892701d91e6aba62719b54792e1e14eeea11a0
> # Parent 1059f59c44039020843ced5bca39f165c322bacb
> Core: remove NGX_TIME_T_SIZE.
>
> Replace ./configure-time test with equivalent compile-time test.
>
> Signed-off-by: Piotr Sikora <piotrsikora@google.com>
>
> diff -r 1059f59c4403 -r a2892701d91e auto/unix
> --- a/auto/unix
> +++ b/auto/unix
> @@ -624,7 +624,6 @@ ngx_param=NGX_MAX_OFF_T_VALUE; ngx_value
> ngx_param=NGX_OFF_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
>
> ngx_type="time_t"; . auto/types/sizeof
> -ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
> ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
> ngx_param=NGX_MAX_TIME_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
>
> diff -r 1059f59c4403 -r a2892701d91e src/core/ngx_module.h
> --- a/src/core/ngx_module.h
> +++ b/src/core/ngx_module.h
> @@ -18,9 +18,7 @@
> #define NGX_MODULE_UNSET_INDEX (ngx_uint_t) -1
>
>
> -#define NGX_MODULE_SIGNATURE_0 \
> - ngx_value(NGX_PTR_SIZE) "," \
> - ngx_value(NGX_TIME_T_SIZE) ","
> +#define NGX_MODULE_SIGNATURE_0 ngx_value(NGX_PTR_SIZE) ","
>
> #if (NGX_HAVE_KQUEUE)
> #define NGX_MODULE_SIGNATURE_1 "1"

I don't think that size of time_t should be removed from module
signatures. E.g., OpenBSD switched to 64-bit time_t on 32-bit
hosts a couple of years ago, and I would expect similar things to
happen on other platforms as well. Signatures were designed to
prevent loading of incompatible modules in such cases.

It can be replaced with, e.g., NGX_TIME_T_LEN, but I don't see
reasoning behind these changes. Are you trying to make it
possible to build nginx as a multiarchitecture binary?

[...]

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 2 of 2] Core: remove NGX_TIME_T_SIZE

Piotr Sikora 443 June 27, 2016 09:32PM

Re: [PATCH 2 of 2] Core: remove NGX_TIME_T_SIZE

Maxim Dounin 213 July 07, 2016 09:14PM

Re: [PATCH 2 of 2] Core: remove NGX_TIME_T_SIZE

Piotr Sikora 172 July 13, 2016 02:02PM

Re: [PATCH 2 of 2] Core: remove NGX_TIME_T_SIZE

Maxim Dounin 188 July 13, 2016 03:02PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready