]> Savannah Git Hosting - gnulib.git/commit
byteswap: Use __has_builtin portably.
authorCollin Funk <collin.funk1@gmail.com>
Fri, 17 May 2024 06:18:16 +0000 (23:18 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 17 May 2024 06:18:16 +0000 (23:18 -0700)
commit73541d459cdd964e71f40ad447e50a7253a6f20d
treec044e02cbee22ea2337b771b350125eb63e531c9
parent15cd8edb6ec9aed2585e10456d46eec09d5c1b8b
byteswap: Use __has_builtin portably.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00249.html>.

* lib/byteswap.in.h (_GL_BYTESWAP_HAS_BUILTIN_BSWAP16)
(_GL_BYTESWAP_HAS_BUILTIN_BSWAP32)
(_GL_BYTESWAP_HAS_BUILTIN_BSWAP64): Define using the GCC version or
__has_builtin after checking that it is defined.
(bswap_16, bswap_32, bswap_64): Use the macros.
* modules/byteswap (Depends-on): Add stdbool as a conditional
dependency.
ChangeLog
lib/byteswap.in.h
modules/byteswap