Break dependency on features.h
authorOwen Yamauchi <oyamauchi@fb.com>
Fri, 3 May 2013 16:25:39 +0000 (09:25 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 May 2013 18:01:27 +0000 (11:01 -0700)
commitce4dec4c322aee6b9905be54bb67956d76270b65
tree674e986c20c5c0ec85924043bd8b39b82c10243a
parentbbe8ee53ab2e73e900751611e09cd448d58bb07a
Break dependency on features.h

Summary:
It doesn't exist on some systems (at least Mac OS X). We're only using
it for __GNUC_PREREQ, which is easy to provide our own definition for.

I moved the definitions of FOLLY_FINAL and FOLLY_OVERRIDE into
folly-config.h so we can autoconf them in the open-source build. The
hardcoded stuff for the internal build is a little ugly, unfortunately.

folly can't be built with gcc versions earlier than 4.6, so that check
in ThreadLocal.h is pointless by now. (Plus we use noexcept without a
macro wrapper all over the place.) That stuff was also not
clang-friendly. clang has supported static_assert since 2.9 and noexcept
since... I'm not sure but at least 3.0.

Test Plan:
fbconfig/fbmake runtests, with gcc 4.6 and 4.7. clang can't
build folly right now, but I verified separately that it supports
noexcept and static_assert.

Reviewed By: simpkins@fb.com

FB internal diff: D799143
folly/Portability.h
folly/String.cpp
folly/ThreadLocal.h
folly/configure.ac