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.9 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,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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 B73D31F463 for ; Mon, 30 Dec 2019 20:11:43 +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=d+CV sQctcm5QZEKYbRwHE3h3nd0CCdgFGS/IAWQGh8ReUYOmPIVfPv/27bZh7xwF4dLS t4/mZo8IPOu4PeIOEnpW7egcs9QplizgXjQHAqIcqZ6+HB46rbcEUi9BVd+GeVrM 8rGDLv82ytwd/ZlUTmHuaB6gXVeqZlHfOvD8pKI= 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=ylDAEClkFs RJOxjj+6a6L7Ekcow=; b=yZ9F0qM88cCT7dsGd3FxtNYqEGy83i+MP5DYviW/fc wsgH8FSbFIypXa4IJdTCm3Y9CwGUdSjLkqafhLiNQDIu/r3Cnu6E3D+16Lrwm6rk bt51sCnTmY3dNuCm5HATSE4rDADArCrIlghpW/jSNnsPHmJR8fdp8JhVt3dmkQC+ 0= Received: (qmail 15645 invoked by alias); 30 Dec 2019 20:11:40 -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 15620 invoked by uid 89); 30 Dec 2019 20:11:37 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mout.kundenserver.de MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Mon, 30 Dec 2019 21:11:14 +0100 Message-ID: Subject: Re: 32-bit time_t inside itimerval To: Alistair Francis Cc: GNU C Library , Alistair Francis , Lukasz Majewski Content-Type: text/plain; charset="UTF-8" On Mon, Dec 30, 2019 at 8:57 PM Alistair Francis wrote: > On Mon, Dec 30, 2019 at 2:02 AM Arnd Bergmann wrote: > > On Sat, Dec 21, 2019 at 6:19 PM Alistair Francis wrote: > > > For the glibc people, can we do something like this? > > > > > > 1. Add a __old_timeval struct used by the itimerval and rusage structs > > > 2. Make __old_timeval use __old_time_t that is always a long (no > > > matter what time_t really is) > > > > If you have linux-5.1 kernel headers, there is already __kernel_old_timeval > > that is defined specifically for this purpose. Not sure if you can use those > > given the state of the kernel headers overall. > > > > > Then the question becomes do we expose __old_timeval (with 32-bit > > > time_t) or the real timeval (64-bit time_t) to callers of the > > > functions? > > > > I would think this has to be the actual timeval, there is no point in > > changing the API now. > > Yeah, agreed. I have updated the RV32 port to internally convert > between 32/64-bit. Any chance of making this the default implementation for 32-bit rather than RV32 specific? The code should be the same for any time64 user space regardless of the architecture. Arnd