cxmisc.h depends on cvconfig.h, breaks non-GCC builds (Bug #329)
Description
cxmisc.h includes the following:
/* get alloca declaration */ #ifdef +GNUC+ #undef alloca #define alloca +builtin_alloca #elif defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 || \ defined WINCE || defined _MSC_VER || defined +BORLANDC+ #include <malloc.h> #elif defined HAVE_ALLOCA_H #include <alloca.h> #elif defined HAVE_ALLOCA #include <stdlib.h> #else #error "No alloca!" #endif
I am mitigating this problem with this workaround: <pre> <code class="diff"> --- a/include/opencv/cxmisc.h 2010-04-05 21:24:40.000000000 -0400 +++ b/include/opencv/cxmisc.h 2010-05-08 17:25:25.852393994 -0400 @@ -50,6 +50,10 @@ #include <limits.h> +#ifdef HAVE_CONFIG_H + #include <cvconfig.h> +#endif + /****************************************************************************************\ * Compile-time tuning parameters * \****************************************************************************************/ </code>
History
Updated by Vadim Pisarevsky almost 14 years ago
alloca/cvStackAlloc is not used in opencv anymore
- Status changed from Open to Done
- (deleted custom field) set to fixed