> Date: Tue, 21 Aug 2012 13:12:28 +0200
> From: Martin Pieuchot <[email protected]>
> 
> Diff below correctly defines the CPU_TO_LE32() macro for needed for
> big-endian machines on OpenBSD. This is required to use dri on macppc. 
> 
> I'll do the necessary to get this upstream once it's in our tree.
> 
> Tested with the r200 driver, ok?

ok kettenis@

> Index: src/mesa/main//compiler.h
> ===================================================================
> RCS file: /cvs/xenocara/dist/Mesa/src/mesa/main/compiler.h,v
> retrieving revision 1.3
> diff -u -p -r1.3 compiler.h
> --- src/mesa/main//compiler.h 17 Aug 2012 13:58:17 -0000      1.3
> +++ src/mesa/main//compiler.h 21 Aug 2012 09:10:49 -0000
> @@ -263,6 +263,9 @@ static INLINE GLuint CPU_TO_LE32(GLuint 
>             ((x & 0x00ff0000) >>  8) |
>             ((x & 0xff000000) >> 24));
>  }
> +#elif defined(__OpenBSD__)
> +#include <sys/types.h>
> +#define CPU_TO_LE32( x )     htole32( x )
>  #else /*__linux__ */
>  #include <sys/endian.h>
>  #define CPU_TO_LE32( x )     bswap32( x )

Reply via email to