Improve support for CYGWIN#3928
Conversation
The patch 244c84e looks good to me.
--- b/codec/decoder/plus/src/welsDecoderExt.cpp
+++ a/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -90,7 +90,7 @@ namespace WelsDec {
***************************************************************************/
DECLARE_PROCTHREAD (pThrProcInit, p) {
SWelsDecThreadInfo* sThreadInfo = (SWelsDecThreadInfo*)p;
-#if defined(WIN32)
+#if defined(WIN32) && !defined(__CYGWIN__)
_alloca (WELS_DEC_MAX_THREAD_STACK_SIZE * (sThreadInfo->uiThrNum + 1));
#endif
return sThreadInfo->pThrProcMain (p);
You are right. This (a1ae590) should be the right thing here. |
a1ae590 to
74f2a54
Compare
|
Thank you very much. |
I tried to build openh264 on CYGWIN but I got few errors that can be fixed quite easily, hopefully.
The platform "cygwin" is not recognized by the script for Meson and this message is printed on the console.
However, CYGWIN can be handled by adding its name in the same path where MinGW is also handled.
Later, this error appears on the console:
Similar to other POSIX platforms, CYGWIN supports
alloca()rather than_alloca(), so this function needs to be used for reserving stack space.Finally, this last error happens:
On x86_64 and aarch64 ports,
longhas a size of 8 byte, whileLONGis still 4 bytes even when_WIN64is defined with Windows APIs.This can be fixed by using a local parameter declared as
LONGand, in my opinion, it would be worth to do it also for traditional_WIN32platforms for a clear type matching.I hope that you will find these tiny patches useful.