On 1/27/2020 2:52 PM, Thomas Monjalon wrote:
13/01/2020 22:55, Pallavi Kadam:
Added #ifndef WIN64 to exclude syslog definitions and parameters
from Windows builds.
Signed-off-by: Pallavi Kadam <pallavi.ka...@intel.com>
Reviewed-by: Ranjit Menon <ranjit.me...@intel.com>
---
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -204,9 +206,9 @@ eal_reset_internal_config(struct internal_config
*internal_cfg)
internal_cfg->hugepage_info[i].lock_descriptor = -1;
}
internal_cfg->base_virtaddr = 0;
-
Please keep blank lines
Sure, will add new lines here.
+#ifndef _WIN64
Could it be #ifdef LOG_DAEMON?
Will update this in v6.
internal_cfg->syslog_facility = LOG_DAEMON;
-
+#endif
[..]
@@ -1391,7 +1395,7 @@ eal_parse_common_option(int opt, const char *optarg,
+#ifndef _WIN64
case OPT_SYSLOG_NUM:
if (eal_parse_syslog(optarg, conf) < 0) {
Instead of adding #ifdef, I think we could introduce eal_parse_unix_option()
in a separate file, and it would call eal_parse_common_option().
So in Windows, you just skip it by calling directly eal_parse_common_option()
which would be truly common.
We might have to include changes in multiple files once we create a 'unix'
directory
to introduce unix based functions and then test it on Linux and FreeBSD.
For this release, will include #ifndef RTE_EXEC_ENV_WINDOWS for syslog functions
and can add unix based functions in the next release.