Make tv_sec a time_t on all platforms but alpha. Brings us more in line with
POSIX. This also makes the struct correct we ever implement an i386-time64 architecture. Not that we need too. Reviewed by: imp, brooks Approved by: njl (acpica), des (no objects, touches procfs) Tested with: make universe
This commit is contained in:
parent
aefc1eb332
commit
09c00166e4
@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <paths.h>
|
||||
#include <syslog.h>
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef NO_SETSID
|
||||
# include <fcntl.h> /* for O_RDONLY, etc */
|
||||
@ -535,8 +536,8 @@ main(argc, argv)
|
||||
}
|
||||
if (!FD_ISSET(s, &readfds)) {
|
||||
if (debug > 1)
|
||||
report(LOG_INFO, "exiting after %ld minutes of inactivity",
|
||||
actualtimeout.tv_sec / 60);
|
||||
report(LOG_INFO, "exiting after %jd minutes of inactivity",
|
||||
(intmax_t)actualtimeout.tv_sec / 60);
|
||||
exit(0);
|
||||
}
|
||||
ra_len = sizeof(recv_addr);
|
||||
|
@ -257,8 +257,8 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout)
|
||||
tmo = 1;
|
||||
|
||||
if (acpi_semaphore_debug) {
|
||||
printf("%s: Wakeup timeleft(%lu, %lu), tmo %u, sem %p, thread %d\n",
|
||||
__func__, timelefttv.tv_sec, timelefttv.tv_usec, tmo, as,
|
||||
printf("%s: Wakeup timeleft(%jd, %lu), tmo %u, sem %p, thread %d\n",
|
||||
__func__, (intmax_t)timelefttv.tv_sec, timelefttv.tv_usec, tmo, as,
|
||||
AcpiOsGetThreadId());
|
||||
}
|
||||
}
|
||||
|
@ -698,8 +698,8 @@ sbp_login(struct sbp_dev *sdev)
|
||||
if (t.tv_sec >= 0 && t.tv_usec > 0)
|
||||
ticks = (t.tv_sec * 1000 + t.tv_usec / 1000) * hz / 1000;
|
||||
SBP_DEBUG(0)
|
||||
printf("%s: sec = %ld usec = %ld ticks = %d\n", __func__,
|
||||
t.tv_sec, t.tv_usec, ticks);
|
||||
printf("%s: sec = %jd usec = %ld ticks = %d\n", __func__,
|
||||
(intmax_t)t.tv_sec, t.tv_usec, ticks);
|
||||
END_DEBUG
|
||||
callout_reset(&sdev->login_callout, ticks,
|
||||
sbp_login_callout, (void *)(sdev));
|
||||
|
@ -132,10 +132,10 @@ procfs_doprocstatus(PFS_FILL_ARGS)
|
||||
calcru(p, &ut, &st);
|
||||
start = p->p_stats->p_start;
|
||||
timevaladd(&start, &boottime);
|
||||
sbuf_printf(sb, " %ld,%ld %ld,%ld %ld,%ld",
|
||||
start.tv_sec, start.tv_usec,
|
||||
ut.tv_sec, ut.tv_usec,
|
||||
st.tv_sec, st.tv_usec);
|
||||
sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld",
|
||||
(intmax_t)start.tv_sec, start.tv_usec,
|
||||
(intmax_t)ut.tv_sec, ut.tv_usec,
|
||||
(intmax_t)st.tv_sec, st.tv_usec);
|
||||
} else {
|
||||
sbuf_printf(sb, " -1,-1 -1,-1 -1,-1");
|
||||
}
|
||||
|
@ -45,7 +45,11 @@ typedef __time_t time_t;
|
||||
* Structure returned by gettimeofday(2) system call, and used in other calls.
|
||||
*/
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds (XXX should be time_t) */
|
||||
#ifdef __alpha__
|
||||
long tv_sec; /* seconds */
|
||||
#else
|
||||
time_t tv_sec; /* seconds */
|
||||
#endif
|
||||
suseconds_t tv_usec; /* and microseconds */
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user