From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4BB6F5AA0 for ; Thu, 5 Mar 2015 14:54:16 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 05 Mar 2015 05:54:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,347,1422950400"; d="scan'208";a="694362094" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga002.jf.intel.com with ESMTP; 05 Mar 2015 05:54:13 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 5 Mar 2015 21:54:11 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.234]) with mapi id 14.03.0195.001; Thu, 5 Mar 2015 21:54:10 +0800 From: "Qiu, Michael" To: David Marchand , "Richardson, Bruce" Thread-Topic: =?Windows-1252?Q?[dpdk-dev]_[PATCH_3/3]_librte=5Feal/common:_Fix_redeclar?= =?Windows-1252?Q?ation_of_enumerator_=91REG=5FEAX=92?= Thread-Index: AQHQV0aJJJU31JH3L0amHBzVEfuprw== Date: Thu, 5 Mar 2015 13:54:09 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CEEF2D@SHSMSX101.ccr.corp.intel.com> References: <1425561339-13300-1-git-send-email-michael.qiu@intel.com> <1425561339-13300-4-git-send-email-michael.qiu@intel.com> <20150305132332.GC1504@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] =?windows-1252?q?=5BPATCH_3/3=5D_librte=5Feal/common?= =?windows-1252?q?=3A_Fix_redeclaration_of_enumerator_=91REG=5FEAX=92?= X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 13:54:16 -0000 On 3/5/2015 9:36 PM, David Marchand wrote:=0A= > On Thu, Mar 5, 2015 at 2:23 PM, Bruce Richardson=0A= > > wrote:= =0A= >=0A= > On Thu, Mar 05, 2015 at 09:15:39PM +0800, Michael Qiu wrote:=0A= > > include/rte_cpuflags.h:154:2: error: redeclaration of enumerator=0A= > =91REG_EAX=92=0A= > > In file included from /usr/include/signal.h:358:0,=0A= > > from /usr/include/sys/wait.h:30,=0A= > > from /root/dpdk/app/test/test_mp_secondary.c:50:= =0A= > > /usr/include/sys/ucontext.h:180:3: note: previous definition of=0A= > =91REG_EAX=92 was here=0A= > >=0A= > > In i686, from REG_EAX to REG_EDX are all defined in=0A= > > /usr/include/sys/ucontext.h=0A= >=0A= >=0A= > Well, this is the same for x86_64.=0A= =0A= Yes, but for some reason, it was not include, see /usr/include/signal.h:358= =0A= =0A= # include =0A= # if defined __USE_XOPEN || defined __USE_XOPEN2K8=0A= /* This will define `ucontext_t' and `mcontext_t'. */=0A= # include =0A= # endif=0A= =0A= So only if __USE_XOPEN or __USE_XOPEN2K8 been defined will include =0A= =0A= =0A= Thanks,=0A= Michael=0A= >=0A= > $ grep -rl '\' /usr/include/=0A= > /usr/include/x86_64-linux-gnu/sys/ucontext.h=0A= >=0A= > $ ls -l /usr/include/sys/ucontext.h =0A= > lrwxrwxrwx 1 root root 34 Feb 22 12:45 /usr/include/sys/ucontext.h ->=0A= > ../x86_64-linux-gnu/sys/ucontext.h=0A= >=0A= > So I am not sure I understand why we redefine stuff already available=0A= > from the toolchain.=0A= > Rather than prefixing, I think we should get rid of this and include=0A= > the right header.=0A= >=0A= >=0A= > -- =0A= > David Marchand =0A= =0A=