[dpdk-dev] [PATCH v2] doc: announce API changes for Windows compatibility
Dmitry Kozlyuk
dmitry.kozliuk at gmail.com
Thu Mar 11 18:01:01 CET 2021
2021-03-11 16:19 (UTC+0000), John Alexander:
[...]
> > * `struct rte_param_log2_range`, `struct rte_crypto_param_range`:
> >
> > * `min` -> `minimum`
> > * `max` -> `maximum`
>
>
> The min/max macros in the Windows headers cause issues with C++ projects also (breaks std::min/std::max). The fix there is to "#define NOMINMAX" prior to including windows.h, maybe that's appropriate here too?
We don't control include order in user code and we shouldn't #undef system
macros in public headers. We could push_macro/pop_macro around structure
definition and have min/max undefined in DPDK internal code, so that including
this header always works. Then, if user wants to access the fields, they
should take care of macros themselves.
More information about the dev
mailing list