Message ID | 87cz97rv5u.fsf@oldenburg.str.redhat.com |
---|---|
State | Accepted |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> 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 A3A1E3855173 for <patchwork@sourceware.org>; Mon, 28 Nov 2022 14:50:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3A1E3855173 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669647000; bh=L+SZQRz309HSn3VfQR81Mrn293R0tcH4mhturLEav/c=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=enRc3jGQ1A9DGkoKOhcf1VD7m1ODTJSA5brZhZyeoUbOZgkGnCpafZBCORcIJSoqH GhIx075JIFDib0ld0kurQ0n1h2SZUxYV6ql/aPvLWIPQX3NRr6Q84ZeOEExok5Wv2W NEwJAIloBzMJstDb/t2fsmsK+Z7mwp1Hv6WVJ9rM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 583163855173 for <libc-alpha@sourceware.org>; Mon, 28 Nov 2022 14:49:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 583163855173 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-538-rotBy7qzNl-G8AAyVNkT2g-1; Mon, 28 Nov 2022 09:49:37 -0500 X-MC-Unique: rotBy7qzNl-G8AAyVNkT2g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57743101A56C for <libc-alpha@sourceware.org>; Mon, 28 Nov 2022 14:49:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2B0F1410DD9 for <libc-alpha@sourceware.org>; Mon, 28 Nov 2022 14:49:36 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v2] <time.h>: Make strptime available by default Date: Mon, 28 Nov 2022 15:49:33 +0100 Message-ID: <87cz97rv5u.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Florian Weimer <fweimer@redhat.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
[v2] <time.h>: Make strptime available by default
|
|
Commit Message
Florian Weimer
Nov. 28, 2022, 2:49 p.m. UTC
This matches what FreeBSD does. --- v2: Remove unneccesary parentheses. time/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: f704192911c6c7b65a54beab3ab369fca7609a5d
Comments
On 28/11/22 11:49, Florian Weimer via Libc-alpha wrote: > This matches what FreeBSD does. > LGTM, thanks. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > --- > v2: Remove unneccesary parentheses. > time/time.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/time/time.h b/time/time.h > index d18089116e..0919e578d4 100644 > --- a/time/time.h > +++ b/time/time.h > @@ -101,7 +101,7 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize, > const char *__restrict __format, > const struct tm *__restrict __tp) __THROW; > > -#ifdef __USE_XOPEN > +#if defined __USE_XOPEN || defined __USE_MISC > /* Parse S according to FORMAT and store binary time information in TP. > The return value is a pointer to the first unparsed character in S. */ > extern char *strptime (const char *__restrict __s, > > base-commit: f704192911c6c7b65a54beab3ab369fca7609a5d >
* Adhemerval Zanella Netto: > On 28/11/22 11:49, Florian Weimer via Libc-alpha wrote: >> This matches what FreeBSD does. >> > > > LGTM, thanks. > > Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > >> --- >> v2: Remove unneccesary parentheses. >> time/time.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/time/time.h b/time/time.h >> index d18089116e..0919e578d4 100644 >> --- a/time/time.h >> +++ b/time/time.h >> @@ -101,7 +101,7 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize, >> const char *__restrict __format, >> const struct tm *__restrict __tp) __THROW; >> >> -#ifdef __USE_XOPEN >> +#if defined __USE_XOPEN || defined __USE_MISC >> /* Parse S according to FORMAT and store binary time information in TP. >> The return value is a pointer to the first unparsed character in S. */ >> extern char *strptime (const char *__restrict __s, >> >> base-commit: f704192911c6c7b65a54beab3ab369fca7609a5d >> I think this change has been vetoed by Andreas. I assume he wants us to define __USE_XOPEN by default to check all visiblities at once. Florian
On 08/12/22 15:13, Florian Weimer wrote: > * Adhemerval Zanella Netto: > >> On 28/11/22 11:49, Florian Weimer via Libc-alpha wrote: >>> This matches what FreeBSD does. >>> >> >> >> LGTM, thanks. >> >> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> >> >>> --- >>> v2: Remove unneccesary parentheses. >>> time/time.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/time/time.h b/time/time.h >>> index d18089116e..0919e578d4 100644 >>> --- a/time/time.h >>> +++ b/time/time.h >>> @@ -101,7 +101,7 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize, >>> const char *__restrict __format, >>> const struct tm *__restrict __tp) __THROW; >>> >>> -#ifdef __USE_XOPEN >>> +#if defined __USE_XOPEN || defined __USE_MISC >>> /* Parse S according to FORMAT and store binary time information in TP. >>> The return value is a pointer to the first unparsed character in S. */ >>> extern char *strptime (const char *__restrict __s, >>> >>> base-commit: f704192911c6c7b65a54beab3ab369fca7609a5d >>> > > I think this change has been vetoed by Andreas. I assume he wants us to > define __USE_XOPEN by default to check all visiblities at once. > > Florian > Alright then, defining __USE_XOPEN works as well.
diff --git a/time/time.h b/time/time.h index d18089116e..0919e578d4 100644 --- a/time/time.h +++ b/time/time.h @@ -101,7 +101,7 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_MISC /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s,