lib/hx509: declare and apply HX509_LIB_xxx macros

libhx509 is not built according to the same export and calling conventions
on Windows as the other libraries.  This change declares and applies
HX509_LIB_FUNCTION, HX509_LIB_NORETURN_FUNCTION, HX509_LIB_CALL and
HX509_LIB_VARIABLE to lib/hx509.

As a result of this change the calling convention for exported functions
will be __stdcall instead of __cdecl.

Change-Id: Ibc3f05e8088030ef7d13798f1d9c9b190bc57797
This commit is contained in:
Jeffrey Altman
2019-01-02 01:50:52 -05:00
committed by Nico Williams
parent bec4818943
commit 1dd38cc3de
26 changed files with 321 additions and 299 deletions

View File

@@ -50,7 +50,7 @@ struct hx509_collector {
};
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
_hx509_collector_alloc(hx509_context context, hx509_lock lock, struct hx509_collector **collector)
{
struct hx509_collector *c;
@@ -85,14 +85,14 @@ _hx509_collector_alloc(hx509_context context, hx509_lock lock, struct hx509_coll
return 0;
}
hx509_lock
HX509_LIB_FUNCTION hx509_lock HX509_LIB_CALL
_hx509_collector_get_lock(struct hx509_collector *c)
{
return c->lock;
}
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
_hx509_collector_certs_add(hx509_context context,
struct hx509_collector *c,
hx509_cert cert)
@@ -110,7 +110,7 @@ free_private_key(struct private_key *key)
free(key);
}
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
_hx509_collector_private_key_add(hx509_context context,
struct hx509_collector *c,
const AlgorithmIdentifier *alg,
@@ -247,7 +247,7 @@ match_keys(hx509_context context, struct private_key *value, hx509_certs certs)
return found;
}
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
_hx509_collector_collect_certs(hx509_context context,
struct hx509_collector *c,
hx509_certs *ret_certs)
@@ -282,7 +282,7 @@ _hx509_collector_collect_certs(hx509_context context,
return 0;
}
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
_hx509_collector_collect_private_keys(hx509_context context,
struct hx509_collector *c,
hx509_private_key **keys)
@@ -313,7 +313,7 @@ _hx509_collector_collect_private_keys(hx509_context context,
}
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
_hx509_collector_free(struct hx509_collector *c)
{
size_t i;