From 268c2eb3dd74c7a734c6e5f70298426ae5b2730a Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Fri, 10 Jan 2025 13:33:52 +0000 Subject: [PATCH] Enable and fix additional build warnings (#655) Part of #651 * Use much stricter windows warnings (`/W3` rather than `/W1`). This requires quite a few fixes for all the sloppy places where we do implicit assignment of 64-bit values to 32-bit storage. * Use and test CMake build & install on FreeBSD and Solaris * Add 64 bit Solaris build (`cc -m64`) and fix existing Solaris warnings * Make compile flags used in CI consistent across platforms. Previously Mac & Linux were building with different warning flags. * Add `--enable-Werror` to `configure.ac`. This means that you can build with `-Werror` in a clean way. Previously, you had to hackily override the CPPFLAGS when calling `make` since you can't pass `-Werror` as a CFLAG into `./configure` (it messes with compiler feature detection). --- .github/workflows/build.yml | 82 +++++-- .github/workflows/dev.yml | 43 ++-- .gitignore | 1 + CMakeLists.txt | 18 +- Makefile.am | 9 +- build.zig | 2 +- configure.ac | 23 +- deps/sljit | 2 +- doc/html/README.txt | 2 +- m4/pcre2_visibility.m4 | 6 +- maint/ManyConfigTests | 8 +- maint/PrepareRelease | 2 +- maint/manifest-cmakeinstall-freebsd | 253 ++++++++++++++++++++ maint/manifest-cmakeinstall-solaris | 253 ++++++++++++++++++++ maint/manifest-makeinstall-solaris | 255 +++++++++++++++++++++ maint/manifest-tarball | 2 +- config-cmake.h.in => src/config-cmake.h.in | 4 +- src/pcre2_jit_char_inc.h | 2 +- src/pcre2_jit_compile.c | 21 +- src/pcre2_jit_neon_inc.h | 9 + src/pcre2_substitute.c | 4 +- src/pcre2grep.c | 48 ++-- src/pcre2test.c | 146 ++++++------ 23 files changed, 1025 insertions(+), 170 deletions(-) create mode 100644 maint/manifest-cmakeinstall-freebsd create mode 100644 maint/manifest-cmakeinstall-solaris create mode 100644 maint/manifest-makeinstall-solaris rename config-cmake.h.in => src/config-cmake.h.in (95%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a9efa411c..293de8310 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,11 @@ on: permissions: contents: read +env: + CFLAGS_GCC_STYLE: '-Wall -Wextra -pedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings' + CFLAGS_MSVC: '/W3' + CFLAGS_SOLARIS_CC: '-errtags=yes -erroff=E_STATEMENT_NOT_REACHED' + jobs: linux: name: Linux @@ -28,10 +33,10 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 + run: ./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-Werror - name: Build - run: make -j3 CPPFLAGS='-Wall -Wextra -Werror' + run: make -j3 - name: Test (main test script) run: ./RunTest @@ -56,7 +61,7 @@ jobs: container: alpine steps: - name: Setup - run: apk add --no-cache automake autoconf gcc libtool make musl-dev git zlib zlib-dev bzip2 bzip2-dev #musl-locales + run: apk add --no-cache automake autoconf gcc libtool make musl-dev git zlib zlib-dev bzip2 bzip2-dev - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -67,10 +72,10 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 + run: ./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-Werror - name: Build - run: make -j3 CPPFLAGS='-Wall -Wextra -Werror' + run: make -j3 - name: Test (main test script) run: ./RunTest @@ -99,7 +104,7 @@ jobs: submodules: true - name: Configure - run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_SUPPORT_LIBZ=ON -DPCRE2_SUPPORT_LIBBZ2=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_C_FLAGS='-Wall -Wextra' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build + run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_SUPPORT_LIBZ=ON -DPCRE2_SUPPORT_LIBBZ2=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build - name: Build run: cd build && make -j3 @@ -127,7 +132,7 @@ jobs: submodules: true - name: Configure - run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A ${{ matrix.arch }} + run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DCMAKE_C_FLAGS="$CFLAGS_MSVC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A ${{ matrix.arch }} - name: Build run: cmake --build build --config Release @@ -157,16 +162,37 @@ jobs: - name: Build & test uses: vmactions/freebsd-vm@debf37ca7b7fa40e19c542ef7ba30d6054a706a4 # v1.1.5 with: + envs: 'CFLAGS_GCC_STYLE' usesh: true + prepare: | + pkg install -y cmake + run: | set -e - ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 - make -j3 CPPFLAGS='-Wall -Wextra -Werror' + + cp -rp . ../build-autoconf + cp -rp . ../build-cmake + + echo "== Autoconf ==" + cd ../build-autoconf + + ./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-Werror + make -j3 make check make install "DESTDIR=`pwd`/install-dir" maint/RunManifestTest install-dir maint/manifest-makeinstall-freebsd + echo "== CMake ==" + cd ../build-cmake + + cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build + cd build + make -j3 + ctest -j3 --output-on-failure + cmake --install . --prefix install-dir + ../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-freebsd + solaris: name: Solaris runs-on: ubuntu-24.04 @@ -191,6 +217,7 @@ jobs: - name: Build & test uses: vmactions/solaris-vm@a89b9438868c70db27e41625f0a5de6ff5e90809 # v1.1.0 with: + envs: 'CFLAGS_SOLARIS_CC' usesh: true # Seriously! Solaris is the only OS to actually ship without a C # compiler, and not even to provide a simple download to get one! @@ -203,22 +230,47 @@ jobs: -k /root/pkg.oracle.com.key.pem \ -c /root/pkg.oracle.com.certificate.pem \ -G "*" -g https://pkg.oracle.com/solarisstudio/release solarisstudio - pkg install developer/build/make system/header + pkg install developer/build/make developer/build/cmake system/header pkg install --accept developerstudio-126/cc run: | set -e PATH=/opt/developerstudio12.6/bin:"$PATH" export PATH - CC=cc - export CC - ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 - make CPPFLAGS='-Wall -Wextra -Werror' + cp -rp . ../build-autoconf-32 + cp -rp . ../build-autoconf-64 + cp -rp . ../build-cmake-64 + + echo "== Autoconf, 32-bit ==" + cd ../build-autoconf-32 + + ./configure CC="cc -m32" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn + make + make check + + make install "DESTDIR=`pwd`/install-dir" + maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris + + echo "== Autoconf, 64-bit ==" + cd ../build-autoconf-64 + + ./configure CC="cc -m64" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn + make make check make install "DESTDIR=`pwd`/install-dir" - maint/RunManifestTest install-dir maint/manifest-makeinstall-linux + maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris + + echo "== CMake, 64-bit ==" + cd ../build-cmake-64 + + CC="cc -m64" cmake -DNCURSES_LIBRARY=termcap -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_SOLARIS_CC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build + cd build + make + ctest -j3 --output-on-failure + cmake --install . --prefix install-dir + ../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-solaris distcheck: name: Build & verify distribution diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f8bae3b60..5dc619654 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -9,6 +9,10 @@ on: permissions: contents: read +env: + CFLAGS_GCC_STYLE: '-Wall -Wextra -pedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings' + CFLAGS_MSVC: '/W3' + jobs: canary: @@ -30,7 +34,7 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure CC='gcc -fsanitize=undefined,address -fsanitize-undefined-trap-on-error' CFLAGS='-O0 -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --enable-pcre2test-libedit --with-link-size=4 + run: ./configure CC='gcc -fsanitize=undefined,address -fsanitize-undefined-trap-on-error' CFLAGS="-O0 $CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --enable-Werror --enable-pcre2test-libedit --with-link-size=4 - name: Build run: make -j3 @@ -65,7 +69,7 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure CC='clang -fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-integer-overflow,unsigned-shift-base,function' CFLAGS='${{ matrix.opt }} -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter -Wno-error=deprecated-declarations -Wno-error=incompatible-library-redeclaration -Wno-error=incompatible-pointer-types-discards-qualifiers' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --with-link-size=3 + run: ./configure CC='clang -fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-integer-overflow,unsigned-shift-base,function' CFLAGS="${{ matrix.opt }} $CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --enable-Werror --with-link-size=3 - name: Build run: make -j3 @@ -95,7 +99,7 @@ jobs: submodules: true - name: Configure - run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build + run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build - name: Build run: cd build && make -j3 @@ -123,7 +127,7 @@ jobs: run: ./autogen.sh - name: Configure - run: ./configure CFLAGS='-Os -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug + run: ./configure CFLAGS="-Os $CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --enable-Werror - name: Build run: make -j3 @@ -168,7 +172,7 @@ jobs: - name: Configure run: | cmake --version | grep "version ${CMAKE_VER}" || (echo "CMake version mismatch" && exit 1) - CC='clang' CFLAGS='-fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-shift-base,function -pedantic -Wall -Wextra -Wpedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings -Werror -Wno-error=incompatible-pointer-types-discards-qualifiers' cmake -G Ninja -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DPCRE2_SUPPORT_LIBREADLINE=ON -DCMAKE_BUILD_TYPE=MinSizeRel -B build + CC='clang' cmake -G Ninja -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DPCRE2_SUPPORT_LIBREADLINE=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=MinSizeRel -B build - name: Build run: ninja -C build @@ -193,7 +197,7 @@ jobs: submodules: true - name: Configure - run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2GREP_SUPPORT_CALLOUT_FORK=OFF -DPCRE2_DEBUG=ON -DPCRE2_NEWLINE=ANYCRLF -DPCRE2_STATIC_PIC=ON -DPCRE2_STATIC_RUNTIME=ON -DPCRE2_SUPPORT_BSR_ANYCRLF=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A Win32 + run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2GREP_SUPPORT_CALLOUT_FORK=OFF -DPCRE2_DEBUG=ON -DPCRE2_NEWLINE=ANYCRLF -DPCRE2_STATIC_PIC=ON -DPCRE2_STATIC_RUNTIME=ON -DPCRE2_SUPPORT_BSR_ANYCRLF=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_C_FLAGS="$CFLAGS_MSVC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A Win32 - name: Build run: cmake --build build --config RelWithDebInfo @@ -212,7 +216,7 @@ jobs: submodules: true - name: Configure - run: cmake -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A x64 + run: cmake -DPCRE2_SUPPORT_JIT=OFF -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="$CFLAGS_MSVC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A x64 - name: Build run: cmake --build build --config Debug @@ -246,27 +250,13 @@ jobs: runs-on: ubuntu-24.04 container: perl:devel steps: - - name: Setup - run: | - apt-get -qq update - apt-get -qq install cmake ninja-build - - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: submodules: yes - - name: Configure - run: cmake -G Ninja -B build -DPCRE2_BUILD_PCRE2_8=OFF -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_NEVER_BACKSLASH_C=ON -DPCRE2_DEBUG=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo - - - name: Build - run: ninja -C build - - name: Test run: | - cd build - ctest -j3 --output-on-failure - cd .. perl -v maint/RunPerlTest @@ -276,6 +266,13 @@ jobs: # functions or macros which collide. name: CMake unity build runs-on: ubuntu-24.04 + env: + # Disallowing shadowing would be very spammy for unity builds, because the + # same variable name can be used in multiple files. + # We disable format truncation/overflow because the heuristics used for + # these warnings are not very good, and are apparently affected by the + # inliner, which is used much less aggressively in unity builds. + CFLAGS_UNITY: "-Wno-shadow -Wno-format-truncation -Wno-format-overflow" steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -283,7 +280,7 @@ jobs: submodules: true - name: Configure - run: cmake -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=0 -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build + run: cmake -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=0 -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE $CFLAGS_UNITY" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build - name: Build run: cd build && make -j3 @@ -324,7 +321,7 @@ jobs: - name: Configure shell: msys2 {0} - run: cmake -G Ninja -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build + run: cmake -G Ninja -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE -Wno-format-truncation -Wno-format-overflow" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build - name: Build shell: msys2 {0} diff --git a/.gitignore b/.gitignore index a23d6aabe..39f1efe4c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ __pycache__ .deps .libs +COPYING Makefile Makefile.in RunGrepTest.log diff --git a/CMakeLists.txt b/CMakeLists.txt index 313e679d5..dbba50eaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,16 +118,12 @@ set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED TRUE) set(CMAKE_C_VISIBILITY_PRESET hidden) -cmake_policy(SET CMP0063 NEW) -# Set policy CMP0026 to avoid warnings for the use of LOCATION in -# GET_TARGET_PROPERTY. This should no longer be required. -# CMAKE_POLICY(SET CMP0026 OLD) - -# With a recent cmake, you can provide a rootdir to look for non -# standard installed library dependencies, but to do so, the policy -# needs to be set to new (by uncommenting the following) -# CMAKE_POLICY(SET CMP0074 NEW) +# The following policies have been set in the PCRE2 CMake file in the past. +# Since we specify a minimum of CMake 3.15, these are no longer required. +# cmake_policy(SET CMP0063 NEW) +# cmake_policy(SET CMP0026 OLD) +# cmake_policy(SET CMP0074 NEW) # For FindReadline.cmake. This was changed to allow setting CMAKE_MODULE_PATH # on the command line. @@ -175,7 +171,7 @@ check_c_source_compiles( ) set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "XL") +if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "XL" AND NOT CMAKE_C_COMPILER_ID STREQUAL "SunPro") set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") endif() @@ -583,7 +579,7 @@ endif() # Output files -configure_file(config-cmake.h.in ${PROJECT_BINARY_DIR}/config.h @ONLY) +configure_file(src/config-cmake.h.in ${PROJECT_BINARY_DIR}/config.h @ONLY) # Parse version numbers and date out of configure.ac diff --git a/Makefile.am b/Makefile.am index 8aaa0cc5b..193828e95 100644 --- a/Makefile.am +++ b/Makefile.am @@ -348,6 +348,11 @@ include_HEADERS = src/pcre2posix.h bin_SCRIPTS = pcre2-config +## This is the dummy COPYING file. We don't need to check it into Git, to save cluttering a checkout with unused files (only needed for tarball). + +COPYING:: + printf "%s" "PCRE2 LICENCE\n\nPlease see the file LICENCE in the PCRE2 distribution for licensing details.\n\nEnd\n" > $@ + ## --------------------------------------------------------------- ## The pcre2_dftables program is used to rebuild character tables before ## compiling PCRE2, if --enable-rebuild-chartables is specified. It is not an @@ -972,7 +977,7 @@ EXTRA_DIST += \ cmake/FindReadline.cmake \ cmake/pcre2-config-version.cmake.in \ cmake/pcre2-config.cmake.in \ - CMakeLists.txt \ - config-cmake.h.in + src/config-cmake.h.in \ + CMakeLists.txt ## end Makefile.am diff --git a/build.zig b/build.zig index 4cb6d99d6..7540b6d31 100644 --- a/build.zig +++ b/build.zig @@ -17,7 +17,7 @@ pub fn build(b: *std.Build) !void { const config_header = b.addConfigHeader( .{ - .style = .{ .cmake = b.path("config-cmake.h.in") }, + .style = .{ .cmake = b.path("src/config-cmake.h.in") }, .include_path = "config.h", }, .{ diff --git a/configure.ac b/configure.ac index 6b8cb0846..c3d6b1073 100644 --- a/configure.ac +++ b/configure.ac @@ -448,6 +448,16 @@ AC_ARG_ENABLE(percent-zt, [disable the use of z and t formatting modifiers]), , enable_percent_zt=auto) +# Handle --enable-Werror/errwarn +AC_ARG_ENABLE(Werror, + AS_HELP_STRING([--enable-Werror], + [Add -Werror to CFLAGS (GCC/Clang style); if -Werror is passed to ./configure via CFLAGS it interferes with feature detection]), + , enable_Werror=no) +AC_ARG_ENABLE(errwarn, + AS_HELP_STRING([--enable-errwarn], + [Add -errwarn=%all to CFLAGS (Sun cc style)]), + , enable_errwarn=no) + # Set the default value for pcre2-8 if test "x$enable_pcre2_8" = "xunset" then @@ -659,9 +669,9 @@ if test "$enable_pcre2test_libreadline" = "yes"; then [unset ac_cv_lib_readline_readline; AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncurses"], [unset ac_cv_lib_readline_readline; - AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"], + AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"], [unset ac_cv_lib_readline_readline; - AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"], + AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"], [LIBREADLINE=""], [-ltermcap])], [-lncursesw])], @@ -1145,6 +1155,15 @@ AC_CONFIG_COMMANDS([script-chmod], [chmod a+x pcre2-config]) # creating it was changed by reconfiguration. AC_CONFIG_COMMANDS([delete-old-chartables], [rm -f pcre2_chartables.c]) +# Handle --enable-Werror/errwarn. This must come last, so that we don't mess +# with any of the library-detection tests (or similar). +if test "X$enable_Werror" = Xyes; then + CFLAGS="$CFLAGS -Werror" +fi +if test "X$enable_errwarn" = Xyes; then + CFLAGS="$CFLAGS -errwarn=%all" +fi + AC_OUTPUT # --disable-stack-for-recursion is obsolete and has no effect. diff --git a/deps/sljit b/deps/sljit index e51eabbfb..8481dde36 160000 --- a/deps/sljit +++ b/deps/sljit @@ -1 +1 @@ -Subproject commit e51eabbfb8eabc6526f56e4e88b29fb10d1ee048 +Subproject commit 8481dde366d0346ac5475aa03ae48ee44fa74ca4 diff --git a/doc/html/README.txt b/doc/html/README.txt index 5a50f7f11..94cdd9fef 100644 --- a/doc/html/README.txt +++ b/doc/html/README.txt @@ -940,8 +940,8 @@ The distribution should contain the files listed below. cmake/FindReadline.cmake cmake/pcre2-config-version.cmake.in cmake/pcre2-config.cmake.in + src/config-cmake.h.in CMakeLists.txt - config-cmake.h.in (E) Auxiliary files for building PCRE2 "by hand" diff --git a/m4/pcre2_visibility.m4 b/m4/pcre2_visibility.m4 index 03f4fba6e..c950ab918 100644 --- a/m4/pcre2_visibility.m4 +++ b/m4/pcre2_visibility.m4 @@ -34,10 +34,10 @@ AC_DEFUN([PCRE2_VISIBILITY], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[]])], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[ #warning e ]])], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[ #warning e ]])], [], [pcre2_cv_cc_vis_werror=yes] - ) + ) ], []) CFLAGS="$pcre2_save_CFLAGS"]) AC_MSG_RESULT([$pcre2_cv_cc_vis_werror]) diff --git a/maint/ManyConfigTests b/maint/ManyConfigTests index 9be20db70..d93feec88 100755 --- a/maint/ManyConfigTests +++ b/maint/ManyConfigTests @@ -118,13 +118,15 @@ cc --version >/tmp/pcre2ccversion 2>/dev/null if [ $? -eq 0 ] && grep GCC /tmp/pcre2ccversion >/dev/null; then ISGCC=1 CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS -Wextra" CFLAGS="$CFLAGS -Wno-overlength-strings" CFLAGS="$CFLAGS -Wpointer-arith" CFLAGS="$CFLAGS -Wwrite-strings" - CFLAGS="$CFLAGS -Wundef -Wshadow" + CFLAGS="$CFLAGS -Wundef" + CFLAGS="$CFLAGS -Wshadow" CFLAGS="$CFLAGS -Wmissing-field-initializers" CFLAGS="$CFLAGS -Wunused-parameter" - CFLAGS="$CFLAGS -Wextra -Wformat" + CFLAGS="$CFLAGS -Wformat" CFLAGS="$CFLAGS -Wbad-function-cast" CFLAGS="$CFLAGS -Wmissing-declarations" CFLAGS="$CFLAGS -Wnested-externs" @@ -135,6 +137,8 @@ if [ $? -eq 0 ] && grep GCC /tmp/pcre2ccversion >/dev/null; then CFLAGS="$CFLAGS -Wstrict-prototypes" CFLAGS="$CFLAGS -Warray-bounds" CFLAGS="$CFLAGS -Wformat-overflow=2" + CFLAGS="$CFLAGS -Wformat-truncation=2" + CFLAGS="$CFLAGS -Wdeclaration-after-statement" fi rm -f /tmp/pcre2ccversion diff --git a/maint/PrepareRelease b/maint/PrepareRelease index 98a9b0799..7e87c9852 100755 --- a/maint/PrepareRelease +++ b/maint/PrepareRelease @@ -246,7 +246,7 @@ crlf_files=( ) c_files=( - config-cmake.h.in + src/config-cmake.h.in src/pcre2.h.in src/pcre2_auto_possess.c src/pcre2_chartables.c.dist diff --git a/maint/manifest-cmakeinstall-freebsd b/maint/manifest-cmakeinstall-freebsd new file mode 100644 index 000000000..3bc4386f0 --- /dev/null +++ b/maint/manifest-cmakeinstall-freebsd @@ -0,0 +1,253 @@ +drwxr-xr-x install-dir +drwxr-xr-x install-dir/bin +-rwxr-xr-x install-dir/bin/pcre2-config +-rwxr-xr-x install-dir/bin/pcre2grep +-rwxr-xr-x install-dir/bin/pcre2test +drwxr-xr-x install-dir/include +-rw-r--r-- install-dir/include/pcre2.h +-rw-r--r-- install-dir/include/pcre2posix.h +drwxr-xr-x install-dir/lib +drwxr-xr-x install-dir/lib/cmake +drwxr-xr-x install-dir/lib/cmake/pcre2 +-rw-r--r-- install-dir/lib/cmake/pcre2/pcre2-config-version.cmake +-rw-r--r-- install-dir/lib/cmake/pcre2/pcre2-config.cmake +-rw-r--r-- install-dir/lib/libpcre2-16.a +lrwxr-xr-x install-dir/lib/libpcre2-16.so -> libpcre2-16.so.0 +lrwxr-xr-x install-dir/lib/libpcre2-16.so.0 -> libpcre2-16.so.0.14.0 +-rwxr-xr-x install-dir/lib/libpcre2-16.so.0.14.0 +-rw-r--r-- install-dir/lib/libpcre2-32.a +lrwxr-xr-x install-dir/lib/libpcre2-32.so -> libpcre2-32.so.0 +lrwxr-xr-x install-dir/lib/libpcre2-32.so.0 -> libpcre2-32.so.0.14.0 +-rwxr-xr-x install-dir/lib/libpcre2-32.so.0.14.0 +-rw-r--r-- install-dir/lib/libpcre2-8.a +lrwxr-xr-x install-dir/lib/libpcre2-8.so -> libpcre2-8.so.0 +lrwxr-xr-x install-dir/lib/libpcre2-8.so.0 -> libpcre2-8.so.0.14.0 +-rwxr-xr-x install-dir/lib/libpcre2-8.so.0.14.0 +-rw-r--r-- install-dir/lib/libpcre2-posix.a +lrwxr-xr-x install-dir/lib/libpcre2-posix.so -> libpcre2-posix.so.3 +lrwxr-xr-x install-dir/lib/libpcre2-posix.so.3 -> libpcre2-posix.so.3.0.6 +-rwxr-xr-x install-dir/lib/libpcre2-posix.so.3.0.6 +drwxr-xr-x install-dir/lib/pkgconfig +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-16.pc +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-32.pc +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-8.pc +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-posix.pc +drwxr-xr-x install-dir/share +drwxr-xr-x install-dir/share/doc +drwxr-xr-x install-dir/share/doc/pcre2 +-rw-r--r-- install-dir/share/doc/pcre2/AUTHORS.md +-rw-r--r-- install-dir/share/doc/pcre2/COPYING +-rw-r--r-- install-dir/share/doc/pcre2/ChangeLog +-rw-r--r-- install-dir/share/doc/pcre2/LICENCE.md +-rw-r--r-- install-dir/share/doc/pcre2/NEWS +-rw-r--r-- install-dir/share/doc/pcre2/README +-rw-r--r-- install-dir/share/doc/pcre2/SECURITY.md +drwxr-xr-x install-dir/share/doc/pcre2/html +-rw-r--r-- install-dir/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt +-rw-r--r-- install-dir/share/doc/pcre2/html/README.txt +-rw-r--r-- install-dir/share/doc/pcre2/html/index.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2-config.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_callout_enumerate.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_code_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_code_copy_with_tables.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_code_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_config.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_convert_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_convert_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_convert_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_converted_pattern_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_dfa_match.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_general_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_general_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_general_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_error_message.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_mark.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_match_data_heapframes_size.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_match_data_size.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_ovector_count.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_ovector_pointer.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_startchar.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_compile.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_free_unused_memory.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_match.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_stack_assign.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_stack_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_stack_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_maketables.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_maketables_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_data_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_data_create_from_pattern.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_data_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_pattern_convert.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_pattern_info.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_decode.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_encode.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_get_number_of_codes.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_bsr.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_character_tables.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_compile_extra_options.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_compile_recursion_guard.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_depth_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_glob_escape.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_glob_separator.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_heap_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_match_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_max_pattern_compiled_length.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_max_pattern_length.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_max_varlookbehind.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_newline.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_offset_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_optimize.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_parens_nest_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_recursion_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_recursion_memory_management.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_substitute_callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_substitute_case_callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substitute.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_copy_byname.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_copy_bynumber.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_get_byname.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_get_bynumber.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_length_byname.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_length_bynumber.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_list_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_list_get.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_nametable_scan.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_number_from_name.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2api.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2build.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2compat.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2convert.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2demo.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2grep.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2jit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2limits.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2matching.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2partial.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2pattern.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2perform.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2posix.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2sample.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2serialize.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2syntax.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2test.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2unicode.html +-rw-r--r-- install-dir/share/doc/pcre2/pcre2-config.txt +-rw-r--r-- install-dir/share/doc/pcre2/pcre2.txt +-rw-r--r-- install-dir/share/doc/pcre2/pcre2grep.txt +-rw-r--r-- install-dir/share/doc/pcre2/pcre2test.txt +drwxr-xr-x install-dir/share/man +drwxr-xr-x install-dir/share/man/man1 +-rw-r--r-- install-dir/share/man/man1/pcre2-config.1 +-rw-r--r-- install-dir/share/man/man1/pcre2grep.1 +-rw-r--r-- install-dir/share/man/man1/pcre2test.1 +drwxr-xr-x install-dir/share/man/man3 +-rw-r--r-- install-dir/share/man/man3/pcre2.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_callout_enumerate.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_code_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_code_copy_with_tables.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_code_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_config.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_convert_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_convert_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_convert_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_converted_pattern_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_dfa_match.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_general_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_general_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_general_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_error_message.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_mark.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_match_data_heapframes_size.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_match_data_size.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_ovector_count.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_ovector_pointer.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_startchar.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_compile.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_free_unused_memory.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_match.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_stack_assign.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_stack_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_stack_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_maketables.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_maketables_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_data_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_data_create_from_pattern.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_data_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_pattern_convert.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_pattern_info.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_decode.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_encode.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_get_number_of_codes.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_bsr.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_character_tables.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_compile_extra_options.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_compile_recursion_guard.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_depth_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_glob_escape.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_glob_separator.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_heap_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_match_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_max_pattern_compiled_length.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_max_pattern_length.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_max_varlookbehind.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_newline.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_offset_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_optimize.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_parens_nest_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_recursion_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_recursion_memory_management.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_substitute_callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_substitute_case_callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substitute.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_copy_byname.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_copy_bynumber.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_get_byname.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_get_bynumber.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_length_byname.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_length_bynumber.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_list_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_list_get.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_nametable_scan.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_number_from_name.3 +-rw-r--r-- install-dir/share/man/man3/pcre2api.3 +-rw-r--r-- install-dir/share/man/man3/pcre2build.3 +-rw-r--r-- install-dir/share/man/man3/pcre2callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2compat.3 +-rw-r--r-- install-dir/share/man/man3/pcre2convert.3 +-rw-r--r-- install-dir/share/man/man3/pcre2demo.3 +-rw-r--r-- install-dir/share/man/man3/pcre2jit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2limits.3 +-rw-r--r-- install-dir/share/man/man3/pcre2matching.3 +-rw-r--r-- install-dir/share/man/man3/pcre2partial.3 +-rw-r--r-- install-dir/share/man/man3/pcre2pattern.3 +-rw-r--r-- install-dir/share/man/man3/pcre2perform.3 +-rw-r--r-- install-dir/share/man/man3/pcre2posix.3 +-rw-r--r-- install-dir/share/man/man3/pcre2sample.3 +-rw-r--r-- install-dir/share/man/man3/pcre2serialize.3 +-rw-r--r-- install-dir/share/man/man3/pcre2syntax.3 +-rw-r--r-- install-dir/share/man/man3/pcre2unicode.3 diff --git a/maint/manifest-cmakeinstall-solaris b/maint/manifest-cmakeinstall-solaris new file mode 100644 index 000000000..93b76a711 --- /dev/null +++ b/maint/manifest-cmakeinstall-solaris @@ -0,0 +1,253 @@ +drwxr-xr-x install-dir +drwxr-xr-x install-dir/bin +-rwxr-xr-x install-dir/bin/pcre2-config +-rwxr-xr-x install-dir/bin/pcre2grep +-rwxr-xr-x install-dir/bin/pcre2test +drwxr-xr-x install-dir/include +-rw-r--r-- install-dir/include/pcre2.h +-rw-r--r-- install-dir/include/pcre2posix.h +drwxr-xr-x install-dir/lib +drwxr-xr-x install-dir/lib/cmake +drwxr-xr-x install-dir/lib/cmake/pcre2 +-rw-r--r-- install-dir/lib/cmake/pcre2/pcre2-config-version.cmake +-rw-r--r-- install-dir/lib/cmake/pcre2/pcre2-config.cmake +-rw-r--r-- install-dir/lib/libpcre2-16.a +lrwxrwxrwx install-dir/lib/libpcre2-16.so -> libpcre2-16.so.0 +lrwxrwxrwx install-dir/lib/libpcre2-16.so.0 -> libpcre2-16.so.0.14.0 +-rwxr-xr-x install-dir/lib/libpcre2-16.so.0.14.0 +-rw-r--r-- install-dir/lib/libpcre2-32.a +lrwxrwxrwx install-dir/lib/libpcre2-32.so -> libpcre2-32.so.0 +lrwxrwxrwx install-dir/lib/libpcre2-32.so.0 -> libpcre2-32.so.0.14.0 +-rwxr-xr-x install-dir/lib/libpcre2-32.so.0.14.0 +-rw-r--r-- install-dir/lib/libpcre2-8.a +lrwxrwxrwx install-dir/lib/libpcre2-8.so -> libpcre2-8.so.0 +lrwxrwxrwx install-dir/lib/libpcre2-8.so.0 -> libpcre2-8.so.0.14.0 +-rwxr-xr-x install-dir/lib/libpcre2-8.so.0.14.0 +-rw-r--r-- install-dir/lib/libpcre2-posix.a +lrwxrwxrwx install-dir/lib/libpcre2-posix.so -> libpcre2-posix.so.3 +lrwxrwxrwx install-dir/lib/libpcre2-posix.so.3 -> libpcre2-posix.so.3.0.6 +-rwxr-xr-x install-dir/lib/libpcre2-posix.so.3.0.6 +drwxr-xr-x install-dir/lib/pkgconfig +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-16.pc +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-32.pc +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-8.pc +-rw-r--r-- install-dir/lib/pkgconfig/libpcre2-posix.pc +drwxr-xr-x install-dir/share +drwxr-xr-x install-dir/share/doc +drwxr-xr-x install-dir/share/doc/pcre2 +-rw-r--r-- install-dir/share/doc/pcre2/AUTHORS.md +-rw-r--r-- install-dir/share/doc/pcre2/COPYING +-rw-r--r-- install-dir/share/doc/pcre2/ChangeLog +-rw-r--r-- install-dir/share/doc/pcre2/LICENCE.md +-rw-r--r-- install-dir/share/doc/pcre2/NEWS +-rw-r--r-- install-dir/share/doc/pcre2/README +-rw-r--r-- install-dir/share/doc/pcre2/SECURITY.md +drwxr-xr-x install-dir/share/doc/pcre2/html +-rw-r--r-- install-dir/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt +-rw-r--r-- install-dir/share/doc/pcre2/html/README.txt +-rw-r--r-- install-dir/share/doc/pcre2/html/index.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2-config.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_callout_enumerate.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_code_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_code_copy_with_tables.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_code_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_compile_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_config.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_convert_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_convert_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_convert_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_converted_pattern_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_dfa_match.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_general_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_general_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_general_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_error_message.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_mark.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_match_data_heapframes_size.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_match_data_size.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_ovector_count.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_ovector_pointer.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_get_startchar.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_compile.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_free_unused_memory.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_match.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_stack_assign.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_stack_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_jit_stack_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_maketables.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_maketables_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_context_copy.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_context_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_context_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_data_create.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_data_create_from_pattern.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_match_data_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_pattern_convert.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_pattern_info.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_decode.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_encode.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_serialize_get_number_of_codes.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_bsr.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_character_tables.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_compile_extra_options.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_compile_recursion_guard.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_depth_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_glob_escape.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_glob_separator.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_heap_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_match_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_max_pattern_compiled_length.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_max_pattern_length.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_max_varlookbehind.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_newline.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_offset_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_optimize.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_parens_nest_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_recursion_limit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_recursion_memory_management.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_substitute_callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_set_substitute_case_callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substitute.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_copy_byname.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_copy_bynumber.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_get_byname.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_get_bynumber.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_length_byname.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_length_bynumber.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_list_free.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_list_get.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_nametable_scan.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2_substring_number_from_name.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2api.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2build.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2callout.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2compat.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2convert.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2demo.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2grep.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2jit.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2limits.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2matching.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2partial.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2pattern.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2perform.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2posix.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2sample.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2serialize.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2syntax.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2test.html +-rw-r--r-- install-dir/share/doc/pcre2/html/pcre2unicode.html +-rw-r--r-- install-dir/share/doc/pcre2/pcre2-config.txt +-rw-r--r-- install-dir/share/doc/pcre2/pcre2.txt +-rw-r--r-- install-dir/share/doc/pcre2/pcre2grep.txt +-rw-r--r-- install-dir/share/doc/pcre2/pcre2test.txt +drwxr-xr-x install-dir/share/man +drwxr-xr-x install-dir/share/man/man1 +-rw-r--r-- install-dir/share/man/man1/pcre2-config.1 +-rw-r--r-- install-dir/share/man/man1/pcre2grep.1 +-rw-r--r-- install-dir/share/man/man1/pcre2test.1 +drwxr-xr-x install-dir/share/man/man3 +-rw-r--r-- install-dir/share/man/man3/pcre2.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_callout_enumerate.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_code_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_code_copy_with_tables.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_code_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_compile_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_config.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_convert_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_convert_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_convert_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_converted_pattern_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_dfa_match.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_general_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_general_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_general_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_error_message.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_mark.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_match_data_heapframes_size.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_match_data_size.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_ovector_count.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_ovector_pointer.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_get_startchar.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_compile.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_free_unused_memory.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_match.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_stack_assign.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_stack_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_jit_stack_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_maketables.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_maketables_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_context_copy.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_context_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_context_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_data_create.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_data_create_from_pattern.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_match_data_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_pattern_convert.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_pattern_info.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_decode.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_encode.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_serialize_get_number_of_codes.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_bsr.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_character_tables.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_compile_extra_options.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_compile_recursion_guard.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_depth_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_glob_escape.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_glob_separator.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_heap_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_match_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_max_pattern_compiled_length.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_max_pattern_length.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_max_varlookbehind.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_newline.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_offset_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_optimize.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_parens_nest_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_recursion_limit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_recursion_memory_management.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_substitute_callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_set_substitute_case_callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substitute.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_copy_byname.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_copy_bynumber.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_get_byname.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_get_bynumber.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_length_byname.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_length_bynumber.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_list_free.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_list_get.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_nametable_scan.3 +-rw-r--r-- install-dir/share/man/man3/pcre2_substring_number_from_name.3 +-rw-r--r-- install-dir/share/man/man3/pcre2api.3 +-rw-r--r-- install-dir/share/man/man3/pcre2build.3 +-rw-r--r-- install-dir/share/man/man3/pcre2callout.3 +-rw-r--r-- install-dir/share/man/man3/pcre2compat.3 +-rw-r--r-- install-dir/share/man/man3/pcre2convert.3 +-rw-r--r-- install-dir/share/man/man3/pcre2demo.3 +-rw-r--r-- install-dir/share/man/man3/pcre2jit.3 +-rw-r--r-- install-dir/share/man/man3/pcre2limits.3 +-rw-r--r-- install-dir/share/man/man3/pcre2matching.3 +-rw-r--r-- install-dir/share/man/man3/pcre2partial.3 +-rw-r--r-- install-dir/share/man/man3/pcre2pattern.3 +-rw-r--r-- install-dir/share/man/man3/pcre2perform.3 +-rw-r--r-- install-dir/share/man/man3/pcre2posix.3 +-rw-r--r-- install-dir/share/man/man3/pcre2sample.3 +-rw-r--r-- install-dir/share/man/man3/pcre2serialize.3 +-rw-r--r-- install-dir/share/man/man3/pcre2syntax.3 +-rw-r--r-- install-dir/share/man/man3/pcre2unicode.3 diff --git a/maint/manifest-makeinstall-solaris b/maint/manifest-makeinstall-solaris new file mode 100644 index 000000000..991ebe131 --- /dev/null +++ b/maint/manifest-makeinstall-solaris @@ -0,0 +1,255 @@ +drwxr-xr-x install-dir +drwxr-xr-x install-dir/usr +drwxr-xr-x install-dir/usr/local +drwxr-xr-x install-dir/usr/local/bin +-rwxr-xr-x install-dir/usr/local/bin/pcre2-config +-rwxr-xr-x install-dir/usr/local/bin/pcre2grep +-rwxr-xr-x install-dir/usr/local/bin/pcre2test +drwxr-xr-x install-dir/usr/local/include +-rw-r--r-- install-dir/usr/local/include/pcre2.h +-rw-r--r-- install-dir/usr/local/include/pcre2posix.h +drwxr-xr-x install-dir/usr/local/lib +-rw-r--r-- install-dir/usr/local/lib/libpcre2-16.a +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-16.la +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-16.so -> libpcre2-16.so.0.14.0 +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-16.so.0 -> libpcre2-16.so.0.14.0 +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-16.so.0.14.0 +-rw-r--r-- install-dir/usr/local/lib/libpcre2-32.a +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-32.la +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-32.so -> libpcre2-32.so.0.14.0 +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-32.so.0 -> libpcre2-32.so.0.14.0 +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-32.so.0.14.0 +-rw-r--r-- install-dir/usr/local/lib/libpcre2-8.a +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-8.la +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-8.so -> libpcre2-8.so.0.14.0 +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-8.so.0 -> libpcre2-8.so.0.14.0 +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-8.so.0.14.0 +-rw-r--r-- install-dir/usr/local/lib/libpcre2-posix.a +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-posix.la +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-posix.so -> libpcre2-posix.so.3.0.6 +lrwxrwxrwx install-dir/usr/local/lib/libpcre2-posix.so.3 -> libpcre2-posix.so.3.0.6 +-rwxr-xr-x install-dir/usr/local/lib/libpcre2-posix.so.3.0.6 +drwxr-xr-x install-dir/usr/local/lib/pkgconfig +-rw-r--r-- install-dir/usr/local/lib/pkgconfig/libpcre2-16.pc +-rw-r--r-- install-dir/usr/local/lib/pkgconfig/libpcre2-32.pc +-rw-r--r-- install-dir/usr/local/lib/pkgconfig/libpcre2-8.pc +-rw-r--r-- install-dir/usr/local/lib/pkgconfig/libpcre2-posix.pc +drwxr-xr-x install-dir/usr/local/share +drwxr-xr-x install-dir/usr/local/share/doc +drwxr-xr-x install-dir/usr/local/share/doc/pcre2 +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/AUTHORS.md +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/COPYING +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/ChangeLog +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/LICENCE.md +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/NEWS +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/README +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/SECURITY.md +drwxr-xr-x install-dir/usr/local/share/doc/pcre2/html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/README.txt +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/index.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2-config.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_callout_enumerate.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_code_copy.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_code_copy_with_tables.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_code_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_compile.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_compile_context_copy.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_compile_context_create.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_compile_context_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_config.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_convert_context_copy.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_convert_context_create.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_convert_context_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_converted_pattern_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_dfa_match.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_general_context_copy.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_general_context_create.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_general_context_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_error_message.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_mark.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_match_data_heapframes_size.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_match_data_size.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_ovector_count.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_ovector_pointer.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_get_startchar.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_jit_compile.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_jit_free_unused_memory.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_jit_match.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_jit_stack_assign.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_jit_stack_create.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_jit_stack_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_maketables.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_maketables_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match_context_copy.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match_context_create.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match_context_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match_data_create.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match_data_create_from_pattern.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_match_data_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_pattern_convert.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_pattern_info.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_serialize_decode.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_serialize_encode.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_serialize_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_serialize_get_number_of_codes.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_bsr.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_callout.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_character_tables.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_compile_extra_options.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_compile_recursion_guard.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_depth_limit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_glob_escape.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_glob_separator.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_heap_limit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_match_limit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_max_pattern_compiled_length.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_max_pattern_length.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_max_varlookbehind.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_newline.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_offset_limit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_optimize.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_parens_nest_limit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_recursion_limit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_recursion_memory_management.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_substitute_callout.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_set_substitute_case_callout.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substitute.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_copy_byname.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_copy_bynumber.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_get_byname.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_get_bynumber.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_length_byname.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_length_bynumber.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_list_free.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_list_get.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_nametable_scan.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2_substring_number_from_name.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2api.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2build.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2callout.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2compat.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2convert.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2demo.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2grep.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2jit.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2limits.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2matching.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2partial.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2pattern.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2perform.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2posix.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2sample.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2serialize.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2syntax.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2test.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/pcre2unicode.html +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/pcre2-config.txt +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/pcre2.txt +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/pcre2grep.txt +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/pcre2test.txt +drwxr-xr-x install-dir/usr/local/share/man +drwxr-xr-x install-dir/usr/local/share/man/man1 +-rw-r--r-- install-dir/usr/local/share/man/man1/pcre2-config.1 +-rw-r--r-- install-dir/usr/local/share/man/man1/pcre2grep.1 +-rw-r--r-- install-dir/usr/local/share/man/man1/pcre2test.1 +drwxr-xr-x install-dir/usr/local/share/man/man3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_callout_enumerate.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_code_copy.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_code_copy_with_tables.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_code_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_compile.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_compile_context_copy.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_compile_context_create.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_compile_context_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_config.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_convert_context_copy.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_convert_context_create.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_convert_context_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_converted_pattern_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_dfa_match.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_general_context_copy.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_general_context_create.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_general_context_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_error_message.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_mark.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_match_data_heapframes_size.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_match_data_size.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_ovector_count.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_ovector_pointer.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_get_startchar.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_jit_compile.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_jit_free_unused_memory.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_jit_match.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_jit_stack_assign.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_jit_stack_create.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_jit_stack_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_maketables.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_maketables_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match_context_copy.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match_context_create.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match_context_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match_data_create.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match_data_create_from_pattern.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_match_data_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_pattern_convert.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_pattern_info.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_serialize_decode.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_serialize_encode.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_serialize_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_serialize_get_number_of_codes.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_bsr.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_callout.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_character_tables.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_compile_extra_options.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_compile_recursion_guard.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_depth_limit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_glob_escape.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_glob_separator.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_heap_limit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_match_limit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_max_pattern_compiled_length.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_max_pattern_length.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_max_varlookbehind.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_newline.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_offset_limit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_optimize.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_parens_nest_limit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_recursion_limit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_recursion_memory_management.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_substitute_callout.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_set_substitute_case_callout.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substitute.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_copy_byname.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_copy_bynumber.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_get_byname.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_get_bynumber.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_length_byname.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_length_bynumber.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_list_free.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_list_get.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_nametable_scan.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2_substring_number_from_name.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2api.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2build.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2callout.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2compat.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2convert.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2demo.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2jit.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2limits.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2matching.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2partial.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2pattern.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2perform.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2posix.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2sample.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2serialize.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2syntax.3 +-rw-r--r-- install-dir/usr/local/share/man/man3/pcre2unicode.3 diff --git a/maint/manifest-tarball b/maint/manifest-tarball index 7cdc99554..51c596db2 100644 --- a/maint/manifest-tarball +++ b/maint/manifest-tarball @@ -30,7 +30,6 @@ drwxr-xr-x tarball-dir/pcre2-SNAPSHOT/cmake -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/cmake/pcre2-config-version.cmake.in -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/cmake/pcre2-config.cmake.in -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/compile --rw-r--r-- tarball-dir/pcre2-SNAPSHOT/config-cmake.h.in -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/config.guess -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/config.sub -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/configure @@ -298,6 +297,7 @@ drwxr-xr-x tarball-dir/pcre2-SNAPSHOT/m4 -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/pcre2-config.in -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/perltest.sh drwxr-xr-x tarball-dir/pcre2-SNAPSHOT/src +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/src/config-cmake.h.in -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/src/config.h.generic -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/src/config.h.in -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/src/pcre2.h.generic diff --git a/config-cmake.h.in b/src/config-cmake.h.in similarity index 95% rename from config-cmake.h.in rename to src/config-cmake.h.in index 0eff0e0f7..bf055a945 100644 --- a/config-cmake.h.in +++ b/src/config-cmake.h.in @@ -52,7 +52,7 @@ #define PCRE2GREP_BUFSIZE @PCRE2GREP_BUFSIZE@ #define PCRE2GREP_MAX_BUFSIZE @PCRE2GREP_MAX_BUFSIZE@ -#define MAX_NAME_SIZE 128 -#define MAX_NAME_COUNT 10000 +#define MAX_NAME_SIZE 128 +#define MAX_NAME_COUNT 10000 /* end config.h for CMake builds */ diff --git a/src/pcre2_jit_char_inc.h b/src/pcre2_jit_char_inc.h index 69fe938fc..77652f69a 100644 --- a/src/pcre2_jit_char_inc.h +++ b/src/pcre2_jit_char_inc.h @@ -1104,7 +1104,7 @@ if (ranges.range_count >= 6) depth = 0; first_item = 0; -last_item = ranges.range_count - 2; +last_item = (sljit_u32)(ranges.range_count - 2); has_cmov = sljit_has_cpu_feature(SLJIT_HAS_CMOV) != 0; while (TRUE) diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 175eb6853..0041f567a 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -1838,7 +1838,8 @@ if (*next == OP_BRAZERO || *next == OP_BRAMINZERO) if (i == max) { - common->private_data_ptrs[max_end - common->start - LINK_SIZE] = next_end - max_end; + /* Patterns must fit into an int32 even for link-size=4. */ + common->private_data_ptrs[max_end - common->start - LINK_SIZE] = (sljit_s32)(next_end - max_end); common->private_data_ptrs[max_end - common->start - LINK_SIZE + 1] = (type == OP_BRAZERO) ? OP_UPTO : OP_MINUPTO; /* +2 the original and the last. */ common->private_data_ptrs[max_end - common->start - LINK_SIZE + 2] = max + 2; @@ -1853,7 +1854,7 @@ if (*next == OP_BRAZERO || *next == OP_BRAMINZERO) if (min >= 3) { - common->private_data_ptrs[end - common->start - LINK_SIZE] = max_end - end; + common->private_data_ptrs[end - common->start - LINK_SIZE] = (sljit_s32)(max_end - end); common->private_data_ptrs[end - common->start - LINK_SIZE + 1] = OP_EXACT; common->private_data_ptrs[end - common->start - LINK_SIZE + 2] = min; return TRUE; @@ -2438,7 +2439,7 @@ SLJIT_ASSERT(stackpos == STACK(stacktop)); typedef struct delayed_mem_copy_status { struct sljit_compiler *compiler; int store_bases[RECURSE_TMP_REG_COUNT]; - int store_offsets[RECURSE_TMP_REG_COUNT]; + sljit_s32 store_offsets[RECURSE_TMP_REG_COUNT]; int tmp_regs[RECURSE_TMP_REG_COUNT]; int saved_tmp_regs[RECURSE_TMP_REG_COUNT]; int next_tmp_reg; @@ -2460,7 +2461,7 @@ status->compiler = common->compiler; } static void delayed_mem_copy_move(delayed_mem_copy_status *status, int load_base, sljit_sw load_offset, - int store_base, sljit_sw store_offset) + int store_base, sljit_s32 store_offset) { struct sljit_compiler *compiler = status->compiler; int next_tmp_reg = status->next_tmp_reg; @@ -3184,7 +3185,7 @@ while (cc < ccend) SLJIT_ASSERT(private_srcw[i] != 0); if (!from_sp) - delayed_mem_copy_move(&status, base_reg, stackptr, SLJIT_SP, private_srcw[i]); + delayed_mem_copy_move(&status, base_reg, stackptr, SLJIT_SP, (sljit_s32)private_srcw[i]); if (from_sp || type == recurse_swap_global) delayed_mem_copy_move(&status, SLJIT_SP, private_srcw[i], base_reg, stackptr); @@ -3204,7 +3205,7 @@ while (cc < ccend) SLJIT_ASSERT(shared_srcw[i] != 0); if (!from_sp) - delayed_mem_copy_move(&status, base_reg, stackptr, SLJIT_SP, shared_srcw[i]); + delayed_mem_copy_move(&status, base_reg, stackptr, SLJIT_SP, (sljit_s32)shared_srcw[i]); if (from_sp || type == recurse_swap_global) delayed_mem_copy_move(&status, SLJIT_SP, shared_srcw[i], base_reg, stackptr); @@ -3224,7 +3225,7 @@ while (cc < ccend) SLJIT_ASSERT(kept_shared_srcw[i] != 0); if (!from_sp) - delayed_mem_copy_move(&status, base_reg, stackptr, SLJIT_SP, kept_shared_srcw[i]); + delayed_mem_copy_move(&status, base_reg, stackptr, SLJIT_SP, (sljit_s32)kept_shared_srcw[i]); if (from_sp || type == recurse_swap_global) delayed_mem_copy_move(&status, SLJIT_SP, kept_shared_srcw[i], base_reg, stackptr); @@ -3380,7 +3381,7 @@ OP2(SLJIT_SUB | SLJIT_SET_Z, COUNT_MATCH, 0, COUNT_MATCH, 0, SLJIT_IMM, 1); add_jump(compiler, &common->calllimit, JUMP(SLJIT_ZERO)); } -static SLJIT_INLINE void allocate_stack(compiler_common *common, int size) +static SLJIT_INLINE void allocate_stack(compiler_common *common, sljit_s32 size) { /* May destroy all locals and registers except TMP2. */ DEFINE_COMPILER; @@ -3401,7 +3402,7 @@ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCAL1, TMP1, 0); add_stub(common, CMP(SLJIT_LESS, STACK_TOP, 0, STACK_LIMIT, 0)); } -static SLJIT_INLINE void free_stack(compiler_common *common, int size) +static SLJIT_INLINE void free_stack(compiler_common *common, sljit_s32 size) { DEFINE_COMPILER; @@ -8567,7 +8568,7 @@ unsigned int callout_length = (*cc == OP_CALLOUT) sljit_sw value1; sljit_sw value2; sljit_sw value3; -sljit_uw callout_arg_size = (common->re->top_bracket + 1) * 2 * SSIZE_OF(sw); +sljit_s32 callout_arg_size = (common->re->top_bracket + 1) * 2 * SSIZE_OF(sw); /* top_bracket is uint16 so maximum is 1MiB */ PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL); diff --git a/src/pcre2_jit_neon_inc.h b/src/pcre2_jit_neon_inc.h index 9caa1f26f..d3d189289 100644 --- a/src/pcre2_jit_neon_inc.h +++ b/src/pcre2_jit_neon_inc.h @@ -82,6 +82,11 @@ POSSIBILITY OF SUCH DAMAGE. # endif # endif +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" +#endif + #if (defined(__GNUC__) && __SANITIZE_ADDRESS__) \ || (defined(__clang__) \ && ((__clang_major__ == 3 && __clang_minor__ >= 3) || (__clang_major__ > 3))) @@ -352,3 +357,7 @@ match:; /* Failed match. */ return NULL; } + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif diff --git a/src/pcre2_substitute.c b/src/pcre2_substitute.c index 17040ce5f..ef27b941c 100644 --- a/src/pcre2_substitute.c +++ b/src/pcre2_substitute.c @@ -818,7 +818,7 @@ if (match_data == NULL) pcre2_general_context gcontext; if (use_existing_match) return PCRE2_ERROR_NULL; gcontext.memctl = (mcontext == NULL)? - ((const pcre2_real_code *)code)->memctl : + ((pcre2_real_code *)code)->memctl : ((pcre2_real_match_context *)mcontext)->memctl; match_data = internal_match_data = pcre2_match_data_create_from_pattern(code, &gcontext); @@ -830,7 +830,7 @@ else if (use_existing_match) int pairs; pcre2_general_context gcontext; gcontext.memctl = (mcontext == NULL)? - ((const pcre2_real_code *)code)->memctl : + ((pcre2_real_code *)code)->memctl : ((pcre2_real_match_context *)mcontext)->memctl; pairs = (code->top_bracket + 1 < match_data->oveccount)? code->top_bracket + 1 : match_data->oveccount; diff --git a/src/pcre2grep.c b/src/pcre2grep.c index 7d8c43c8b..68dfe4a2a 100644 --- a/src/pcre2grep.c +++ b/src/pcre2grep.c @@ -260,7 +260,7 @@ static const uint8_t *character_tables = NULL; static uint32_t pcre2_options = 0; static uint32_t extra_options = 0; -static PCRE2_SIZE heap_limit = PCRE2_UNSET; +static uint32_t heap_limit = ~(uint32_t)0; static uint32_t match_limit = 0; static uint32_t depth_limit = 0; @@ -469,7 +469,7 @@ static option_item optionlist[] = { { OP_NODATA, N_LBUFFER, NULL, "line-buffered", "use line buffering" }, { OP_NODATA, N_LOFFSETS, NULL, "line-offsets", "output line numbers and offsets, not text" }, { OP_STRING, N_LOCALE, &locale, "locale=locale", "use the named locale" }, - { OP_SIZE, N_H_LIMIT, &heap_limit, "heap-limit=number", "set PCRE2 heap limit option (kibibytes)" }, + { OP_U32NUMBER, N_H_LIMIT, &heap_limit, "heap-limit=number", "set PCRE2 heap limit option (kibibytes)" }, { OP_U32NUMBER, N_M_LIMIT, &match_limit, "match-limit=number", "set PCRE2 match limit option" }, { OP_U32NUMBER, N_M_LIMIT_DEP, &depth_limit, "depth-limit=number", "set PCRE2 depth limit option" }, { OP_U32NUMBER, N_M_LIMIT_DEP, &depth_limit, "recursion-limit=number", "obsolete synonym for depth-limit" }, @@ -831,7 +831,7 @@ return result; static void -init_colour_output() +init_colour_output(void) { if (do_colour) { @@ -966,7 +966,7 @@ return isatty(fileno(f)); /************* Print optionally coloured match Unix-style and z/OS **********/ static void -print_match(const void *buf, int length) +print_match(const void *buf, size_t length) { if (length == 0) return; if (do_colour) fprintf(stdout, "%c[%sm", 0x1b, colour_string); @@ -1102,7 +1102,7 @@ return _isatty(_fileno(f)); /************* Print optionally coloured match in Windows **********/ static void -print_match(const void *buf, int length) +print_match(const void *buf, size_t length) { if (length == 0) return; if (do_colour) @@ -1161,7 +1161,7 @@ return FALSE; /************* Print optionally coloured match when we can't do it **********/ static void -print_match(const void *buf, int length) +print_match(const void *buf, size_t length) { if (length == 0) return; FWRITE_IGNORE(buf, 1, length, stdout); @@ -1265,8 +1265,8 @@ for (op = optionlist; op->one_char != 0; op++) n = 31 - printf(" -%c", op->one_char); else { - if (op->one_char > 0) sprintf(s, "-%c,", op->one_char); - else strcpy(s, " "); + if (op->one_char > 0) snprintf(s, sizeof(s), "-%c,", op->one_char); + else snprintf(s, sizeof(s), " "); n = 31 - printf(" %s --%s", s, op->long_name); } @@ -1305,7 +1305,7 @@ Returns: TRUE if the path is not excluded static BOOL test_incexc(char *path, patstr *ip, patstr *ep) { -int plen = strlen((const char *)path); +size_t plen = strlen((const char *)path); for (; ep != NULL; ep = ep->next) { @@ -2532,7 +2532,7 @@ necessary, otherwise assume fork(). */ #ifdef WIN32 (void)fflush(stdout); -result = _spawnvp(_P_WAIT, argsvector[0], (const char * const *)argsvector); +result = _spawnvp(_P_WAIT, argsvector[0], (const char * const *)argsvector) != 0; #elif defined __VMS { @@ -2921,7 +2921,7 @@ while (ptr < endptr) int n = om->groupnum; if (n == 0 || n < mrc) { - int plen = offsets[2*n + 1] - offsets[2*n]; + size_t plen = offsets[2*n + 1] - offsets[2*n]; if (plen > 0) { if (printed && om_separator != NULL) @@ -3440,7 +3440,7 @@ if (isdirectory(pathname)) while ((nextfile = readdirectory(dir)) != NULL) { int frc; - int fnlength = strlen(pathname) + strlen(nextfile) + 2; + size_t fnlength = strlen(pathname) + strlen(nextfile) + 2; if (fnlength > FNBUFSIZ) { /* LCOV_EXCL_START - this is a "never" event */ @@ -3449,7 +3449,7 @@ if (isdirectory(pathname)) break; /* LCOV_EXCL_STOP */ } - sprintf(childpath, "%s%c%s", pathname, FILESEP, nextfile); + snprintf(childpath, sizeof(childpath), "%s%c%s", pathname, FILESEP, nextfile); /* If the realpath() function is available, we can try to prevent endless recursion caused by a symlink pointing to a parent directory (GitHub @@ -3509,7 +3509,15 @@ if (iswild(pathname)) while ((nextfile = readdirectory(dir)) != NULL) { int frc; - sprintf(buffer, "%.512s%.128s", pathname, nextfile); + if (strlen(pathname) + strlen(nextfile) + 1 > sizeof(buffer)) + { + /* LCOV_EXCL_START - this is a "never" event */ + fprintf(stderr, "pcre2grep: wildcard filename is too long\n"); + rc = 2; + break; + /* LCOV_EXCL_STOP */ + } + snprintf(buffer, sizeof(buffer), "%s%s", pathname, nextfile); frc = grep_or_recurse(buffer, dir_recurse, FALSE); if (frc > 1) rc = frc; else if (frc == 0 && rc == 1) rc = 0; @@ -3738,16 +3746,16 @@ ordin(int n) { static char buffer[14]; char *p = buffer; -sprintf(p, "%d", n); +snprintf(p, sizeof(buffer), "%d", n); while (*p != 0) p++; n %= 100; if (n >= 11 && n <= 13) n = 0; switch (n%10) { - case 1: strcpy(p, "st"); break; - case 2: strcpy(p, "nd"); break; - case 3: strcpy(p, "rd"); break; - default: strcpy(p, "th"); break; + case 1: snprintf(p, (buffer + sizeof(buffer)) - p, "st"); break; + case 2: snprintf(p, (buffer + sizeof(buffer)) - p, "nd"); break; + case 3: snprintf(p, (buffer + sizeof(buffer)) - p, "rd"); break; + default: snprintf(p, (buffer + sizeof(buffer)) - p, "th"); break; } return buffer; } @@ -4333,7 +4341,7 @@ extra_options |= PCRE2_EXTRA_NEVER_CALLOUT; /* Put limits into the match context. */ -if (heap_limit != PCRE2_UNSET) pcre2_set_heap_limit(match_context, heap_limit); +if (heap_limit != ~(uint32_t)0) pcre2_set_heap_limit(match_context, heap_limit); if (match_limit > 0) pcre2_set_match_limit(match_context, match_limit); if (depth_limit > 0) pcre2_set_depth_limit(match_context, depth_limit); diff --git a/src/pcre2test.c b/src/pcre2test.c index 80ab4f809..7b98aa954 100644 --- a/src/pcre2test.c +++ b/src/pcre2test.c @@ -576,7 +576,7 @@ typedef struct patctl { /* Structure for pattern modifiers. */ uint32_t control; /* Must be in same position as datctl */ uint32_t control2; /* Must be in same position as datctl */ uint32_t jitstack; /* Must be in same position as datctl */ - uint8_t replacement[REPLACE_MODSIZE]; /* So must this */ + uint8_t replacement[REPLACE_MODSIZE]; /* So must this */ uint32_t substitute_skip; /* Must be in same position as datctl */ uint32_t substitute_stop; /* Must be in same position as datctl */ uint32_t jit; @@ -593,24 +593,24 @@ typedef struct patctl { /* Structure for pattern modifiers. */ #define MAXCPYGET 10 #define LENCPYGET 64 -typedef struct datctl { /* Structure for data line modifiers. */ - uint32_t options; /* Must be in same position as patctl */ - uint32_t control; /* Must be in same position as patctl */ - uint32_t control2; /* Must be in same position as patctl */ - uint32_t jitstack; /* Must be in same position as patctl */ - uint8_t replacement[REPLACE_MODSIZE]; /* So must this */ - uint32_t substitute_skip; /* Must be in same position as patctl */ - uint32_t substitute_stop; /* Must be in same position as patctl */ - uint32_t startend[2]; - uint32_t cerror[2]; - uint32_t cfail[2]; - int32_t callout_data; - int32_t copy_numbers[MAXCPYGET]; - int32_t get_numbers[MAXCPYGET]; - uint32_t oveccount; - uint32_t offset; - uint8_t copy_names[LENCPYGET]; - uint8_t get_names[LENCPYGET]; +typedef struct datctl { /* Structure for data line modifiers. */ + uint32_t options; /* Must be in same position as patctl */ + uint32_t control; /* Must be in same position as patctl */ + uint32_t control2; /* Must be in same position as patctl */ + uint32_t jitstack; /* Must be in same position as patctl */ + uint8_t replacement[REPLACE_MODSIZE]; /* So must this */ + uint32_t substitute_skip; /* Must be in same position as patctl */ + uint32_t substitute_stop; /* Must be in same position as patctl */ + uint32_t startend[2]; + uint32_t cerror[2]; + uint32_t cfail[2]; + int32_t callout_data; + int32_t copy_numbers[MAXCPYGET]; + int32_t get_numbers[MAXCPYGET]; + uint32_t oveccount; + PCRE2_SIZE offset; + uint8_t copy_names[LENCPYGET]; + uint8_t get_names[LENCPYGET]; } datctl; /* Ids for which context to modify. */ @@ -1027,7 +1027,7 @@ static regex_t preg = { NULL, NULL, 0, 0, 0, 0 }; static int *dfa_workspace = NULL; static const uint8_t *locale_tables = NULL; static const uint8_t *use_tables = NULL; -static uint8_t locale_name[32]; +static uint8_t locale_name[LOCALESIZE]; static uint8_t *tables3 = NULL; /* For binary-loaded tables */ static uint32_t loadtables_length = 0; @@ -3111,7 +3111,7 @@ if (c < 0x100) } if (f != NULL) n = fprintf(f, "\\x{%02x}", c); - else n = sprintf(tempbuffer, "\\x{%02x}", c); + else n = snprintf(tempbuffer, sizeof(tempbuffer), "\\x{%02x}", c); return n >= 0 ? n : 0; } @@ -3157,7 +3157,7 @@ For printing *MARK strings, a negative length is given, indicating that the length is in the first code unit. If handed a NULL file, this function just counts chars without printing (because pchar() does that). */ -static int pchars8(PCRE2_SPTR8 p, int length, BOOL utf, FILE *f) +static int pchars8(PCRE2_SPTR8 p, ptrdiff_t length, BOOL utf, FILE *f) { PCRE2_SPTR8 end; uint32_t c = 0; @@ -3196,7 +3196,7 @@ For printing *MARK strings, a negative length is given, indicating that the length is in the first code unit. If handed a NULL file, just counts chars without printing. */ -static int pchars16(PCRE2_SPTR16 p, int length, BOOL utf, FILE *f) +static int pchars16(PCRE2_SPTR16 p, ptrdiff_t length, BOOL utf, FILE *f) { int yield = 0; if (length < 0) length = *p++; @@ -3231,7 +3231,7 @@ For printing *MARK strings, a negative length is given, indicating that the length is in the first code unit. If handed a NULL file, just counts chars without printing. */ -static int pchars32(PCRE2_SPTR32 p, int length, BOOL utf, FILE *f) +static int pchars32(PCRE2_SPTR32 p, ptrdiff_t length, BOOL utf, FILE *f) { int yield = 0; (void)(utf); /* Avoid compiler warning */ @@ -3530,13 +3530,14 @@ Returns: nothing (aborts if malloc() fails) static void expand_input_buffers(void) { -int new_pbuffer8_size = 2*pbuffer8_size; +size_t new_pbuffer8_size = 2*pbuffer8_size; uint8_t *new_buffer = (uint8_t *)malloc(new_pbuffer8_size); uint8_t *new_pbuffer8 = (uint8_t *)malloc(new_pbuffer8_size); if (new_buffer == NULL || new_pbuffer8 == NULL) { - fprintf(stderr, "pcre2test: malloc(%d) failed\n", new_pbuffer8_size); + fprintf(stderr, "pcre2test: malloc(%" SIZ_FORM ") failed\n", + new_pbuffer8_size); exit(1); } @@ -3585,40 +3586,42 @@ uint8_t *here = start; for (;;) { + size_t dlen; size_t rlen = (size_t)(pbuffer8_size - (here - buffer)); - if (rlen > 1000) - { - size_t dlen; - - /* If libreadline or libedit support is required, use readline() to read a - line if the input is a terminal. Note that readline() removes the trailing - newline, so we must put it back again, to be compatible with fgets(). */ + /* If libreadline or libedit support is required, use readline() to read a + line if the input is a terminal. Note that readline() removes the trailing + newline, so we must put it back again, to be compatible with fgets(). */ #if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) - if (INTERACTIVE(f)) + if (INTERACTIVE(f)) + { + char *s = readline(prompt); + if (s == NULL) return (here == start)? NULL : start; + dlen = strlen(s); + if (dlen > rlen - 2) { - size_t len; - char *s = readline(prompt); - if (s == NULL) return (here == start)? NULL : start; - len = strlen(s); - if (len > 0) add_history(s); - if (len > rlen - 1) len = rlen - 1; - memcpy(here, s, len); - here[len] = '\n'; - here[len+1] = 0; - free(s); + fprintf(outfile, "** Interactive input exceeds buffer space\n"); + exit(1); } - else + if (dlen > 0) add_history(s); + memcpy(here, s, dlen); + here[dlen] = '\n'; + here[dlen+1] = 0; + free(s); + return start; + } #endif + if (rlen > 1000) + { + int rlen_trunc = (rlen > (unsigned)INT_MAX)? INT_MAX : (int)rlen; + /* Read the next line by normal means, prompting if the file is a tty. */ - { - if (INTERACTIVE(f)) printf("%s", prompt); - if (fgets((char *)here, rlen, f) == NULL) - return (here == start)? NULL : start; - } + if (INTERACTIVE(f)) printf("%s", prompt); + if (fgets((char *)here, rlen_trunc, f) == NULL) + return (here == start)? NULL : start; dlen = strlen((char *)here); here += dlen; @@ -3635,7 +3638,7 @@ for (;;) strlen() to give a short length. This is a hard error because pcre2test expects to work with C strings. */ - if (!INTERACTIVE(f) && dlen < rlen - 1 && !feof(f)) + if (dlen < (unsigned)rlen_trunc - 1 && !feof(f)) { fprintf(outfile, "** Binary zero encountered in input\n"); fprintf(outfile, "** pcre2test run abandoned\n"); @@ -3672,7 +3675,7 @@ Returns: < 0, = 0, or > 0, according to the comparison */ static int -strncmpic(const uint8_t *s, const uint8_t *t, int n) +strncmpic(const uint8_t *s, const uint8_t *t, size_t n) { while (n--) { @@ -3698,7 +3701,7 @@ Returns: an index in the modifier list, or -1 on failure */ static int -scan_modifiers(const uint8_t *p, unsigned int len) +scan_modifiers(const uint8_t *p, size_t len) { int bot = 0; int top = MODLISTCOUNT; @@ -3706,12 +3709,12 @@ int top = MODLISTCOUNT; while (top > bot) { int mid = (bot + top)/2; - unsigned int mlen = strlen(modlist[mid].name); + size_t mlen = strlen(modlist[mid].name); int c = strncmp((const char *)p, modlist[mid].name, (len < mlen)? len : mlen); if (c == 0) { if (len == mlen) return mid; - c = (int)len - (int)mlen; + c = len > mlen ? 1 : -1; } if (c > 0) bot = mid + 1; else top = mid; } @@ -3845,7 +3848,8 @@ for (;;) void *field; modstruct *m; BOOL off = FALSE; - unsigned int i, len; + unsigned int i; + size_t len; int index; char *endptr; @@ -5076,9 +5080,9 @@ open_file(uint8_t *buffptr, const char *mode, FILE **fptr, const char *name) { char *endf; char *filename = (char *)buffptr; -while (isspace(*filename)) filename++; +while (isspace((unsigned char)*filename)) filename++; endf = filename + strlen8(filename); -while (endf > filename && isspace(endf[-1])) endf--; +while (endf > filename && isspace((unsigned char)endf[-1])) endf--; if (endf == filename) { @@ -5120,9 +5124,10 @@ process_command(void) FILE *f; PCRE2_SIZE serial_size; size_t i; -int rc, cmd, cmdlen, yield; +int rc, cmd, yield; uint16_t first_listed_newline; const char *cmdname; +size_t cmdlen; uint8_t *argptr, *serial; yield = PR_OK; @@ -5593,7 +5598,7 @@ else if ((pat_patctl.control & CTL_EXPAND) != 0) { if (pe[0] == ']' && pe[1] == '{') { - uint32_t clen = pe - pc - 2; + size_t clen = pe - pc - 2; uint32_t i = 0; unsigned long uli; char *endptr; @@ -5677,7 +5682,7 @@ if (pat_patctl.locale[0] != 0) } if (strcmp((const char *)pat_patctl.locale, (const char *)locale_name) != 0) { - strcpy((char *)locale_name, (char *)pat_patctl.locale); + snprintf((char *)locale_name, sizeof(locale_name), "%s", (char *)pat_patctl.locale); if (locale_tables != NULL) { PCRE2_MAKETABLES_FREE(general_context, (const void *)locale_tables); @@ -6998,7 +7003,7 @@ for (;;) int groupnumber; PCRE2_SIZE length, length2; uint32_t copybuffer[256]; - int namelen = strlen((const char *)nptr); + size_t namelen = strlen((const char *)nptr); #if defined SUPPORT_PCRE2_16 || defined SUPPORT_PCRE2_32 PCRE2_SIZE cnl = namelen; #endif @@ -7079,7 +7084,7 @@ for (;;) void *gotbuffer; int rc; int groupnumber; - int namelen = strlen((const char *)nptr); + size_t namelen = strlen((const char *)nptr); #if defined SUPPORT_PCRE2_16 || defined SUPPORT_PCRE2_32 PCRE2_SIZE cnl = namelen; #endif @@ -7329,7 +7334,6 @@ while ((c = *p++) != 0) if (c == ']' && start_rep != NULL) { - PCRE2_SIZE d; long li; char *endptr; @@ -7361,12 +7365,12 @@ while ((c = *p++) != 0) } replen = CAST8VAR(q) - start_rep; - if (PRIV(ckd_smul)(&d, replen, i)) + if (replen > (SIZE_MAX - needlen) / i) { fprintf(outfile, "** Expanded content too large\n"); return PR_OK; } - needlen += d; + needlen += replen * i; if (needlen >= dbuffer_size) { @@ -7775,9 +7779,9 @@ if ((pat_patctl.control & CTL_POSIX) != 0) if (dat_datctl.startend[0] != CFORE_UNSET) { - pmatch[0].rm_so = dat_datctl.startend[0]; + pmatch[0].rm_so = (regoff_t)dat_datctl.startend[0]; pmatch[0].rm_eo = (dat_datctl.startend[1] != 0)? - dat_datctl.startend[1] : len; + (regoff_t)dat_datctl.startend[1] : (regoff_t)len; eflags |= REG_STARTEND; } @@ -8819,14 +8823,12 @@ return PR_OK; static void print_version(FILE *f, BOOL include_mode) { -char buf[16]; VERSION_TYPE *vp; fprintf(f, "PCRE2 version "); for (vp = version; *vp != 0; vp++) fprintf(f, "%c", *vp); if (include_mode) { - sprintf(buf, "%d-bit", test_mode); - fprintf(f, " (%s)", buf); + fprintf(f, " (%d-bit)", test_mode); } fprintf(f, "\n"); } @@ -9399,7 +9401,7 @@ for (i = 0, j = (n+1)/2; i < (n+1)/2; i++, j++) display_one_modifier(m, for_pattern); if (j < n) { - uint32_t k = 27 - strlen(m->name) - extra[i]; + size_t k = 27 - strlen(m->name) - extra[i]; while (k-- > 0) printf(" "); display_one_modifier(modlist + list[j], for_pattern); }