[Zlib-devel] crc32 big/little endian
Rolf Kalbermatter
r.kalbermatter at hccnet.nl
Thu Apr 22 02:46:22 EDT 2010
Mark Adler <madler at alumni.caltech.edu> wrote:
>How could long be less portable? Every C compiler since the
>beginning of time understands long, even with no header files
>at all. Obviously I'm missing something here.
Maybe because long on Windows 64bit is 32 bit while in Linux
64bit it is 64 bit??
Most likely so that long doesn't change size between 32bit and
64bit Windows and they have the MSCVC type _int64 for 64bit integers.
Not sure why GCC chose to change size between systems. Before I
assumed that int was meant to be the actual bitness integer and
all other integer types would stay the same size no matter what,
which of course never was entirely true for every single C compiler
out there but still seemed like a good straw to hold on to.
Rolf Kalbermatter
More information about the Zlib-devel
mailing list