Re: pgsql: Allow building with MSVC and Strawberry perl - Mailing list pgsql-committers

From Andrew Dunstan
Subject Re: pgsql: Allow building with MSVC and Strawberry perl
Date
Msg-id 02b5e6c8-a062-94f0-1add-db1fd1db5f0b@dunslane.net
Whole thread Raw
In response to pgsql: Allow building with MSVC and Strawberry perl  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pgsql: Allow building with MSVC and Strawberry perl
List pgsql-committers
On 2022-11-25 Fr 15:38, Andrew Dunstan wrote:
> 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.


Argh! drongo doesn't seem to like this. I thought I'd tested it.

A little further googling suggests that instead of


#define __builtin_expect(expr, val) (expr)


we should probably have something like


#define __builtin_expect(expr, val) ((expr) == (val))


I'll try that.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Allow building with MSVC and Strawberry perl
Next
From: Andres Freund
Date:
Subject: Re: pgsql: Allow building with MSVC and Strawberry perl