diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd852515..d945587a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,8 +64,8 @@ jobs: - name: Test run: ../../../b2 toolset=$TOOLSET working-directory: ../boost-root/libs/regex/test - ubuntu-focal-standalone: - runs-on: ubuntu-20.04 + ubuntu-jammy-standalone: + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -87,7 +87,7 @@ jobs: - name: Install packages run: sudo apt install g++-9 g++-10 - name: Test - run: ${{ matrix.compiler }} -std=${{ matrix.standard }} -I../../include *.cpp ../../src/*.cpp -o regress -licuuc -licudata -licui18n && ./regress + run: ${{ matrix.compiler }} -std=${{ matrix.standard }} -I../../include *.cpp ../../src/*.cpp -o regress -licuuc -licui18n && ./regress working-directory: ./test/regress ubuntu-bionic: runs-on: ubuntu-18.04 diff --git a/src/posix_api.cpp b/src/posix_api.cpp index f34a5a16..131171ab 100644 --- a/src/posix_api.cpp +++ b/src/posix_api.cpp @@ -180,7 +180,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA* // We're converting an integer i to a string, and since i <= REG_E_UNKNOWN // a five character string is *always* large enough: // -#if BOOST_CXX_VERSION >= 201103 +#if !defined(BOOST_CXX_VERSION) || (BOOST_CXX_VERSION >= 201103) int r = (std::snprintf)(localbuf, 5, "%d", i); #elif BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) int r = (::sprintf_s)(localbuf, 5, "%d", i); @@ -194,7 +194,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA* return std::strlen(localbuf) + 1; } } -#if BOOST_CXX_VERSION >= 201103 +#if !defined(BOOST_CXX_VERSION) || (BOOST_CXX_VERSION >= 201103) int r = (::snprintf)(localbuf, 5, "%d", 0); #elif BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) int r = (::sprintf_s)(localbuf, 5, "%d", 0);