|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Remove little-endian assumption from libr
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170090113 0
# Node ID e7ceed4ebcd9a60a9828121c68a15c7c62f9a8cb
# Parent 21d6135f522fb309b830f803c4b6d289f2b5e092
Remove little-endian assumption from library code.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/common/lib.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
diff -r 21d6135f522f -r e7ceed4ebcd9 xen/common/lib.c
--- a/xen/common/lib.c Mon Jan 29 16:50:22 2007 +0000
+++ b/xen/common/lib.c Mon Jan 29 17:01:53 2007 +0000
@@ -2,6 +2,7 @@
#include <xen/ctype.h>
#include <xen/lib.h>
#include <xen/types.h>
+#include <asm/byteorder.h>
/* for ctype.h */
unsigned char _ctype[] = {
@@ -80,9 +81,15 @@ union uu {
long sl[2]; /* as two signed longs */
unsigned long ul[2]; /* as two unsigned longs */
};
-/* XXX RN: Yuck hardcoded endianess :) */
+
+#ifdef __BIG_ENDIAN
+#define _QUAD_HIGHWORD 0
+#define _QUAD_LOWWORD 1
+#else /* __LITTLE_ENDIAN */
#define _QUAD_HIGHWORD 1
#define _QUAD_LOWWORD 0
+#endif
+
/*
* Define high and low longwords.
*/
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Remove little-endian assumption from library code.,
Xen patchbot-unstable <=
|
|
|
|
|