aklomp / base64

Fast Base64 stream encoder/decoder in C99, with SIMD acceleration
BSD 2-Clause "Simplified" License
866 stars 162 forks source link

Update word size detection #87

Closed mayeut closed 2 years ago

mayeut commented 2 years ago

The detection for word size was dependent on __LONG_WIDTH__ for at least gcc Alpine Linux (probably other musl distros too). This is not working with clang which does not define __LONG_WIDTH__. Replace __LONG_WIDTH__ by __SIZE_WIDTH__. As this will not work as expected for x32 ABI, add a robust x32 detection first.