Use #if rather than #ifdef for FOLLY_HAVE_WEAK_SYMBOLS
authorPeter Griess <pgriess@fb.com>
Wed, 29 Jan 2014 17:46:29 +0000 (09:46 -0800)
committerDave Watson <davejwatson@fb.com>
Fri, 21 Feb 2014 21:40:49 +0000 (13:40 -0800)
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
folly/detail/Malloc.h

index 64d30b544dd61d300365d7ef492b30a528e4992a..9882dd84c0bce0d06f1ee73d99a7f03a47905557 100644 (file)
@@ -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
index c36591845767dd6cc62c70c89be4a0a2e42346af..fc61b9cf70a16556641d26e1a3d3321698b48ebb 100644 (file)
@@ -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