define _MSC_VER when preprocessing, add guards

This commit is contained in:
Brent Cook
2024-02-25 18:29:14 -06:00
parent 499a33a35d
commit 9584fb3e0a
2 changed files with 8 additions and 2 deletions

View File

@@ -7,7 +7,13 @@
#define LIBCOMPAT_CET_H
#ifndef _MSC_VER
#include_next <cet.h>
#ifdef __CET__
# include_next <cet.h>
#else
# define _CET_ENDBR
#endif
#endif
#endif

View File

@@ -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' \