[PATCH] login: Use unsigned 32-bit types for seconds-since-epoch

Paul Eggert eggert@cs.ucla.edu
Wed Apr 3 21:20:07 GMT 2024


On 4/3/24 11:39, Florian Weimer wrote:
> For consistency,
> if there is a 64-bit architecture that is coinstallable, define
> __WORDSIZE_TIME64_COMPAT32 to 1 on the 32-bit architectyre as well.

Could you explain the advantage of consistency here? User code almost 
invariably assignes ut_tv.tv_sec to time_t (this is true of every 
instance I found of ut_tv in Gnulib source code, for example). So 
changing this field's type on platforms where time_t is 32 bits will 
likely be ineffective in practice, and might cause more problems than it 
cures.

Since the _TIME_BITS==32 world is going away anyway by 2038, it might be 
better to leave the field types unchanged in that world, to lessen 
compatibility glitches before that world gives up its ghost.



More information about the Libc-alpha mailing list