From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 30 21:02:45 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1735106570B; Fri, 30 Sep 2011 21:02:45 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2D98FC14; Fri, 30 Sep 2011 21:02:44 +0000 (UTC) Received: by yia13 with SMTP id 13so2342105yia.13 for ; Fri, 30 Sep 2011 14:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=PHa32iJh4DCnR4EpPxZXet6f/pRnHGHkMhaCp9dL7aE=; b=fyVWOSHnFWK/i2apca8EKdkQYOWuJlgxiz4NK2tSw0fA4XU+CPRwafoLFKrTGe9Spx /YOo5vuhs1PiAuP2oEdRxckoavn7gytH8notA1ejsXVHv9G8oG3y8eNINWEWF24USfEB JwaiTefSj1jezD4Eo0YAvS4kOS591xXKISLMA= MIME-Version: 1.0 Received: by 10.150.238.18 with SMTP id l18mr3684796ybh.335.1317414798868; Fri, 30 Sep 2011 13:33:18 -0700 (PDT) Received: by 10.151.145.18 with HTTP; Fri, 30 Sep 2011 13:33:18 -0700 (PDT) In-Reply-To: <362958423.20111001003037@serebryakov.spb.ru> References: <362958423.20111001003037@serebryakov.spb.ru> Date: Fri, 30 Sep 2011 13:33:18 -0700 Message-ID: From: Xin LI To: lev@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: sizeof(size_t) and other "semantic" types on 32 bit systems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 21:02:45 -0000 2011/9/30 Lev Serebryakov : > Hello, Hackers. > > =C2=A0I was surprised, when I discover that size_t are 32-bit wide on > =C2=A032-bit (i386) system. Which "semantic" type should I use, for > =C2=A0example, for storing GEOM size in bytes in system-independent way? = I > =C2=A0could use "uint64_t", of course, but I don't like this solution, as > =C2=A0it very low-level (ok, not so low-level as "unsigned long long", to > =C2=A0be honest). off_t? Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die