From 53edbd00c12ee1d27f1b9533933b32781125c758 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 25 Feb 2024 18:29:14 -0600 Subject: define _MSC_VER when preprocessing, add guards --- include/compat/cet.h | 8 +++++++- update.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/compat/cet.h b/include/compat/cet.h index 95517b0..bb845de 100644 --- a/include/compat/cet.h +++ b/include/compat/cet.h @@ -7,7 +7,13 @@ #define LIBCOMPAT_CET_H #ifndef _MSC_VER -#include_next + +#ifdef __CET__ +# include_next +#else +# define _CET_ENDBR +#endif + #endif #endif diff --git a/update.sh b/update.sh index e414f0d..08cac6f 100755 --- a/update.sh +++ b/update.sh @@ -186,7 +186,7 @@ $CP crypto/compat/ui_openssl_win.c crypto/ui $GREP -v OPENSSL_ia32cap_P $libcrypto_src/Symbols.list | $GREP '^[A-Za-z0-9_]' > crypto/crypto.sym fixup_masm() { - cpp -I./crypto -I./include/compat $1 \ + cpp -I./crypto -I./include/compat -D_MSC_VER $1 \ | sed -e 's/^#/;/' \ | sed -e 's/|/OR/g' \ | sed -e 's/~/NOT/g' \ -- cgit v1.2.3-55-g6feb