pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c
Date: Fri, 15 Feb 2019 14:00:34 -0300
Message-ID: <20190215170034.GA28311@alvherre.pgsql> (raw)
In-Reply-To: <E1gugXk-000276-Ht@gemulon.postgresql.org>

Hmm, this should fix the build, but I'm rushing out to lunch -- maybe
I'm missing something.

inline patch 1: src/port/pg_bitutils.c (+4/-0 lines) download inline-1.patchdiff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c index 97bfcebe4e1..e0198f3ab35 100644 --- a/src/port/pg_bitutils.c +++ b/src/port/pg_bitutils.c @@ -90,9 +90,11 @@ pg_popcount_available(void) static int pg_popcount32_choose(uint32 word) { +#if defined(HAVE__GET_CPUID) || defined(HAVE__CPUID) if (pg_popcount_available()) pg_popcount32 = pg_popcount32_hw; else +#endif pg_popcount32 = pg_popcount32_builtin; return pg_popcount32(word); @@ -178,9 +180,11 @@ pg_popcount(const char *buf, int bytes) static int pg_popcount64_choose(uint64 word) { +#if defined(HAVE__GET_CPUID) || defined(HAVE__CPUID) if (pg_popcount_available()) pg_popcount64 = pg_popcount64_hw; else +#endif pg_popcount64 = pg_popcount64_builtin; return pg_popcount64(word);
-- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

view thread (8+ messages)  latest in thread

Message-ID: <20190215170034.GA28311@alvherre.pgsql>
Permalink:  ../20190215170034.GA28311@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190215170034.GA28311@alvherre.pgsql

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@2ndquadrant.com
  Subject: Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c
  In-Reply-To: <20190215170034.GA28311@alvherre.pgsql>
  References: <E1gugXk-000276-Ht@gemulon.postgresql.org> <20190215170034.GA28311@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox