From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phillip Lougher Subject: Re: big-endian udfct_1_0r2 Date: Wed, 08 Oct 2003 21:43:28 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3F8476F0.2050705@lougher.demon.co.uk> References: <1065553341.8172.45.camel@patehci2> <20031007204951.A25423@falcon.csc.calpoly.edu> <1065631289.6625.34.camel@patehci2> <1065631668.6625.48.camel@patehci2> <1065635511.7602.38.camel@patehci2> <1065636544.7602.49.camel@patehci2> <20031008183049.GN10906@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from anchor-post-32.mail.demon.net ([194.217.242.90]:6407 "EHLO anchor-post-32.mail.demon.net") by vger.kernel.org with ESMTP id S261762AbTJHT7w (ORCPT ); Wed, 8 Oct 2003 15:59:52 -0400 Received: from lougher.demon.co.uk ([80.177.127.218]) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1A7KTO-000MvB-0W for linux-fsdevel@vger.kernel.org; Wed, 08 Oct 2003 20:59:51 +0100 To: linux-fsdevel@vger.kernel.org In-Reply-To: <20031008183049.GN10906@parcelfarce.linux.theplanet.co.uk> List-Id: linux-fsdevel.vger.kernel.org Matthew Wilcox wrote: > On Wed, Oct 08, 2003 at 12:09:04PM -0600, Pat LaVarre wrote: > >>>http://www.extra.research.philips.com/udf/download.html >>>For big endian platforms, >>>ENDIAN_SWAP must be defined at compilation time. >> >>Anyone here already working on fixing that feature? >> >>I'm too new myself to know how socially correct C code in linux does >>distinguish big-endian from little-endian. Perhaps the first fragment > > > Take a look at include/linux/byteorder/generic.h, those are the functions > to use. cpu_to_le{32,16} would probably be the favourite. > If you want to know what endianess architecture you're running on, #include This defines the symbol __BIG_ENDIAN or __LITTLE_ENDIAN as appropriate (by pulling in either include/linux/byteorder/big_endian.h or little_endian.h). Phillip