delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/07/24/09:54:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; q=dns; s=default; b=ECEz
91WRwjOIKKiKJhuUmMoeblkPIeUOZQPbfYlKM6/ZsubeUYUy+xnw3h5G3Y+/sOV6
Vl9qlyNWi0Jxcft3sZ+301+KqWidzzJBn2e39/POu+e+jAU+GVUbM+3WHmMQqoW5
r7Hp1S5E4lsUCoj+0bVYn5Pz+wCvddiC7d8/KWw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; s=default; bh=jb/m7n7/gc
L5P3vW7Ls8DxPQiSM=; b=YgAk+pNTYphAyD6Rx7Suluz3nDXb6biUOUuBWi3ap9
cKkYGc8ag14EcdDTmYV0MUGiI9jSM3eqEd8z+SyGwyedPDvCCvIFQNP+Ctqvr0wC
XlvYZNP7JlbgMOude7gXm+XaMDze//7wxPHaAF6E+d5KWLBz+j5U26PamG8OT/iF
Y=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:998, H*c:application
X-HELO: mx1.redhat.com
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A551661D37
Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake AT redhat DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A551661D37
Subject: Re: Cygwin strptime() is missing "%s" which strftime() has
To: cygwin AT cygwin DOT com
References: <BY1PR09MB03436E115C205453E19F9D31A5BB0 AT BY1PR09MB0343 DOT namprd09 DOT prod DOT outlook DOT com>
From: Eric Blake <eblake AT redhat DOT com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Message-ID: <824a586d-7a5f-a2d0-f88c-b8d33fbd9359@redhat.com>
Date: Mon, 24 Jul 2017 08:54:03 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <BY1PR09MB03436E115C205453E19F9D31A5BB0@BY1PR09MB0343.namprd09.prod.outlook.com>
X-IsSubscribed: yes

--Bm5HxecfwNE8G63tvsxVGM05RM1MClLN3
Content-Type: multipart/mixed; boundary="2KjKG7njCkPE0BsLxGTAGMAcJeamX8BqB";
 protected-headers="v1"
From: Eric Blake <eblake AT redhat DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <824a586d-7a5f-a2d0-f88c-b8d33fbd9359 AT redhat DOT com>
Subject: Re: Cygwin strptime() is missing "%s" which strftime() has
References: <BY1PR09MB03436E115C205453E19F9D31A5BB0 AT BY1PR09MB0343 DOT namprd09 DOT prod DOT outlook DOT com>
In-Reply-To: <BY1PR09MB03436E115C205453E19F9D31A5BB0 AT BY1PR09MB0343 DOT namprd09 DOT prod DOT outlook DOT com>


--2KjKG7njCkPE0BsLxGTAGMAcJeamX8BqB
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 07/24/2017 08:24 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>>>> But that's just scanning a decimal integer to time_t.
>>>
>>> It's not a question of whether I can or can't convert a string into an
>>> integer, rather it's a question about portability of code that uses %s
>=20
>> I see your point but... "portability" is kind of the wrong expression
>> here.  If you have portability in mind, you should *not* use %s at all.
>=20
> The point is, if I can use "%s" with strftime() on Cygwin, then I should =
be able to use "%s" with strptime(),
> but currently there's a disconcert with that.  Indeed, "%s" is a GNU exte=
nsion yet it has been on Linux for years,
> so why not here but only 50%?

Demand.  I patches strftime to add %s because Coreutils wanted it.  But
coreutils doesn't use strptime, so I had no reason to add it.

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--2KjKG7njCkPE0BsLxGTAGMAcJeamX8BqB--

--Bm5HxecfwNE8G63tvsxVGM05RM1MClLN3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAll1+/sACgkQp6FrSiUn
Q2qzWQf/S4+Sbj9JuQT4L9Mz5QYLEQpZ2kOB852N5HpgBjBxCp6iKi3/7ebeKJ/s
K3ZQlh5srCzB61OnetbcoCScQU9+449OpEcT+YaUzUVN44uxuY+NGluQcNJidnFw
V9dju1/u8xcEZOFfJSdi8WT7P/fWuoa+Gx6YgArGkMGuHYgw6+vVYnux69BF7vT2
xQNaGe5zbuNaDDpVl137J1XjjnqEMqVi6fzb58mu4Pl08wisAYF5iK16pThT39AX
wejV2GvJta0ito0c2g1PYMw51Kn4FbQj3FbJN5LyghsQvKuPV1QGURCqL5pMyFHA
OW68eagnB4iWE3QAMbq2mMA72dS12g==
=/x03
-----END PGP SIGNATURE-----

--Bm5HxecfwNE8G63tvsxVGM05RM1MClLN3--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019