This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 04/10] Use clock_settime to implement settimeofday.
- From: Zack Weinberg <zackw at panix dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Florian Weimer <fweimer at redhat dot com>, Lukasz Majewski <lukma at denx dot de>, Alistair Francis <alistair23 at gmail dot com>, Stepan Golosunov <stepan at golosunov dot pp dot ru>, Arnd Bergmann <arnd at arndb dot de>, Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Date: Tue, 3 Sep 2019 10:44:52 -0400
- Subject: Re: [PATCH v2 04/10] Use clock_settime to implement settimeofday.
- References: <20190828153236.18229-1-zackw@panix.com> <20190828153236.18229-5-zackw@panix.com> <ea6b2f56-6892-9a6d-64df-a30aa7b485eb@linaro.org>
On Mon, Sep 2, 2019 at 9:22 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
> > The vestigial "set time zone" feature of settimeofday complicates the
> > generic settimeofday implementation a little. The only remaining uses
> > of this feature that aren't just bugs, are using it to inform the
> > Linux kernel of the offset between the hardware clock and UTC, on
> > systems where the hardware clock doesn't run in UTC (usually because
> > of dual-booting with Windows). There currently isn't any other way to
> > do this. However, the callers that do this call settimeofday with
> > _only_ the timezone argument non-NULL. Therefore, glibc's new
> > behavior is: callers of settimeofday must supply one and only one of
> > the two arguments. If both arguments are non-NULL, or both arguments
> > are NULL, the call fails and sets errno to EINVAL.
>
> We definitely need a NEWS entry for this change.
NEWS entries for the complete patchset are in the final patch of the
series (with the manual changes).
zw