Module Name: src
Committed By: rillig
Date: Sun Nov 22 20:01:46 UTC 2020
Modified Files:
src/usr.bin/make: targ.c
Log Message:
make(1): add remark to add a "reasonable way" to format time_t 0
To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/usr.bin/make/targ.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/targ.c
diff -u src/usr.bin/make/targ.c:1.139 src/usr.bin/make/targ.c:1.140
--- src/usr.bin/make/targ.c:1.139 Sat Nov 21 18:41:57 2020
+++ src/usr.bin/make/targ.c Sun Nov 22 20:01:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: targ.c,v 1.139 2020/11/21 18:41:57 rillig Exp $ */
+/* $NetBSD: targ.c,v 1.140 2020/11/22 20:01:46 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -119,7 +119,7 @@
#include "dir.h"
/* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: targ.c,v 1.139 2020/11/21 18:41:57 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.140 2020/11/22 20:01:46 rillig Exp $");
/*
* All target nodes that appeared on the left-hand side of one of the
@@ -398,6 +398,8 @@ Targ_FmtTime(time_t tm)
struct tm *parts;
static char buf[128];
+ /* TODO: Add special case for 0, which often means ENOENT, to make it
+ * independent from time zones. */
parts = localtime(&tm);
(void)strftime(buf, sizeof buf, "%k:%M:%S %b %d, %Y", parts);
return buf;