Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-ati/dist/src/AtomBios make this wo...
details: https://anonhg.NetBSD.org/xsrc/rev/102000b9351c
branches: trunk
changeset: 10070:102000b9351c
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 02 18:51:58 2019 +0000
description:
make this work with both the old and the new version of compiler.h
diffstat:
external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c | 15 +++++-----
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r e64af9060b19 -r 102000b9351c external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c
--- a/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c Wed Jan 02 15:54:24 2019 +0000
+++ b/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c Wed Jan 02 18:51:58 2019 +0000
@@ -215,28 +215,29 @@
pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[2]);
}
-/* from xorg-server 1.18 compiler.h */
-struct __una_u64 { uint64_t x __attribute__((packed)); };
-struct __una_u32 { uint32_t x __attribute__((packed)); };
+/* Avoid conflicts with older versions of compiler.h */
+
+#define ldw_u xldw_u
+#define ldl_u xldl_u
+#define stl_u xstl_u
static __inline__ uint16_t ldw_u(uint16_t *p)
{
uint16_t ret;
- memmove(&ret, p, sizeof(*p));
+ memmove(&ret, p, sizeof(ret));
return ret;
}
static __inline__ uint32_t ldl_u(uint32_t *p)
{
uint32_t ret;
- memmove(&ret, p, sizeof(*p));
+ memmove(&ret, p, sizeof(ret));
return ret;
}
static __inline__ void stl_u(uint32_t val, uint32_t *p)
{
- struct __una_u32 *ptr = (struct __una_u32 *) p;
- ptr->x = val;
+ memmove(p, &val, sizeof(*p));
}
UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
Home |
Main Index |
Thread Index |
Old Index