From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3B6CA0C4B; Thu, 17 Jun 2021 16:27:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 996ED4067A; Thu, 17 Jun 2021 16:27:15 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 864E640150 for ; Thu, 17 Jun 2021 16:27:14 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id D950F20B6AEE; Thu, 17 Jun 2021 07:27:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D950F20B6AEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1623940033; bh=m4IeRPRHZ3ydDsNJlp+oJpWQ6WtGWDwq5EEXB2LWGBA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CvIb58gbqW/PHd3o7mjJ5yTih1an6qvmpaHSUM9+pBd6lmm5PrkE9o62Sf8jx/4QO OwtHG+2AWzL/uDoHVeIWp5REl2HP3yIH0n5DCGZKS5n9BRYpJMaMTzlnoWEF9sPqU+ qjGSVzJoyofhtazbM62hXo4q+Yfgm/MZKkbIR9/c= Date: Thu, 17 Jun 2021 07:27:13 -0700 From: Tyler Retzlaff To: Akhil Goyal Cc: Dmitry Kozlyuk , "dev@dpdk.org" , Ferruh Yigit , Fiona Trahe , Ashish Gupta , Khoa To , Ray Kinsella , Neil Horman , Thomas Monjalon , "bruce.richardson@intel.com" , Konstantin Ananyev , Jerin Jacob Kollanukkaran , "Zhang, Roy Fan" Message-ID: <20210617142713.GB29777@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210310235421.23259-1-dmitry.kozliuk@gmail.com> <20210520184254.16790-1-dmitry.kozliuk@gmail.com> <20210520223140.6bef6046@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [EXT] [PATCH v3] doc: announce API changes for Windows compatibility X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 20, 2021 at 08:17:54PM +0000, Akhil Goyal wrote: > > > > Yes it makes more sense now. But ideally it should be fixed in windows. they won't be fixed in windows. it is extremely rare to withdraw something from a platform headers namespace and is avoided to maintain API compatibility no matter how horrible these macros are. > This may be just one such issue, there may be many more. > Will this also mean that nobody can define a local variable 'min'? that is correct. As well as a long list of other commonly used names not only from windows but other platform headers, standard library headers and keywords. > Any macro definition in a subsystem should have a prefix to denote that, > Just like in DPDK 'RTE_' is added. completely agree, best practice would be to avoid contaminating the applications namespace. > Macros with generic names should be avoided so that we do not get into > these issues. > > Adding more people for comments. I don't have a good feeling about > this change. there is no real choice, the platform header won't be "fixed" so it has to be dealt with and even thinking you can avoid it by just not including windows.h here keep in mind the consuming application will have to anyway so it's difficult to avoid.