From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 385F61F462 for ; Fri, 26 Jul 2019 13:08:58 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=oKWp EFtPQeYN5hRtE0ec0NziHW6NFqJnO+igNhd2V/BlWUkP8o+eJJzDhJVZn0E8MMLr Hyr003yoouHoZ9EEgUgv1IQFO0xqQNClwIkj7OUK6BzN5R9EKTCSrDE8QU9W7bAA /CsK5e7yHygB8jKQLhBgI24FAoIE7AbKo2KmE/4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=FzWVjDyjcX onGC5+jiV+CyzvM7M=; b=HoWLhVqZydVTLm9PMPKhCwLv3Fi+KuUs+1OiTXm45p 48tuQm4/nDTvHZKkj9zpZUBlC89UTaRgAoBTxtFxv62+gTAuaEKZgo2JX1a5jzW6 IxZwUb6ae/8wmzQms7+gKvCeaNmgezOibKcYrD+KyHVZIGNLi1xDvrzywA0S43xS A= Received: (qmail 77642 invoked by alias); 26 Jul 2019 13:08:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 77633 invoked by uid 89); 26 Jul 2019 13:08:56 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mailbackend.panix.com MIME-Version: 1.0 References: <4ec24dc5-ca74-82cd-5116-c6d76688765f@cs.ucla.edu> <87lfwlar0j.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87lfwlar0j.fsf@oldenburg2.str.redhat.com> From: Zack Weinberg Date: Fri, 26 Jul 2019 09:08:40 -0400 Message-ID: Subject: Re: [RFC v2 07/20] sysdeps/gettimeofday: Use clock_gettime64 if avaliable To: Florian Weimer Cc: Arnd Bergmann , Paul Eggert , Alistair Francis , Joseph Myers , Alistair Francis , GNU C Library , Adhemerval Zanella , Palmer Dabbelt , macro@wdc.com, Zong Li , Zong Li Content-Type: text/plain; charset="UTF-8" On Fri, Jul 26, 2019 at 9:01 AM Florian Weimer wrote: > > * Arnd Bergmann: > > > On Thu, Jul 25, 2019 at 7:21 PM Zack Weinberg wrote: > >> > >> On Thu, Jul 25, 2019 at 1:03 PM Paul Eggert wrote: > >> > > >> > Arnd Bergmann wrote: > >> > > If we want to keep > >> > > the traditional settimeofday()/gettimeofday() behavior working, a new > >> > > kernel interface could be added > >> > > >> > Let's not. That behavior was a bad idea even in the 1980s, and applications > >> > stopped using it decades ago. It has been completely obsoleted by TZ strings. > >> > >> Do we think we could get away with having both functions fail (with > >> EINVAL) whenever the tz argument is non-null? > > > > From my findings at Debian code search, I found code like > > > > struct timeval my_gettime(void) > > { > > struct timezone tz_ignored; > > struct timeval tv; > > gettimeofday(&tv, &tz_ignored); > > return tv; > > } > > > > In this case, the safer choice would be to silently ignore it. > > > > Another alternative would be to hide the definition of 'struct timezone' > > in the libc headers and only leave a forward declaration. > > Renaming the struct timezone members might be sufficient. Then the code > above would still compile, but something that actually depends on the > struct timezone data would not. I like this idea. We could escalate to hiding the definition later. zw