Avoid namespace collision: rename bswap_XX to radeon_bswap_XX

xorg-server includes its own bswap_16, bswap_32 etc macros in
its misc.h. This is transcluded after radeon.h in some files.

If the operating system defines bswap_XX in a way that is
unsuitable for a function name (e.g. on NetBSD), this results
in build failures.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/merge_requests/23>
This commit is contained in:
nia
2024-05-04 02:47:08 +02:00
committed by Marge Bot
parent 1f81004bfc
commit b65036af74
2 changed files with 17 additions and 14 deletions

View File

@@ -254,11 +254,11 @@ b = bswap16(a);
if test "$USE_SYS_ENDIAN_H" = "yes" ; then
AC_DEFINE([USE_SYS_ENDIAN_H], 1,
[Define to use byteswap macros from <sys/endian.h>])
AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16,
AC_DEFINE_UNQUOTED([radeon_bswap_16], ${BSWAP}16,
[Define to 16-bit byteswap macro])
AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32,
AC_DEFINE_UNQUOTED([radeon_bswap_32], ${BSWAP}32,
[Define to 32-bit byteswap macro])
AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64,
AC_DEFINE_UNQUOTED([radeon_bswap_64], ${BSWAP}64,
[Define to 64-bit byteswap macro])
fi
fi