Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
July 13, 2016 03:02PM
Hello!

On Wed, Jul 13, 2016 at 11:00:06AM -0700, Piotr Sikora wrote:

> Hey Maxim,
>
> > 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.
>
> I'm aware of that change... I don't have a way to test this, but I
> assume that modules wouldn't load even without NGX_TIME_T_SIZE being
> in the signature, because of the libc and/or kernel ABI bump.
>
> Also, it's not clear to me why time_t is part of the signature, but
> ino_t and off_t (for example) aren't.

Because we don't have NGX_INO_T_SIZE/NGX_OFF_T_SIZE readily
available and decided that adding them don't worth the effort.

> > 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?
>
> Removal of values detected at the ./configure-time is one of the ways
> to enable cross-compilation, since the autotest binary cannot be run
> on the system running ./configure script.

For cross-compilation it might be more reasonable to use
static/compile-time assertions in auto/types/sizeof instead.
There were previous attempts to introduce such changes.

--
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 441 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 171 July 13, 2016 02:02PM

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

Maxim Dounin 187 July 13, 2016 03:02PM



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

Online Users

Guests: 260
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