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 BC26545B03; Thu, 10 Oct 2024 12:43:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91BBB40279; Thu, 10 Oct 2024 12:43:47 +0200 (CEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id 155AD4025E for ; Thu, 10 Oct 2024 12:43:46 +0200 (CEST) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-53991d05416so939762e87.2 for ; Thu, 10 Oct 2024 03:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728557025; x=1729161825; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=xDy2TxB93hELf+b0QpkeOiA28/uEpwG8o1OjygbbEFw=; b=Kc2XF1RmqsBUswkQc0pf5uVm5LFWqtI+s0MDmOhWiDj7oeK1Q5hVX28aQbKOzroKLl BY6PjR8zpXXlnVob1IyaF78SPTXJkTKuoXaFMtoZ29X37bNrgkbYC2Ksk6OoGAGN8JEw 9/HUhboQ7za76jh4CMZivEeFs7NAOj2ohWcOO9S25TzT2qvG+p7pXVHTcFMoc88s+bu7 WCo4QbURHHZLcVo/FBOV0nXiNuIwn5zBVnwbYVTTY40rK/bmzi6jbUSz7eGZuN8ifXIe gZBttJ43jUf1ETNtg3tKzMo7ypLLM3+GzeryzMBugcwLS/rtlQbYnuGRZggiO19OgPrs FomA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728557025; x=1729161825; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xDy2TxB93hELf+b0QpkeOiA28/uEpwG8o1OjygbbEFw=; b=Dlyn8tfqhoGm88fzhegfKqopgV9PUSRFUKGlJERy3zPx1W8Y9GMnRE5dHWCk4errXw unMy5FRkH9q2OYbBeNPau1OSjp+Sa17tZU0C9yeZwAp+ve0GIap/xEUz4gAbWZkHaGLV UYofdKkRYGxpdZDM6lnjtZ0KKPMcImeMneCAt0MFHbxF7LdwsA1L3bk/h54TrxsIWEAE 2sVH/gJQRT5n+QpEM7JK9wdx0HfcFqgDwkZR8S8+oLVHokP6GU/pGwPh9NMBsAJpljSg bfglHrb/GyF15je/Z2twdazLhcWx7Yt/ju15dUe+AcaT8mINu6FpLvU8qaEDoXA6fqF2 mwaw== X-Gm-Message-State: AOJu0YxnC9WpryHGXtORDsoN9Z4H03xfz/3GsbHUL0n1jSux8XH3x/rG B0lzN0fEPSBOM4egBDwbzG9eU1OxwbiP+SPxLT6fCEUDJzAmgFes X-Google-Smtp-Source: AGHT+IE0MCKRHKaFQ0jAxa1gAWKpN66RvO6W1jz4KbH5/Z5dSEsCpqeUufhcbjgHDPTgOw2lwKWkxg== X-Received: by 2002:ac2:4c48:0:b0:533:c9d:a01f with SMTP id 2adb3069b0e04-539c488d913mr5267214e87.4.1728557025228; Thu, 10 Oct 2024 03:43:45 -0700 (PDT) Received: from sovereign (broadband-109-173-43-194.ip.moscow.rt.ru. [109.173.43.194]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539cb6c110dsm206176e87.46.2024.10.10.03.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 03:43:44 -0700 (PDT) Date: Thu, 10 Oct 2024 13:43:41 +0300 From: Dmitry Kozlyuk To: Bruce Richardson Cc: dev@dpdk.org, david.marchand@redhat.com, ferruh.yigit@amd.com, thomas@monjalon.net, Tyler Retzlaff , Pallavi Kadam Subject: Re: [PATCH] eal/windows: define standard file numbers Message-ID: <20241010134341.142453cf@sovereign> In-Reply-To: <20241010095434.358810-1-bruce.richardson@intel.com> References: <20241010095434.358810-1-bruce.richardson@intel.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 2024-10-10 10:54 (UTC+0100), Bruce Richardson: > The macros for STD*_FILENO are missing on windows. Add defines for them > to the DPDK-local unistd.h file. > > Signed-off-by: Bruce Richardson > --- > lib/eal/windows/include/unistd.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/lib/eal/windows/include/unistd.h b/lib/eal/windows/include/unistd.h > index 6b33005b24..78150c6480 100644 > --- a/lib/eal/windows/include/unistd.h > +++ b/lib/eal/windows/include/unistd.h > @@ -12,4 +12,15 @@ > > #include > > +/* > + * Windows appears to be missing STD*_FILENO macros, so define here. > + * For simplicity, assume that if STDIN_FILENO is missing, all are, > + * rather than checking each individually. > + */ > +#ifndef STDIN_FILENO > +#define STDIN_FILENO _fileno(stdin) > +#define STDOUT_FILENO _fileno(stdout) > +#define STDERR_FILENO _fileno(stderr) > +#endif > + > #endif /* _UNISTD_H_ */ Why is this needed? There are 3 users of STD*_FILENO within DPDK: * lib/eal/unix/eal_debug.c - not for Windows, obviously * app/dumpcap - not for Windows, requires multi-process * app/proc-info - not for Windows, requires multi-process * examples/l2fwd-cat - not for Windows, requires