[flac-dev] FLAC__BYTES_PER_WORD==8 test results
Erik de Castro Lopo
mle+la at mega-nerd.com
Thu Dec 31 00:00:03 PST 2015
Brian Willoughby wrote:
> What's wrong with something incredible simple, like:
>
> #define FLAC__BYTES_PER_WORD (sizeof(int))
The fact that it actually is not correct. We want to determine
the size in bits of the CPU registers.
Here's what I know:
sizeof(int) sizeof (long)
---------------+----------------+-----------------
32 bit Linux | 4 | 4
64 bit Linux | 4 | 8
32 bit windows | 4 | 4
64 bit windows | 4 | 4
Note that sizeof(long) on 64 bit windows is 4!
Most other unixen follow the LP64 scheme used by Linux.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the flac-dev
mailing list