Start compiling a bit of `-Wshadow`
[folly.git] / folly / Portability.h
index 5bca1f54c8bdbd7f260cd847b62ca761c4f1dace..a9348e5c9557d2f95a91d248690ebcc1b3a4894f 100644 (file)
@@ -14,8 +14,8 @@
  * 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
@@ -355,13 +351,6 @@ using namespace FOLLY_GFLAGS_NAMESPACE;
 #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))
@@ -376,5 +365,3 @@ inline size_t malloc_usable_size(void* ptr) {
 // we will take the next one.
 #define FOLLY_STATIC_CTOR_PRIORITY_MAX __attribute__((__init_priority__(102)))
 #endif
-
-#endif // FOLLY_PORTABILITY_H_