-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[utils] Add getRealpath function #2050
Conversation
📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2050. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/. |
I will check the CI errors tomorrow and reflect the corrections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baek2sm, 💯 All CI checkers are successfully verified. Thanks.
@@ -197,4 +197,12 @@ bool istrequal(const std::string &a, const std::string &b) { | |||
}); | |||
} | |||
|
|||
char *get_realpath (const char *__restrict __name, char *__restrict __resolved) { | |||
#ifdef _WIN32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about change the def for the consistency.
for Android, nntrainer uses __ANDROID___
, Tizen, ___TIZEN__
.
So.. for Windows, how about ___WIN32___
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I didn't know that there was a predefined keyword called __WIN32__
. I will fix it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_WIN32 is predefined macro defined by toolchain. __ANDROID__
and __TIZEN__
are macro defined by nntrainer. If you want __WIN32__
, you will need to do it in a common header: #define __WIN32__ (_WIN32)
(do we really need this?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This modification has not been reflected yet. If it is necessary to modify the keyword _WIN32
into __WIN32__
, then I will modify and reflect it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OR... maybe https://en.cppreference.com/w/cpp/filesystem/absolute is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_WIN32 is predefined macro defined by toolchain
if it is defined by Visual Studio, then it is ok to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OR... maybe https://en.cppreference.com/w/cpp/filesystem/absolute is better?
The "absolute" function seems to work well in windows. It seems to be best way to use the absolute function. I will reflect this modification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifications were reflected to use the "absolute" function. At this time, the existing PR has been modified as it is, but I wonder if it would be better to upload new PR in the future if it is completely different from the existing PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filesystem including absolute function does not seem to be fully supported in android r21 (supported from r22) : android/ndk#609 (comment). Therefore, I would like to modify it again by defining the "getRealpath" function as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I uploaded it reflecting the work situation so far.
Plz, Check the CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
7b9248b
to
1650a6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baek2sm, 💯 All CI checkers are successfully verified. Thanks.
1650a6d
to
cd27593
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baek2sm, 💯 All CI checkers are successfully verified. Thanks.
cd27593
to
88b043d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baek2sm, 💯 All CI checkers are successfully verified. Thanks.
LGTM |
88b043d
to
fed5df7
Compare
cd1c678
to
49d4ddd
Compare
cibot: @baek2sm, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nntrainer/ci/repo-workers/pr-checker/2050-202211301509200.16678190231323-49d4ddd53fe185783fbff0263d95683654db6764/. |
Since the "realpath" function is not available in the Windows operating system, the "getRealpath" function has been added and replaced so that it can be used in the Windows operating system. - Add "getRealpath" function to utils. **Self evaluation:** 1. Build test: [x]Passed []Failed []Skipped 2. Run test: [x]Passed []Failed []Skipped Signed-off-by: Seungbaek Hong <sb92.hong@samsung.net>
49d4ddd
to
30fae59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baek2sm, 💯 All CI checkers are successfully verified. Thanks.
Since the "realpath" function is not available in the Windows operating system, the "getRealpath" function has been added and replaced so that it can be used in the Windows operating system.
Self evaluation:
Signed-off-by: Seungbaek Hong sb92.hong@samsung.net