From: Sathya Gunasekar Date: Tue, 15 Oct 2013 02:50:20 +0000 (-0700) Subject: Include cpp only when needed X-Git-Tag: v0.22.0~818 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3851f0ea3eea79622f1fa18888f70897d7edc4cd;p=folly.git Include cpp only when needed Summary: D1008921 broke compilation for tao which uses folly/Portability.h This diff guards the change for only c++ code. Not sure if this breaks the definition of portability. Test Plan: Compile tao, fbconfig -r folly and fbmake runtests Reviewed By: simpkins@fb.com FB internal diff: D1010967 @override-unit-failures --- diff --git a/folly/Portability.h b/folly/Portability.h index 47d33be4..6d5ab9c9 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -137,6 +137,7 @@ struct MaxAlign { char c; } __attribute__((aligned)); #include "folly/detail/Clock.h" #endif +#if defined(__cplusplus) // Unfortunately, boost::has_trivial_copy is broken in libc++ due to its // usage of __has_trivial_copy(), so we can't use it as a // least-common-denominator for C++11 implementations that don't support @@ -153,5 +154,6 @@ struct MaxAlign { char c; } __attribute__((aligned)); #include #define FOLLY_IS_TRIVIALLY_COPYABLE(T) (boost::has_trivial_copy::value) #endif +#endif // __cplusplus #endif // FOLLY_PORTABILITY_H_