First draft of the Y2038 design document

Paul Eggert eggert@cs.ucla.edu
Tue Oct 27 22:20:00 GMT 2015


On 10/27/2015 02:42 PM, Rich Felker wrote:
> whether a function accesses the environment is a part
> of its interface contract.

Sure, but part of the POSIX contract is that the application must set TZ 
(if it sets it at all) to a value that POSIX allows. If the application 
doesn't follow the application's part of contract, the implementation 
need not follow the implementation's part (some of which you quoted). If 
an application messes with PATH, for example, it might not get standard 
behavior. Likewise if it messes with LC_ALL, SHELL, ENV, 
POSIXLY_CORRECT, and so forth. TZ is just another variable on this list.

POSIX places constraints on what applications can do with the 
environment, and applications that violate these constraints do so at 
their peril. Glibc does not go out of its way to break nonconforming 
applications, but it can and does give nonconforming applications some 
useful behavior that would otherwise violate POSIX.



More information about the Libc-alpha mailing list