From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3A25181D39 for ; Wed, 2 Nov 2016 09:47:55 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 02 Nov 2016 09:47:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,583,1473145200"; d="scan'208";a="1079625643" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga002.fm.intel.com with ESMTP; 02 Nov 2016 09:47:56 -0700 Received: from orsmsx162.amr.corp.intel.com (10.22.240.85) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 2 Nov 2016 09:47:56 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.50]) by ORSMSX162.amr.corp.intel.com ([10.22.240.85]) with mapi id 14.03.0248.002; Wed, 2 Nov 2016 09:47:46 -0700 From: "Kinney, Michael D" To: "Gao, Liming" , "Song, BinX" , "edk2-devel@lists.01.org" , "Kinney, Michael D" Thread-Topic: [PATCH] MdePkg/BaseLib: Re-define CHAR_NULL in BaseLib Thread-Index: AdI04uqUOt70ef5FREKiiC0v+9bN4QAAjPOgABC3FpA= Date: Wed, 2 Nov 2016 16:47:45 +0000 Message-ID: References: <559D2DF22BC9A3468B4FA1AA547F0EF1354922@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14B49D8FA@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49D8FA@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTEwZjI3NDMtNDhjMy00ODg1LThhNWQtZmQ1YTk5NmQ0NDQ4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImRXeWNhZkM4Tjlmazc0Sm1nWVB4dkx0U2kxbFY4T281THpNazJZT2JnUGc9In0= x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg/BaseLib: Re-define CHAR_NULL in BaseLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 16:47:55 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Liming, I agree. That is better than having to use #ifndef. The UEFI Specification does not have the #defines for the CHAR_x values, so we can move the subset of these character values required by libraries of type BASE into Base.h starting with CHAR_NULL. Thanks, Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ga= o, Liming > Sent: Wednesday, November 2, 2016 1:44 AM > To: Song, BinX ; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH] MdePkg/BaseLib: Re-define CHAR_NULL in BaseLi= b >=20 > Bin: > I suggest move CHAR_NULL definition from Protocol\SimpleTextIn.h to Bas= e.h >=20 > Thanks > Liming > -----Original Message----- > From: Song, BinX > Sent: Wednesday, November 2, 2016 4:27 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [PATCH] MdePkg/BaseLib: Re-define CHAR_NULL in BaseLib >=20 > - https://bugzilla.tianocore.org/show_bug.cgi?id=3D172 >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Bell Song > --- > MdePkg/Include/Base.h | 7 +++++++ > MdePkg/Library/BaseLib/FilePaths.c | 2 -- > 2 files changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h > index 2217058..0c3318f 100644 > --- a/MdePkg/Include/Base.h > +++ b/MdePkg/Include/Base.h > @@ -338,6 +338,13 @@ struct _LIST_ENTRY { > /// > #define NULL ((VOID *) 0) >=20 > +// > +// Required unicode control chars > +// > +#ifndef CHAR_NULL > +#define CHAR_NULL 0x0000 > +#endif > + > /// > /// Maximum values for common UEFI Data Types > /// > diff --git a/MdePkg/Library/BaseLib/FilePaths.c b/MdePkg/Library/BaseLib/= FilePaths.c > index c8da6bb..183b323 100644 > --- a/MdePkg/Library/BaseLib/FilePaths.c > +++ b/MdePkg/Library/BaseLib/FilePaths.c > @@ -10,10 +10,8 @@ > THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. > **/ > -#include > #include > #include > -#include >=20 > /** > Removes the last directory or file entry in a path by changing the las= t > -- > 2.7.2.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel