From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 04D313857C58 for ; Tue, 25 Oct 2022 10:38:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 04D313857C58 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666694288; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=j6nT/Qm7MSBtuGK4IhPjVgkCx7Q/s0ByhjpCV1mEpxg=; b=O9IkHarW7HMdUgz9q1IvGnqJMAk5yGDdOfMWs4gDrZnlOFS+XC9KZAjceQxvxzU3vtQHpJ WBDI806WcKnhBFOo1m97H4fqQ1xbathNoQsmYSzDLGh9g94nCCeJ9MYI6JU1dOvbRPtAe0 FWVh4cg3GL7Mp8Vv/Vs/0gT6SHWA3qY= 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-477-L1WRaoqQO4mtraRpZOkzag-1; Tue, 25 Oct 2022 06:38:07 -0400 X-MC-Unique: L1WRaoqQO4mtraRpZOkzag-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 28323800B30 for ; Tue, 25 Oct 2022 10:38:07 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.193.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05A412166B2A for ; Tue, 25 Oct 2022 10:38:07 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id BDA7BA80BAC; Tue, 25 Oct 2022 12:38:04 +0200 (CEST) Date: Tue, 25 Oct 2022 12:38:04 +0200 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: [PATCH] strftime.c(__strftime): add %q, %v, tests; tweak %Z doc Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20221022051352.2723-1-Brian.Inglis@SystematicSW.ab.ca> <40664e92-d899-fc28-9321-0fb3b97931e8@SystematicSw.ab.ca> MIME-Version: 1.0 In-Reply-To: <40664e92-d899-fc28-9321-0fb3b97931e8@SystematicSw.ab.ca> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: On Oct 24 17:50, Brian Inglis wrote: > On 2022-10-24 06:07, Corinna Vinschen wrote: > > On Oct 21 23:13, Brian Inglis wrote: > > > + case CQ('v'): /* BSD/OSX/Ruby extension VMS/Oracle date format > > > + from Arnold Robbins strftime version 3.0 */ > > > + { /* %v is equivalent to "%e-%b-%Y", flags and width can change year > > ^^^^^ > > pad? > > > + format. Recurse to avoid need to replicate %b and %Y formation. */ > > > > Sorry for being a nag, but doesn't that introduce an incompatible > > change? The BSDs don't handle pad and width, they just call > > _fmt("%e-%b-%Y", ...). Or am I missing how the BSD function works? > > Yes if this function was actually BSD-like, but newlib strftime supports all > the POSIX and GNU flags (including +, which was why why I couldn't add BSD > %+ for default locale formatting), so I thought I should add POSIX extended > year handling to support the extended year range and formats required, for > compatibility with other %Y formatting in that function, and tests of that > functionality. Sounds ok to me on second thought. Pushed. Thanks, Corinna