Module Name: src Committed By: christos Date: Sat Nov 3 17:33:01 UTC 2012
Modified Files: src/external/bsd/cron/dist: crontab.c Log Message: make the utime and utimes cases work too. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/cron/dist/crontab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/cron/dist/crontab.c diff -u src/external/bsd/cron/dist/crontab.c:1.6 src/external/bsd/cron/dist/crontab.c:1.7 --- src/external/bsd/cron/dist/crontab.c:1.6 Sat Nov 3 11:39:23 2012 +++ src/external/bsd/cron/dist/crontab.c Sat Nov 3 13:33:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $ */ +/* $NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = "Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp"; #else -__RCSID("$NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $"); +__RCSID("$NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $"); #endif #endif @@ -155,11 +155,11 @@ change_time(const char *name, const stru struct timeval tv[2]; TIMESPEC_TO_TIMEVAL(&tv[0], &ts[0]); TIMESPEC_TO_TIMEVAL(&tv[1], &ts[1]); - return utimes(name, tvs); + return utimes(name, tv); #else - struct utimebuf ut; - ut.actime = tv[0].tv_sec; - ut.modtime = tv[1].tv_sec; + struct utimbuf ut; + ut.actime = ts[0].tv_sec; + ut.modtime = ts[1].tv_sec; return utime(name, &ut); #endif } @@ -174,7 +174,7 @@ compare_time(const struct stat *st, cons #if defined(HAVE_UTIMENSAT) && ts1[1].tv_nsec == ts2[1].tv_nsec #elif defined(HAVE_UTIMES) - && ts1[1].tv_nsec / 1000 = ts2[1].tv_nsec / 1000 + && ts1[1].tv_nsec / 1000 == ts2[1].tv_nsec / 1000 #endif ; } @@ -638,7 +638,7 @@ replace_cmd(void) { */ (void)fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n"); (void)fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now)); - (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $"); + (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $"); /* copy the crontab to the tmp */