diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-11-24 14:36:36 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-11-24 14:36:36 +0000 |
commit | e929152d444d933415d0c0df0aa6b4fae922fe43 (patch) | |
tree | 33342bdce3651572ab9711803cbdd75bb4150d02 /usr.bin/make/job.c | |
parent | 2cee9a585ea175c769b7222ead016577e476d8e3 (diff) |
Change the time stamp interface to use an abstract datatype.
Define two possible interfaces: the classic one,
and the new one (used where available) that depends on timespec.
Better granularity, make is now able to distinguish between files that
were built during the same second.
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r-- | usr.bin/make/job.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 83cc5c4615e..5692dba1098 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.37 2000/09/14 13:52:42 espie Exp $ */ +/* $OpenBSD: job.c,v 1.38 2000/11/24 14:36:34 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -126,7 +126,7 @@ static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else UNUSED -static char rcsid[] = "$OpenBSD: job.c,v 1.37 2000/09/14 13:52:42 espie Exp $"; +static char rcsid[] = "$OpenBSD: job.c,v 1.38 2000/11/24 14:36:34 espie Exp $"; #endif #endif /* not lint */ @@ -1009,7 +1009,6 @@ Job_Touch(gn, silent) Boolean silent; /* TRUE if should not print messages */ { int streamID; /* ID of stream opened to do the touch */ - struct utimbuf times; /* Times for utime() call */ if (gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_OPTIONAL)) { /* @@ -1035,8 +1034,7 @@ Job_Touch(gn, silent) } else { char *file = gn->path ? gn->path : gn->name; - times.actime = times.modtime = now; - if (utime(file, ×) < 0){ + if (set_times(file) == -1) { streamID = open(file, O_RDWR | O_CREAT, 0666); if (streamID >= 0) { |