[vtkusers] #Defines for Big or Little Endian
David Gobbi
dgobbi at atamai.com
Fri Sep 1 12:14:37 EDT 2006
Mike Jackson wrote:
> As a follow up to my own post I think that in the vtkConfigure.h on OS X I
> think that there needs to be something like:
>
> /* Byte order. */
> #if defined(__i386__) && defined(__GNUC__)
> #undef VTK_WORDS_BIGENDIAN
> #elif defined(__ppc__) && defined(__GNUC__)
> #define VTK_WORDS_BIGENDIAN
> #else
> #error Do not know the endianess of this architecture
> #endif
>
> At the top. This is pretty much what Apple uses in there own files. Testing
> is required.. Maybe put this into the next version of VTK to help out those
> of us trying to compile universal binaries?
>
This sounds good to me. Can a couple people try this and see if
it makes cross-compiling work?
The only negative is that the endianness specified in the CMakeCache.txt
will not always match the endianness of the code. But that's a small
price to pay for having code that actually runs.
- David
More information about the vtkusers
mailing list