From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id 0FD015949
 for <dev@dpdk.org>; Fri,  6 Mar 2015 11:32:52 +0100 (CET)
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga103.jf.intel.com with ESMTP; 06 Mar 2015 02:30:15 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.11,352,1422950400"; d="scan'208";a="537003286"
Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28])
 by orsmga003.jf.intel.com with ESMTP; 06 Mar 2015 02:32:35 -0800
Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by
 irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Fri, 6 Mar 2015 10:30:51 +0000
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.117]) by
 irsmsx155.ger.corp.intel.com ([169.254.14.159]) with mapi id 14.03.0195.001;
 Fri, 6 Mar 2015 10:30:51 +0000
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: =?iso-8859-1?Q?Simon_K=E5gstr=F6m?= <simon.kagstrom@netinsight.net>,
 "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH] headers: typeof -> __typeof__ to unbreak
 C++11 code
Thread-Index: AQHQVL5S0Gzolx2v5UuOLdugxt7f+J0PJXmAgAAhviA=
Date: Fri, 6 Mar 2015 10:30:50 +0000
Message-ID: <2601191342CEEE43887BDE71AB977258213F44D4@irsmsx105.ger.corp.intel.com>
References: <20150225142851.55406347@miho>
 <2601191342CEEE43887BDE71AB977258213F3012@irsmsx105.ger.corp.intel.com>
 <54F41765.1050403@netinsight.net> <54F9651B.7060603@netinsight.net>
In-Reply-To: <54F9651B.7060603@netinsight.net>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.182]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] headers: typeof -> __typeof__ to unbreak
 C++11 code
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Mar 2015 10:32:53 -0000


Hi Simon,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Simon K=E5gstr=F6m
> Sent: Friday, March 06, 2015 8:28 AM
> To: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] headers: typeof -> __typeof__ to unbreak =
C++11 code
>=20
> Ping? Konstantins simpler patch is fine for me, but at least one of
> these two would be very nice to have so that modern C++ code can use DPDK=
.
>=20
> // Simon

Can you do v2 as suggested, or do you want me to do it?
Thanks
Konstantin

>=20
> On 2015-03-02 08:55, Simon K=E5gstr=F6m wrote:
> > On 2015-02-27 17:24, Ananyev, Konstantin wrote:
> >> Actually, I wonder wouldn't something like the one below be sufficient=
?
> >>
> >> diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_e=
al/common/
> >> index 8ac940c..1867692 100644
> >> --- a/lib/librte_eal/common/include/rte_common.h
> >> +++ b/lib/librte_eal/common/include/rte_common.h
> >> @@ -51,6 +51,15 @@ extern "C" {
> >>  #include <errno.h>
> >>  #include <limits.h>
> >>
> >> +#ifndef typeof
> >> +#define typeof __typeof__
> >> +#endif
> >> +
> >> +#ifndef asm
> >> +#define asm __asm__
> >> +#endif
> >
> > Yes, I've tested, and this works with g++ as well.
> >
> > // Simon
> >