Fix for MSVC#4
Open
SzateX wants to merge 1 commit into
Open
Conversation
Owner
|
It's been over two years since I have done any work on this project or any work in the C language for that matter. At this point I have no plans to resurrect my C-development environment and make any changes. With the BSD license you are, of course, free to modify it anyway you wish for your own projects. Thanks for using APG 7.0 and good luck with your project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.cI 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.cI put definition ofPATH_MAXwhich is only declared inlinux/limits.hon Linux. I set value to4096.in
utilities.cI also put definition ofPATH_MAX(probably it could be better place for it).in
utilities.cwas 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_getcwdfunction which I rename togetcwd.in
utitilities.cthere was also problem with initialization of array invUtilCurrentWorkingDirectoryfunction. C language not allows to put consts as element number (it will be added in C23). Currently I changes_uiBufSizeto macro.I hope this changes will help to make runtime library more portable.