[dpdk-dev] [PATCH v2 2/6] eal: add header files to support windows

Anand Rawat anand.rawat at intel.com
Wed Mar 6 05:16:30 CET 2019


Added header files to support windows on x86 platforms.
Updated rte_config to include rte_windows.h for windows
build.

Signed-off-by: Anand Rawat <anand.rawat at intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam at intel.com>
Reviewed-by: Jeff Shaw <jeffrey.b.shaw at intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon at intel.com>
---
 config/rte_config.h                           |  7 +++++-
 .../eal/include/exec-env/rte_windows.h        | 23 +++++++++++++++++++
 lib/librte_eal/windows/eal/meson.build        |  2 ++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 lib/librte_eal/windows/eal/include/exec-env/rte_windows.h

diff --git a/config/rte_config.h b/config/rte_config.h
index 7606f5d7b..1ad7e1d30 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Intel Corporation
+ * Copyright(c) 2017-2019 Intel Corporation
  */
 
 /**
@@ -118,4 +118,9 @@
 /* QEDE PMD defines */
 #define RTE_LIBRTE_QEDE_FW ""
 
+/* windows specific*/
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <rte_windows.h>
+#endif
+
 #endif /* _RTE_CONFIG_H_ */
diff --git a/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h
new file mode 100644
index 000000000..8e4dc72bb
--- /dev/null
+++ b/lib/librte_eal/windows/eal/include/exec-env/rte_windows.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2019 Intel Corporation
+ */
+
+#ifndef _RTE_WINDOWS_H_
+#define _RTE_WINDOWS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define __extension__
+#define __thread __declspec(thread)
+
+#define strerror_r(a, b, c) strerror_s(b, c, a)
+
+typedef void *ssize_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_WINDOWS_H_ */
diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build
index 8b1735623..d6c540f82 100644
--- a/lib/librte_eal/windows/eal/meson.build
+++ b/lib/librte_eal/windows/eal/meson.build
@@ -1,6 +1,8 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+eal_inc += include_directories('include/exec-env')
+
 env_objs = []
 env_headers = []
 env_sources = files('eal.c',
-- 
2.17.1.windows.2



More information about the dev mailing list