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 64d30b5..9882dd8 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 c365918..fc61b9c 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