blob: 41ae993459eebb7969f476e7bfb1770bae3e0df4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-aa,v 1.11 2009/06/05 11:10:35 wiz Exp $
--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2009-01-22 19:38:33 +0200
+++ src/mesa/drivers/dri/mach64/mach64_context.h 2009-05-19 12:13:08 +0300
@@ -294,12 +294,19 @@ extern GLboolean mach64UnbindContext( __
#define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0)
#define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0)
#else
+/* XXX mesa should handle many more platforms here [properly] */
+#if defined(__NetBSD__)
+#include <sys/types.h>
+#include <machine/byteswap.h>
+#define bswap_32 bswap32
+#else
#ifndef __OpenBSD__
#include <byteswap.h>
#else
#include <machine/endian.h>
#define bswap_32 bswap32
#endif
+#endif
#define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
#define LE32_IN_FLOAT( x ) \
|