Fix reading of host-endian VMAs.

This commit is contained in:
Ilari Liusvaara 2013-02-28 23:01:29 +02:00
parent 2004486a1e
commit caa216c290

View file

@ -111,15 +111,15 @@ public:
/** /**
* Get system endianess. * Get system endianess.
*/ */
#if DISABLE_FAST_MEMORY && (defined(__i386__) || defined(__x86_64__)) #if (defined(__i386__) || defined(__x86_64__))
static int get_system_endian() throw() { return -1; } static int get_system_endian() throw() { return -1; }
#else #else
static int get_system_endian() throw() { if(!sysendian) _get_system_endian(); return sysendian; } static int get_system_endian() throw() { if(!sysendian) sysendian = _get_system_endian(); return sysendian; }
#endif #endif
/** /**
* Do native unaligned reads work? * Do native unaligned reads work?
*/ */
#if DISABLE_FAST_MEMORY && (defined(__i386__) || defined(__x86_64__)) #if (defined(__i386__) || defined(__x86_64__))
static int can_read_unaligned() throw() { return true; } static int can_read_unaligned() throw() { return true; }
#else #else
static int can_read_unaligned() throw() { return false; } static int can_read_unaligned() throw() { return false; }