[flac-dev] FLAC__SSE_OS change

Erik de Castro Lopo mle+la at mega-nerd.com
Sat Jun 25 07:09:03 UTC 2016


lvqcl wrote:

> 1) if FLAC__SSE_OS==1 then MSVC cannot compile current cpu.c:
> "#include <windows.h>" line is inactive and MSVC complains:
> cpu.c(278): error C2065: 'EXCEPTION_EXECUTE_HANDLER': undeclared identifier
> cpu.c(279): error C2065: 'STATUS_ILLEGAL_INSTRUCTION': undeclared identifier
> 
> 2) the current code (simplified):
> 
>      if(info->ia32.sse) {
> #if !FLAC__SSE_OS
>          /* assume user knows better than us; turn it off */
>          disable_sse(info);
> #elif ...
> #elif defined(__linux__) && !FLAC__SSE_OS
> #elif ...
> #else
> #endif
>      }
> 
> means that the __linux__ part is never compiled: if FLAC__SSE_OS==0 then
> this code becomes just "disable_sse(info);" and if FLAC__SSE_OS==1
> then "defined(__linux__) && !FLAC__SSE_OS" is always false.


I think I've fixed both those in:

    commit 23778a3a6018f5dcb5fc1ad6ac97ad8391afc69d
    Author: Erik de Castro Lopo <erikd at mega-nerd.com>
    Date:   Sat Jun 25 17:02:06 2016 +1000

        libFLAC/cpu.c: More pre-processor cleanups


I've tested on this in x86, x86_64, powerpc and armhf linux as well as
cross-compiling from linux to x86 and x86_64 Windows.

Please test compiling on Windows and anything else you can get your
hands on.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list