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 5D757A00C3; Mon, 17 Jan 2022 19:20:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C436740143; Mon, 17 Jan 2022 19:20:13 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 1078E40140 for ; Mon, 17 Jan 2022 19:20:12 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 73A8E3201F8E; Mon, 17 Jan 2022 13:20:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 17 Jan 2022 13:20:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= sfE+jYkleWeZHEuDb/onen2qycnSHcUQx+Do5HJuKd8=; b=kcW2MzND/73q21QH sf12Soji/vEt42+F7gHpimix/Jk3IXYbJMdoW7QhdEelZFDTixlHu9o1sbezm245 rTk2qUnl+qIe4BdQep8Bjyu+51iKdQTL+ybMk3wi2t7bdI2uXSMOgl06ylJtUKYB NvaCGQpCApi/hoz7FWbMx411S0bgJkbO8G+/KxX/ZL0k80vs3XC2xGg5oUckAsrF 3SdqajvLSWEirOw/slqW8ggeqZbHp1pMa2uLRilttLuwA1RPfEel3hSV8yJgIO+B fb7FKTQbEG6izrJbUlusTa8IfYo23YnH4Kw0914OKwuxamMO52UE7w0c2lPhJnQK ZUo1Yw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=sfE+jYkleWeZHEuDb/onen2qycnSHcUQx+Do5HJuK d8=; b=cNXRXIsXQNMlX4vraHoYH7C0LRQ6tEbQ5AMXqAkDVS4ejs5g36xd+B4Uh IfbmHBIq1jH2hpaxoXRoHUvqSmR6noS0Au5glparNRJXYtk37HGLxKNhNtytx3lU wWoa7+LEY70EPDMIdtlLb8UWOGdxPfXbPO7kYNt1Frj4/GA3XOxzVneITO4YEG/M tvt1EVKiue20Dkw+9gCNOlMMc+OqrzhEE4ymHBcGuOQungTo3d2r0o4pVv0Ou45C 5cpDb/+J5yHenmg1jGtN8AaYdFajoy6bWtINztAjYGUGfZKvbkBNjtkc/uwzOER8 2EBtON9GxNzCphk0lHmvK7uyzCv1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddugdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jan 2022 13:20:09 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, Dmitry Kozlyuk , Jerin Jacob Subject: Re: [PATCH v2] build/eal: add OS defines for C conditional checks Date: Mon, 17 Jan 2022 19:20:07 +0100 Message-ID: <2961371.ktpJ11cQ8Q@thomas> In-Reply-To: <20211216152107.725239-1-bruce.richardson@intel.com> References: <20211210145330.108256-1-bruce.richardson@intel.com> <20211216152107.725239-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 16/12/2021 16:21, Bruce Richardson: > Define a set of macros in the build configuration to allow C runtime > code to check the current OS environment. This saves the user having to > use ifdefs for e.g. disabling particular tests on Windows. See included > documentation changes for usage examples. > > Signed-off-by: Bruce Richardson > Acked-by: Dmitry Kozlyuk > Acked-by: Jerin Jacob > > --- > V2: Included feedback from Dmitry to expand on documentation to include > guidelines on when to use conditional compilation. > --- [...] > +* If the code in question cannot compile on all systems, but constitutes only a small fragment of > + a file, then conditional complication should be used, as described in this section. complication -> compilation [...] > + switch (RTE_EXEC_ENV) { > + case RTE_ENV_FREEBSD: > + default = x; > + break; > + case RTE_ENV_LINUX: > + default = y; > + break; > + case RTE_ENV_WINDOWS: > + default = z; > + break; > + } This is not the recommended indentation. Applied with minor changes, thanks.