From: Kvetoslav Belda Date: Fri, 18 Apr 2014 14:20:27 +0000 (+0200) Subject: Use correct header file for alloca for Linux build. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/mf624-simulink.git/commitdiff_plain/f68e0aa7d1b39a46e039a8c3b7bc8cca4ae7e86c Use correct header file for alloca for Linux build. --- diff --git a/sfAnalogInput.c b/sfAnalogInput.c index fdc1722..69572f5 100644 --- a/sfAnalogInput.c +++ b/sfAnalogInput.c @@ -47,26 +47,27 @@ #include "simstruc.h" #include -#include #ifndef WITHOUT_HW #include "mf624_SIMULINK.h" #endif /*WITHOUT_HW*/ - #ifdef __GNUC__ - #define my_popcount __builtin_popcount - #else - int my_popcount(uint32_t patt) - { - int pops = 0; - while (patt) { - if (patt & 1) - pops++; - patt >>= 1; - } - return pops; +#ifdef __GNUC__ + #include + #define my_popcount __builtin_popcount +#else + #include + int my_popcount(uint32_t patt) + { + int pops = 0; + while (patt) { + if (patt & 1) + pops++; + patt >>= 1; } - #endif + return pops; + } +#endif /* Error handling