OSDN Git Service

Fix touch(1) date parsing on tzcode-derived systems.
authorElliott Hughes <enh@google.com>
Fri, 29 Jul 2016 20:11:04 +0000 (13:11 -0700)
committerRob Landley <rob@landley.net>
Mon, 1 Aug 2016 19:54:54 +0000 (14:54 -0500)
commitabf079b2d82cc3635863672371a2c53f8e940ba1
tree787781a66d32a11aa6d400c24b30a6f3d657d8dd
parent8f3e0af6409e9d3cfe0370d93645ebd93d11aa0a
Fix touch(1) date parsing on tzcode-derived systems.

The IANA tzcode implementation of mktime (used on Android and BSDs) sets
errno in some cases where it doesn't return -1 to indicate failure, so the
existing test always failed on those systems.

I don't think glibc ever sets errno (which is fine by ISO C, but not POSIX).

Other uses of mktime in toybox are already fine. This one would have been
caught by the existing tests if I was running them on the device :-(
toys/posix/touch.c