Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e23Bt-0002g6-Rk for pgsql-committers@arkaria.postgresql.org; Tue, 10 Oct 2017 22:39:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e23Bt-00080P-8U for pgsql-committers@arkaria.postgresql.org; Tue, 10 Oct 2017 22:39:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e23Bs-000804-OV for pgsql-committers@postgresql.org; Tue, 10 Oct 2017 22:39:56 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e23Bp-0008LC-L3 for pgsql-committers@postgresql.org; Tue, 10 Oct 2017 22:39:55 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9B4F720DC3; Tue, 10 Oct 2017 18:39:52 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 10 Oct 2017 18:39:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=VVNFqUiW5QlaTqtJbC 1GxhO2lsGuHgkRWwdxwhjIz18=; b=SW30/JWSzegYub3qSITOINbt+p1h7oZD8k WvGxZVpTDNek69CxxyWiy2tNsRdVvFoZEL4lX7lgsVRevUzjikZtAowXG8x3rzsA aTNMyXEVzptgmyAA+oRZN2o3GftQA6Anwr40Wgk4MGu0EbCq2dxgt2Da/COCcwaC 0J3apIdj/71Idd/H+GwhPkjS2e6uUoRTrgGQ3EYd/lfT/WDtN84HriIIy8x5O199 1QJcVZfI9Xe7FJ6TYrjEfEqXsHh/WCynrXxLgPXdXuRLdeKhTr8l2pmwOEkjEwXj mDdVMD7DHmtb6Zrjezo1sYZ4WOSL4XPh7OTmpnxmeRQ6nNGVsN+A== X-ME-Sender: X-Sasl-enc: BBEG0ocRcLprIuTETvW+XP2WiGHG+Yyy1+1Vv7jdtgQS 1507675192 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 550537E3DB; Tue, 10 Oct 2017 18:39:52 -0400 (EDT) Date: Tue, 10 Oct 2017 15:39:51 -0700 From: Andres Freund To: Tom Lane Cc: Andrew Dunstan , pgsql-committers@postgresql.org Subject: Re: pgsql: Add pg_strnlen() a portable implementation of strlen. Message-ID: <20171010223951.cn2oaijecml2s7ro@alap3.anarazel.de> References: <20171009231509.nlptgdrtg2au6frn@alap3.anarazel.de> <44745881-6095-e3ba-e8eb-23b1d92bffab@dunslane.net> <20171010194818.p2hhod32ezmvhryb@alap3.anarazel.de> <21912.1507668699@sss.pgh.pa.us> <20171010205315.g7l6tf3j5jzplqax@alap3.anarazel.de> <20171010215618.qbracvhslzvuxilv@alap3.anarazel.de> <31930.1507673415@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31930.1507673415@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2017-10-10 18:10:15 -0400, Tom Lane wrote: > Andres Freund writes: > > Here's a fix. Not quite sure whether we really need the > > HAVE_DECL_STRNLEN test, added it for symmetry. > > LGTM. Thanks for checking. > I think the DECL test is a good idea; the system definition > might be a macro or otherwise weird, in which case we'd cause problems > if we write an extern definition anyway. I was thinking about protecting it with HAVE_STRNLEN rather than not protecting it at all. But this works, so whatever ;) Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers