From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 20 15:14:22 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE44016A4CE for ; Thu, 20 Jan 2005 15:14:22 +0000 (GMT) Received: from mail.freebsd.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with SMTP id AF0BF43D5F for ; Thu, 20 Jan 2005 15:14:13 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 97851 invoked by uid 0); 20 Jan 2005 15:06:15 -0000 Received: from unknown (HELO beastie.frontfree.net) (219.239.99.7) by mail.freebsd.org.cn with SMTP; 20 Jan 2005 15:06:15 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id EB5241333A0 for ; Thu, 20 Jan 2005 23:13:59 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 43419-13 for ; Thu, 20 Jan 2005 23:13:51 +0800 (CST) Received: from localhost.localdomain (unknown [61.48.135.6]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by beastie.frontfree.net (Postfix) with ESMTP id D99EF1310D2 for ; Thu, 20 Jan 2005 23:13:50 +0800 (CST) From: Xin LI To: freebsd-hackers@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-m6hA+HqQC5h3RuPHQARE" Organization: The FreeBSD Simplified Chinese Project Date: Thu, 20 Jan 2005 23:12:35 +0800 Message-Id: <1106233955.1019.9.camel@spirit> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port X-Virus-Scanned: by amavisd-new at frontfree.net Subject: rstat_timeval: Different type from timeval on 64-bit platforms X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: delphij@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 15:14:23 -0000 --=-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 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--