Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for 1.87 #230

Merged
merged 7 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: GitHub Actions CI

# permit node16 use as a workaround for node20's differing glibc version
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

on:
pull_request:
push:
Expand Down Expand Up @@ -107,7 +111,7 @@ jobs:
sudo python3 get-pip.py
sudo /usr/local/bin/pip install cmake

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: linux
shell: bash
Expand Down Expand Up @@ -205,7 +209,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set DEVELOPER_DIR
if: matrix.xcode_version != ''
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ TODO (known issues):

CHANGELOG

Boost V1.87:
- Fixed #220: Seg fault under C++20 and empty stringify parameter (thanks jwnhy)
- Fixed #222: No line directive if first line of included file is blank (thanks Nick Nobles)
- Misc build fixes: CI server update, deprecated headers, modular build

Boost V1.86:
- Fixed #197: Improper signed overflow handling (UB and a missing division check)
- Replaced usage of vsprintf() with the more secure vsnprintf()
Expand Down
43 changes: 43 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright René Ferdinand Rivera Morell 2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

constant boost_dependencies :
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/filesystem//boost_filesystem
/boost/format//boost_format
/boost/iterator//boost_iterator
/boost/lexical_cast//boost_lexical_cast
/boost/mpl//boost_mpl
/boost/multi_index//boost_multi_index
/boost/optional//boost_optional
/boost/pool//boost_pool
/boost/preprocessor//boost_preprocessor
/boost/serialization//boost_serialization
/boost/smart_ptr//boost_smart_ptr
/boost/spirit//boost_spirit
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;

project /boost/wave
: common-requirements
<include>include
;

