summaryrefslogtreecommitdiff
path: root/sys/dev/rasops/rasops4.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-08 17:40:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-08 17:40:31 +0000
commiteac48a633a72732691dccdad7d9f181f2ed8801e (patch)
treee07fd67499775ea59fbae660937466146b5ee782 /sys/dev/rasops/rasops4.c
parent20a16460fc3dadc3670f74649d9efd23d4e1672f (diff)
Big-endian fix here too.
Diffstat (limited to 'sys/dev/rasops/rasops4.c')
-rw-r--r--sys/dev/rasops/rasops4.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/rasops/rasops4.c b/sys/dev/rasops/rasops4.c
index 489ebc68334..577d2d9a5dc 100644
--- a/sys/dev/rasops/rasops4.c
+++ b/sys/dev/rasops/rasops4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rasops4.c,v 1.5 2002/07/27 22:18:20 miod Exp $ */
+/* $OpenBSD: rasops4.c,v 1.6 2006/01/08 17:40:30 miod Exp $ */
/* $NetBSD: rasops4.c,v 1.4 2001/11/15 09:48:15 lukem Exp $ */
/*-
@@ -244,10 +244,17 @@ rasops4_makestamp(ri, attr)
stamp_attr = attr;
for (i = 0; i < 16; i++) {
+#if BYTE_ORDER == LITTLE_ENDIAN
stamp[i] = (i & 1 ? fg : bg) << 8;
stamp[i] |= (i & 2 ? fg : bg) << 12;
stamp[i] |= (i & 4 ? fg : bg) << 0;
stamp[i] |= (i & 8 ? fg : bg) << 4;
+#else
+ stamp[i] = (i & 1 ? fg : bg) << 0;
+ stamp[i] |= (i & 2 ? fg : bg) << 4;
+ stamp[i] |= (i & 4 ? fg : bg) << 8;
+ stamp[i] |= (i & 8 ? fg : bg) << 12;
+#endif
}
}