[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 09/23] lz4: add support for OSes that don't have asm/unaligned.h



On Wed, 2014-04-23 at 18:18 +0200, Roger Pau Monnà wrote:

> > In the scaffolding and not by modifying the imported code I pressume? In
> > which case, good thanks!
> 
> While working around this issue, I've noticed that xen/common/lz4/defs.h
> has one branch for little endian and another one for big endian, but
> while compiling libxc, "__LITTLE_ENDIAN" is not defined and we fall into
> big endian, which seems wrong, because we don't have support for any big
> endian arch.
> 
> Would it be OK to get rid of the big endian case, and only support
> little endian by default?

I think it would be better to #define __LITTLE_ENDIAN than to diverge
from the upstream of this file.

gcc has some built #defines for this see [0], but I'd have thought this
would be something autoconf could assist with. Or we could probably get
away with a static #define in tools/libxc/xc_dom_decompress_lz4.c.

Ian.

[0] 
http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros

          /* Test for a little-endian machine */
          #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__     
> 
> Roger.
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.