This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]