On Mon, Nov 14, 2011 at 2:16 AM, Paul Smith <[email protected]> wrote:
> If you want to use sub-second timestamps you must find tools that
> support them, and avoid using tools that don't.

On a side note, I've often wondered why, after all these years and
discussions like this one, nobody's modified at least the GNU version
of touch to do its work by opening the file for write and writing 0
bytes to it, or appending one byte and then removing it, or whatever
it takes to force an mtime update, rather than using the flawed utimes
syscall. There may be corner cases where this wouldn't work but it
would be simple enough to fall back to utimes. And of course none of
this would apply to cases like --reference=FILE, --date=TIME, etc.,
only to simple "touch foo".

It feels like this would save a lot of confusion but it's so obvious I
can't believe it hasn't been considered before. Anybody know if it's
been kicked around and found wanting?

The short term workaround in make context, as Eli says, is to do the
same thing using "echo >foo" though I'd recommend ">>foo".

-David Boyce

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to