summaryrefslogtreecommitdiff
path: root/src/mongo/util/allocator.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-04-02 14:55:19 -0400
committerEric Milkie <milkie@10gen.com>2012-04-02 14:59:48 -0400
commit45f30389a9128fe2216371cabbe8426b634d68e9 (patch)
treea3f0fc2b758e58c0ec61a27110f1e7b26f034f76 /src/mongo/util/allocator.h
parent8b1c9bd361bd002980266c5269e5eab4ba62a7f5 (diff)
downloadmongo-45f30389a9128fe2216371cabbe8426b634d68e9.tar.gz
SERVER-5348 make dbclient.h the main C++ driver include file
This change fixes some #defines of common C functions so that their definitions do not leak into consumer code. I also had to change Labeler SIZE because it conflicts with Windows SIZE. pch.h is on its way out, but for now it's hanging around.
Diffstat (limited to 'src/mongo/util/allocator.h')
-rw-r--r--src/mongo/util/allocator.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/util/allocator.h b/src/mongo/util/allocator.h
index 27406bfd402..fae1364546f 100644
--- a/src/mongo/util/allocator.h
+++ b/src/mongo/util/allocator.h
@@ -17,6 +17,9 @@
#pragma once
+// we need the "real" malloc here
+#include "mongo/client/undef_macros.h"
+
namespace mongo {
inline void * ourmalloc(size_t size) {
@@ -34,9 +37,8 @@ namespace mongo {
#define MONGO_malloc mongo::ourmalloc
#define MONGO_realloc mongo::ourrealloc
-#ifdef MONGO_EXPOSE_MACROS
-# define malloc MONGO_malloc
-# define realloc MONGO_realloc
-#endif
+// this redefines 'malloc' to 'MONGO_malloc', etc
+#include "mongo/client/redef_macros.h"
+
} // namespace mongo