Skip to content

Commit

Permalink
More missing boost headers for FreeBSD 13
Browse files Browse the repository at this point in the history
  • Loading branch information
CamJN committed Dec 10, 2021
1 parent 7dc4e99 commit 4c8d0a1
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 13 deletions.
41 changes: 28 additions & 13 deletions dev/copy_boost_headers
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,31 @@ PROGRAM_SOURCE = %q{
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/foreach.hpp>
#include <boost/unordered_map.hpp>
#include <boost/cregex.hpp>
#include <boost/regex.hpp>
#include <boost/pool/object_pool.hpp>
#include <boost/move/core.hpp>
#include <boost/move/utility.hpp>
#include <boost/atomic.hpp>
#include <boost/typeof/typeof.hpp>
#include <boost/asio.hpp>
#include <boost/pointer_cast.hpp>
#include <boost/circular_buffer.hpp>
#include <boost/config.hpp>
#include <boost/container/small_vector.hpp>
#include <boost/core/noncopyable.hpp>
#include <boost/cstdint.hpp>
#include <boost/current_function.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/move/move.hpp>
#include <boost/predef.h>
#include <boost/ref.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/static_assert.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/tss.hpp>
// Included despite not used in Passenger
#include <boost/cregex.hpp>
#include <boost/pointer_cast.hpp>
#include <boost/asio.hpp>
}

require 'fileutils'
Expand Down Expand Up @@ -192,16 +207,16 @@ def copy_dependencies(cflags)
compiler_output = `c++ test.cpp -c -I. -I.. #{cflags} 2>&1`
File.unlink('test.o') if File.exist?('test.o')
missing_headers = compiler_output.
split("\n").
grep(/(error: .*: No such file|fatal error: '.*' file not found)/).
map do |line|
if line =~ /error: (.*): No such file/
file = $1
elsif line =~ /fatal error: '(.*)' file not found/
file = $1
else
abort "Bug"
end
split("\n").
grep(/(error: .*: No such file|fatal error: '.*' file not found)/).
map do |line|
if line =~ /error: (.*): No such file/
file = $1
elsif line =~ /fatal error: '(.*)' file not found/
file = $1
else
abort "Bug"
end
if file =~ /^boost\//
file
else
Expand Down
19 changes: 19 additions & 0 deletions src/cxx_supportlib/vendor-modified/boost/align/align.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Copyright 2014-2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGN_HPP
#define BOOST_ALIGN_ALIGN_HPP

#include <boost/config.hpp>

#if !defined(BOOST_NO_CXX11_STD_ALIGN) && !defined(BOOST_LIBSTDCXX_VERSION)
#include <boost/align/detail/align_cxx11.hpp>
#else
#include <boost/align/detail/align.hpp>
#endif

#endif
54 changes: 54 additions & 0 deletions src/cxx_supportlib/vendor-modified/boost/align/alignment_of.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
Copyright 2014-2016 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP
#define BOOST_ALIGN_ALIGNMENT_OF_HPP

#include <boost/align/detail/element_type.hpp>
#include <boost/align/alignment_of_forward.hpp>

#if defined(_MSC_VER) && defined(__clang__)
#include <boost/align/detail/alignment_of_cxx11.hpp>
#elif defined(BOOST_MSVC)
#include <boost/align/detail/alignment_of_msvc.hpp>
#elif defined(__GNUC__) && defined(__unix__) && !defined(__LP64__)
#include <boost/align/detail/alignment_of.hpp>
#elif defined(BOOST_CLANG) && !defined(__x86_64__)
#include <boost/align/detail/alignment_of.hpp>
#elif !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
#include <boost/align/detail/alignment_of_cxx11.hpp>
#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
#include <boost/align/detail/alignment_of_gcc.hpp>
#elif defined(BOOST_CODEGEARC)
#include <boost/align/detail/alignment_of_codegear.hpp>
#elif defined(BOOST_CLANG)
#include <boost/align/detail/alignment_of_clang.hpp>
#elif __GNUC__ > 4
#include <boost/align/detail/alignment_of_gcc.hpp>
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)
#include <boost/align/detail/alignment_of_gcc.hpp>
#else
#include <boost/align/detail/alignment_of.hpp>
#endif

namespace boost {
namespace alignment {

template<class T>
struct alignment_of
: detail::alignment_of<typename
detail::element_type<T>::type>::type { };

#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
template<class T>
constexpr std::size_t alignment_of_v = alignment_of<T>::value;
#endif

} /* alignment */
} /* boost */

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2014 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP
#define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP

namespace boost {
namespace alignment {

template<class T>
struct alignment_of;

} /* alignment */
} /* boost */

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Copyright 2014 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP

#include <memory>

namespace boost {
namespace alignment {

using std::align;

} /* alignment */
} /* boost */

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright 2014 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP

#include <type_traits>

namespace boost {
namespace alignment {
namespace detail {

using std::alignment_of;

} /* detail */
} /* alignment */
} /* boost */

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
Copyright 2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP
#define BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP

#include <boost/config.hpp>

#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
#include <type_traits>
#else
#include <cstddef>
#endif

namespace boost {
namespace alignment {
namespace detail {

#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
using std::remove_reference;
using std::remove_all_extents;
using std::remove_cv;
#else
template<class T>
struct remove_reference {
typedef T type;
};

template<class T>
struct remove_reference<T&> {
typedef T type;
};

#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<class T>
struct remove_reference<T&&> {
typedef T type;
};
#endif

template<class T>
struct remove_all_extents {
typedef T type;
};

template<class T>
struct remove_all_extents<T[]> {
typedef typename remove_all_extents<T>::type type;
};

template<class T, std::size_t N>
struct remove_all_extents<T[N]> {
typedef typename remove_all_extents<T>::type type;
};

template<class T>
struct remove_cv {
typedef T type;
};

template<class T>
struct remove_cv<const T> {
typedef T type;
};

template<class T>
struct remove_cv<volatile T> {
typedef T type;
};

template<class T>
struct remove_cv<const volatile T> {
typedef T type;
};
#endif

template<class T>
struct element_type {
typedef typename remove_cv<typename remove_all_extents<typename
remove_reference<T>::type>::type>::type type;
};

} /* detail */
} /* alignment */
} /* boost */

#endif

0 comments on commit 4c8d0a1

Please sign in to comment.