summaryrefslogtreecommitdiff
path: root/mysys/my_new.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-01-20 22:32:31 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-01-20 22:32:31 +0100
commit3cb24fff33105f40c2f4b696a06449032ec09604 (patch)
tree4623802cde42a9debeae4fbd893e66522f1ffb6c /mysys/my_new.cc
parentc232b2023205b6b898448cb1f603b4d42a7a2656 (diff)
downloadmariadb-git-3cb24fff33105f40c2f4b696a06449032ec09604.tar.gz
- Always compile my_new.cc and safemalloc.c with mysys
Preprocessor macros USE_MYSYS_NEW and -DSAFEMALLOC are used to conditionally compile safemalloc or overwritten new/delete. -Define dummy symbol in my_new.cc in case -DUSE_MYSYS_NEW is not set. This avoids compiler/linker warnings about an essentially empty file being compiled.
Diffstat (limited to 'mysys/my_new.cc')
-rw-r--r--mysys/my_new.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/mysys/my_new.cc b/mysys/my_new.cc
index 8724f9cc4a4..03b3d0f5870 100644
--- a/mysys/my_new.cc
+++ b/mysys/my_new.cc
@@ -55,6 +55,11 @@ int __cxa_pure_virtual()
}
C_MODE_END
-
+#else
+/*
+ Define a dummy symbol, just to avoid compiler/linker warnings
+ about compiling an essentially empty file.
+*/
+int my_new_cc_symbol;
#endif /* USE_MYSYS_NEW */