1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019 Intel Corporation
9 * This file is required to support the common code in eal_common_log.c
10 * as Microsoft libc does not contain regex.h. This may be removed in
20 #include <rte_common.h>
22 /* defining regex_t for Windows */
23 typedef void *regex_t;
24 /* defining regmatch_t for Windows */
25 typedef void *regmatch_t;
28 * The regcomp() function will compile the regular expression
29 * contained in the string pointed to by the pattern argument
30 * and place the results in the structure pointed to by preg.
31 * The cflags argument is the bitwise inclusive OR of zero or
34 static inline int regcomp(__rte_unused regex_t *preg,
35 __rte_unused const char *regex, __rte_unused int cflags)
38 /* This is a stub, not the expected result */
43 * The regexec() function compares the null-terminated string
44 * specified by string with the compiled regular expression
45 * preg initialised by a previous call to regcomp(). If it finds
46 * a match, regexec() returns 0; otherwise it returns non-zero
47 * indicating either no match or an error. The eflags argument
48 * is the bitwise inclusive OR of zero or more of the flags.
50 static inline int regexec(__rte_unused const regex_t *preg,
51 __rte_unused const char *string, __rte_unused size_t nmatch,
52 __rte_unused regmatch_t pmatch[], __rte_unused int eflags)
55 /* This is a stub, not the expected result */
60 * The regerror() function provides a mapping from error codes
61 * returned by regcomp() and regexec() to unspecified printable strings.
63 static inline size_t regerror(__rte_unused int errcode,
64 __rte_unused const regex_t *preg, char *errbuf,
65 __rte_unused size_t errbuf_size)
68 /* This is a stub, not the expected result */
77 * The regfree() function frees any memory allocated by regcomp()
78 * associated with preg.
80 static inline void regfree(__rte_unused regex_t *preg)
83 /* This is a stub, not the expected result */
90 #endif /* _REGEX_H_ */