DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	dev@dpdk.org, harini.ramakrishnan@microsoft.com
Subject: Re: [dpdk-dev] [PATCH 4/6] build: MinGW-w64 support for Meson
Date: Thu, 6 Feb 2020 10:59:02 +0000	[thread overview]
Message-ID: <20200206105902.GA767@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20200205234105.61ad5c55@Sovereign>

On Wed, Feb 05, 2020 at 11:41:05PM +0300, Dmitry Kozlyuk wrote:
> > > > > > +if is_windows
> > > > > > +	# Require platform SDK for Windows 7 and above.
> > > > > > +	add_project_arguments('-D_WIN32_WINNT=0x0601', language: 'c')    
> > > > > 
> > > > > Please explain. Why Windows 7 is needed? What this define is doing?  
> > > > 
> > > > Yes, Windows 7 and above is need for already existing code in eal_lcore.c,
> > > > specifically for GetLogicalProcessorInformation() call.
> > > > 
> > > > When including <windows.h>, one must define minimum API version the
> > > > application is compiled against [0]. MSVC and Clang default to the version of
> > > > platform SDK (that is, maximum supported). MinGW defaults to Windows XP, so
> > > > this definition must be either in <rte_os.h> before #include <windows.h> or
> > > > here. Because other files may include <windows.h>, I'd prefer to have a
> > > > global definition via compiler command-line.
> > > > 
> > > > [0]:
> > > > https://docs.microsoft.com/en-us/windows/win32/WinProg/using-the-windows-headers  
> > > 
> > > OK, thanks.
> > > Please reword the comment with something like
> > > 	"Minimum supported API is Windows 7."
> > >   
> > For this, as an alternative to putting it as a project argument, you can just
> > add it to dpdk_conf which means it will end up as a define in the global
> > rte_build_config.h and so be directly included in each compilation unit
> > ahead of any other headers. (rte_config.h includes rte_build_config.h)
> 
> Can you please explain why using dpdk_conf is a better alternative? In
> lib/meson.build I can see add_project_arguments('_D_GNU_SOURCE', ...), which
> serves a similar purpose on POSIX systems. Compiler option also makes it
> impossible to forget or redefine this constant in code by mistake.
> 
I'm not necessarily saying it's better, it's just an alternative to
consider. :-) Having it in rte_config.h makes the define available to any
external apps using DPDK, which may or may not be desirable.

  reply	other threads:[~2020-02-06 10:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31  3:07 [dpdk-dev] [PATCH 0/6] MinGW-w64 support Dmitry Kozlyuk
2020-01-31  3:07 ` [dpdk-dev] [PATCH 1/6] eal: introduce portable format attribute Dmitry Kozlyuk
2020-01-31  3:07 ` [dpdk-dev] [PATCH 2/6] eal: use " Dmitry Kozlyuk
2020-01-31  3:07 ` [dpdk-dev] [PATCH 3/6] cmdline: " Dmitry Kozlyuk
2020-01-31  3:07 ` [dpdk-dev] [PATCH 4/6] build: MinGW-w64 support for Meson Dmitry Kozlyuk
2020-02-04 22:08   ` Thomas Monjalon
2020-02-04 23:21     ` Dmitry Kozlyuk
2020-02-05  0:41       ` Thomas Monjalon
2020-02-05 14:30         ` Bruce Richardson
2020-02-05 20:41           ` Dmitry Kozlyuk
2020-02-06 10:59             ` Bruce Richardson [this message]
2020-02-07 19:27               ` Dmitry Kozlyuk
2020-01-31  3:07 ` [dpdk-dev] [PATCH 5/6] build: add cross-file for MinGW-w64 Dmitry Kozlyuk
2020-02-04 22:14   ` Thomas Monjalon
2020-02-04 23:23     ` Dmitry Kozlyuk
2020-01-31  3:07 ` [dpdk-dev] [PATCH 6/6] doc: guide for Windows build using MinGW-w64 Dmitry Kozlyuk
2020-02-04 22:34   ` Thomas Monjalon
2020-02-04 23:57     ` Dmitry Kozlyuk
2020-02-05  2:20       ` Thomas Monjalon
2020-02-09 21:39         ` Dmitry Kozlyuk
2020-02-17  6:27           ` Dmitry Kozlyuk
2020-04-29 13:57             ` Thomas Monjalon
2020-02-05  1:49 ` [dpdk-dev] [EXTERNAL] [PATCH 0/6] MinGW-w64 support Narcisa Ana Maria Vasile
2020-02-05  5:43   ` Dmitry Kozlyuk
2020-02-05  9:26     ` David Marchand
2020-02-05 20:59       ` Dmitry Kozlyuk
2020-02-05 21:02         ` Narcisa Ana Maria Vasile
2020-02-05 21:21           ` Dmitry Kozlyuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200206105902.GA767@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).