diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b6f24ed..0950977 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -41,6 +41,9 @@ jobs: - name: ln Windows if: ${{ startsWith(matrix.target, 'windows') }} run: copy Makefile.win Makefile + - name: install Windows libraries + if: ${{ startsWith(matrix.target, 'windows') }} + run: vcpkg install pcre:x64-windows - name: dirs Windows if: ${{ startsWith(matrix.target, 'windows') }} run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib/VC/x64/MT" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win && dir "c:/program files/openssl/lib"' diff --git a/Makefile.msvc b/Makefile.msvc index c1fc4a5..5affb31 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -28,7 +28,7 @@ REMOVECOMMAND = del TYPECOMMAND = type COMPATLIBS = MAKEFILE = Makefile.msvc -PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin +PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin VERFILE = 3proxy.res $(VERFILE) VERSION = $(VERSION) VERSIONDEP = 3proxy.res $(VERSIONDEP) diff --git a/Makefile.msvc64 b/Makefile.msvc64 index 9310b64..873526e 100644 --- a/Makefile.msvc64 +++ b/Makefile.msvc64 @@ -31,7 +31,7 @@ TYPECOMMAND = type COMPATLIBS = VERFILE = 3proxy.res $(VERFILE) VERSIONDEP = 3proxy.res $(VERSIONDEP) -PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin +PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin AFTERCLEAN = del src\*.res include Makefile.inc diff --git a/Makefile.msvcARM64 b/Makefile.msvcARM64 index 264efe0..a892c0d 100644 --- a/Makefile.msvcARM64 +++ b/Makefile.msvcARM64 @@ -28,7 +28,7 @@ REMOVECOMMAND = del 2>NUL >NUL TYPECOMMAND = type COMPATLIBS = MAKEFILE = Makefile.msvcARM64 -PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin +PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin VERFILE = 3proxy.res $(VERFILE) VERSIONDEP = 3proxy.res $(VERSIONDEP) AFTERCLEAN = del src\*.res diff --git a/src/plugins/PCREPlugin/pcre_plugin.c b/src/plugins/PCREPlugin/pcre_plugin.c index abf37e5..9c79d10 100644 --- a/src/plugins/PCREPlugin/pcre_plugin.c +++ b/src/plugins/PCREPlugin/pcre_plugin.c @@ -41,33 +41,33 @@ static struct pcreopt { int value; } pcreopts[]= { - {"PCRE_CASELESS", 0x00000001}, - {"PCRE_MULTILINE", 0x00000002}, - {"PCRE_DOTALL", 0x00000004}, - {"PCRE_EXTENDED", 0x00000008}, - {"PCRE_ANCHORED", 0x00000010}, - {"PCRE_DOLLAR_ENDONLY", 0x00000020}, - {"PCRE_EXTRA", 0x00000040}, - {"PCRE_NOTBOL", 0x00000080}, - {"PCRE_NOTEOL", 0x00000100}, - {"PCRE_UNGREEDY", 0x00000200}, - {"PCRE_NOTEMPTY", 0x00000400}, - {"PCRE_UTF8", 0x00000800}, - {"PCRE_NO_AUTO_CAPTURE", 0x00001000}, - {"PCRE_NO_UTF8_CHECK", 0x00002000}, - {"PCRE_AUTO_CALLOUT", 0x00004000}, - {"PCRE_PARTIAL", 0x00008000}, - {"PCRE_DFA_SHORTEST", 0x00010000}, - {"PCRE_DFA_RESTART", 0x00020000}, - {"PCRE_FIRSTLINE", 0x00040000}, - {"PCRE_DUPNAMES", 0x00080000}, - {"PCRE_NEWLINE_CR", 0x00100000}, - {"PCRE_NEWLINE_LF", 0x00200000}, - {"PCRE_NEWLINE_CRLF", 0x00300000}, - {"PCRE_NEWLINE_ANY", 0x00400000}, - {"PCRE_NEWLINE_ANYCRLF", 0x00500000}, - {"PCRE_BSR_ANYCRLF", 0x00800000}, - {"PCRE_BSR_UNICODE", 0x01000000}, + {"PCRE_CASELESS", PCRE_CASELESS}, + {"PCRE_MULTILINE", PCRE_MULTILINE}, + {"PCRE_DOTALL", PCRE_DOTALL}, + {"PCRE_EXTENDED", PCRE_EXTENDED}, + {"PCRE_ANCHORED", PCRE_ANCHORED}, + {"PCRE_DOLLAR_ENDONLY", PCRE_DOLLAR_ENDONLY}, + {"PCRE_EXTRA", PCRE_EXTRA}, + {"PCRE_NOTBOL", PCRE_NOTBOL}, + {"PCRE_NOTEOL", PCRE_NOTEOL}, + {"PCRE_UNGREEDY", PCRE_UNGREEDY}, + {"PCRE_NOTEMPTY", PCRE_NOTEMPTY}, + {"PCRE_UTF8", PCRE_UTF8}, + {"PCRE_NO_AUTO_CAPTURE", PCRE_NO_AUTO_CAPTURE}, + {"PCRE_NO_UTF8_CHECK", PCRE_NO_UTF8_CHECK}, + {"PCRE_AUTO_CALLOUT", PCRE_AUTO_CALLOUT}, + {"PCRE_PARTIAL", PCRE_PARTIAL}, + {"PCRE_DFA_SHORTEST", PCRE_DFA_SHORTEST}, + {"PCRE_DFA_RESTART", PCRE_DFA_RESTART}, + {"PCRE_FIRSTLINE", PCRE_FIRSTLINE}, + {"PCRE_DUPNAMES", PCRE_DUPNAMES}, + {"PCRE_NEWLINE_CR", PCRE_NEWLINE_CR}, + {"PCRE_NEWLINE_LF", PCRE_NEWLINE_LF}, + {"PCRE_NEWLINE_CRLF", PCRE_NEWLINE_CRLF}, + {"PCRE_NEWLINE_ANY", PCRE_NEWLINE_ANY}, + {"PCRE_NEWLINE_ANYCRLF", PCRE_NEWLINE_ANYCRLF}, + {"PCRE_BSR_ANYCRLF", PCRE_BSR_ANYCRLF}, + {"PCRE_BSR_UNICODE", PCRE_BSR_UNICODE}, {NULL, 0} };