[PSEH] Add implementation for GCC amd64

Also, put include directory next to the library and use
target_include_directories(.. INTERFACE ..) to get this right.
This is because :
 - Having includes & implementation in two different places buggers me
 - This makes sure that there is no "if it compiles everything is fine" behaviour from anyone
   because now even static libraries need it for GCC amd64 build
Also add __USE_PSEH2__ define for the non SEH-aware compilers out there and use it in a few headers
where we define macros involving __try
This commit is contained in:
Jérôme Gardou 2021-04-22 11:11:34 +02:00 committed by Jérôme Gardou
parent d31856cda1
commit ba74a05a17
14 changed files with 230 additions and 50 deletions

View file

@ -5,7 +5,7 @@
#endif /* _INC_WINDOWS */
#endif
#ifndef RC_INVOKED
#if defined(__USE_PSEH2__) && !defined(RC_INVOKED)
#include <pseh/pseh2.h>
#endif
@ -122,7 +122,7 @@ typedef int RPC_STATUS;
#include <excpt.h>
#include <winerror.h>
#ifndef __GNUC__
#ifndef __USE_PSEH2__
#define RpcTryExcept __try {
#define RpcExcept(expr) } __except (expr) {
#define RpcEndExcept }