From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 191105690 for ; Thu, 5 Mar 2015 19:25:11 +0100 (CET) Received: by wiwl15 with SMTP id l15so5187088wiw.4 for ; Thu, 05 Mar 2015 10:25:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=exujl5SKOpGE34YCUHFEq//4p1YiHm6+OJTY00lRxv0=; b=QslWV1R0Nlp0LUYQyABLuEgGVoBMVSGP2yjQ/5bnWNWnN2zNGtsc2khQimfE5+cTLY W6qf6KSEQjYSqqR/BJ7GSuerMaUtBDHdLsa4uLHADglRknxj0+640Qg5TJYETLqa6S04 Uub5M375IaIFKZDfRoxssLq/YYenavzYe0tRXjTnsM4kwqoC5onu07L0K85SU3yFWjow yZOOd6PbjHwKsqI8SVDTpxtP+TCTUEJt2K0zhcGT76hWycP3QyBOsPhJ6vsN6BUYEhhy KPOe3skMLRAG05aMx1iy4OgBWG31J7m0FYsQz+b7OXkeZAuy3gr3Zk4XGAVXfrHNtcbc Ot2Q== X-Gm-Message-State: ALoCoQlvuCfLMEoiTasNywUUJWqQOoa0b6ne4+f5vsG1odmYPyT1t3ORojNqB23bLZahZ0Ft3DUD X-Received: by 10.180.14.196 with SMTP id r4mr67608387wic.77.1425579910891; Thu, 05 Mar 2015 10:25:10 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id hi6sm11588850wjc.34.2015.03.05.10.25.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 10:25:10 -0800 (PST) From: Thomas Monjalon To: "Qiu, Michael" Date: Thu, 05 Mar 2015 19:24:35 +0100 Message-ID: <2172702.LNYdJ2P2iC@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <533710CFB86FA344BFBF2D6802E60286CEF29E@SHSMSX101.ccr.corp.intel.com> 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] =?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?= 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 18:25:11 -0000 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.