Fix folly::fibers on OSX with boost 1.60
authorAndrii Grynenko <andrii@fb.com>
Fri, 10 Jun 2016 22:25:44 +0000 (15:25 -0700)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Fri, 10 Jun 2016 22:38:28 +0000 (15:38 -0700)
Summary: We only need fcontext.hpp, so let's include it directly. all.hpp includes other headers, which use thread-locals (doesn't work with our OSX build).

Reviewed By: igorsugak, bhamiltoncx

Differential Revision: D3419638

fbshipit-source-id: b4fa1bd14454bcd75eaece52c398ac6510273773

folly/fibers/BoostContextCompatibility.h
folly/fibers/Fiber.h
folly/m4/ax_boost_context.m4

index e243767..4aede8f 100644 (file)
@@ -15,7 +15,7 @@
  */
 #pragma once
 
-#include <boost/context/all.hpp>
+#include <boost/context/fcontext.hpp>
 #include <boost/version.hpp>
 
 /**
index 543deef..f543321 100644 (file)
@@ -18,8 +18,6 @@
 #include <functional>
 #include <typeinfo>
 
-#include <boost/context/all.hpp>
-#include <boost/version.hpp>
 #include <folly/AtomicIntrusiveLinkedList.h>
 #include <folly/CPortability.h>
 #include <folly/Function.h>
index 6843c39..46517c9 100644 (file)
@@ -69,7 +69,7 @@ AC_DEFUN([AX_BOOST_CONTEXT],
                        CXXFLAGS_SAVE=$CXXFLAGS
 
                        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                               [[@%:@include <boost/context/all.hpp>
+                               [[@%:@include <boost/context/fcontext.hpp>
 #include <boost/version.hpp>
 ]],
                                [[#if BOOST_VERSION >= 105600