There's a meson issue with `cc.has_function()`:
https://github.com/mesonbuild/meson/issues/5628

What if we just define RTE_INTERNAL for librte_eal/windows/include/rte_os.h
(and other public headers if need be) to distinguish the case when it's used
from within DPDK?
It's a pragmatic solution to the problem, but sadly it's not quite as clean as letting the build system determine if each 'wrapper' is needed. DPDK supports a variety of platforms and toolsets and my experience with SPDK suggests that we'll end up with compiler specific ifdef's. It's all protected by RTE_INTERNAL so it's not really a problem, but I wonder if it makes it easier for someone to accidentally introduce definitions outside of the #ifdef RTE_INTERNAL?

How about a new header rte_os_internal.h that contains the 'wrappers'? It gets included from rte_os.h only if RTE_INTERNAL is set and doesn't get installed so can't impact the user environment. I'm not sure I like it, but I guess we could do the same thing for every header that needs wrappers. I'm really 'thinking aloud' here and I'm not convinced it's the best route forward, so feel free to ignore. What I'm searching for is a way of wrapping that's clean and has a reasonably low risk of future human error.

Regards,
Nick

Reply via email to