Skip to content

Conversation

@dscho
Copy link
Member

@dscho dscho commented Jul 23, 2019

This is a companion PR to git-for-windows#2258

It is necessary because MSYS2 (and therefore, Git for Windows' SDK) switched to GCC v9.x for the MINGW builds.

The `labs()` function operates, as the initial `l` suggests, on `long`
parameters. However, in `config.c` we tried to use it on values of type
`intmax_t`.

This problem was found by GCC v9.x.

To fix it, let's just "unroll" the function (i.e. negate the value if it
is negative).

Signed-off-by: Johannes Schindelin <[email protected]>
Copy link

@jeffhostetler jeffhostetler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks !

@dscho dscho merged commit e703eda into vfs-2.22.0 Jul 24, 2019
@dscho dscho deleted the gcc-9-vfs branch July 24, 2019 11:03
derrickstolee added a commit to derrickstolee/VFSForGit that referenced this pull request Jul 24, 2019
derrickstolee added a commit to microsoft/VFSForGit that referenced this pull request Jul 24, 2019
Includes changes from:

* microsoft/git#158 (experimental tracing: trace threading and cache-tree extension)
* microsoft/git#159 (experimental tracing: prime_cache_tree())
* microsoft/git#160 (experimental tracing: checkout and reset perf)
* microsoft/git#162 (support building with GCC v9.x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants