[PATCH v1 28/35] nss/: Use __builtin_bswap32() instead of __bswap_constant_32()
Alejandro Colomar
alx@kernel.org
Sun Nov 9 21:53:58 GMT 2025
See the previous commit. We assume it's supported by the compiler.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
nss/getaddrinfo.c | 2 +-
nss/tst-rfc3484-2.c | 2 +-
nss/tst-rfc3484-3.c | 2 +-
nss/tst-rfc3484.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/nss/getaddrinfo.c b/nss/getaddrinfo.c
index 6726ace6fd..b2fcbc51f1 100644
--- a/nss/getaddrinfo.c
+++ b/nss/getaddrinfo.c
@@ -1237,7 +1237,7 @@ struct sort_result_combo
#if __BYTE_ORDER == __BIG_ENDIAN
# define htonl_c(n) n
#else
-# define htonl_c(n) __bswap_constant_32 (n)
+# define htonl_c(n) __builtin_bswap32 (n)
#endif
static const struct scopeentry
diff --git a/nss/tst-rfc3484-2.c b/nss/tst-rfc3484-2.c
index a5f8f82c04..f8e612b0bd 100644
--- a/nss/tst-rfc3484-2.c
+++ b/nss/tst-rfc3484-2.c
@@ -68,7 +68,7 @@ nss_action_list __nss_hosts_database attribute_hidden;
#if __BYTE_ORDER == __BIG_ENDIAN
# define h(n) n
#else
-# define h(n) __bswap_constant_32 (n)
+# define h(n) __builtin_bswap32 (n)
#endif
diff --git a/nss/tst-rfc3484-3.c b/nss/tst-rfc3484-3.c
index edf0b7db2e..684eda71d6 100644
--- a/nss/tst-rfc3484-3.c
+++ b/nss/tst-rfc3484-3.c
@@ -68,7 +68,7 @@ nss_action_list __nss_hosts_database attribute_hidden;
#if __BYTE_ORDER == __BIG_ENDIAN
# define h(n) n
#else
-# define h(n) __bswap_constant_32 (n)
+# define h(n) __builtin_bswap32 (n)
#endif
struct sockaddr_in addrs[] =
diff --git a/nss/tst-rfc3484.c b/nss/tst-rfc3484.c
index 5b4a0c5b82..19e0639609 100644
--- a/nss/tst-rfc3484.c
+++ b/nss/tst-rfc3484.c
@@ -68,7 +68,7 @@ nss_action_list __nss_hosts_database attribute_hidden;
#if __BYTE_ORDER == __BIG_ENDIAN
# define h(n) n
#else
-# define h(n) __bswap_constant_32 (n)
+# define h(n) __builtin_bswap32 (n)
#endif
struct sockaddr_in addrs[] =
--
2.51.0
More information about the Libc-alpha
mailing list