* limitations under the License.
*/
-#ifndef FOLLY_PORTABILITY_H_
-#define FOLLY_PORTABILITY_H_
+// Break caches 20160401 (#8764509) @nocommit
+#pragma once
#include <string.h>
#include <folly/CPortability.h>
-#ifdef __APPLE__
-# include <malloc/malloc.h>
-#endif
-
#if FOLLY_HAVE_SCHED_H
#include <sched.h>
#endif
// Hide a GCC specific thing that breaks MSVC if left alone.
# define __extension__
-#ifdef _M_IX86_FP
-# define FOLLY_SSE _M_IX86_FP
-# define FOLLY_SSE_MINOR 0
-#endif
+// We have compiler support for the newest of the new, but
+// MSVC doesn't tell us that.
+#define __SSE4_2__ 1
#endif
#include <TargetConditionals.h>
#endif
-// MacOS doesn't have malloc_usable_size()
-#if defined(__APPLE__) && !defined(FOLLY_HAVE_MALLOC_USABLE_SIZE)
-inline size_t malloc_usable_size(void* ptr) {
- return malloc_size(ptr);
-}
-#endif
-
// RTTI may not be enabled for this compilation unit.
#if defined(__GXX_RTTI) || defined(__cpp_rtti) || \
(defined(_MSC_VER) && defined(_CPPRTTI))
#endif
#if defined(__APPLE__) || defined(_MSC_VER)
-#define MAX_STATIC_CONSTRUCTOR_PRIORITY
+#define FOLLY_STATIC_CTOR_PRIORITY_MAX
#else
// 101 is the highest priority allowed by the init_priority attribute.
// This priority is already used by JEMalloc and other memory allocators so
// we will take the next one.
-#define MAX_STATIC_CONSTRUCTOR_PRIORITY __attribute__ ((__init_priority__(102)))
+#define FOLLY_STATIC_CTOR_PRIORITY_MAX __attribute__((__init_priority__(102)))
#endif
-
-#endif // FOLLY_PORTABILITY_H_