summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2004-12-15 16:03:40 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2004-12-15 16:03:40 +0000
commit40431b158a2fd6a840c51b840f7132195854d799 (patch)
treeacb647aa35103b25a7d22f8fe79d6f121d647656
parent6b3c1ce86489f8280b0244ee6b2c2fc1b97d13fa (diff)
downloaddrakx-40431b158a2fd6a840c51b840f7132195854d799.tar
drakx-40431b158a2fd6a840c51b840f7132195854d799.tar.gz
drakx-40431b158a2fd6a840c51b840f7132195854d799.tar.bz2
drakx-40431b158a2fd6a840c51b840f7132195854d799.tar.xz
drakx-40431b158a2fd6a840c51b840f7132195854d799.zip
fix on big endian platforms (ppc, ppc64)
-rw-r--r--tools/ddcprobe/vbe.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/ddcprobe/vbe.h b/tools/ddcprobe/vbe.h
index 4dd7e70c5..ac555c011 100644
--- a/tools/ddcprobe/vbe.h
+++ b/tools/ddcprobe/vbe.h
@@ -120,11 +120,18 @@ struct vbe_edid1_info {
unsigned char header[8];
union {
u_int16_t p;
- struct {
+ struct __attribute__ ((packed)) {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
u_int16_t char3: 5;
u_int16_t char2: 5;
u_int16_t char1: 5;
u_int16_t zero: 1;
+#else /* __BIG_ENDIAN */
+ u_int16_t zero: 1;
+ u_int16_t char1: 5;
+ u_int16_t char2: 5;
+ u_int16_t char3: 5;
+#endif
} u;
} manufacturer_name;
u_int16_t product_code;
@@ -176,9 +183,15 @@ struct vbe_edid1_info {
unsigned char reserved: 7;
} manufacturer_timings __attribute__ ((packed));
struct {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
u_int16_t xresolution: 8;
u_int16_t vfreq: 6;
u_int16_t aspect: 2;
+#else /* __BIG_ENDIAN */
+ u_int16_t aspect: 2;
+ u_int16_t vfreq: 6;
+ u_int16_t xresolution: 8;
+#endif
} standard_timing[8] __attribute__ ((packed));
union {
struct vbe_edid_detailed_timing detailed_timing[4];