From owner-freebsd-ports@FreeBSD.ORG Fri Sep 20 08:42:11 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 53E3BA7A for ; Fri, 20 Sep 2013 08:42:11 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay012.isp.belgacom.be (mailrelay012.isp.belgacom.be [195.238.6.179]) by mx1.freebsd.org (Postfix) with ESMTP id E642C2776 for ; Fri, 20 Sep 2013 08:42:10 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnwGAP4IPFJR8n3K/2dsb2JhbABbgwe/QoJ9gRgXdIIlAQEEAVYjBQsLDgoJJQ8qHgaIEAq6cY9nB4QeA5Amh1WRdoMmOg Received: from 202.125-242-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.242.125.202]) by relay.skynet.be with ESMTP; 20 Sep 2013 10:42:03 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r8K8g1Dl002236; Fri, 20 Sep 2013 10:42:02 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Fri, 20 Sep 2013 10:41:54 +0200 From: Tijl Coosemans To: Shane Ambler Subject: Re: libc++ differences between 9.2 and 10.0 Message-ID: <20130920104154.244e28f9@kalimero.tijl.coosemans.org> In-Reply-To: <523BDDCE.4060801@ShaneWare.Biz> References: <523BDDCE.4060801@ShaneWare.Biz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/YsKdTiLeOchA3H.FD1fdWsV"; protocol="application/pgp-signature" Cc: FreeBSD-ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2013 08:42:11 -0000 --Sig_/YsKdTiLeOchA3H.FD1fdWsV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 20 Sep 2013 15:01:58 +0930 Shane Ambler wrote: > I'm Starting to look at fixing my ports to build on 10.0 and there > appears to be a difference between 9.2 and 10.0 when it comes to using=20 > libc++ >=20 > The first port I am looking at is graphics/opencolorio. a patch was > submitted (ports/182220) that works fine on 10.0 but it breaks 9.2 build > when using clang with - > error: no type named 'shared_ptr' in namespace 'std' >=20 > The patch is simple, just adding - >=20 > #elif __cplusplus >=3D 199711 > #include > #define OCIO_SHARED_PTR std::shared_ptr > #define OCIO_DYNAMIC_POINTER_CAST std::dynamic_pointer_cast >=20 > As far as I can see both 10.0 and 9.2 use the same contrib/libc++ > contents but I don't see why 9.2 isn't finding std::shared_ptr Clang on 9.2 uses libstdc++ by default which doesn't define shared_ptr in . > The other thing is I don't think testing __cplusplus is the right way to > go but don't see an alternative. __cplusplus is defined in clang > irrespective of the library used so isn't really a reliable test. >=20 > Are there any defines to easily test for std::shared_ptr or is that a > test I need to create for configure or cmake - has already been done? The libc++ headers define _LIBCPP_VERSION so as long as at least one standard header has been included before including OpenColorABI.h, which seems to be the case, you can use #elif defined(_LIBCPP_VERSION). --Sig_/YsKdTiLeOchA3H.FD1fdWsV Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iF4EAREIAAYFAlI8ClkACgkQfoCS2CCgtitqqgEAhGy+kdCAIEDMHqdxZT1THBLU eJamOb+r1+xC8AEcF5wA/igJ6EGCrpdcs1pd0k5gcKTI+Tm3M5cuN3Kk2h3dkvZc =r6jg -----END PGP SIGNATURE----- --Sig_/YsKdTiLeOchA3H.FD1fdWsV--