summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-06-05 16:48:54 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-06-05 16:48:54 +0000
commitaf2a1c1d679f870a8f30b17d3cf308807be3fb0e (patch)
tree33d9edf267a85fcda77be88e5150324051700a9d /src/mesa
parent28b03c6acb203bd4b523ea5ed39920bc52fc8fe5 (diff)
more big-endian tweaks
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/t_dd_vertex.h6
-rw-r--r--src/mesa/main/macros.h9
-rw-r--r--src/mesa/main/texutil.c8
3 files changed, 12 insertions, 11 deletions
diff --git a/src/mesa/drivers/common/t_dd_vertex.h b/src/mesa/drivers/common/t_dd_vertex.h
index 01773af7aa..ba031fc0bb 100644
--- a/src/mesa/drivers/common/t_dd_vertex.h
+++ b/src/mesa/drivers/common/t_dd_vertex.h
@@ -1,4 +1,4 @@
-/* $Id: t_dd_vertex.h,v 1.10 2002/06/03 16:06:35 brianp Exp $ */
+/* $Id: t_dd_vertex.h,v 1.11 2002/06/05 16:48:54 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -33,7 +33,7 @@ typedef struct {
#ifdef COLOR_IS_RGBA
typedef struct {
-#ifdef __BIG_ENDIAN
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
GLubyte alpha, blue, green, red;
#else
GLubyte red, green, blue, alpha;
@@ -41,7 +41,7 @@ typedef struct {
} TAG(_color_t);
#else
typedef struct {
-#ifdef __BIG_ENDIAN
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
GLubyte alpha, red, green, blue;
#else
GLubyte blue, green, red, alpha;
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 9444975ab1..294c928e35 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -1,9 +1,10 @@
+/* $Id: macros.h,v 1.27 2002/06/05 16:48:54 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.0.3
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -456,7 +457,7 @@ do { \
/* Byte swapping
*/
-#ifdef __BIG_ENDIAN
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#include <byteswap.h>
#define CPU_TO_LE32( x ) bswap_32( x )
#else
@@ -492,7 +493,7 @@ do { \
(((a) & 0xe0) | (((b) & 0xe0) >> 3) | (((c) & 0xc0) >> 6))
-#ifdef __BIG_ENDIAN
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#define PACK_COLOR_8888_LE( a, b, c, d ) PACK_COLOR_8888( d, c, b, a )
diff --git a/src/mesa/main/texutil.c b/src/mesa/main/texutil.c
index d840747a04..47d320cf07 100644
--- a/src/mesa/main/texutil.c
+++ b/src/mesa/main/texutil.c
@@ -1,8 +1,8 @@
-/* $Id: texutil.c,v 1.28 2002/06/03 16:06:34 brianp Exp $ */
+/* $Id: texutil.c,v 1.29 2002/06/05 16:48:54 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.0.2
+ * Version: 4.0.3
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -44,7 +44,7 @@
#define DEBUG_TEXUTIL 0
-#ifdef __BIG_ENDIAN
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#define APPEND16( a, b ) ( (a) << 16 | (b) )
#else
#define APPEND16( a, b ) ( (a) | (b) << 16 )
@@ -417,7 +417,7 @@ CONVERT_ARGB4444( texsubimage3d )
#include "texutil_tmp.h"
-#ifdef __BIG_ENDIAN
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#define CONVERT_TEXEL( dst, src ) \
{ const GLushort s = *(GLushort *)src; \