Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
6532bfce
Commit
6532bfce
authored
Jan 06, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3493 from parnic/support-platforms-without-realpath
Fix build for platforms not supporting realpath
parents
56f9b2d1
a3363def
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
util.h
include/flatbuffers/util.h
+4
-0
No files found.
include/flatbuffers/util.h
View file @
6532bfce
...
@@ -219,6 +219,9 @@ inline void EnsureDirExists(const std::string &filepath) {
...
@@ -219,6 +219,9 @@ inline void EnsureDirExists(const std::string &filepath) {
// Obtains the absolute path from any other path.
// Obtains the absolute path from any other path.
// Returns the input path if the absolute path couldn't be resolved.
// Returns the input path if the absolute path couldn't be resolved.
inline
std
::
string
AbsolutePath
(
const
std
::
string
&
filepath
)
{
inline
std
::
string
AbsolutePath
(
const
std
::
string
&
filepath
)
{
#ifdef FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION
return
filepath
;
#else
#ifdef _WIN32
#ifdef _WIN32
char
abs_path
[
MAX_PATH
];
char
abs_path
[
MAX_PATH
];
return
GetFullPathNameA
(
filepath
.
c_str
(),
MAX_PATH
,
abs_path
,
nullptr
)
return
GetFullPathNameA
(
filepath
.
c_str
(),
MAX_PATH
,
abs_path
,
nullptr
)
...
@@ -228,6 +231,7 @@ inline std::string AbsolutePath(const std::string &filepath) {
...
@@ -228,6 +231,7 @@ inline std::string AbsolutePath(const std::string &filepath) {
#endif
#endif
?
abs_path
?
abs_path
:
filepath
;
:
filepath
;
#endif // FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION
}
}
// To and from UTF-8 unicode conversion functions
// To and from UTF-8 unicode conversion functions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment