Re: [Mingw-w64-public] [PATCH] headers: Implement _set_com_error_handler and _com_raise_error in comdef.h

2022-03-30 Thread Martin Storsjö
On Wed, 30 Mar 2022, LIU Hao wrote: 在 2022-03-30 16:51, Martin Storsjö 写道: +__MINGW_SELECTANY void (WINAPI *__error_handler)(HRESULT hr,IErrorInfo *perrinfo) = _com_raise_error; + +inline void WINAPI _set_com_error_handler(void (WINAPI *pHandler)(HRESULT hr,IErrorInfo *perrinfo)) { + __er

Re: [Mingw-w64-public] [PATCH] headers: Implement _set_com_error_handler and _com_raise_error in comdef.h

2022-03-30 Thread LIU Hao
在 2022-03-30 16:51, Martin Storsjö 写道: +__MINGW_SELECTANY void (WINAPI *__error_handler)(HRESULT hr,IErrorInfo *perrinfo) = _com_raise_error; + +inline void WINAPI _set_com_error_handler(void (WINAPI *pHandler)(HRESULT hr,IErrorInfo *perrinfo)) { + __error_handler = pHandler; +} + +inline vo

[Mingw-w64-public] [PATCH] headers: Implement _set_com_error_handler and _com_raise_error in comdef.h

2022-03-30 Thread Martin Storsjö
These could also possibly be made non-inline if we'd be providing the comsupp library. However, that could break existing code that calls _com_issue_error (implicitly via _com_ptr_t in comip.h) and don't currently explicitly link in any comsupp library (which doesn't exist currently either). In th

Re: [Mingw-w64-public] [PATCH] headers: Add a few more annotation macros to sal.h

2022-03-30 Thread Martin Storsjö
On Wed, 30 Mar 2022, LIU Hao wrote: 在 2022-03-30 04:55, Martin Storsjö 写道: Signed-off-by: Martin Storsjö --- There's still probably lots of more defines that one could add, but these ones at least fix building (one aspect of) a piece of code I tried to build. --- mingw-w64-headers/include/sa

Re: [Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-30 Thread Martin Storsjö
On Wed, 30 Mar 2022, LIU Hao wrote: 在 2022-03-30 04:53, Martin Storsjö 写道: After some back-and-forth, we found that __mingw_setjmp/__mingw_longjmp do work in this case, but it is not obvious how to satisfy the conditions in the headers to switch to that implementation without switching the