Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnydW-0008G7-B7 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Mar 2017 02:26:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cnydV-0001PI-U3 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Mar 2017 02:26:01 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cnydV-0001P9-7r for pgsql-hackers@postgresql.org; Wed, 15 Mar 2017 02:26:01 +0000 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cnydR-00069L-GY for pgsql-hackers@postgresql.org; Wed, 15 Mar 2017 02:25:59 +0000 Received: by mail-pg0-x22e.google.com with SMTP id g2so2169186pge.3 for ; Tue, 14 Mar 2017 19:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rMngQjTT0ZdbnxfBs2PvjehHpXd9uZKMEEtmeY/Nu2A=; b=UHgLh7jmajXsgv+8MPL+Sk8qUueHrTiqsRUIgmBIq/tUpVYi4+veiCaOStc5NM8O62 47R5YocY/5cEohziyh6lmK3cSbCEboTlcKTt6KIqXCw2UdGE5xK4jUodQXuyPdKfC19r qyabJLRrPjsgIL+5hmygVYbkvFYIqnnmBzKsA= 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rMngQjTT0ZdbnxfBs2PvjehHpXd9uZKMEEtmeY/Nu2A=; b=K4VTNMaKPCVfVTAqD/Hr/0ccbn82VHyREDTtK7Xwv0S5yga/8vY0C83daUCl2K8eeG 4LEzAWwvDuGULlVb6X/As46VfPKg1Yy7/0urNtv0FaWvDWA7AstiB9SjDBleIlsK/yvZ WOmxsV8eC4AzISekf8AxLE7x4GviV+0K2eOu5FPJtRLmgGXKJ4taSHg2+hh/aIdUaJ/2 jyB6zfaCHxDnze38FKNsguTqeE4UbJEULO2J7r3t7QZiINdS38t9+HTMFu5Rz2A5zWL3 FdOSM1tFkyrVO0K7NYs2kA/7GK6jDfBFHzumpqjCYiJfnkmXg+oqZt3c1e7CcJfpOSfc BjvA== X-Gm-Message-State: AFeK/H2Hd+nZ8bdi8OrJy7Lsd6Jr6Eumk1v32n9TIg7SGkD0m7uACGA2Wgg00mdfGWAXqA== X-Received: by 10.99.210.81 with SMTP id t17mr975681pgi.80.1489544755287; Tue, 14 Mar 2017 19:25:55 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id y184sm449041pfg.86.2017.03.14.19.25.53 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 14 Mar 2017 19:25:53 -0700 (PDT) Date: Wed, 15 Mar 2017 02:25:38 +0000 From: Noah Misch To: Aleksander Alekseev Cc: David Steele , PostgreSQL Developers Subject: Re: [PATCH] Suppress Clang 3.9 warnings Message-ID: <20170315022538.GA1723554@tornado.leadboat.com> References: <20170220141239.GD12278@e733.localdomain> <20170313153553.GB2564@e733.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170313153553.GB2564@e733.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Mon, Mar 13, 2017 at 06:35:53PM +0300, Aleksander Alekseev wrote: > --- a/src/include/port.h > +++ b/src/include/port.h > @@ -395,11 +395,22 @@ extern double rint(double x); > extern int inet_aton(const char *cp, struct in_addr * addr); > #endif > > -#if !HAVE_DECL_STRLCAT > +/* > + * Unfortunately in case of strlcat and strlcpy we can't trust tests > + * executed by Autotools if Clang > 3.6 is used. Clang manages to compile > + * a program that shouldn't compile which causes wrong values of > + * HAVE_DECL_STRLCAT and HAVE_DECL_STRLCPY. More details could be found here: > + * > + * http://lists.llvm.org/pipermail/cfe-dev/2016-March/048126.html > + * > + * This is no doubt a dirty hack but apparently alternative solutions are > + * not much better. > + */ > +#if !HAVE_DECL_STRLCAT || defined(__clang__) > extern size_t strlcat(char *dst, const char *src, size_t siz); > #endif > > -#if !HAVE_DECL_STRLCPY > +#if !HAVE_DECL_STRLCPY || defined(__clang__) > extern size_t strlcpy(char *dst, const char *src, size_t siz); > #endif This is wrong on platforms that do have strlcpy() in libc. If I recall correctly, you can suppress the warnings in your own build by adding "ac_cv_func_strlcpy=no ac_cv_have_decl_strlcpy=no ac_cv_func_strlcat=no ac_cv_have_decl_strlcat=no" to the "configure" command line. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers