binio: change get_lsb_ulong() to get_lsb_int32()
And add macro get_lsb_uint32(). Enable 2 commented out tests that now pass.o Since get_lsb_ulong() was sometimes used as an int_32_t and sometimes as a uint32_t this makes the code more explicit anf finesses different CC doing different, and incompatible, things with the code. It turns out that some, not all, CC will promote an (unsigned char) to (int) when you left shift it. This is required in C99 6.3.1.1.2. But Solaris does not do that. Then when the new int is sign extended and ORed in an unsigned, bad things happen.
Loading
Please register or sign in to comment