From f76191fd994aa1e49110b496f6c7119052118dee Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Fri, 25 Nov 2022 15:28:38 -0500 Subject: [PATCH] Allow building with MSVC and Strawberry perl Strawberry uses __builtin_expect which Visual C doesn't have. For this case define it as a noop. Solution taken from vim sources. Backpatch to all live branches --- src/pl/plperl/plperl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index 6a615385b59..bba7f2afe34 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -54,6 +54,8 @@ #ifdef isnan #undef isnan #endif +/* Work around for using MSVC and Strawberry Perl >= 5.30. */ +#define __builtin_expect(expr, val) (expr) #endif /* -- 2.39.5