[dpdk-dev] [EXT] [PATCH v3] doc: announce API changes for Windows compatibility

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Thu May 20 21:31:40 CEST 2021


2021-05-20 18:59 (UTC+0000), Akhil Goyal:
> > Windows system headers define `s_addr`, `min`, and `max` macros which
> > break structure definitions containing fields with one of these names.
> > Undefining those macros would break consumer code that relies on them.
> >   
> 
> From the commit message the requirement for changing the structure definitions
> Is not clear. Please note that 'min' - 'max' are not macros. These are variables of a
> structure which should not break any other structure/Macro in windows.

Err, yes, that's what the commit message says.
Structure fields of course break nothing; they are broken by Windows macros.
Would this make more sense?


	Windows headers define `s_addr`, `min`, and `max` as macros.
	If DPDK headers are included after Windows ones, DPDK structure
	definitions containing fields with these names get broken.
	If DPDK headers undefined these macros, it could break consumer code
	relying on these macros. It is proposed to rename structure fields
	in DPDK, because Win32 headers are more widely used and harder to fix.


More information about the dev mailing list