A few of the changes here fix compile errors on Linux. Notably there are issues with hatrack.h due to a badly placed #endif and a couple of other Linux-specific things (like not having htonll, for example). Most changes are to silence warnings
I don't have a build environment setup for macOS, but I did check the changes to header includes and endian tests made to base.h with a small test program to make sure they'll work as expected.
It's not obvious, but for min/max, I changed to always use __typeof__(a) to silence sign mismatch in comparison errors. The effect of the comparison is the same, but the compiler doesn't complain this way. Arguably the comparison sites that raise warnings should be fixed to correctly address the warnings, though.
A few of the changes here fix compile errors on Linux. Notably there are issues with hatrack.h due to a badly placed #endif and a couple of other Linux-specific things (like not having
htonll
, for example). Most changes are to silence warningsI don't have a build environment setup for macOS, but I did check the changes to header includes and endian tests made to
base.h
with a small test program to make sure they'll work as expected.It's not obvious, but for min/max, I changed to always use
__typeof__(a)
to silence sign mismatch in comparison errors. The effect of the comparison is the same, but the compiler doesn't complain this way. Arguably the comparison sites that raise warnings should be fixed to correctly address the warnings, though.