Skip to content

Commit f76191f

Browse files
committed
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
1 parent e522452 commit f76191f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pl/plperl/plperl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
#ifdef isnan
5555
#undef isnan
5656
#endif
57+
/* Work around for using MSVC and Strawberry Perl >= 5.30. */
58+
#define __builtin_expect(expr, val) (expr)
5759
#endif
5860

5961
/*

0 commit comments

Comments
 (0)