postgres.git / summary / log / commit / refs

commit    171c7fffaa4a3f2b000f980ecb33c2f7441a9a03
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Fri Nov 25 20:28:38 2022 +0000
First released in: 16.0, 11.19, 12.14, 13.10, 14.7, 15.2

    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


src/pl/plperl/plperl.h | 2 ++ 1 file changed, 2 insertions(+) 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 /* [parent: aa9d916f671d]