Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c
От | Alvaro Herrera |
---|---|
Тема | Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c |
Дата | |
Msg-id | 20190215170034.GA28311@alvherre.pgsql обсуждение исходный текст |
Ответ на | pgsql: Fix compiler builtin usage in new pg_bitutils.c (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c
|
Список | pgsql-committers |
Hmm, this should fix the build, but I'm rushing out to lunch -- maybe I'm missing something. diff --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
В списке pgsql-committers по дате отправления: