Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yr9FT-0003v5-AF for pgsql-bugs@arkaria.postgresql.org; Sat, 09 May 2015 18:13:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yr9FS-0003Fb-RR for pgsql-bugs@arkaria.postgresql.org; Sat, 09 May 2015 18:13:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yr9FS-0003FV-65 for pgsql-bugs@postgresql.org; Sat, 09 May 2015 18:13:14 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Yr9FP-0004LT-9A for pgsql-bugs@postgresql.org; Sat, 09 May 2015 18:13:12 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Yr9FN-0005IS-4H; Sat, 09 May 2015 14:13:09 -0400 Date: Sat, 9 May 2015 14:13:09 -0400 From: Bruce Momjian To: Heikki Linnakangas Cc: Alex Dunn , pgsql-bugs@postgresql.org Subject: Re: psqlodbc: HEAD fails to build with recent clang Message-ID: <20150509181309.GD30684@momjian.us> References: <20150506040733.GR4686@Hell> <554AA2FD.4090705@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <554AA2FD.4090705@iki.fi> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Thu, May 7, 2015 at 02:25:49AM +0300, Heikki Linnakangas wrote: > On 05/06/2015 07:07 AM, Alex Dunn wrote: > >Beginning (I think) in Mavericks, Clang has begun taking functions and > >defining them as macros; they then conflict with declarations via > >headers. I think this is what's happening with `strlcat` in the most > >recent psqlodbc, since it builds fine with GCC. > > > >Here are the build logs with system info (errors start at L15 of 03.make): > >https://gist.github.com/dunn/f6ed7ac29a23aa06ba65#file-03-make-L15 > > > >Clang is: Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) > > Hmm, I think this is because there's a typo in our misc.h header > file (it was checking HAVE_STRLCPY instead of HAVE_STRLCAT), and > because of the typo it always defines a prototype for strlcat(), > even when the system provides that function. And that prototype then > conflicts with the one from the system headers. > > I've pushed a fix to that, I hope it fixed the build for you. Offlist, I didn't know you were working on ODBC --- very good. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs