Index: lib/libpam/modules/pam_lastlog/pam_lastlog.c =========================================================================== --- lib/libpam/modules/pam_lastlog/pam_lastlog.c 2002/11/15 13:30:01 #14 +++ lib/libpam/modules/pam_lastlog/pam_lastlog.c 2002/11/15 13:30:01 @@ -71,6 +71,7 @@ struct passwd *pwd; struct utmp utmp; struct lastlog ll; + time_t t; const char *rhost, *user, *tty; off_t llpos; int fd, pam_err; @@ -109,13 +110,14 @@ goto file_err; if ((flags & PAM_SILENT) == 0) { if (read(fd, &ll, sizeof ll) == sizeof ll && ll.ll_time != 0) { + t = ll.ll_time; if (*ll.ll_host != '\0') pam_info(pamh, "Last login: %.*s from %.*s", - 24 - 5, ctime(&ll.ll_time), + 24 - 5, ctime(&t), (int)sizeof(ll.ll_host), ll.ll_host); else pam_info(pamh, "Last login: %.*s on %.*s", - 24 - 5, ctime(&ll.ll_time), + 24 - 5, ctime(&t), (int)sizeof(ll.ll_line), ll.ll_line); } if (lseek(fd, llpos, L_SET) != llpos) @@ -123,7 +125,7 @@ } bzero(&ll, sizeof(ll)); - time(&ll.ll_time); + ll.ll_time = time(NULL); /* note: does not need to be NUL-terminated */ strncpy(ll.ll_line, tty, sizeof(ll.ll_line)); @@ -140,7 +142,7 @@ * Record session in utmp(5) and wtmp(5). */ bzero(&utmp, sizeof(utmp)); - time(&utmp.ut_time); + utmp.ut_time = time(NULL); /* note: does not need to be NUL-terminated */ strncpy(utmp.ut_name, user, sizeof(utmp.ut_name)); if (rhost != NULL) Index: sys/ia64/ia64/clock.c =========================================================================== --- sys/ia64/ia64/clock.c 2002/11/15 13:30:01 #9 +++ sys/ia64/ia64/clock.c 2002/11/15 13:30:01 @@ -353,7 +353,7 @@ deltat = -deltat; if (deltat < 2 * SECDAY) return; - printf("WARNING: clock %s %d days", + printf("WARNING: clock %s %ld days", ts.tv_sec < base ? "lost" : "gained", deltat / SECDAY); } bad: Index: sys/ia64/include/_types.h =========================================================================== --- sys/ia64/include/_types.h 2002/11/15 13:30:01 #3 +++ sys/ia64/include/_types.h 2002/11/15 13:30:01 @@ -72,7 +72,7 @@ typedef __int64_t __segsz_t; /* segment size (in pages) */ typedef __uint64_t __size_t; /* sizeof() */ typedef __int64_t __ssize_t; /* byte count or error */ -typedef __int32_t __time_t; /* time()... */ +typedef __int64_t __time_t; /* time()... */ typedef __uint64_t __uintfptr_t; typedef __uint64_t __uintmax_t; typedef __uint64_t __uintptr_t; Index: sys/ufs/ffs/ffs_snapshot.c =========================================================================== --- sys/ufs/ffs/ffs_snapshot.c 2002/11/15 13:30:01 #27 +++ sys/ufs/ffs/ffs_snapshot.c 2002/11/15 13:30:01 @@ -500,8 +500,8 @@ if (collectsnapstats && starttime.tv_sec > 0) { nanotime(&endtime); timespecsub(&endtime, &starttime); - printf("%s: suspended %d.%03ld sec, redo %ld of %d\n", - vp->v_mount->mnt_stat.f_mntonname, endtime.tv_sec, + printf("%s: suspended %ld.%03ld sec, redo %ld of %d\n", + vp->v_mount->mnt_stat.f_mntonname, (long)endtime.tv_sec, endtime.tv_nsec / 1000000, redo, fs->fs_ncg); } if (sbp == NULL) Index: usr.bin/who/who.c =========================================================================== --- usr.bin/who/who.c 2002/11/15 13:30:01 #7 +++ usr.bin/who/who.c 2002/11/15 13:30:01 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -160,7 +161,7 @@ { char buf[80], tty[sizeof(_PATH_DEV) + UT_LINESIZE]; struct stat sb; - time_t idle; + time_t idle, t; static int d_first = -1; struct tm *tm; char state; @@ -184,7 +185,8 @@ if (Tflag) printf("%c ", state); printf("%-*.*s ", UT_LINESIZE, UT_LINESIZE, ut->ut_line); - tm = localtime(&ut->ut_time); + t = _time32_to_time(ut->ut_time); + tm = localtime(&t); strftime(buf, sizeof(buf), d_first ? "%e %b %R" : "%b %e %R", tm); printf("%-*s ", 12, buf); if (uflag) { @@ -265,7 +267,7 @@ name = "?"; strncpy(ut.ut_name, name, UT_NAMESIZE); strncpy(ut.ut_line, tty, UT_LINESIZE); - time(&ut.ut_time); + ut.ut_time = _time_to_time32(time(NULL)); row(&ut); } Index: usr.bin/xinstall/xinstall.c =========================================================================== --- usr.bin/xinstall/xinstall.c 2002/11/15 13:30:01 #14 +++ usr.bin/xinstall/xinstall.c 2002/11/15 13:30:01 @@ -64,7 +64,6 @@ #include #include #include -#include #include "pathnames.h" @@ -262,7 +261,7 @@ install(const char *from_name, const char *to_name, u_long fset, u_int flags) { struct stat from_sb, temp_sb, to_sb; - struct utimbuf utb; + struct timeval tvb[2]; int devnull, files_match, from_fd, serrno, target; int tempcopy, temp_fd, to_fd; char backup[MAXPATHLEN], *p, pathbuf[MAXPATHLEN], tempfile[MAXPATHLEN]; @@ -377,9 +376,11 @@ * Need to preserve target file times, though. */ if (to_sb.st_nlink != 1) { - utb.actime = to_sb.st_atime; - utb.modtime = to_sb.st_mtime; - (void)utime(tempfile, &utb); + tvb[0].tv_sec = to_sb.st_atime; + tvb[0].tv_usec = 0; + tvb[1].tv_sec = to_sb.st_mtime; + tvb[1].tv_usec = 0; + (void)utimes(tempfile, tvb); } else { files_match = 1; (void)unlink(tempfile); @@ -433,9 +434,11 @@ * Preserve the timestamp of the source file if necessary. */ if (dopreserve && !files_match && !devnull) { - utb.actime = from_sb.st_atime; - utb.modtime = from_sb.st_mtime; - (void)utime(to_name, &utb); + tvb[0].tv_sec = from_sb.st_atime; + tvb[0].tv_usec = 0; + tvb[1].tv_sec = from_sb.st_mtime; + tvb[1].tv_usec = 0; + (void)utimes(to_name, tvb); } if (fstat(to_fd, &to_sb) == -1) { Index: usr.sbin/ppp/physical.c =========================================================================== --- usr.sbin/ppp/physical.c 2002/11/15 13:30:01 #8 +++ usr.sbin/ppp/physical.c 2002/11/15 13:30:01 @@ -916,7 +916,7 @@ char *colon; memset(&ut, 0, sizeof ut); - time(&ut.ut_time); + ut.ut_time = time(NULL); strncpy(ut.ut_name, name, sizeof ut.ut_name); if (p->handler && (p->handler->type == TCP_DEVICE || p->handler->type == UDP_DEVICE)) { Index: usr.sbin/pppd/auth.c =========================================================================== --- usr.sbin/pppd/auth.c 2002/11/15 13:30:01 #2 +++ usr.sbin/pppd/auth.c 2002/11/15 13:30:01 @@ -995,7 +995,7 @@ #endif memset((void *)&utmp, 0, sizeof(utmp)); - (void)time(&utmp.ut_time); + utmp.ut_time = time(NULL); (void)strncpy(utmp.ut_name, user, sizeof(utmp.ut_name)); (void)strncpy(utmp.ut_host, ":PPP", sizeof(utmp.ut_host)); (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line));