This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC v4 07/24] time: Deprecate struct timezone members


On Mon, Aug 12, 2019 at 8:42 AM Zack Weinberg <zackw@panix.com> wrote:
>
> On Fri, Aug 9, 2019 at 9:04 PM Alistair Francis
> <alistair.francis@wdc.com> wrote:
> >
> > Append the struct timezone members with '_dep'. This indicates that
> > these members are deprecated and will cause build failures on code that
> > is currently using the members.
>
> I had been working on a more thorough version of this patch, one that
> removed these fields altogether (replacing them with `char
> __preserve_historic_size[2*sizeof(int)]`) and changed _all_ of the
> code that touches them, within glibc, to either ignore the fields or
> zero them out.  This patch tripped over an Alpha-only ABI headache
> (Alpha has compatibility versions of both gettimeofday and
> settimeofday) and then I ran out of time to work on it.
>
> In view of the reported behavior of systemd, though, I now think
> neither your approach nor mine is exactly what we should do.  We
> should do something along these lines for the next release:
>
>  - We should _not_ rename the fields of struct timezone, but we should
> mark them __attribute_deprecated__ so that code still using them
> triggers compile warnings.

This sounds good to me

>  - We should do the same for the timezone fields of struct timeb.
>  - Our implementation of gettimeofday should always pass NULL for
> struct timezone to the kernel, and write zeroes to any struct timezone
> argument that is supplied.  (This will transitively apply to ftime.)

I don't think this is the right idea here and reading further down the
list it seems like not everyone is on board.

>  - We should leave settimeofday alone until the kernel has an
> alternative means of doing the "RTC clock warp" thing that systemd is
> trying to do.

Agreed, at least for systems that have a settimeofday syscall.

>
> Do you have time to work that patch up?  You can get my
> patch-in-progress from
> https://sourceware.org/git/?p=glibc.git;a=log;h=refs/heads/zack/gtod-no-timezone
> (please grab at least the changes to manual/time.texi).  If you don't
> have time, I will try to find time to work on it this week.

I do have time and am happy to do it, the problem is that WDC still
doesn't have a FSF contributor agreement so from my understanding the
patch couldn't be applied.

Alistair

>
> zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]