From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 56C9E385840F for ; Thu, 23 Feb 2023 16:17:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 56C9E385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x32a.google.com with SMTP id c2-20020a9d6842000000b0068bc93e7e34so2360999oto.4 for ; Thu, 23 Feb 2023 08:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677169059; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CBsKhqyGB6Lo2eG2sEsgkZyIhSNWVfd7EABPbCKHUJg=; b=SV9dlet+PoXyTKg8jk7HymvH+aXJmiiZJlj/D+z+ZbckLkyQvW1Vfk5q2OHnMCIULS Cm9wqYJxBW6bNCDUlaVWQfUMRPka/BrVZ0GLdo8y5gudoHQhRwhI5jp5pTdpJyurfABu VGKfJzM4sz0QI2dZ85BP9x4Evt5vj+xdHK4PReNtG90+AwnlEBq9x/z5qrF1JffG588E Q539R5l6bYTlFnA43LPtDaRmUOkiHevpBd9ptOfBvuQLbgFY/zdaIUxL3Mwm9E1G7w+/ pNTP467WuBfd998/6UNt32O7IRiS5VWKW3+BbWIlThJEFZGcgdJzXu3haQT2mEcqN6YG 8eSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677169059; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CBsKhqyGB6Lo2eG2sEsgkZyIhSNWVfd7EABPbCKHUJg=; b=ZrsD8dYV7o/oVue5vg6DkQWcN44hWHWpKeg4D3XzZsEJZadp4dKfH0AUH7xppLH7Jk 0azXg4MXMBsbtMU4Xxk9lfNDpAuuAIoqXF3fZrK0c3ND2Lt44mGhU9M8Ve6T6+IyNZIx FM9uhZeQBWb3RVF5Nagb2saTj88UQ7KIvj7SsaXX9QPiSseQvy+cRvB1/237HRgibovm 7n0l4suuJo00v8fLgx6F4XH9aprSLib9LZjgXFQN53u7ZKH4NnSFZDUXR+7VjiXk7KmB iFbSXwxI029OUthchJl+niPSrYW2ujfsWhu9lVvm0ajb4ikQymdXcg1ogqO6wixlGXVL z6fw== X-Gm-Message-State: AO0yUKXDRpT9dg8nJc/myOX24H181wfzcMhE0bYPFIDxzAYTcngLtc1A cBL3OCbve6FU2osKnTDRkqh7Lw== X-Google-Smtp-Source: AK7set/pzV/1FwCSmQv6UKxdcA4lOvxs7At4En+1eryYGuK3qauF7H9oUu6ed+ItUvC8xTjrN8Jn2g== X-Received: by 2002:a05:6830:811:b0:68b:b534:c8e4 with SMTP id r17-20020a056830081100b0068bb534c8e4mr6377870ots.7.1677169059547; Thu, 23 Feb 2023 08:17:39 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c3:89be:8c1b:4e8b:6072:80c5? ([2804:1b3:a7c3:89be:8c1b:4e8b:6072:80c5]) by smtp.gmail.com with ESMTPSA id y10-20020a9d714a000000b0068bb6043362sm2731299otj.11.2023.02.23.08.17.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Feb 2023 08:17:38 -0800 (PST) Message-ID: <8b486af8-698e-33af-9494-69cd1891e3b2@linaro.org> Date: Thu, 23 Feb 2023 13:17:36 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH] support: use 64-bit time_t (bug 30111) Content-Language: en-US To: Andreas Schwab , libc-alpha@sourceware.org References: From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 23/02/23 12:55, Andreas Schwab via Libc-alpha wrote: > Ensure to use 64-bit time_t in the test infrastructure. I sent a similar patchset some weeks ago [1]. It misses support_copy_file.c and support_descriptor_supports_holes.c, I can update it to cover it as well. [1] https://patchwork.sourceware.org/project/glibc/list/?series=17127 > --- > support/Makefile | 10 ++++++++++ > support/support_can_chroot.c | 4 ++-- > support/support_copy_file.c | 2 +- > support/support_descriptor_supports_holes.c | 2 +- > 4 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/support/Makefile b/support/Makefile > index b29b7eb505..1df57d10fc 100644 > --- a/support/Makefile > +++ b/support/Makefile > @@ -238,6 +238,16 @@ CFLAGS-support_paths.c = \ > CFLAGS-timespec.c += -fexcess-precision=standard > CFLAGS-timespec-time64.c += -fexcess-precision=standard > > +# Ensure that general support files use 64-bit time_t > +CFLAGS-support_can_chroot.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-support_copy_file.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-support_copy_file_range.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-support_descriptor_supports_holes.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-support_descriptors.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-support_stat_nanoseconds.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-support_test_main.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > +CFLAGS-test-container.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > + > ifeq (,$(CXX)) > LINKS_DSO_PROGRAM = links-dso-program-c > else > diff --git a/support/support_can_chroot.c b/support/support_can_chroot.c > index 7d9f91205d..7b4f491b53 100644 > --- a/support/support_can_chroot.c > +++ b/support/support_can_chroot.c > @@ -29,14 +29,14 @@ static void > callback (void *closure) > { > int *result = closure; > - struct stat64 before; > + struct stat before; > xstat ("/dev", &before); > if (chroot ("/dev") != 0) > { > *result = errno; > return; > } > - struct stat64 after; > + struct stat after; > xstat ("/", &after); > TEST_VERIFY (before.st_dev == after.st_dev); > TEST_VERIFY (before.st_ino == after.st_ino); > diff --git a/support/support_copy_file.c b/support/support_copy_file.c > index 50ff87b9f1..f3e0a2d1b7 100644 > --- a/support/support_copy_file.c > +++ b/support/support_copy_file.c > @@ -24,7 +24,7 @@ > void > support_copy_file (const char *from, const char *to) > { > - struct stat64 st; > + struct stat st; > xstat (from, &st); > int fd_from = xopen (from, O_RDONLY, 0); > mode_t mode = st.st_mode & 0777; > diff --git a/support/support_descriptor_supports_holes.c b/support/support_descriptor_supports_holes.c > index 7af5934808..91db216bf0 100644 > --- a/support/support_descriptor_supports_holes.c > +++ b/support/support_descriptor_supports_holes.c > @@ -40,7 +40,7 @@ support_descriptor_supports_holes (int fd) > block_headroom = 32, > }; > > - struct stat64 st; > + struct stat st; > xfstat (fd, &st); > if (!S_ISREG (st.st_mode)) > FAIL_EXIT1 ("descriptor %d does not refer to a regular file", fd);