From patchwork Wed Nov 11 15:50:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 41016 X-Patchwork-Delegate: l.majewski@majess.pl Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 891EC3985473; Wed, 11 Nov 2020 15:51:50 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id 6986C386103E for ; Wed, 11 Nov 2020 15:51:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6986C386103E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CWTk73Lwsz1qsbQ; Wed, 11 Nov 2020 16:51:43 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CWTk71VyCz1rYF7; Wed, 11 Nov 2020 16:51:43 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id BZg4yoaO65rq; Wed, 11 Nov 2020 16:51:40 +0100 (CET) X-Auth-Info: iqc/zL2/TkPtDL5P/5pLL+v4fij3TScQqJVPtAa5tYU= Received: from localhost.localdomain (89-64-5-98.dynamic.chello.pl [89.64.5.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 11 Nov 2020 16:51:40 +0100 (CET) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [PATCH] y2038: Export struct __timespec64 (as ./bits/types/struct___timespec64.h) Date: Wed, 11 Nov 2020 16:50:58 +0100 Message-Id: <20201111155058.15878-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , Cc: Florian Weimer , GNU C Library , Andreas Schwab , Stepan Golosunov , Alistair Francis Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" After this change the struct __timespec64 would be available as exported (installed) header file. As a result - in-glibc copy could be removed and just one instance would be used. After this change it was also necessary to adjust #include paths for struct___timespec64.h Build tests: ./src/scripts/build-many-glibcs.py glibcs --- A few questions regarding the above patch: 1. Is this approach acceptable? 2. I have had a question (posted to glibc-help) regarding the way headers are exported/installed in glibc: https://sourceware.org/pipermail/libc-help/2020-November/005549.html 3. Which approach shall be taken: -- The one which adjusts struct_timespec.h with __USE_TIME_BITS64, so still the struct timespec is used - as presented in: https://github.com/lmajewski/y2038_glibc/commit/cc68c0498f82697e6f87418e148a19ded2d5aec7#diff-8297a1191cc06a8a7af6fc6ac33af4bef2d7d72efd901d1634d910b56631e0c7R13 or -- The approach presented here - struct___timespec64.h is exported and struct timespec is aliased (via #define) to struct __timespec64 It would be crucial to have the consensus sooner than latter as it determines the work needed to provide patch enabling Y2038 support to glibc. --- include/bits/types/struct___timespec64.h | 1 + include/mqueue.h | 2 +- include/signal.h | 2 +- include/sys/select.h | 2 +- include/sys/stat.h | 2 +- include/time.h | 2 +- inet/net-internal.h | 2 +- login/logwtmp.c | 2 +- nscd/nscd_helper.c | 2 +- sysdeps/unix/sysv/linux/include/sys/sem.h | 2 +- time/Makefile | 3 ++- {include => time/bits/types}/struct___timespec64.h | 4 ++-- time/bits/types/struct_timespec.h | 5 +++++ 13 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 include/bits/types/struct___timespec64.h rename {include => time/bits/types}/struct___timespec64.h (92%) diff --git a/include/bits/types/struct___timespec64.h b/include/bits/types/struct___timespec64.h new file mode 100644 index 0000000000..5904500b5e --- /dev/null +++ b/include/bits/types/struct___timespec64.h @@ -0,0 +1 @@ +#include