From patchwork Mon Oct 19 19:13:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 40757 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 72F14388EC31; Mon, 19 Oct 2020 19:13:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72F14388EC31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603134795; bh=/G7LNG1Ejonmwtdeq+/AhfxioLMTVJY1KfXuoW/9L5o=; 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=nlRmedp9qLYE+FMSUBm07RounvrBpNO2nwaJdzrE0UWQKWYK0NSJyQMcYssBuxbdJ +NDJGZSp3UJGNhtMarr8hxEdKwk6SJZGhtxw4Z6tXGbfWbLzNphpDiGliMWFcXFweX rN8Fnmdg5gYecknwjwD+/pSYfoz4KI/dM7z19Aj4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by sourceware.org (Postfix) with ESMTPS id 194FB388EC23 for ; Mon, 19 Oct 2020 19:13:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 194FB388EC23 Received: by mail-qt1-x829.google.com with SMTP id c5so624428qtw.3 for ; Mon, 19 Oct 2020 12:13:12 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/G7LNG1Ejonmwtdeq+/AhfxioLMTVJY1KfXuoW/9L5o=; b=iX8UWAsohG1flv1W60QLKcwvFdn5sBzLoMNsIy3AdtQogRYZyh+EAdap2GdC+UlLM4 wDjkP0zKvsmXFoxrBiNOaXyF9fKX/TXhjVDnKizyZmbSpBVXBveQHsT1xsVJYVYvrpY1 TWlFc7GrynGfoOLzFmNyfvGmGjz02FgrTrZvmC7sysuOfNaVwiXs3Nb37iLcP8bMZCXT 0EH+Hk0ifMw16x1pQAsjlMSRY2pe5qpc3tLdgLOfH77LpskPM8RZGv7tMauA92F48eit BLXiNZKN2WiyNh0SU+STQahd6sGg664L8Tc8/Oq0YvHVjBmwgLp6TvwTpNS2RKgKFV8U zhww== X-Gm-Message-State: AOAM533jKjUlTaBDkqpmP5SOjvyjZIxzgQ4hPh7OQoxQNvVo4tfnGj74 n/6f/6b+R2zAMx9qphuSLEgHCkRSq3EFdQ== X-Google-Smtp-Source: ABdhPJyWC2eNrMHruOolUsHbRlChmxzMccq3VrEMsQ59Ynkvxzw/sWyVKwkTm0DNmAroqlSMuJKNAQ== X-Received: by 2002:aed:2c47:: with SMTP id f65mr937390qtd.328.1603134791423; Mon, 19 Oct 2020 12:13:11 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id a20sm343404qtk.67.2020.10.19.12.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 12:13:10 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 2/2] time: Add 64-bit time_t support for ftime Date: Mon, 19 Oct 2020 16:13:04 -0300 Message-Id: <20201019191304.3471080-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201019191304.3471080-1-adhemerval.zanella@linaro.org> References: <20201019191304.3471080-1-adhemerval.zanella@linaro.org> 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, 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 Reply-To: Adhemerval Zanella Cc: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" It basically calls the 64-bit __clock_gettime64 and adds the overflow check. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski --- include/bits/types/struct_timeb.h | 1 + include/struct___timeb64.h | 16 ++++++++++++++++ include/sys/timeb.h | 12 ++++++++++++ time/Makefile | 2 +- time/bits/types/struct_timeb.h | 15 +++++++++++++++ time/ftime.c | 28 ++++++++++++++++++++++++---- time/sys/timeb.h | 12 +----------- 7 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 include/bits/types/struct_timeb.h create mode 100644 include/struct___timeb64.h create mode 100644 time/bits/types/struct_timeb.h diff --git a/include/bits/types/struct_timeb.h b/include/bits/types/struct_timeb.h new file mode 100644 index 0000000000..fef74d2f44 --- /dev/null +++ b/include/bits/types/struct_timeb.h @@ -0,0 +1 @@ +#include