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 e243767dd1a1d4098e182ae2eb4fd27b7f3533ce..4aede8f81dc65fa60783bb2920756e5b81d383ba 100644 (file)
@@ -15,7 +15,7 @@
  */
 #pragma once
 
-#include <boost/context/all.hpp>
+#include <boost/context/fcontext.hpp>
 #include <boost/version.hpp>
 
 /**
index 543deef896257595fb625ae24821c2c9e6d43403..f543321ba54aa3b0cba22874437fc73eabbd6eb2 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 6843c390a7c6d36eb3182a6e79d52d2a48fa390f..46517c97cf360fb732e5523f114f9d5430c15136 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