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:34 -0500
commit171c7fffaa4a3f2b000f980ecb33c2f7441a9a03 (patch)
tree94e6b74995c3ed7aebf71708dc85d9afe7951a78 /src
parentaa9d916f671de1decdc3978b952ed0ab2670d2ed (diff)
downloadpostgresql-171c7fffaa4a3f2b000f980ecb33c2f7441a9a03.tar.gz
postgresql-171c7fffaa4a3f2b000f980ecb33c2f7441a9a03.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 ab24d6580c8..8619ff91f53 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
/*