Module Name: xsrc Committed By: christos Date: Wed Jan 2 18:51:58 UTC 2019
Modified Files: xsrc/external/mit/xf86-video-ati/dist/src/AtomBios: CD_Operations.c Log Message: make this work with both the old and the new version of compiler.h To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ xsrc/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c diff -u xsrc/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c:1.6 xsrc/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c:1.7 --- xsrc/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c:1.6 Wed Jan 2 10:54:24 2019 +++ xsrc/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c Wed Jan 2 13:51:58 2019 @@ -215,28 +215,29 @@ VOID IndirectIOCommand_CLEAR(PARSER_TEMP 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)