From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by sourceware.org (Postfix) with ESMTPS id 64FD5385840C for ; Thu, 7 Oct 2021 19:31:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 64FD5385840C Received: by mail-qv1-xf2e.google.com with SMTP id z3so4903419qvl.9 for ; Thu, 07 Oct 2021 12:31:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dMV7HpiOM2j5/LdW6V/FgDPf6EpiOlnSRTEBc8r66Y4=; b=CwjtnddKM9CwQ0aXp3lGPhqWZjxHzTrNse+8Wv1AXb0UqatzgNaScjb1yi9sxCDpp+ NitXXADhMR/o9biaMudzugIRmIG6yxUMz8rPlIbhT40nCkMeczXkPmFCy5DjA679JXpM STILtgRxudASguNhnaWtU0l7v5nXBNizP8XsmZz1HGy5CJ5y0rFO+20TdNld6JeldYJj UxJyFpCync5wZcP7kjrubnsAHw4gomXdRoT4i47Bn7lrfUOS02w+vvOQcz6BjTcKD1YU ZCII2tXOLCIkBlsuWGsCXyGKCyYzeeMUypTiRSP4QRofmaTU0A+Uh2WGEPIfWMg2rF2I yvtg== X-Gm-Message-State: AOAM530nNlGmHqKdX2G3campYaBwUt+rMITJ7L0VGunY+MWyx2erPOrg MYtiNMvdJWjflCgxfKdZ5uudB+tQ2QFpuQ== X-Google-Smtp-Source: ABdhPJwwXULWEp+aZYbKXuybvsxZ/B0GSbWryhwzdUnnffgF33BcV9PnaP/l6hlTsl+bApPmf0XbeQ== X-Received: by 2002:a0c:de0e:: with SMTP id t14mr5999986qvk.41.1633635092805; Thu, 07 Oct 2021 12:31:32 -0700 (PDT) Received: from ?IPv6:2804:431:c7cb:807a:2864:3aef:e68:8698? ([2804:431:c7cb:807a:2864:3aef:e68:8698]) by smtp.gmail.com with ESMTPSA id g11sm233482qts.63.2021.10.07.12.31.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Oct 2021 12:31:32 -0700 (PDT) Subject: Re: strftime() _GNU_SOURCE extension request To: Vito Caputo , libc-help@sourceware.org References: <20210925061529.4dmdq3rbuvettzhr@shells.gnugeneration.com> From: Adhemerval Zanella Message-ID: Date: Thu, 7 Oct 2021 16:31:31 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210925061529.4dmdq3rbuvettzhr@shells.gnugeneration.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2021 19:31:35 -0000 On 25/09/2021 03:15, Vito Caputo wrote: > Hello list, > > I'd like to propose a _GNU_SOURCE extension for strftime() treating > str=NULL similarly to snprintf()'s C99 handling of str=NULL; write > nothing to str, but return the number of bytes that /would/ be written > if str were non-NULL and sufficiently large. It sounds reasonable, I would suggestion you to check if gnulib is willing to push for such change all well, since the code came from them originally.