diff --git a/src/xpdev/genwrap.h b/src/xpdev/genwrap.h index bb7dc4998c4519c983a4b5ca0567a629472f0f79..3b725ec39ffe75e38ae894d6c0c772b5cb09b8b1 100644 --- a/src/xpdev/genwrap.h +++ b/src/xpdev/genwrap.h @@ -71,11 +71,11 @@ extern "C" { * On platforms where alloca() is not in libc, programs which use * it will fail to link when compiled with non-GNU compilers. */ -#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) +#if defined(_WIN32) +#include <malloc.h> +#elif __GNUC__ >= 2 || defined(__INTEL_COMPILER) #undef alloca /* some GNU bits try to get cute and define this on their own */ #define alloca(sz) __builtin_alloca(sz) -#elif defined(_WIN32) -#include <malloc.h> #endif /*********************/