From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id D157A3858D28 for ; Tue, 7 Dec 2021 18:20:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D157A3858D28 Received: by mail-wm1-x32f.google.com with SMTP id n33-20020a05600c502100b0032fb900951eso2394781wmr.4 for ; Tue, 07 Dec 2021 10:20:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=9YRZpdiL8Qtqj/ec6DEkq2YK/AQzR68rudF1qTmvRU0=; b=bV147jBSY+fO1kseUlUQlpEStQm1/YrX4V+MaCNvQwA+//3rf792/PE1u/YlW5RFhY lOmTzLWrx5OMf3rr59Z70vg0uuLpEIV0Z/7FWdhQjI6Lzdw6smpf7x0h2AhrwYlpiMdQ I1fNfF25v9x2K2upUUCA25vL0iphGEAmNs3K33xz4Yk8PeiVIpXL3G8/wHJDngxz8lQg JSMFXBCavMgixWaYVrzLS4b+kLccnj4A/uSXRUqtQ5C02+lyfq8Lw6IAud02oGMnwkvF Lrg3Y/onO7HrJUNfSw0bvAPU8Q4XoamjziJl6LZUfbZAjMMf5f8jd7yf1O36u91PRiNM UO9w== X-Gm-Message-State: AOAM530Gw+NuIiB9YVlm8iUKhoYPjhpuiez5v6IjNBa2gxwFlZ1CGnL3 v4x1AZ5k9OJL9xRb0PlFrrI= X-Google-Smtp-Source: ABdhPJzL8dbnDHfqoCoa56nvWVsC8hrRjMpk/PTR59p9jNAImhQcucZSwz3NRlL7d1CRAYTXObo4ZA== X-Received: by 2002:a05:600c:3d1a:: with SMTP id bh26mr8891538wmb.5.1638901210998; Tue, 07 Dec 2021 10:20:10 -0800 (PST) Received: from [10.8.0.26] ([195.53.121.100]) by smtp.gmail.com with ESMTPSA id t8sm403725wmq.32.2021.12.07.10.20.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Dec 2021 10:20:10 -0800 (PST) Message-ID: <114d5ecb-d64e-0b62-4aea-88cc31da80ea@gmail.com> Date: Tue, 7 Dec 2021 19:20:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH] sys/types.h: Define new types: [s]nseconds_t Content-Language: en-US To: =?UTF-8?B?0L3QsNCx?= Cc: libc-alpha@sourceware.org, Jakub Wilk , Zack Weinberg , Stefan Puiu , Michael Kerrisk References: <20211207111957.8087-1-alx.manpages@gmail.com> <20211207131750.h2quh3di6ml3psbz@tarta.nabijaczleweli.xyz> From: "Alejandro Colomar (man-pages)" In-Reply-To: <20211207131750.h2quh3di6ml3psbz@tarta.nabijaczleweli.xyz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RAZOR2_CF_RANGE_51_100, RAZOR2_CHECK, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2021 18:20:13 -0000 Hi наб, On 12/7/21 14:17, наб wrote: > On Tue, Dec 07, 2021 at 12:19:58PM +0100, Alejandro Colomar wrote: >> For symmetry with the existing [s]useconds_t types. > If you'd hold on to your horses, like, until the next WG14 meeting, > turns out I know a guy who knows a guy, but my guy is the WG14 project > editor, and I'm like, a day's away from getting an N number and turns > out getting your "C defect" paper through is pretty easy if you don't > have to sit in an NB meeting yourself. > (Granted, this wouldn't have to be a paper at all if this were C++, > but this is pretty good as-is.) Sounds great! :) I'll continue with my glibc patch as a draft, to learn how glibc types are defined (there's a lot of magic I still need to learn), but will wait for the results of your C2X proposal before merging this to glibc. As Zack suggested, an unsigned version is probably unnecessary, so I'll use nsec_t for the patches, as you used in your draft. I like short names, and also signed types. > > You can find my current draft: > https://srhtcdn.githack.com/~nabijaczleweli/wg14/blob/868d3e096db0fe4378d77cd67215bed56045196d/N%3F%3F%3F%3F.pdf It looks good. Would you mind sharing the source code of your pdf? I'm curious to learn to write those papers. Also, please CC me when you have any news on that :) > accepting this would mean just a > typedef decltype(struct timespec::tv_nsec) nsec_t; > to make the implementation C2X conformant again. Hmm, not sure if it would be better for glibc to define nsec_t in terms of timespec, or the other way around. I had in mind something like the following: Here would go many ifdefs: typedef /* probably */ long nsec_t; And this would be clean: struct timespec { ... nsec_t tv_nsec; }; Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/