From patchwork Wed Oct 21 12:35:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 40797 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 E529D3953CEC; Wed, 21 Oct 2020 12:36:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E529D3953CEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603283775; bh=PIaNLGnaizGG1uBa8SotN6X731alnqXo2aCznVSzNsA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qhnYAQ874DwwVN+hHiTamkBTJJvU2puUY3nPtOyjVLke9IxBwaMG5PtkHMbZs7hRS uLRs4eS8iB9AAD2OvESmXuvFpCM8lnLhfH+ocPvEbXpDvWuGiTrg0BsIFCbXC3+xPw V4XbuyQ/OBdIqIuk7UpbLrN6FHu3yQGF8AKPxfKk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by sourceware.org (Postfix) with ESMTPS id 4A35B3851C03 for ; Wed, 21 Oct 2020 12:36:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4A35B3851C03 Received: by mail-qk1-x72a.google.com with SMTP id r7so2175378qkf.3 for ; Wed, 21 Oct 2020 05:36:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PIaNLGnaizGG1uBa8SotN6X731alnqXo2aCznVSzNsA=; b=tLaiveid4Z6BqI2HKpdwGzC5btOW8dihSDKLzNe6m9hxue0T0Mc1ghH+7Ram4j7zla YL1Jq/iEW0PLQZgR/lMAfF7cBId7CRa/6I6R3/flROe70HbpwYt0AR1pR7bMgYGt9vQ0 bH9Xd40VDHgrBVm1s973VZMgiEY2KP10qyhx0tgkDLVx0rFQKus4HpYNbUjHyChbzUTL UkYTj6wK/R/oc28f+1FZWi31veJ9Spt27Nbm6B0G8Nccd45XEGlwQGhhq5I9Kzg8gpFE k2wh+CuT0bgduawyxCwxdSOOIVSOdyorkkj0hrlOpLmV5EIGkx/xvjmRfjB959w29fBC yaCw== X-Gm-Message-State: AOAM533A6bkZiE0edDP0tUgX+ZWvWNcNsHTuAPUx0T4bxOjujdPKPUXC RBzj0z4Bxq5Y6qn3zgIrCDYVltdsrSPDgQ== X-Google-Smtp-Source: ABdhPJy7KhJmnKyFOCMRh9Ngb6mSDFU4GWSxTlHnft59yZ+5Vll/ZuPiaQkP0RukSvnoWOreMmfsNQ== X-Received: by 2002:a37:9f45:: with SMTP id i66mr2838518qke.418.1603283769295; Wed, 21 Oct 2020 05:36:09 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id l25sm1110830qtf.18.2020.10.21.05.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 05:36:08 -0700 (PDT) To: libc-alpha@sourceware.org, Florian Weimer Subject: [PATCH v2] Reinstate ftime and move define it for POSIX.1-2001 or older Date: Wed, 21 Oct 2020 09:35:59 -0300 Message-Id: <20201021123559.598864-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <87sga7x2i5.fsf@oldenburg2.str.redhat.com> References: <87sga7x2i5.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This patch revert "Move ftime to a compatibility symbol" (commit 14633d3e568eb9770a7e5046eff257113e0453fb). It as adds a deprecated message on ftime usage. Checked on x86_64-linux-gnu and i686-linux-gnu. --- NEWS | 6 +-- include/sys/timeb.h | 1 + .../unix/sysv/linux/riscv/rv32/libc.abilist | 1 + time/Makefile | 5 +-- time/ftime.c | 20 ++------- time/sys/timeb.h | 45 +++++++++++++++++++ time/tst-ftime.c | 38 ++++++---------- 7 files changed, 67 insertions(+), 49 deletions(-) create mode 100644 include/sys/timeb.h create mode 100644 time/sys/timeb.h diff --git a/NEWS b/NEWS index 6eb577a669..6105eb0b3e 100644 --- a/NEWS +++ b/NEWS @@ -37,10 +37,8 @@ Deprecated and removed features, and other changes affecting compatibility: implementations from HWCAP subdirectories are no longer loaded. Instead, the default implementation is used. -* The deprecated header and the ftime function have been - removed. To support old binaries, the ftime function continue to exist - as a compatibility symbol (on those architectures which had it). All - programs should use gettimeofday or clock_gettime instead. +* The deprecated ftime function is now only declared for POSIX.1-2001 or + older standard. Changes to build and runtime requirements: diff --git a/include/sys/timeb.h b/include/sys/timeb.h new file mode 100644 index 0000000000..9f4509c35e --- /dev/null +++ b/include/sys/timeb.h @@ -0,0 +1 @@ +#include