From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: =?utf-8?q?=5BPATCH_3/3_v2=5D_librte=5Feal/common=3A_Fi?= =?utf-8?q?x_redeclaration_of_enumerator_=E2=80=98REG=5FEAX?= =?utf-8?b?4oCZ?= Date: Thu, 05 Mar 2015 19:24:35 +0100 Message-ID: <2172702.LNYdJ2P2iC@xps13> References: <1425561339-13300-4-git-send-email-michael.qiu@intel.com> <2382780.BfG7EQavsa@xps13> <533710CFB86FA344BFBF2D6802E60286CEF29E@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: "Qiu, Michael" Return-path: In-Reply-To: <533710CFB86FA344BFBF2D6802E60286CEF29E-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2015-03-05 16:31, Qiu, Michael: > On 2015/3/5 22:39, Thomas Monjalon wrote: > > 2015-03-05 14:03, Qiu, Michael: > >> On 3/5/2015 9:54 PM, David Marchand wrote: > >>> On Thu, Mar 5, 2015 at 2:50 PM, Michael Qiu >>> > wrote: > >>> > >>> include/rte_cpuflags.h:154:2: error: redeclaration of enumera= tor > >>> =E2=80=98REG_EAX=E2=80=99 > >>> In file included from /usr/include/signal.h:358:0, > >>> from /usr/include/sys/wait.h:30, > >>> from /root/dpdk/app/test/test_mp_secondary.c= :50: > >>> /usr/include/sys/ucontext.h:180:3: note: previous definition = of > >>> =E2=80=98REG_EAX=E2=80=99 was here > >>> > >>> In i686, from REG_EAX to REG_EDX are all defined in > >>> /usr/include/sys/ucontext.h > >>> > >>> Rename to CPU_REG_EAX to avoid this issue. > >>> > >>> Signed-off-by: Michael Qou >>> > > >>> > >>> > >>> NAK. > >>> > >> I have answered in you last thread, please check the mail. > >> > >> Yes, but for some reason, it was not include, see /usr/include/sig= nal.h:358 > >> > >> # include > >> # if defined __USE_XOPEN || defined __USE_XOPEN2K8 > >> /* This will define `ucontext_t' and `mcontext_t'. */ > >> # include > >> # endif > >> > >> So only if __USE_XOPEN or __USE_XOPEN2K8 been defined will include= =20 > >> > > So try to define USE_XOPEN. > > > >> Why NAK? > > Because it seems you didn't really try to include system headers. >=20 > See below(ucontext.h:25): > #ifdef __x86_64__ > ... > #ifdef __USE_GNU > enmu{ > ... > REG_RBX, > # define REG_RBX REG_RBX > REG_RDX, > # define REG_RDX REG_RDX > REG_RAX, > # define REG_RAX REG_RAX > REG_RCX, > # define REG_RCX REG_RCX > ... > }; > #endif > ... > #else /* !__x86_64__ */ > ... > #ifdef __USE_GNU > enmu{ > ... > REG_EBX, > # define REG_EBX REG_EBX > REG_EDX, > # define REG_EDX REG_EDX > REG_ECX, > # define REG_ECX REG_ECX > REG_EAX, > # define REG_EAX REG_EAX > ... > }; > #endif > ... > #endif /* !__x86_64__ */ >=20 >=20 > For none x86_64 platform will be defined as REG_E*X, but x86_64 will = be > REG_R*X. >=20 > This is why only happens in i686 platform. >=20 > Does this clear? OK thanks. So it is not possible to use this system header. It seems your patch is a good approach.