Re: byteswap: Use inline functions instead of macros.

2024-05-17 Thread Paul Eggert
On 2024-05-16 23:25, Collin Funk wrote: Hi Paul, On 5/16/24 10:16 PM, Paul Eggert wrote: +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) Unfortunately this usage is not portable, not for __has_bui

Re: byteswap: Use inline functions instead of macros.

2024-05-17 Thread Bruno Haible
Collin Funk asked: > I'm assuming that _GL_[module-name]_(rest-of-macro) can be assumed > safe? Yes, such a macro name is safe. Bruno

Re: byteswap: Use inline functions instead of macros.

2024-05-16 Thread Collin Funk
Hi Paul, On 5/16/24 10:16 PM, Paul Eggert wrote: >> +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ >> + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) > > Unfortunately this usage is not portable, not for __has_builtin or for any of > the other __

Re: byteswap: Use inline functions instead of macros.

2024-05-16 Thread Paul Eggert
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) Unfortunately this usage is not portable, not for __has_builtin or for any of the other __has_XX primitives. This is because older compilers will rep

byteswap: Use inline functions instead of macros.

2024-05-16 Thread Collin Funk
teswap.m4 should be good enough. If not the test cases I added in patch 2 should catch it at least. [1] https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00188.html CollinFrom 0858943ba21449b1f8fd0c0ed8c2342cdac3c374 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 16 May 2024 20:37:14 -0