summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-09 12:33:47 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-17 21:17:32 +0000
commita74dd39b232ae8c54517446089316b9643b3a84a (patch)
treeb4d6a15a17f6a45570a804331cba34eab5d7994b /README.md
parentb78bcbb9b1217d6aada0ab98f3053cb8f151a8a3 (diff)
downloadlibgit2-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.md1
1 files changed, 0 insertions, 1 deletions
diff --git a/README.md b/README.md
index 69ddfd610..8569df078 100644
--- a/README.md
+++ b/README.md
@@ -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: