autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On time64 and Large File Support


From: Paul Eggert
Subject: Re: On time64 and Large File Support
Date: Sat, 12 Nov 2022 10:33:40 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2022-11-11 20:20, Wookey wrote:
It doesn't seem right to me that AC_SYS_LARGEFILE should imply
AC_SYS_YEAR2038. What is the reasoning behind that?

First, in Autoconf git AC_SYS_LARGEFILE does not imply AC_SYS_YEAR2038. The former is willing to fall back on 32-bit time_t if 64-bit is not available. The latter errors out unless 64-bit time_t is available.

Second and to answer your question, the intent of AC_SYS_LARGEFILE has always been, "I want open, stat, lseek, etc. to work on all files, and I don't want them to fail with errno==EOVERFLOW simply because my integer types are too narrow".

For this to work with glibc 2.34+ on x64 and arm GNU/Linux, time_t must be 64 bits just as off_t, dev_t etc must be 64 bits; otherwise syscalls like 'stat' stop working on some files. These failures can have security implications. Many software developers, even in the security arena, haven't thought through the implications of EOVERFLOW and their programs do the wrong thing with EOVERFLOW.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]