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.
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.