f40fb62d1d7cc7714c105acc905f110fd150463c
[dpdk.git] / lib / eal / windows / include / rte_os_shim.h
1 /* SPDX-License-Identifier: BSD-3-Clause */
2
3 #ifndef _RTE_OS_SHIM_
4 #define _RTE_OS_SHIM_
5
6 #include <rte_os.h>
7
8 /**
9  * @file
10  * @internal
11  * Provides semi-standard OS facilities by convenient names.
12  */
13
14 #ifndef PATH_MAX
15 #define PATH_MAX _MAX_PATH
16 #endif
17
18 #define strdup(str) _strdup(str)
19 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
20 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
21
22 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
23 #define read(fd, buf, n) _read(fd, buf, n)
24 #define write(fd, buf, n) _write(fd, buf, n)
25 #define close(fd) _close(fd)
26 #define unlink(path) _unlink(path)
27
28 #define IPVERSION       4
29
30 #define IPPROTO_IPIP    4
31 #define IPPROTO_GRE     47
32 #ifdef RTE_TOOLCHAIN_GCC
33 #define IPPROTO_SCTP    132
34 #endif
35
36 #endif /* _RTE_OS_SHIM_ */