Cygwin strptime() is missing "%s" which strftime() has

Eric Blake eblake@redhat.com
Mon Jul 24 17:02:00 GMT 2017


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
> 
>> 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.
> 
> 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 extension 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.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170724/4abb9268/attachment.sig>


More information about the Cygwin mailing list