explicit
[ alias boost_wave : build//boost_wave ]
[ alias wave : tool/build//wave ]
[ alias all : boost_wave wave samples test ]
;

call-if : boost-library wave
: install boost_wave
;

19 changes: 11 additions & 8 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
#
# http://www.boost.org/
#
# Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

import ../../config/checks/config : requires ;
require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;

project boost/wave
project
: common-requirements <library>$(boost_dependencies)
: requirements
[ requires
cxx11_constexpr
Expand All @@ -25,6 +28,8 @@ project boost/wave
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
: source-location ../src
: usage-requirements
<define>BOOST_ALL_NO_LIB=1
;

SOURCES =
Expand All @@ -45,8 +50,8 @@ SOURCES =
lib boost_wave
:
$(SOURCES)
../../filesystem/build//boost_filesystem
../../thread/build//boost_thread
/boost/filesystem//boost_filesystem
/boost/thread//boost_thread
;

for local source in $(SOURCES)
Expand All @@ -69,5 +74,3 @@ for local source in $(SOURCES)

obj $(source) : $(source).cpp : $(requirements) ;
}

boost-install boost_wave ;
2 changes: 1 addition & 1 deletion include/boost/wave/cpplexer/cpp_lex_token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <boost/throw_exception.hpp>
#include <boost/pool/singleton_pool.hpp>
#include <boost/detail/atomic_count.hpp>
#include <boost/smart_ptr/detail/atomic_count.hpp>
#include <boost/optional.hpp>

// this must occur after all of the includes and before any code appears
Expand Down
5 changes: 3 additions & 2 deletions include/boost/wave/util/cpp_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1578,9 +1578,9 @@ pp_iterator_functor<ContextT>::on_include_helper(char const* f, char const* s,
char const* current_name = 0; // never try to match current file name
#endif

// call the 'found_include_directive' hook function
// call the 'found_include_directive' hook function
if (ctx.get_hooks().found_include_directive(ctx.derived(), f, include_next))
return true; // client returned false: skip file to include
return true; // client returned true: skip file to include

file_path = util::impl::unescape_lit(file_path);
std::string native_path_str;
Expand All @@ -1607,6 +1607,7 @@ pp_iterator_functor<ContextT>::on_include_helper(char const* f, char const* s,
boost::wave::enable_prefer_pp_numbers(ctx.get_language()),
is_system ? base_iteration_context_type::system_header :
base_iteration_context_type::user_header));
new_iter_ctx->emitted_lines = (unsigned int)(-1); // force #line directive

// call the include policy trace function
ctx.get_hooks().opened_include_file(ctx.derived(), dir_path, file_path,
Expand Down
43 changes: 27 additions & 16 deletions include/boost/wave/util/cpp_macromap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,25 +1262,36 @@ macromap<ContextT>::expand_replacement_list(
else if (adjacent_stringize &&
!IS_CATEGORY(*cit, WhiteSpaceTokenType))
{
// stringize the current argument
BOOST_ASSERT(!arguments[i].empty());

// safe a copy of the first tokens position (not a reference!)
position_type pos((*arguments[i].begin()).get_position());

#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
if (is_ellipsis && boost::wave::need_variadics(ctx.get_language())) {
impl::trim_sequence_left(arguments[i]);
impl::trim_sequence_right(arguments.back());
expanded.push_back(token_type(T_STRINGLIT,
impl::as_stringlit(arguments, i, pos), pos));
}
#if BOOST_WAVE_SUPPORT_CPP2A != 0
if (i >= arguments.size()) {
// no argument supplied; do nothing (only c20 should reach here)
BOOST_ASSERT(boost::wave::need_cpp2a(ctx.get_language()));
position_type last_valid(arguments.back().back().get_position());
// insert a empty string
expanded.push_back(token_type(T_STRINGLIT, "\"\"", last_valid));
}
else
#endif
{
impl::trim_sequence(arguments[i]);
expanded.push_back(token_type(T_STRINGLIT,
impl::as_stringlit(arguments[i], pos), pos));
// shouldn't be oob (w.o. cpp20)
BOOST_ASSERT(i < arguments.size() && !arguments[i].empty());
// safe a copy of the first tokens position (not a reference!)
position_type pos((*arguments[i].begin()).get_position());

#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
if (is_ellipsis && boost::wave::need_variadics(ctx.get_language())) {
impl::trim_sequence_left(arguments[i]);
impl::trim_sequence_right(arguments.back());
expanded.push_back(token_type(T_STRINGLIT,
impl::as_stringlit(arguments, i, pos), pos));
}
else
#endif
{
impl::trim_sequence(arguments[i]);
expanded.push_back(token_type(T_STRINGLIT,
impl::as_stringlit(arguments[i], pos), pos));
}
}
adjacent_stringize = false;
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/wave/util/macro_definition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <vector>
#include <list>

#include <boost/detail/atomic_count.hpp>
#include <boost/smart_ptr/detail/atomic_count.hpp>
#include <boost/intrusive_ptr.hpp>

#include <boost/wave/wave_config.hpp>
Expand Down
2 changes: 2 additions & 0 deletions samples/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;

project
Expand Down
2 changes: 1 addition & 1 deletion samples/check_macro_naming/check_macro_naming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
=============================================================================*/

#include "check_macro_naming.hpp"
#include "libs/filesystem/include/boost/filesystem/file_status.hpp"
#include "boost/filesystem/file_status.hpp"

///////////////////////////////////////////////////////////////////////////////
// Utilities from the rest of Boost
Expand Down
19 changes: 10 additions & 9 deletions samples/cpp_tokens/build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@
#
# http://www.boost.org/
#
# Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

project : requirements <library>/boost/wave//boost_wave ;

SOURCES =
../cpp_tokens
../instantiate_cpp_exprgrammar
../instantiate_cpp_grammar
../cpp_tokens
../instantiate_cpp_exprgrammar
../instantiate_cpp_grammar
../instantiate_cpp_literalgrs
../instantiate_defined_grammar
../instantiate_has_include_grammar
../instantiate_slex_lexer
../instantiate_slex_lexer
;

exe cpp_tokens
:
$(SOURCES)
/boost/wave//boost_wave
/boost/program_options//boost_program_options
/boost/filesystem//boost_filesystem
/boost/system//boost_system
/boost/filesystem//boost_filesystem
/boost/system//boost_system
/boost/thread//boost_thread
;

Expand Down
28 changes: 16 additions & 12 deletions samples/list_includes/build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,39 @@
#
# http://www.boost.org/
#
# Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

SOURCES =
../list_includes
../instantiate_cpp_exprgrammar
../instantiate_cpp_grammar
../instantiate_cpp_exprgrammar
../instantiate_cpp_grammar
../instantiate_cpp_literalgrs
../instantiate_defined_grammar
../instantiate_has_include_grammar
../instantiate_lexertl_lexer
../instantiate_lexertl_lexer
;

project
: requirements
<library>/boost/wave//boost_wave
<library>/boost/program_options//boost_program_options/<link>static
<library>/boost/filesystem//boost_filesystem
<library>/boost/system//boost_system
<library>/boost/thread//boost_thread
;

exe list_includes
:
$(SOURCES)
/boost/wave//boost_wave
/boost/program_options//boost_program_options/<link>static
/boost/filesystem//boost_filesystem
/boost/system//boost_system
/boost/thread//boost_thread
;

for local source in $(SOURCES)
{
local requirements ;
# workaround for compiler bug
requirements += <toolset-msvc:version>7.1:<rtti>off ;
requirements += <toolset-msvc:version>7.1_stlport4:<rtti>off ;
requirements += <toolset-msvc:version>7.1:<rtti>off ;
requirements += <toolset-msvc:version>7.1_stlport4:<rtti>off ;
obj $(source) : $(source).cpp : $(requirements) ;
}
23 changes: 14 additions & 9 deletions samples/token_statistics/build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,31 @@
#
# http://www.boost.org/
#
# Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

SOURCES =
../token_statistics
SOURCES =
../token_statistics
../instantiate_xlex_lexer
../instantiate_cpp_grammar
../instantiate_defined_grammar
../instantiate_has_include_grammar
;

project
: requirements
<library>/boost/wave//boost_wave
<library>/boost/program_options//boost_program_options/<link>static
<library>/boost/filesystem//boost_filesystem
<library>/boost/system//boost_system
<library>/boost/thread//boost_thread
<library>/boost/xpressive//boost_xpressive
;

exe token_statistics
:
$(SOURCES)
/boost/wave//boost_wave
/boost/program_options//boost_program_options/<link>static
/boost/filesystem//boost_filesystem
/boost/system//boost_system
/boost/thread//boost_thread
;

for local source in $(SOURCES)
Expand Down
Loading
Loading