Skip to content

Make Git for Windows compile with GCC 8.x#2149

Merged
dscho merged 3 commits intogit-for-windows:masterfrom
dscho:gcc-8-gfw
Apr 5, 2019
Merged

Make Git for Windows compile with GCC 8.x#2149
dscho merged 3 commits intogit-for-windows:masterfrom
dscho:gcc-8-gfw

Conversation

@dscho
Copy link
Member

@dscho dscho commented Apr 3, 2019

Just a couple of things on top of what upstream already fixed for GCC 8.x.

dscho added 3 commits April 3, 2019 12:17
The return type of the `GetProcAddress()` function is `FARPROC` which
evaluates to `long long int (*)()`, i.e. it cannot be cast to the
correct function signature by GCC 8.

To work around that, we first cast to `void *` and go on with our merry
lives.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The kwset functionality makes use of the obstack code, which expects to
be handed a function that can allocate large chunks of data. It expects
that function to accept a `size` parameter of type `long`.

This upsets GCC 8 on Windows, because `long` does not have the same
bit size as `size_t` there.

Now, the proper thing to do would be to switch to `size_t`. But this
would make us deviate from the "upstream" code even further, making it
hard to synchronize with newer versions, and also it would be quite
involved because that `long` type is so invasive in that code.

Let's punt, and instead provide a super small wrapper around
`xmalloc()`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is needed to make things compile with GCC 8.x and later.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Apr 3, 2019

@szeder could you have a quick look over these changes?

@szeder
Copy link

szeder commented Apr 4, 2019 via email

@dscho
Copy link
Member Author

dscho commented Apr 5, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dscho dscho merged commit 61224e4 into git-for-windows:master Apr 5, 2019
@dscho dscho deleted the gcc-8-gfw branch April 5, 2019 18:26
git-for-windows-ci pushed a commit that referenced this pull request Apr 5, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 5, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 5, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 11, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 19, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 22, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request Apr 23, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Apr 27, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Apr 27, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Apr 27, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request Apr 27, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request May 7, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request May 7, 2019
Make Git for Windows compile with GCC 8.x
git-for-windows-ci pushed a commit that referenced this pull request May 8, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request May 8, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request May 9, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request May 9, 2019
Make Git for Windows compile with GCC 8.x
dscho added a commit that referenced this pull request May 9, 2019
Make Git for Windows compile with GCC 8.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.

2 participants