16/12/2021 16:21, Bruce Richardson:
> Define a set of macros in the build configuration to allow C runtime
> code to check the current OS environment. This saves the user having to
> use ifdefs for e.g. disabling particular tests on Windows. See included
> documentation changes for usage examples.
>
> Signed-off-by: Bruce Richardson <[email protected]>
> Acked-by: Dmitry Kozlyuk <[email protected]>
> Acked-by: Jerin Jacob <[email protected]>
>
> ---
> V2: Included feedback from Dmitry to expand on documentation to include
> guidelines on when to use conditional compilation.
> ---
[...]
> +* If the code in question cannot compile on all systems, but constitutes
> only a small fragment of
> + a file, then conditional complication should be used, as described in this
> section.
complication -> compilation
[...]
> + switch (RTE_EXEC_ENV) {
> + case RTE_ENV_FREEBSD:
> + default = x;
> + break;
> + case RTE_ENV_LINUX:
> + default = y;
> + break;
> + case RTE_ENV_WINDOWS:
> + default = z;
> + break;
> + }
This is not the recommended indentation.
Applied with minor changes, thanks.