From: Andrew Dunstan Date: Fri, 25 Nov 2022 20:28:38 +0000 (-0500) Subject: Allow building with MSVC and Strawberry perl X-Git-Tag: REL_16_BETA1~1229 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=341f4e002d461a3c5513cb864490cddae2b43a64;p=postgresql.git 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 --- diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index 0c196ea0469..5243f308bd5 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -58,6 +58,8 @@ #ifdef isnan #undef isnan #endif +/* Work around for using MSVC and Strawberry Perl >= 5.30. */ +#define __builtin_expect(expr, val) (expr) #endif /*