Skip to content

Boost compatability with versions >= 1.73.0 #64

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions include/boost/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

// config
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/application/config.hpp>
// application
#include <boost/application/version.hpp>
Expand Down
4 changes: 2 additions & 2 deletions include/boost/application/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# include <boost/make_shared.hpp>
# include <boost/unordered_map.hpp>
# include <boost/thread/thread.hpp>
# include <boost/bind.hpp>
# include <boost/bind/bind.hpp>
# include <boost/function.hpp>
# include <boost/type_index.hpp>
#else // auto detect
Expand Down Expand Up @@ -98,7 +98,7 @@
# include <functional>
# define BOOST_APPLICATION_USE_CXX11_HDR_FUNCTIONAL
# else
# include <boost/bind.hpp>
# include <boost/bind/bind.hpp>
# include <boost/function.hpp>
# endif
# ifndef BOOST_NO_CXX11_HDR_TYPEINDEX
Expand Down
12 changes: 6 additions & 6 deletions include/boost/application/detail/windows/path_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

#include <cstdlib>

#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/config.hpp>
#if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA
#error Boost.Application requires at least the windows vista feature level of the windows sdk.
#endif
#include <boost/detail/winapi/dll.hpp>
#include <boost/winapi/dll.hpp>

#include <shlobj.h>

Expand All @@ -37,16 +37,16 @@ namespace boost { namespace application { namespace detail {
// A handle to the loaded module whose path is being requested.
// If this parameter is NULL, GetModuleFileName retrieves the path of the
// executable file of the current process.
boost::detail::winapi::WCHAR_ path_hldr[MAX_PATH];
boost::detail::winapi::LPWSTR_ path = path_hldr;
boost::detail::winapi::get_module_file_name(NULL, path, MAX_PATH);
boost::winapi::WCHAR_ path_hldr[MAX_PATH];
boost::winapi::LPWSTR_ path = path_hldr;
boost::winapi::get_module_file_name(NULL, path, MAX_PATH);
ec = last_error_code();

// In case of ERROR_INSUFFICIENT_BUFFER_ trying to get buffer big enough to store the whole path
for (unsigned i = 2; i < 129 && ec.value() == ERROR_INSUFFICIENT_BUFFER; i *= 2) {
path = new WCHAR[MAX_PATH * i];

boost::detail::winapi::get_module_file_name(NULL, path, MAX_PATH * i);
boost::winapi::get_module_file_name(NULL, path, MAX_PATH * i);
ec = last_error_code();

if (ec) {
Expand Down
8 changes: 4 additions & 4 deletions include/boost/application/detail/windows/process_id_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <boost/application/detail/csbl.hpp>
#include <boost/application/system_error.hpp>

#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/process.hpp>
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/process.hpp>

#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
Expand All @@ -23,7 +23,7 @@ namespace boost { namespace application { namespace detail {
class process_id_impl {

public:
typedef boost::detail::winapi::DWORD_ native_pid_t;
typedef boost::winapi::DWORD_ native_pid_t;

process_id_impl()
: pid_ (0)
Expand All @@ -37,7 +37,7 @@ namespace boost { namespace application { namespace detail {
if(pid_)
return pid_;

pid_ = boost::detail::winapi::GetCurrentProcessId();
pid_ = boost::winapi::GetCurrentProcessId();
return pid_;
}

Expand Down
2 changes: 1 addition & 1 deletion include/boost/application/signal_binder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <boost/application/context.hpp>
#include <boost/application/handler.hpp>

// #include <boost/bind.hpp>
// #include <boost/bind/bind.hpp>
// #include <boost/thread/thread.hpp>

#include <boost/application/aspects/termination_handler.hpp>
Expand Down