xz/src/common
Lasse Collin 4ffc60f323 tuklib_integer: Rename bswapXX to byteswapXX
The __builtin_bswapXX from GCC and Clang are preferred when
they are available. This can allow compilers to emit the x86 MOVBE
instruction instead of doing a load + byteswap as two instructions
(which would happen if the byteswapping is done in inline asm).

bswap16, bswap32, and bswap64 exist in system headers on *BSDs
and Darwin. #defining bswap16 on NetBSD results in a warning about
macro redefinition. It's safest to avoid this namespace conflict
completely.

No OS supported by tuklib_integer.h uses byteswapXX names and
a web search doesn't immediately find any obvious danger of
namespace conflicts. So let's try these still-pretty-short names
for the macros.

Thanks to Sam James for pointing out the compiler warning on
NetBSD 10.0.
2024-04-25 14:00:57 +03:00
..
common_w32res.rc Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
mythread.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
sysdefs.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_common.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_config.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_cpucores.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_cpucores.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_exit.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_exit.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_gettext.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_integer.h tuklib_integer: Rename bswapXX to byteswapXX 2024-04-25 14:00:57 +03:00
tuklib_mbstr.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_mbstr_fw.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_mbstr_width.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_open_stdxxx.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_open_stdxxx.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_physmem.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_physmem.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_progname.c Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_progname.h Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00