build: prepend "NFD_" to various macro names to avoid conflicts
Change-Id: Icc370968e3d38fef80ece35a2aed56450f54b653
diff --git a/tests/daemon/common/privilege-helper.t.cpp b/tests/daemon/common/privilege-helper.t.cpp
index dcea7cb..c670a5f 100644
--- a/tests/daemon/common/privilege-helper.t.cpp
+++ b/tests/daemon/common/privilege-helper.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,7 @@
BOOST_AUTO_TEST_CASE(DropRaise)
{
-#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
SKIP_IF_NOT_SUPERUSER();
// The following assumes that daemon:daemon is present on the test system
@@ -64,7 +64,7 @@
#else
BOOST_TEST_MESSAGE("Dropping/raising privileges not supported on this platform, skipping");
-#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
}
BOOST_AUTO_TEST_SUITE_END() // TestPrivilegeHelper
diff --git a/tests/daemon/mgmt/general-config-section.t.cpp b/tests/daemon/mgmt/general-config-section.t.cpp
index 5dbfc41..cad7834 100644
--- a/tests/daemon/mgmt/general-config-section.t.cpp
+++ b/tests/daemon/mgmt/general-config-section.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,14 +46,14 @@
setConfigFile(configFile);
}
-#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
~GeneralConfigSectionFixture()
{
// revert changes to s_normalUid/s_normalGid, if any
PrivilegeHelper::s_normalUid = ::geteuid();
PrivilegeHelper::s_normalGid = ::getegid();
}
-#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
protected:
ConfigFile configFile;
@@ -76,7 +76,7 @@
BOOST_CHECK_EQUAL(PrivilegeHelper::s_normalGid, PrivilegeHelper::s_privilegedGid);
}
-#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
BOOST_AUTO_TEST_CASE(UserConfig)
{
@@ -124,7 +124,7 @@
BOOST_CHECK_NE(PrivilegeHelper::s_normalGid, PrivilegeHelper::s_privilegedGid);
}
-#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
BOOST_AUTO_TEST_CASE(InvalidUserConfig)
{
diff --git a/tests/other/cs-benchmark.cpp b/tests/other/cs-benchmark.cpp
index e6948ed..26f5410 100644
--- a/tests/other/cs-benchmark.cpp
+++ b/tests/other/cs-benchmark.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,7 +28,7 @@
#include <iostream>
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
#include <valgrind/callgrind.h>
#endif
@@ -50,7 +50,7 @@
static time::microseconds
timedRun(const std::function<void()>& f)
{
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
CALLGRIND_START_INSTRUMENTATION;
#endif
@@ -58,7 +58,7 @@
f();
auto t2 = time::steady_clock::now();
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
CALLGRIND_STOP_INSTRUMENTATION;
#endif
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 3bf5a14..9ee179f 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,7 +33,7 @@
#include <fstream>
#include <iostream>
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
#include <valgrind/callgrind.h>
#endif
@@ -189,7 +189,7 @@
try {
nfd::tests::FaceBenchmark bench{argv[1]};
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
CALLGRIND_START_INSTRUMENTATION;
#endif
nfd::getGlobalIoService().run();
diff --git a/tests/other/pit-fib-benchmark.cpp b/tests/other/pit-fib-benchmark.cpp
index 41449c0..c6888d1 100644
--- a/tests/other/pit-fib-benchmark.cpp
+++ b/tests/other/pit-fib-benchmark.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,7 @@
#include <iostream>
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
#include <valgrind/callgrind.h>
#endif
@@ -118,7 +118,7 @@
generatePacketsAndPopulateFib(nRoundTrip, nFibEntries, fibPrefixLength,
interestNameLength, dataNameLength);
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
CALLGRIND_START_INSTRUMENTATION;
#endif
@@ -142,7 +142,7 @@
auto t2 = time::steady_clock::now();
-#ifdef HAVE_VALGRIND
+#ifdef NFD_HAVE_VALGRIND
CALLGRIND_STOP_INSTRUMENTATION;
#endif
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 9d4edbd..e25c6c9 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,7 +31,7 @@
#include <ndn-cxx/prefix-announcement.hpp>
-#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
#include <unistd.h>
#define SKIP_IF_NOT_SUPERUSER() \
do { \
@@ -42,7 +42,7 @@
} while (false)
#else
#define SKIP_IF_NOT_SUPERUSER()
-#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
+#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
namespace nfd {
namespace tests {