Skip to content
Snippets Groups Projects
Commit 682d7172 authored by Imdad Sardharwalla's avatar Imdad Sardharwalla Committed by GitHub Enterprise
Browse files

REFORM-1143 Use Base::filesystem instead of #ifdefs (#60)

parent 5213f25d
No related branches found
No related tags found
1 merge request!14Merge latest changes to Base from ReForm
......@@ -14,27 +14,16 @@
#include "JournalFileSystem.hh"
#include "JournalString.hh"
#include "Base/Paths/Filesystem.hh"
#include "Base/Utils/Environment.hh"
#include <set>
#include <algorithm>
#ifdef __APPLE__
# ifndef JOURNAL_USE_BOOST
namespace fs = Base::filesystem;
#if defined(__APPLE__) && !defined(JOURNAL_USE_BOOST)
#error Boost is required for journaling on macOS.
# endif
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
#else // __APPLE__
// Include <filesystem> but silence resulting C4995 warnings
INSECURE_INCLUDE_SECTION_BEGIN
#include <filesystem>
INSECURE_INCLUDE_SECTION_END
namespace fs = std::filesystem;
#endif // __APPLE__
#endif // defined(__APPLE__) && !defined(JOURNAL_USE_BOOST)
namespace Journal {
......
......@@ -6,11 +6,7 @@
#include "TestChecksumNumberT.hh"
#include "TestError.hh"
#ifdef __APPLE__
#include <boost/filesystem.hpp>
#else
#include <filesystem>
#endif
#include "Base/Paths/Filesystem.hh"
#include <iostream>
#include <string>
......@@ -23,12 +19,7 @@
namespace Test
{
#ifdef __APPLE__
namespace fs = boost::filesystem;
#else // __APPLE__
namespace fs = std::filesystem;
#endif // __APPLE__
namespace fs = Base::filesystem;
Base::IOutputStream& operator<<(Base::IOutputStream& _os, const fs::path& _path)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment