Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Allow building with MSVC and Strawberry perl
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 25 Nov 2022 20:28:38 +0000 (15:28 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 25 Nov 2022 20:37:34 +0000 (15:37 -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

src/pl/plperl/plperl.h

index 16186fc5293b744dc848e1d51ede8fb01b80ea6f..f71119b82b3869e8d75882a355ce0423f16d2ea4 100644 (file)
@@ -41,6 +41,8 @@
  */
 #ifdef _MSC_VER
 #define __inline__ inline
+/* Work around for using MSVC and Strawberry Perl >= 5.30. */
+#define __builtin_expect(expr, val) (expr)
 #endif
 
 /*