common.hpp: prepend NDN_CXX_ to WITH_TESTS macros
refs #2060
Change-Id: I74ea076cacf01d2f7dd9c2e5a42dec1d336f489f
diff --git a/src/common.hpp b/src/common.hpp
index ae69686..e4d66b3 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -24,16 +24,18 @@
#include "ndn-cxx-config.hpp"
+// ndn-cxx specific macros declared in this and other headers must have NDN_CXX_ prefix
+// to avoid conflicts with other projects that include ndn-cxx headers.
#ifdef NDN_CXX_HAVE_TESTS
-#define VIRTUAL_WITH_TESTS virtual
-#define PUBLIC_WITH_TESTS_ELSE_PROTECTED public
-#define PUBLIC_WITH_TESTS_ELSE_PRIVATE public
-#define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
+#define NDN_CXX_VIRTUAL_WITH_TESTS virtual
+#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED public
+#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE public
+#define NDN_CXX_PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
#else
-#define VIRTUAL_WITH_TESTS
-#define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
-#define PUBLIC_WITH_TESTS_ELSE_PRIVATE private
-#define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
+#define NDN_CXX_VIRTUAL_WITH_TESTS
+#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
+#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE private
+#define NDN_CXX_PROTECTED_WITH_TESTS_ELSE_PRIVATE private
#endif
#include <stdint.h>