WIN32: fix calling conventions for 32-bit builds
On 32-bit Windows Intel builds the __cdecl and __stdcall calling conventions are different so labeling the functions that are exported or assigned to function pointers matters. Change-Id: I03b6f34baeb9ffb2e683fd979f12f27a5078a4da
This commit is contained in:
@@ -218,7 +218,7 @@ _kdc_check_access(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
uintptr_t KRB5_CALLCONV
|
||||
kdc_get_instance(const char *libname)
|
||||
{
|
||||
static const char *instance = "libkdc";
|
||||
|
@@ -509,7 +509,7 @@ hdb_create(krb5_context context, HDB **db, const char *filename)
|
||||
return (*cb_ctx.h->create)(context, db, cb_ctx.residual);
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
uintptr_t KRB5_CALLCONV
|
||||
hdb_get_instance(const char *libname)
|
||||
{
|
||||
static const char *instance = "libhdb";
|
||||
|
@@ -1205,7 +1205,7 @@ struct sigctx {
|
||||
hx509_certs pool;
|
||||
};
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
sig_process(hx509_context context, void *ctx, hx509_cert cert)
|
||||
{
|
||||
struct sigctx *sigctx = ctx;
|
||||
@@ -1423,7 +1423,7 @@ sig_process(hx509_context context, void *ctx, hx509_cert cert)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
cert_process(hx509_context context, void *ctx, hx509_cert cert)
|
||||
{
|
||||
struct sigctx *sigctx = ctx;
|
||||
|
@@ -330,7 +330,7 @@ cms_verify_sd(struct cms_verify_sd_options *opt, int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
print_signer(hx509_context contextp, void *ctx, hx509_cert cert)
|
||||
{
|
||||
hx509_pem_header **header = ctx;
|
||||
@@ -693,7 +693,7 @@ struct print_s {
|
||||
int verbose;
|
||||
};
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
print_f(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
||||
{
|
||||
struct print_s *s = ctx;
|
||||
@@ -740,7 +740,7 @@ pcert_print(struct print_options *opt, int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
validate_f(hx509_context hxcontext, void *ctx, hx509_cert c)
|
||||
{
|
||||
hx509_validate_cert(hxcontext, ctx, c);
|
||||
@@ -827,7 +827,7 @@ struct verify {
|
||||
int count;
|
||||
};
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
verify_f(hx509_context hxcontext, void *ctx, hx509_cert c)
|
||||
{
|
||||
struct verify *v = ctx;
|
||||
@@ -1178,7 +1178,7 @@ revoke_print(struct revoke_print_options *opt, int argc, char **argv)
|
||||
*
|
||||
*/
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
verify_o(hx509_context hxcontext, void *ctx, hx509_cert c)
|
||||
{
|
||||
heim_octet_string *os = ctx;
|
||||
@@ -2073,7 +2073,7 @@ hxtool_ca(struct certificate_sign_options *opt, int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
test_one_cert(hx509_context hxcontext, void *ctx, hx509_cert cert)
|
||||
{
|
||||
heim_octet_string sd, c;
|
||||
|
@@ -338,7 +338,7 @@ hx509_certs_end_seq(hx509_context context,
|
||||
HX509_LIB_FUNCTION int HX509_LIB_CALL
|
||||
hx509_certs_iter_f(hx509_context context,
|
||||
hx509_certs certs,
|
||||
int (*func)(hx509_context, void *, hx509_cert),
|
||||
int (HX509_LIB_CALL *func)(hx509_context, void *, hx509_cert),
|
||||
void *ctx)
|
||||
{
|
||||
hx509_cursor cursor;
|
||||
@@ -600,7 +600,7 @@ hx509_certs_filter(hx509_context context,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
certs_merge_func(hx509_context context, void *ctx, hx509_cert c)
|
||||
{
|
||||
return hx509_certs_add(context, (hx509_certs)ctx, c);
|
||||
|
@@ -528,7 +528,7 @@ struct store_ctx {
|
||||
outformat format;
|
||||
};
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
store_func(hx509_context context, void *ctx, hx509_cert c)
|
||||
{
|
||||
struct store_ctx *sc = ctx;
|
||||
|
@@ -486,7 +486,7 @@ addBag(hx509_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
store_func(hx509_context context, void *ctx, hx509_cert c)
|
||||
{
|
||||
PKCS12_AuthenticatedSafe *as = ctx;
|
||||
|
@@ -93,7 +93,7 @@ Time2string(const Time *T, char **str)
|
||||
* @ingroup hx509_print
|
||||
*/
|
||||
|
||||
HX509_LIB_FUNCTION void HX509_LIB_CALL
|
||||
HX509_LIB_FUNCTION void
|
||||
hx509_print_stdout(void *ctx, const char *fmt, va_list va)
|
||||
{
|
||||
FILE *f = ctx;
|
||||
|
@@ -891,7 +891,7 @@ struct ocsp_add_ctx {
|
||||
hx509_cert parent;
|
||||
};
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
add_to_req(hx509_context context, void *ptr, hx509_cert cert)
|
||||
{
|
||||
struct ocsp_add_ctx *ctx = ptr;
|
||||
@@ -1477,7 +1477,7 @@ hx509_crl_free(hx509_context context, hx509_crl *crl)
|
||||
*crl = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
add_revoked(hx509_context context, void *ctx, hx509_cert cert)
|
||||
{
|
||||
TBSCRLCertList *c = ctx;
|
||||
|
@@ -418,7 +418,7 @@ struct foo {
|
||||
char *id;
|
||||
};
|
||||
|
||||
static int
|
||||
static int HX509_LIB_CALL
|
||||
add_cert(hx509_context hxctx, void *ctx, hx509_cert cert)
|
||||
{
|
||||
static char empty[] = "";
|
||||
|
@@ -46,7 +46,7 @@ struct chpass_principal_hook_ctx {
|
||||
const char *password;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
chpass_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -111,7 +111,7 @@ struct create_principal_hook_ctx {
|
||||
const char *password;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
create_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -42,7 +42,7 @@ struct delete_principal_hook_ctx {
|
||||
krb5_const_principal princ;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
delete_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -43,7 +43,7 @@ struct modify_principal_hook_ctx {
|
||||
uint32_t mask;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
modify_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -42,7 +42,7 @@ struct prune_principal_hook_ctx {
|
||||
int kvno;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
prune_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -42,7 +42,7 @@ struct randkey_principal_hook_ctx {
|
||||
krb5_const_principal princ;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
randkey_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -42,7 +42,7 @@ struct rename_principal_hook_ctx {
|
||||
krb5_const_principal source, target;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
rename_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, AuriStor, Inc.
|
||||
* Copyright (c) 2018-2019, AuriStor, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -261,7 +261,7 @@ kadm5_hook_plugin_load(krb5_context context,
|
||||
size_t *num_hooks,
|
||||
const kadm5_hook_ftable *const **hooks);
|
||||
|
||||
static uintptr_t
|
||||
static uintptr_t KRB5_LIB_CALL
|
||||
sample_hook_get_instance(const char *libname)
|
||||
{
|
||||
if (strcmp(libname, "kadm5") == 0)
|
||||
|
@@ -83,7 +83,7 @@ _kadm5_s_free_hooks(kadm5_server_context *ctx)
|
||||
_krb5_unload_plugins(ctx->context, "kadm5");
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
uintptr_t KRB5_LIB_CALL
|
||||
kadm5_get_instance(const char *libname)
|
||||
{
|
||||
static const char *instance = "libkadm5";
|
||||
|
@@ -45,7 +45,7 @@ struct setkey_principal_hook_ctx {
|
||||
krb5_keyblock *keys;
|
||||
};
|
||||
|
||||
static krb5_error_code
|
||||
static krb5_error_code KRB5_LIB_CALL
|
||||
setkey_principal_hook_cb(krb5_context context,
|
||||
const void *hook,
|
||||
void *hookctx,
|
||||
|
@@ -232,7 +232,7 @@ create_signature(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int KRB5_LIB_CALL
|
||||
cert2epi(hx509_context context, void *ctx, hx509_cert c)
|
||||
{
|
||||
ExternalPrincipalIdentifiers *ids = ctx;
|
||||
|
Reference in New Issue
Block a user