Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CoMISo
Base
Commits
682d7172
Commit
682d7172
authored
3 years ago
by
Imdad Sardharwalla
Committed by
GitHub Enterprise
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
REFORM-1143 Use Base::filesystem instead of #ifdefs (#60)
parent
5213f25d
No related branches found
No related tags found
1 merge request
!14
Merge latest changes to Base from ReForm
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Journal/JournalFileSystem.cc
+5
-16
5 additions, 16 deletions
Journal/JournalFileSystem.cc
Test/TestPaths.cc
+2
-11
2 additions, 11 deletions
Test/TestPaths.cc
with
7 additions
and
27 deletions
Journal/JournalFileSystem.cc
+
5
−
16
View file @
682d7172
...
...
@@ -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__
#
if
ndef
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
{
...
...
This diff is collapsed.
Click to expand it.
Test/TestPaths.cc
+
2
−
11
View file @
682d7172
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment