From owner-freebsd-questions@FreeBSD.ORG Wed Jan 7 20:16:20 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B76F106566C for ; Wed, 7 Jan 2009 20:16:20 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr8.xs4all.nl (smtp-vbr8.xs4all.nl [194.109.24.28]) by mx1.freebsd.org (Postfix) with ESMTP id B08D48FC13 for ; Wed, 7 Jan 2009 20:16:19 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr8.xs4all.nl (8.13.8/8.13.8) with ESMTP id n07KGHrO072625; Wed, 7 Jan 2009 21:16:18 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 8C06CBA95; Wed, 7 Jan 2009 21:16:17 +0100 (CET) Date: Wed, 7 Jan 2009 21:16:17 +0100 From: Roland Smith To: Robert Huff Message-ID: <20090107201617.GA37969@slackbox.xs4all.nl> References: <18788.63932.623165.925634@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <18788.63932.623165.925634@jerusalem.litteratus.org> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: questions@freebsd.org Subject: Re: semi OT: 64-bit-clean code X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:16:20 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 07, 2009 at 01:51:40PM -0500, Robert Huff wrote: >=20 > Is there a good guide anywhere to writing 64-bit-clean code? > Something that's thorough but understandable, possibly with examples > of the trickier bits. Do not assume that the size of a void* equals the size of an integer and you're probably halfway there. For the rest, searching for '64-bit-clean' will give you thousands of links. Test your code on both a 64-bit and 32-bit machine. One of them can be a virtual machine, of course. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkllDZEACgkQEnfvsMMhpyU1igCfT7QFxV8/TgleoWTE+Q0OgqAt XjkAn3fNndWkLjGOmAqrV+vC+GqObNnZ =sD+A -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--