git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d94f29c)
Allow building with MSVC and Strawberry perl
2022年11月25日 20:28:38 +0000 (15:28 -0500)
2022年11月25日 20:28:38 +0000 (15:28 -0500)
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 0c196ea0469ec8b2d6dcaa67e2b0a5b1ccb5d443..5243f308bd5c909cf1387886dc4a908ce8c7b16c 100644 (file)
--- 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
/*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /