summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-02-26 10:18:51 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-03-28 15:21:12 +0000
commitbdda8008226db9f4ae6d88b553ffa6192dfcfd57 (patch)
tree089ef09d801e48a3325fe02afbac450c57acdb67
parent90b00c71067df78597db92bb60dbacf654a6f80a (diff)
downloadphosphor-host-ipmid-bdda8008226db9f4ae6d88b553ffa6192dfcfd57.zip
phosphor-host-ipmid-bdda8008226db9f4ae6d88b553ffa6192dfcfd57.tar.gz
Remove experimental filesystem splice
In order to be compatible with older versions of GCC that did not have the experimental filesystem moved over to the standard paths, the code would splice the experimental code into the std namespace. This is no longer necessary with yocto 2.6 and the latest versions of GCC. Change-Id: I2db13c52a91456318795819f2d45c3386b4c56d2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
-rw-r--r--apphandler.cpp14
-rw-r--r--chassishandler.cpp14
-rw-r--r--ipmid-new.cpp14
-rw-r--r--selutility.cpp14
-rw-r--r--sensordatahandler.cpp14
-rw-r--r--storagehandler.cpp14
-rw-r--r--transporthandler.cpp14
7 files changed, 7 insertions, 91 deletions
diff --git a/apphandler.cpp b/apphandler.cpp
index bb7e192..e5daa2a 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -16,6 +16,7 @@
#include <algorithm>
#include <array>
#include <cstddef>
+#include <filesystem>
#include <fstream>
#include <ipmid/types.hpp>
#include <ipmid/utils.hpp>
@@ -33,19 +34,6 @@
#include <xyz/openbmc_project/Software/Version/server.hpp>
#include <xyz/openbmc_project/State/BMC/server.hpp>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
extern sd_bus* bus;
constexpr auto bmc_state_interface = "xyz.openbmc_project.State.BMC";
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 072a021..07e8c5b 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -15,6 +15,7 @@
#include <array>
#include <chrono>
#include <cstring>
+#include <filesystem>
#include <fstream>
#include <future>
#include <ipmid/types.hpp>
@@ -35,19 +36,6 @@
#include <xyz/openbmc_project/State/Host/server.hpp>
#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
// Defines
#define SET_PARM_VERSION 0x01
#define SET_PARM_BOOT_FLAGS_PERMANENT 0x40
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 26c9de4..a6a5caa 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -22,6 +22,7 @@
#include <algorithm>
#include <any>
#include <exception>
+#include <filesystem>
#include <forward_list>
#include <host-cmd-manager.hpp>
#include <ipmid-host/cmd.hpp>
@@ -46,19 +47,6 @@
#include <utility>
#include <vector>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
namespace fs = std::filesystem;
using namespace phosphor::logging;
diff --git a/selutility.cpp b/selutility.cpp
index 9edc1b8..3aecb1c 100644
--- a/selutility.cpp
+++ b/selutility.cpp
@@ -5,25 +5,13 @@
#include <ipmid/api.h>
#include <chrono>
+#include <filesystem>
#include <ipmid/types.hpp>
#include <ipmid/utils.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <vector>
#include <xyz/openbmc_project/Common/error.hpp>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
extern const ipmi::sensor::InvObjectIDMap invSensors;
using namespace phosphor::logging;
using InternalFailure =
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 7903138..1de1540 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -3,6 +3,7 @@
#include "sensorhandler.hpp"
#include <bitset>
+#include <filesystem>
#include <ipmid/types.hpp>
#include <ipmid/utils.hpp>
#include <optional>
@@ -11,19 +12,6 @@
#include <sdbusplus/message/types.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
namespace ipmi
{
namespace sensor
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 32bb088..55e17f2 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -15,6 +15,7 @@
#include <chrono>
#include <cstdio>
#include <cstring>
+#include <filesystem>
#include <ipmid/utils.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
@@ -23,19 +24,6 @@
#include <string>
#include <xyz/openbmc_project/Common/error.hpp>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
void register_netfn_storage_functions() __attribute__((constructor));
unsigned int g_sel_time = 0xFFFFFFFF;
diff --git a/transporthandler.cpp b/transporthandler.cpp
index d56a064..8172cc4 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -8,6 +8,7 @@
#include <ipmid/api.h>
#include <chrono>
+#include <filesystem>
#include <fstream>
#include <ipmid/utils.hpp>
#include <phosphor-logging/elog-errors.hpp>
@@ -24,19 +25,6 @@
#include <systemd/sd-bus.h>
#endif
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
// timer for network changes
std::unique_ptr<phosphor::Timer> networkTimer = nullptr;
OpenPOWER on IntegriCloud