Date: Thu, 20 Jan 2005 23:12:35 +0800 From: Xin LI <delphij@frontfree.net> To: freebsd-hackers@FreeBSD.org Subject: rstat_timeval: Different type from timeval on 64-bit platforms Message-ID: <1106233955.1019.9.camel@spirit>
next in thread | raw e-mail | index | archive | help
--=-m6hA+HqQC5h3RuPHQARE Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Dear folks, During my recent overhaul of our code I found that rstat_timeval (defined in include/rpcsvc/rstat.h) did the following: %%% struct rstat_timeval { u_int tv_sec; u_int tv_usec; }; %%% While we have timeval defined as: %%% struct timeval { long tv_sec; suseconds_t tv_usec; }; %%% And we have some potentially incorrect code, which directly cast rstat_timeval* into timeval*, which will finally cause some wasted data overwritten on other places. Is there any reason rstat_timeval is not an alias of timeval? Is this for backward compatibility or inter-operation with other operating systems? Thanks in advance! Cheers, --=20 Xin LI <delphij delphij net> http://www.delphij.net/ --=-m6hA+HqQC5h3RuPHQARE Content-Type: application/pgp-signature; name=signature.asc Content-Description: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0?= =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8?= =?UTF-8?Q?=E5=88=86?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBB78pj/cVsHxFZiIoRAmuAAJ9vh/2HdoBCwk4+/U7VDFjj0icOyACeNXvh 3/tmDkols/ElgExKapPc1Vs= =pysw -----END PGP SIGNATURE----- --=-m6hA+HqQC5h3RuPHQARE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1106233955.1019.9.camel>