Sun Jan 4 04:33:08 2009 UTC ()
another suseconds_t cast


(christos)
diff -r1.61.2.4 -r1.61.2.5 src/sys/sys/time.h

cvs diff -r1.61.2.4 -r1.61.2.5 src/sys/sys/time.h (expand / switch to unified diff)

--- src/sys/sys/time.h 2009/01/04 04:22:10 1.61.2.4
+++ src/sys/sys/time.h 2009/01/04 04:33:08 1.61.2.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: time.h,v 1.61.2.4 2009/01/04 04:22:10 christos Exp $ */ 1/* $NetBSD: time.h,v 1.61.2.5 2009/01/04 04:33:08 christos Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1982, 1986, 1993 4 * Copyright (c) 1982, 1986, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -51,27 +51,27 @@ struct timeval { @@ -51,27 +51,27 @@ struct timeval {
51 */ 51 */
52struct timespec { 52struct timespec {
53 time_t tv_sec; /* seconds */ 53 time_t tv_sec; /* seconds */
54 long tv_nsec; /* and nanoseconds */ 54 long tv_nsec; /* and nanoseconds */
55}; 55};
56 56
57#if defined(_NETBSD_SOURCE) 57#if defined(_NETBSD_SOURCE)
58#define TIMEVAL_TO_TIMESPEC(tv, ts) do { \ 58#define TIMEVAL_TO_TIMESPEC(tv, ts) do { \
59 (ts)->tv_sec = (tv)->tv_sec; \ 59 (ts)->tv_sec = (tv)->tv_sec; \
60 (ts)->tv_nsec = (tv)->tv_usec * 1000; \ 60 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
61} while (/*CONSTCOND*/0) 61} while (/*CONSTCOND*/0)
62#define TIMESPEC_TO_TIMEVAL(tv, ts) do { \ 62#define TIMESPEC_TO_TIMEVAL(tv, ts) do { \
63 (tv)->tv_sec = (ts)->tv_sec; \ 63 (tv)->tv_sec = (ts)->tv_sec; \
64 (tv)->tv_usec = (ts)->tv_nsec / 1000; \ 64 (tv)->tv_usec = (suseconds_t)(ts)->tv_nsec / 1000; \
65} while (/*CONSTCOND*/0) 65} while (/*CONSTCOND*/0)
66 66
67/* 67/*
68 * Note: timezone is obsolete. All timezone handling is now in 68 * Note: timezone is obsolete. All timezone handling is now in
69 * userland. Its just here for back compatibility. 69 * userland. Its just here for back compatibility.
70 */ 70 */
71struct timezone { 71struct timezone {
72 int tz_minuteswest; /* minutes west of Greenwich */ 72 int tz_minuteswest; /* minutes west of Greenwich */
73 int tz_dsttime; /* type of dst correction */ 73 int tz_dsttime; /* type of dst correction */
74}; 74};
75 75
76/* Operations on timevals. */ 76/* Operations on timevals. */
77#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0L 77#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0L