From owner-freebsd-questions@FreeBSD.ORG Wed May 27 20:08:09 2009 Return-Path: Delivered-To: FreeBSD-Questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F5151065670 for ; Wed, 27 May 2009 20:08:09 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) by mx1.freebsd.org (Postfix) with ESMTP id 0713C8FC1F for ; Wed, 27 May 2009 20:08:07 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id n4RK85YE023647 for ; Wed, 27 May 2009 22:08:05 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 76925BA8E; Wed, 27 May 2009 22:08:05 +0200 (CEST) Date: Wed, 27 May 2009 22:08:05 +0200 From: Roland Smith To: FreeBSD-Questions@freebsd.org Message-ID: <20090527200805.GA20419@slackbox.xs4all.nl> References: <4A1AA3DC.5020300@network-i.net> <200905271048.27837.kirk@strauser.com> <200905271152.34237.kirk@strauser.com> <20090527190230.GB9937@Grumpy.DynDNS.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: 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.19 (2009-01-05) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Subject: Re: FreeBSD & Software RAID 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, 27 May 2009 20:08:10 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 27, 2009 at 09:24:17PM +0200, Wojciech Puchar wrote: > > I haven't looked at the ZFS code but this sort of thing is exactly why > > all code I write uses int8_t, int16_t, int32_t, uint8_t, ... even when > > the first thing I have to do with a new compiler is to work out the > > proper typedefs to create them. >=20 > int, short and char are portable,=20 Not completely, at least as far as C is concerned. I'd say that char and long are portable, but not short and int. According to K&R (and I don't think this has changed in later standards), a char is defined as one byte. Short, int and long can vary but short and int must be at least 16 bits, and a long must be at least 32 bits. Additionally a short may not be longer than an int which may not be longer than a long. But the size of an int depends on hardware platform and compiler data model. 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) --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkodnaUACgkQEnfvsMMhpyURWgCdFilgOTHdQFtX9nVOQfVTeKYF AAEAn0ENltNQIGFdAUUjzyo7UqgZJmly =e93a -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--