Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gugr1-0001zw-Fl for pgsql-committers@arkaria.postgresql.org; Fri, 15 Feb 2019 17:00:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gugr0-0006aY-1a for pgsql-committers@arkaria.postgresql.org; Fri, 15 Feb 2019 17:00:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gugqz-0006aP-Nz for pgsql-committers@lists.postgresql.org; Fri, 15 Feb 2019 17:00:45 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gugqt-000077-Eu for pgsql-committers@lists.postgresql.org; Fri, 15 Feb 2019 17:00:45 +0000 Received: by mail-qk1-x744.google.com with SMTP id u188so6075941qkh.8 for ; Fri, 15 Feb 2019 09:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=hCZbR6QC3N4N8KBwtojaWtpYFuLtdrBigYu7lEQYru8=; b=fe5Z3al9hrlZ9ddAwHfJNWhMWgGgzqT8SAh4R9vCFJLAJsSRSaIkN02RWeJKZhApVr a0s+lRWBqSrm565/29lsnSRQYKTyVOFUpunDcEmbLr68DLhsWZopF0mgaRkQ7jz7ND50 pW3mcJgQP8mu7zPOmbVSKS25lVkN7/JBV/R3Z5sbkrJoWfxC8YcyHbs7UR7xgv/48NUz dJIvnmrXaY2rfuqX1dvChjarz9Drv+oVbFysYsWznEYCMEhwJilnDtZCheFxHPhaPSLf VvIB72QAzFqQngg/23QnKV+/gfyToeItPXM2aOMOkSD3EV5WTMaEES+p6vrajm/ORrHL dkeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hCZbR6QC3N4N8KBwtojaWtpYFuLtdrBigYu7lEQYru8=; b=ha8MvHCJh5m7SgZkJ34N3g2Dk8L9vCRSU+jhGxBYjzsjO80HmfO7F2guBG6Gawc0Nr /JlC+N4mpYdmEFb4YEiwL/IVFSMbF7GRPQcJpdOYl4L995rf69v62MbfxX3io4RVoyGo BLxWxZL9d4utbj5b5fVWmznkqj6jkqRPaZaWYknbF6snhejwNFUhMq3eHoB8Ytx5mA8X oDdMoR3AUr92d7vZdSuka/EugJ9YxMKsLqyNshLPJvmnqqoffB1zvPkD13BbhSYSOd4E j5qqYdIgqHEvzadbSx4sdvs5n+MqutgtKDmMt9XNgpH1mkK+JCeQUg59gSuJPaZIksIh SCaw== X-Gm-Message-State: AHQUAuYySB0dpEu3nZM6YCUsq1rz/G5/M8FS3ULgsmiNT5+WEmzrelJU Gu7z2cVVqb6j6rtNruDufRkpRKBwb6p/10h4XW2J9IUVZMETKI3S3VY09ixXTMUrxOu8ZHtHZUL H5t048AFrhrPEA55XYUUpX9cdVZfYbI9rrTOK9ke5YS236e8njlDBHuBiULTCtHZQjCbEjRY0aM +yL7lLU/c+0ut9kFiQYdE/ X-Google-Smtp-Source: AHgI3IZMaKpJogwI85zoph2IM/C2N8CvBWS+xh/MDn+NzdMygxWO+riHlz0zY9FjYoJHSKYvJ+NILA== X-Received: by 2002:a37:b142:: with SMTP id a63mr7773042qkf.16.1550250037874; Fri, 15 Feb 2019 09:00:37 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id d50sm5175902qta.31.2019.02.15.09.00.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 09:00:37 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id B1536120FB9; Fri, 15 Feb 2019 14:00:34 -0300 (-03) Date: Fri, 15 Feb 2019 14:00:34 -0300 From: Alvaro Herrera To: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix compiler builtin usage in new pg_bitutils.c Message-ID: <20190215170034.GA28311@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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