Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have found that runtime library is unable to compile under MSVC compiler. List of fix is shown below:
in
tools.c
I have changed way to init empty structure, to be compatible with C standard. In C17 there is no possiblity to put empty initialization list according to this (it looks that C23 will add this, but MSVC is not compatible with this standard).in
format.c
I put definition ofPATH_MAX
which is only declared inlinux/limits.h
on Linux. I set value to4096
.in
utilities.c
I also put definition ofPATH_MAX
(probably it could be better place for it).in
utilities.c
was a problem with unistd.h which not exists on systems without posix. Currently I'm checking macro_MSC_VER
, and if it exists I'm including<direct.h>
. It contains_getcwd
function which I rename togetcwd
.in
utitilities.c
there was also problem with initialization of array invUtilCurrentWorkingDirectory
function. C language not allows to put consts as element number (it will be added in C23). Currently I changes_uiBufSize
to macro.I hope this changes will help to make runtime library more portable.