diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-09 12:33:47 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-17 21:17:32 +0000 |
commit | a74dd39b232ae8c54517446089316b9643b3a84a (patch) | |
tree | b4d6a15a17f6a45570a804331cba34eab5d7994b /README.md | |
parent | b78bcbb9b1217d6aada0ab98f3053cb8f151a8a3 (diff) | |
download | libgit2-a74dd39b232ae8c54517446089316b9643b3a84a.tar.gz |
Use cdecl calling conventions on Win32
The recommendation from engineers within Microsoft is that libraries
should have a calling convention specified in the public API, and that
calling convention should be cdecl unless there are strong reasons to
use a different calling convention.
We previously offered end-users the choice between cdecl and stdcall
calling conventions. We did this for presumed wider compatibility: most
Windows applications will use cdecl, but C# and PInvoke default to
stdcall for WINAPI compatibility. (On Windows, the standard library
functions are are stdcall so PInvoke also defaults to stdcall.)
However, C# and PInvoke can easily call cdecl APIs by specifying an
annotation.
Thus, we will explicitly declare ourselves cdecl and remove the option
to build as stdcall.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -255,7 +255,6 @@ The following CMake variables are declared: - `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON) - `BUILD_CLAR`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON) - `THREADSAFE`: Build libgit2 with threading support (defaults to ON) -- `STDCALL`: Build libgit2 as `stdcall`. Turn off for `cdecl` (Windows; defaults to ON) To list all build options and their current value, you can do the following: |