aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-11-25 15:28:38 -0500
committerAndrew Dunstan <andrew@dunslane.net>2022-11-25 15:37:33 -0500
commitf76191fd994aa1e49110b496f6c7119052118dee (patch)
tree540592357b71a03607d92491c7c9d6a372f2010a /src
parente52245228ecf3a58b031c820332bc56478bb1ba2 (diff)
downloadpostgresql-f76191fd994aa1e49110b496f6c7119052118dee.tar.gz
postgresql-f76191fd994aa1e49110b496f6c7119052118dee.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/pl/plperl/plperl.h2
1 files changed, 2 insertions, 0 deletions
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
/*