diff options
author | Patrick Venture <venture@google.com> | 2019-03-08 13:42:10 -0800 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-03-11 07:18:22 -0700 |
commit | 9e997b4da98725401769ef82fe26e11c46a059d9 (patch) | |
tree | 2491fb824cf7dd7dc31eb066d573200d0d1261e4 | |
parent | 5d8f570bdc264d7447ee2fc0fb6f134c1a3780f8 (diff) | |
download | phosphor-hwmon-9e997b4da98725401769ef82fe26e11c46a059d9.tar.gz phosphor-hwmon-9e997b4da98725401769ef82fe26e11c46a059d9.zip |
use filesystem instead of experimental
Use filesystem now that it should be available instead of
experimental::filesystem.
Change-Id: I62838b343ce34f85a47661f1eaaff3c7e6338bbf
Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | fan_pwm.cpp | 2 | ||||
-rw-r--r-- | sensor.cpp | 4 | ||||
-rw-r--r-- | sensorset.cpp | 4 | ||||
-rw-r--r-- | sysfs.cpp | 4 | ||||
-rw-r--r-- | targets.hpp | 4 |
6 files changed, 9 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 6278681..0a23f28 100644 --- a/configure.ac +++ b/configure.ac @@ -24,15 +24,6 @@ AX_PTHREAD([], [AC_MSG_ERROR(["pthread required and not found"])]) AX_CXX_COMPILE_STDCXX_17([noext]) AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CXXFLAGS]) -# Checks for header files. -AC_CHECK_HEADER( - experimental/filesystem, - [], - [AC_MSG_ERROR( - [Could not find experimental/filesystem...libstdc++fs development package required]) - ] -) - # Checks for library functions. LT_INIT diff --git a/fan_pwm.cpp b/fan_pwm.cpp index 23eb6dc..f0910c6 100644 --- a/fan_pwm.cpp +++ b/fan_pwm.cpp @@ -6,7 +6,7 @@ #include "sensorset.hpp" #include "sysfs.hpp" -#include <experimental/filesystem> +#include <filesystem> #include <phosphor-logging/elog-errors.hpp> #include <string> #include <xyz/openbmc_project/Control/Device/error.hpp> @@ -10,7 +10,7 @@ #include <cmath> #include <cstring> -#include <experimental/filesystem> +#include <filesystem> #include <phosphor-logging/elog-errors.hpp> #include <thread> #include <xyz/openbmc_project/Common/error.hpp> @@ -189,7 +189,7 @@ std::shared_ptr<ValueObject> Sensor::addValue(const RetryIO& retryIO, std::shared_ptr<StatusObject> Sensor::addStatus(ObjectInfo& info) { - namespace fs = std::experimental::filesystem; + namespace fs = std::filesystem; std::shared_ptr<StatusObject> iface = nullptr; auto& objPath = std::get<std::string>(info); diff --git a/sensorset.cpp b/sensorset.cpp index f326e88..e3f4e9c 100644 --- a/sensorset.cpp +++ b/sensorset.cpp @@ -17,7 +17,7 @@ #include "hwmon.hpp" -#include <experimental/filesystem> +#include <filesystem> #include <iostream> #include <regex> @@ -29,7 +29,7 @@ static const auto sensor_regex_match_count = 4; SensorSet::SensorSet(const std::string& path) { - namespace fs = std::experimental::filesystem; + namespace fs = std::filesystem; for (const auto& file : fs::directory_iterator(path)) { @@ -20,14 +20,14 @@ #include <algorithm> #include <cerrno> #include <cstdlib> -#include <experimental/filesystem> +#include <filesystem> #include <fstream> #include <memory> #include <phosphor-logging/log.hpp> #include <thread> using namespace std::string_literals; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; namespace sysfs { diff --git a/targets.hpp b/targets.hpp index 9e63351..540338c 100644 --- a/targets.hpp +++ b/targets.hpp @@ -5,7 +5,7 @@ #include "fan_speed.hpp" #include "hwmonio.hpp" -#include <experimental/filesystem> +#include <filesystem> #include <memory> #include <phosphor-logging/elog-errors.hpp> #include <phosphor-logging/log.hpp> @@ -68,7 +68,7 @@ std::shared_ptr<T> addTarget(const SensorSet::key_type& sensor, const std::string& devPath, ObjectInfo& info) { std::shared_ptr<T> target; - namespace fs = std::experimental::filesystem; + namespace fs = std::filesystem; auto& obj = std::get<Object>(info); auto& objPath = std::get<std::string>(info); |