Skip to content

win32: strncmp -> git__strncmp for win32 STDCALL - #4555

Merged
pks-t merged 1 commit into
masterfrom
ethomson/strncmp_stdcall
Feb 28, 2018
Merged

win32: strncmp -> git__strncmp for win32 STDCALL#4555
pks-t merged 1 commit into
masterfrom
ethomson/strncmp_stdcall

Conversation

@ethomson

Copy link
Copy Markdown
Member

We presently fail to build on win32 when STDCALL=ON, which is what LibGit2Sharp uses. At present, we're trying to assign a __cdecl function to a __stdcall declared function pointer.

The win32 C library is compiled cdecl, however when configured with STDCALL=ON, our functions (and function pointers) will use the stdcall calling convention. You cannot set a __stdcall function pointer to a __cdecl function, so it's easier to just use our git__strncmp instead of sorting that mess out.

The win32 C library is compiled cdecl, however when configured with
`STDCALL=ON`, our functions (and function pointers) will use the stdcall
calling convention.  You cannot set a `__stdcall` function pointer to a
`__cdecl` function, so it's easier to just use our `git__strncmp`
instead of sorting that mess out.
@pks-t pks-t added the backport label Feb 28, 2018
@pks-t
pks-t merged commit fb884c6 into master Feb 28, 2018
@pks-t pks-t mentioned this pull request Feb 28, 2018
@ethomson
ethomson deleted the ethomson/strncmp_stdcall branch October 26, 2018 13:37
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