This commit is contained in:
Jay D Dee
2024-04-16 21:31:35 -04:00
parent 9d3a46c355
commit 4f930574cc
33 changed files with 757 additions and 609 deletions

View File

@@ -185,13 +185,13 @@ static inline bool is_windows(void)
*/
#endif
static inline uint32_t swab32(uint32_t v)
static inline uint32_t swab32(uint32_t x)
{
#ifdef WANT_BUILTIN_BSWAP
return __builtin_bswap32(v);
return __builtin_bswap32(x);
#else
return ( (x << 24) & 0xff000000u ) | ( (x << 8) & 0x00ff0000u )
| ( (x >> 8) & 0x0000ff00u ) | ( (x >> 24) & 0x000000ffu )
return ( ( (x) << 24 ) & 0xff000000u ) | ( ( (x) << 8 ) & 0x00ff0000u )
| ( ( (x) >> 8 ) & 0x0000ff00u ) | ( ( (x) >> 24 ) & 0x000000ffu )
// return bswap_32(v);