libgit2/libgit2 — pull request #1736 by ben (2013-07-18 02:24:03+00:00)
Title: Switch default calling convention to cdecl

As reported in #1714, having the default calling convention set to `__stdcall` means that the library seems broken on Windows – a trivial program with the default compiler settings *won't link*. It was decided to work this way back in #356 because .NET, but my gut tells me the majority of .NET users are probably using libgit2sharp rather than P/Invoking directly into the library. @scunz made this point [back in #885](https://github.com/libgit2/libgit2/pull/885#issuecomment-7891981).

This PR switches the default to `__cdecl`, but retains the ability to use the other convention. This means that bindings that want `__stdcall` will need to specify `-DSTDCALL=ON` in their build scripts. Here's an incomplete list of bindings that will need PR's to fix them:

- [ ] [Libgit2Sharp](/libgit2/libgit2sharp)
- [ ] [GitForDelphi](/jasonpenny/GitForDelphi) (?)
- [ ] Others?