From owner-freebsd-current@FreeBSD.ORG Thu Sep 6 18:45:23 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C870916A41B for ; Thu, 6 Sep 2007 18:45:23 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id A13F013C494 for ; Thu, 6 Sep 2007 18:45:23 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l86IASvU083798; Thu, 6 Sep 2007 11:10:28 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l86IASle083797; Thu, 6 Sep 2007 11:10:28 -0700 (PDT) (envelope-from rizzo) Date: Thu, 6 Sep 2007 11:10:28 -0700 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20070906111028.A83649@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Cc: Subject: how to tell 64 vs 32 bit architecture ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2007 18:45:23 -0000 hi, i was wondering what is the proper way to tell a 64 vs 32 bit architecture. I see that some code in sys/ uses ' #ifdef __LP64__ ' but i am not sure if this is generic enough (ie not gcc or FreeBSD specific), and also suitable for userland (i.e. works on linux or other platforms as well). cheers luigi