kdc: annotate libkdc Windows function annotations

Annotate libkdc APIs with KDC_LIB_{CALL,FUNCTION} to ensure correct calling
convention and optimized DLL importing on Windows.

Ensure Windows and libtool export tables are consistent.
This commit is contained in:
Luke Howard
2022-01-04 12:26:21 +11:00
parent b0f0ed74e8
commit ce58eb9081
17 changed files with 80 additions and 42 deletions

View File

@@ -46,6 +46,16 @@
#include <kx509_asn1.h>
#include <gssapi/gssapi.h>
#if !defined(BUILD_KDC_LIB) && defined(_WIN32)
# define KDC_LIB_FUNCTION __declspec(dllimport)
# define KDC_LIB_CALL __stdcall
# define KDC_LIB_VARIABLE __declspec(dllimport)
#else
# define KDC_LIB_FUNCTION
# define KDC_LIB_CALL
# define KDC_LIB_VARIABLE
#endif
#define heim_pcontext krb5_context
#define heim_pconfig krb5_kdc_configuration *
#include <heimbase-svc.h>