From 02747b6d336ec11a57f713bfd372c8c4d8cb5ef4 Mon Sep 17 00:00:00 2001 From: Peter Griess Date: Wed, 29 Jan 2014 09:46:29 -0800 Subject: [PATCH 1/1] Use #if rather than #ifdef for FOLLY_HAVE_WEAK_SYMBOLS Summary: - We need to be able to disable FOLLY_HAVE_WEAK_SYMBOLS via -DFOLLY_HAVE_WEAK_SYMBOLS=0. Switch the #ifdef checks to #if. Test Plan: - fbconfig -r folly && fbmake runtests - Build in fbobjc Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D1150036 --- folly/detail/Malloc.cpp | 2 +- folly/detail/Malloc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/detail/Malloc.cpp b/folly/detail/Malloc.cpp index 64d30b54..9882dd84 100644 --- a/folly/detail/Malloc.cpp +++ b/folly/detail/Malloc.cpp @@ -18,7 +18,7 @@ extern "C" { -#ifndef FOLLY_HAVE_WEAK_SYMBOLS +#if !FOLLY_HAVE_WEAK_SYMBOLS int (*rallocm)(void**, size_t*, size_t, size_t, int) = nullptr; int (*allocm)(void**, size_t*, size_t, int) = nullptr; #endif diff --git a/folly/detail/Malloc.h b/folly/detail/Malloc.h index c3659184..fc61b9cf 100644 --- a/folly/detail/Malloc.h +++ b/folly/detail/Malloc.h @@ -25,7 +25,7 @@ extern "C" { -#ifdef FOLLY_HAVE_WEAK_SYMBOLS +#if FOLLY_HAVE_WEAK_SYMBOLS int rallocm(void**, size_t*, size_t, size_t, int) __attribute__((weak)); int allocm(void**, size_t*, size_t, int) __attribute__((weak)); #else -- 2.34.1