From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78473 invoked by alias); 12 Aug 2019 22:11:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 78464 invoked by uid 89); 12 Aug 2019 22:11:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=Our X-HELO: mail-lj1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T+3kDm89rH3cxeaAoGbSk6Q8cZP9h3q3PdWa/dbRqAM=; b=gtDlMyYAwoGEV3NlYMKPxgoCYe26yPuhwJZygBpwenays9tMKyyngt9GDjia7e5uEB 3/nsFBjdXfbSDy99O2X3ky84a6k2aDM7QDuNbvaBAoA7YlT60qfBIZtNSkCIe0TRYiUU J1dOvo/he+7rWZKkXqEFmuJxeTeLyDkS14GjnMAQaJkAZu2X8Ie2I/OcP29JhQogBxXU 4ELLK5rfu35rcEBcNJkI0y1EBCs0/j4+S0iO65/SidlmINpQUEc/vkYDABJZ4b5NfZvK 7JWDKcr+ttoZEjez0BcviZafK57lg5COUFrfwDMsuT6XU6z1gKqk9Y3AC/RE/VmtEZiF bw8A== MIME-Version: 1.0 References: <53894e78c91ed5e037077f7249b85cefe635ae1f.1565398513.git.alistair.francis@wdc.com> In-Reply-To: From: Alistair Francis Date: Mon, 12 Aug 2019 22:11:00 -0000 Message-ID: Subject: Re: [RFC v4 07/24] time: Deprecate struct timezone members To: Zack Weinberg Cc: Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-08/txt/msg00263.txt.bz2 On Mon, Aug 12, 2019 at 8:42 AM Zack Weinberg wrote: > > On Fri, Aug 9, 2019 at 9:04 PM Alistair Francis > 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