From patchwork Wed Dec 8 14:47:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1565249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=RD1OckBP; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J8Kph5NH0z9ssD for ; Thu, 9 Dec 2021 01:50:36 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E43963858434 for ; Wed, 8 Dec 2021 14:50:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E43963858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1638975033; bh=tV+pDHiqXhAZ0jLJ1ybmwZtDdnfF3HO17CDvFBRnnHA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=RD1OckBPGyN0jegYVFRNN+wC2nGJzxtvLQ6dzRepJyE+g9KdjEZaouR2kyUJayPf3 AZSh46ZqAW0EWkh8o9I1MeKCOMnGXNnJT/daYh+Cji186q2ERZymwxfLvfMrtP5r8h /BSN2cGVLGjWPmbBPhboatvTgRdVb7iJ9mv56gLw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 9C1073858434 for ; Wed, 8 Dec 2021 14:50:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C1073858434 Received: by mail-wm1-x32b.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso4332838wms.3 for ; Wed, 08 Dec 2021 06:50:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tV+pDHiqXhAZ0jLJ1ybmwZtDdnfF3HO17CDvFBRnnHA=; b=ce7mj36igcYfReAGMJFZrraNp+vaphf43uc5seTO3rh+wvGCOi7WF6FbdnnNXb1pGq OWfn7uH3Thxym3htKYJdy7s3XYlX82Rj5N5JtgoWc8SQVFXaL37ScF4nciyjKOJ1/P+g zg5SzOsDSR2GKg2irLYf+xbm3NSf5x4FQPF2Ur8EHUtBZB9dO3zP7LoRCYHwuZsZ5NqI zLvVKLlODlQge47KPI0eu7khItMx4aqK9A3Pe0TwfeqePK9RZTmNzwXStQd1aQQCn5RV WRX0yyIX4LemDkKp7375zX0oubmwgqp/dnRWcWBTrYbBVqw8fVWDIMZ/wnYX04mEi543 I7XQ== X-Gm-Message-State: AOAM530VsjEuZdof4IPg2bY9mxLVYEeyASr2K8eAQc0zcwi084fv7qiN x5TYl5o80cGftlqCbi0KBcgM13nf2fw= X-Google-Smtp-Source: ABdhPJyiHqaI7kjKnAqcCvcX8xUEJWyR0xhYLwOsMT8+SqionnV4z6PpcPJUGR6BMteUwTrp9gKHRg== X-Received: by 2002:a7b:cbd8:: with SMTP id n24mr16233958wmi.150.1638975018810; Wed, 08 Dec 2021 06:50:18 -0800 (PST) Received: from sqli.sqli.com ([195.53.121.100]) by smtp.googlemail.com with ESMTPSA id a9sm2990660wrt.66.2021.12.08.06.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 06:50:18 -0800 (PST) To: libc-alpha@sourceware.org Subject: [RFC v3 2/3] sys/types.h: struct timespec: Use __snseconds_t for tv_nsec Date: Wed, 8 Dec 2021 15:47:58 +0100 Message-Id: <20211208144757.37641-2-alx.manpages@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211207111957.8087-1-alx.manpages@gmail.com> References: <20211207111957.8087-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , Rich Felker , Stefan Puiu , Andreas Schwab , Michael Kerrisk , =?utf-8?b?0L3QsNCx?= , Jakub Wilk , Joseph Myers Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" The timespec(3) structure uses long for tv_nsec, except if __x86_64__ && __ILP32__, in which case it uses long long. Use __snseconds_t to simplify the definition of struct timespec. Link: linux-man Link: glibc Cc: наб Cc: Jakub Wilk Cc: Zack Weinberg Cc: Stefan Puiu Cc: Michael Kerrisk (man-pages) Cc: H.J. Lu Cc: Joseph Myers Cc: Rich Felker Cc: Andreas Schwab Cc: Paul Eggert Signed-off-by: Alejandro Colomar --- time/bits/types/struct_timespec.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/time/bits/types/struct_timespec.h b/time/bits/types/struct_timespec.h index 489e81136d..cc366590d9 100644 --- a/time/bits/types/struct_timespec.h +++ b/time/bits/types/struct_timespec.h @@ -18,14 +18,14 @@ struct timespec #if __WORDSIZE == 64 \ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64) - __syscall_slong_t tv_nsec; /* Nanoseconds. */ + __snseconds_t tv_nsec; /* Nanoseconds. */ #else # if __BYTE_ORDER == __BIG_ENDIAN - int: 32; /* Padding. */ - long int tv_nsec; /* Nanoseconds. */ + int: 32; /* Padding. */ + __snseconds_t tv_nsec; /* Nanoseconds. */ # else - long int tv_nsec; /* Nanoseconds. */ - int: 32; /* Padding. */ + __snseconds_t tv_nsec; /* Nanoseconds. */ + int: 32; /* Padding. */ # endif #endif };