Driver: Move "wildmatch.*" files to "3rdparty/wildmatch/"

This commit is contained in:
Nodir Temirkhodjaev 2023-07-07 12:52:21 +03:00
parent 71efd8db04
commit b9067be4ba
7 changed files with 23 additions and 10 deletions

View File

@ -63,7 +63,7 @@ const uchar sane_ctype[256] = {
#define is_glob_special(x) (ISASCII(x) && sane_istest(x, GIT_GLOB_SPECIAL))
/* Match the "pattern" against the "text" string. */
FORT_API int wildmatch(const wm_char *pattern, const wm_char *text)
WILDMATCH_API int wildmatch(const wm_char *pattern, const wm_char *text)
{
const wm_char *p = pattern;
wm_char p_ch;

View File

@ -1,20 +1,16 @@
#ifndef WILDMATCH_H
#define WILDMATCH_H
#include "common.h"
#define WM_NOMATCH 1
#define WM_MATCH 0
#define WM_ABORT_ALL -1
#define WM_ABORT_TO_STARSTAR -2
typedef WCHAR wm_char;
#if defined(__cplusplus)
extern "C" {
#endif
FORT_API int wildmatch(const wm_char *pattern, const wm_char *text);
WILDMATCH_API int wildmatch(const wm_char *pattern, const wm_char *text);
#ifdef __cplusplus
} // extern "C"

View File

@ -4,7 +4,7 @@ SOURCES += \
$$PWD/common/fortconf.c \
$$PWD/common/fortlog.c \
$$PWD/common/fortprov.c \
$$PWD/common/wildmatch.c
$$PWD/common/fort_wildmatch.c
HEADERS += \
$$PWD/common/common.h \
@ -14,4 +14,4 @@ HEADERS += \
$$PWD/common/fortioctl.h \
$$PWD/common/fortlog.h \
$$PWD/common/fortprov.h \
$$PWD/common/wildmatch.h
$$PWD/common/fort_wildmatch.h

View File

@ -0,0 +1,5 @@
/* Fort Firewall WildMatch */
#include "fort_wildmatch.h"
#include "../../3rdparty/wildmatch/wildmatch.c"

View File

@ -0,0 +1,12 @@
#ifndef FORT_WILDMATCH_H
#define FORT_WILDMATCH_H
#include "common.h"
#define WILDMATCH_API FORT_API
typedef WCHAR wm_char;
#include "../../3rdparty/wildmatch/wildmatch.h"
#endif // FORT_WILDMATCH_H

View File

@ -5,7 +5,7 @@
#include <assert.h>
#include "fortdef.h"
#include "wildmatch.h"
#include "fort_wildmatch.h"
static_assert(sizeof(FORT_CONF_FLAGS) == sizeof(UINT32), "FORT_CONF_FLAGS size mismatch");
static_assert(sizeof(FORT_TRAF) == sizeof(UINT64), "FORT_TRAF size mismatch");

View File

@ -11,7 +11,7 @@
#include "common/fortconf.c"
#include "common/fortlog.c"
#include "common/fortprov.c"
#include "common/wildmatch.c"
#include "common/fort_wildmatch.c"
#include "loader/fortmm_imp.c"
#include "proxycb/fortpcb_dst.c"