Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq8hT-0006Pw-8V for pgsql-bugs@arkaria.postgresql.org; Wed, 06 May 2015 23:25:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yq8hR-0003rh-A9 for pgsql-bugs@arkaria.postgresql.org; Wed, 06 May 2015 23:25:57 +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 1Yq8hQ-0003ra-9g for pgsql-bugs@postgresql.org; Wed, 06 May 2015 23:25:56 +0000 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Yq8hN-0005Ki-5V for pgsql-bugs@postgresql.org; Wed, 06 May 2015 23:25:54 +0000 Received: by wgic8 with SMTP id c8so673068wgi.1 for ; Wed, 06 May 2015 16:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=65LjstmMmzZ3Bwgj38eAog3iHRrWiBG//feFS8k6qhM=; b=WQYLnffvx9QEKzzuJeMC1HFxUtv77YSjnmmVr3CTbUb5lIbK80aBmhXKrquMV1ungp E/ziVMZKISJzYeidA2ef1mfnwSxspu4dw+9Li7+/Xk5x58qnXv06VSHzlgNDZ2JtH2qe dgfWJqJX4UcaHATfacUsxQUtwcNW4Cbr2eSa93wF1hbudpcgM81iDJPNj5+o8P2Y4Rqb ZDL9/mOr3LwR65nVo5kJrfXhghxLCCuvgdiTjcRbAG4dnJioifYxsy4q5QDwswKZrhBr fydq3720sZ+48ouZsufXSJ1SZgmtCMOO0mML1cC1TIwWYjo/3VksXdXvkD2uBvhaJz+0 kETw== X-Received: by 10.180.109.136 with SMTP id hs8mr1325907wib.73.1430954751714; Wed, 06 May 2015 16:25:51 -0700 (PDT) Received: from [192.168.1.99] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by mx.google.com with ESMTPSA id j12sm359867wjn.48.2015.05.06.16.25.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 May 2015 16:25:50 -0700 (PDT) Message-ID: <554AA2FD.4090705@iki.fi> Date: Thu, 07 May 2015 02:25:49 +0300 From: Heikki Linnakangas Reply-To: hlinnaka@iki.fi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Alex Dunn , pgsql-bugs@postgresql.org Subject: Re: psqlodbc: HEAD fails to build with recent clang References: <20150506040733.GR4686@Hell> In-Reply-To: <20150506040733.GR4686@Hell> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.3 (--) 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 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. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs