From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc31.google.com (mail-oo1-xc31.google.com [IPv6:2607:f8b0:4864:20::c31]) by sourceware.org (Postfix) with ESMTPS id 21DEF3858280 for ; Wed, 2 Aug 2023 17:16:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21DEF3858280 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-56ca4d7079aso2963547eaf.0 for ; Wed, 02 Aug 2023 10:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690996617; x=1691601417; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=t9cM2m22KG/lVO4SYDIEwptZMe2v5jiZkN9zjZFcUnE=; b=TtL4bcQKefvi7Ch4oPf4KjL2PFsiauvrfu/YP+wxrhIhusS+DI2GeKmXsSQo4N5Cc9 yqUymUy/mvgRM4CqP9Sv+prT/HNwCXY2quYc8x/hfg3+loBqDQwU6vFAxoQqBdzbRx9n BRHKlmaDJ5dhC+t6tMjyFkrt0kpltGEjegwTcdJzs+K/DDabMZzm3+Fank2rpex05cdc iWbdwAVqqlXaM0UkOYS9olz6A1LPpS04E+Eu30vcEBDr0iUtvivchej8PbbkQh5liS3k peKvYcbKFtX6hmo15HFmqkxkP/NGwow5MXt2yL9HTuE4BFTIuDIHvYO8i7/fFS+KWulF jojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690996617; x=1691601417; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t9cM2m22KG/lVO4SYDIEwptZMe2v5jiZkN9zjZFcUnE=; b=ipyftuo1Cd4XGwtTtedWDzZGKU1e4B6xhf36RGQJyTmWkaJGvcLVTsuPdy40lK7zri TmucTrg2ytQRMNB1KZRQQID7NKd4E6fa8KhMAGUw2lrgnc5sf7sia6r8YEUOknk4moI2 8oT4X8HeM2RubkVxRafvxJGhll78bdlcpMj9CPbvKnHNpjtpl96/eXsgyZbUeMAP+RaO wlASPet5OSgRrQBlbWHKi3qLoznStyXuWbkShCBaM7C1DMjKmw+7Ql1jmCc73bnFyFhp thIEDv8yGq0u58Zgck5wPRwEfe+Ss51lGO75OwgdNgN98ZqmNVIBvxJ+mrcMESRWLtIQ b35w== X-Gm-Message-State: ABy/qLYh8UGuvv/qgZfvIjCxCS8xji2ABlXy6xdBDNgyRCr/0itqKPYo SCT9IPtj5k8KhuHUqyuVTpNaoQ== X-Google-Smtp-Source: APBJJlGO/HA+pyfr50tmkaShC989NMGdbZaSiF0JPdg+zmAjG63QxssUtvDTfvfqiNOzwyTM+3Ya5g== X-Received: by 2002:a4a:650d:0:b0:56c:e71c:2993 with SMTP id y13-20020a4a650d000000b0056ce71c2993mr6114590ooc.8.1690996617396; Wed, 02 Aug 2023 10:16:57 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:9aa9:84f6:53b3:4cd0:ffe6? ([2804:1b3:a7c1:9aa9:84f6:53b3:4cd0:ffe6]) by smtp.gmail.com with ESMTPSA id x47-20020a4a97f2000000b005634ef4f1c0sm2677612ooi.31.2023.08.02.10.16.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Aug 2023 10:16:56 -0700 (PDT) Message-ID: <0f5edfc1-73b9-4535-bf86-4417d39d65aa@linaro.org> Date: Wed, 2 Aug 2023 14:16:54 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] %Z [PATCH v6] Content-Language: en-US To: Stanley Lancaster , libc-alpha@sourceware.org References: <20230731142420.23766-1-lancasterharp@gmail.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20230731142420.23766-1-lancasterharp@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Add a proper subject on each new version, the initial one you use should be ok. On 31/07/23 11:24, Stanley Lancaster via Libc-alpha wrote: > --- > time/strptime_l.c | 19 ++++++++++++++----- > time/tst-strptime.c | 2 ++ > 2 files changed, 16 insertions(+), 5 deletions(-) > > diff --git a/time/strptime_l.c b/time/strptime_l.c > index 85c3249fcc..1b84065c19 100644 > --- a/time/strptime_l.c > +++ b/time/strptime_l.c > @@ -770,11 +770,20 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, > break; > case 'Z': > /* Read timezone but perform no conversion. */ > - while (ISSPACE (*rp)) > - rp++; > - while (!ISSPACE (*rp) && *rp != '\0') > - rp++; > - break; > + { > + while (ISSPACE (*rp)) > + rp++; > + /* Read timezone but perform no conversion. */ > + /* we recognize the format [-+a-zA-Z0-9]{3,} */ > + const char* start_rp = rp; > + > + while ((*rp >= 'A' && *rp <= 'Z') || > + (*rp >= 'a' && *rp <= 'z') || > + (*rp >= '0' && *rp <= '9')) > + rp++; > + if (start_rp+3 < rp) > + return NULL; Indentation is off here, along with style. It should be like: { while (ISSPACE (*rp)) rp++; const char* start_rp = rp; while ((*rp >= 'A' && *rp <= 'Z') || (*rp >= 'a' && *rp <= 'z') || (*rp >= 'a' && *rp <= 'z')) rp++; if (start_rp+3 < rp) return NULL; } break; > + } Missing break here, I am not sure it haven't triggered any regression failure on your side. At least aarch64 bot did trigger the CI failure. > case 'z': > /* We recognize four formats: > 1. Two digits specify hours. > diff --git a/time/tst-strptime.c b/time/tst-strptime.c > index 3dae9e0594..40145cb109 100644 > --- a/time/tst-strptime.c > +++ b/time/tst-strptime.c > @@ -48,6 +48,8 @@ static const struct > 6, 0, 0, 1 }, > { "en_US.ISO-8859-1", "2000-01-01 08:12:21 PM", "%Y-%m-%d %I:%M:%S %p", > 6, 0, 0, 1 }, > + { "en_US.ISO-8859-1", "2000-01-01 08:12:21 AM CST/", "%Y-%m-%d %I:%M:%S %p %Z/", Extra end of line whitespace. > + 6, 0, 0, 1}, > { "ja_JP.EUC-JP", "2001 20 \xb7\xee", "%Y %U %a", 1, 140, 4, 21 }, > { "ja_JP.EUC-JP", "2001 21 \xb7\xee", "%Y %W %a", 1, 140, 4, 21 }, > /* Most of the languages do not need the declension of the month names