Re: pgsql: Allow building with MSVC and Strawberry perl

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Allow building with MSVC and Strawberry perl
Date: 2022-11-25 22:11:51
Message-ID: 02b5e6c8-a062-94f0-1add-db1fd1db5f0b@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-11-25 23:33:31 Re: pgsql: Allow building with MSVC and Strawberry perl
Previous Message Andrew Dunstan 2022-11-25 20:38:40 pgsql: Allow building with MSVC and Strawberry perl