From 87bb14efca96336f339e2680ef9a49c260326fd4 Mon Sep 17 00:00:00 2001 From: Fifi Lyu Date: Thu, 11 Jun 2015 14:32:09 -0700 Subject: [PATCH] fix for Boost >= 1.56 Summary: Folly still continue to build and work on earlier boost versions(boost < 1.56). **boost::context::make_fcontext() change history:** * __1.55:__ fcontext_t * make_fcontext( void * sp, std::size_t size, void(* fn)(intptr_t) ); * __1.56:__ fcontext_t make_fcontext(void* sp,std::size_t size,void(*fn)(intptr_t)); **boost doc:** http://www.boost.org/doc/libs/1_55_0/libs/context/doc/html/context/context/boost_fcontext.html http://www.boost.org/doc/libs/1_56_0/libs/context/doc/html/context/context/boost_fcontext.html Closes #205 Closes #210 Reviewed By: @jwatzman Differential Revision: D2148069 Pulled By: @sgolemon --- folly/m4/ax_boost_context.m4 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/folly/m4/ax_boost_context.m4 b/folly/m4/ax_boost_context.m4 index f4a8b11a..6843c390 100644 --- a/folly/m4/ax_boost_context.m4 +++ b/folly/m4/ax_boost_context.m4 @@ -69,8 +69,16 @@ AC_DEFUN([AX_BOOST_CONTEXT], CXXFLAGS_SAVE=$CXXFLAGS AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[@%:@include ]], - [[boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);]])], + [[@%:@include +#include +]], + [[#if BOOST_VERSION >= 105600 + boost::context::fcontext_t fc = boost::context::make_fcontext(0, 0, 0); +#else + boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0); +#endif +]] + )], ax_cv_boost_context=yes, ax_cv_boost_context=no) CXXFLAGS=$CXXFLAGS_SAVE AC_LANG_POP([C++]) -- 2.34.1