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

@@ -93,7 +93,7 @@ Time2string(const Time *T, char **str)
* @ingroup hx509_print
*/
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
hx509_print_stdout(void *ctx, const char *fmt, va_list va)
{
FILE *f = ctx;
@@ -122,7 +122,7 @@ print_func(hx509_vprint_func func, void *ctx, const char *fmt, ...)
* @ingroup hx509_print
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_oid_sprint(const heim_oid *oid, char **str)
{
return der_print_heim_oid(oid, '.', str);
@@ -139,7 +139,7 @@ hx509_oid_sprint(const heim_oid *oid, char **str)
* @ingroup hx509_print
*/
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
hx509_oid_print(const heim_oid *oid, hx509_vprint_func func, void *ctx)
{
char *str;
@@ -159,7 +159,7 @@ hx509_oid_print(const heim_oid *oid, hx509_vprint_func func, void *ctx)
* @ingroup hx509_print
*/
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
hx509_bitstring_print(const heim_bit_string *b,
hx509_vprint_func func, void *ctx)
{
@@ -187,7 +187,7 @@ hx509_bitstring_print(const heim_bit_string *b,
* @ingroup hx509_print
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cert_keyusage_print(hx509_context context, hx509_cert c, char **s)
{
KeyUsage ku;
@@ -807,7 +807,7 @@ struct {
* @ingroup hx509_print
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_validate_ctx_init(hx509_context context, hx509_validate_ctx *ctx)
{
*ctx = malloc(sizeof(**ctx));
@@ -829,7 +829,7 @@ hx509_validate_ctx_init(hx509_context context, hx509_validate_ctx *ctx)
* @ingroup hx509_print
*/
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
hx509_validate_ctx_set_print(hx509_validate_ctx ctx,
hx509_vprint_func func,
void *c)
@@ -850,7 +850,7 @@ hx509_validate_ctx_set_print(hx509_validate_ctx ctx,
* @ingroup hx509_print
*/
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
hx509_validate_ctx_add_flags(hx509_validate_ctx ctx, int flags)
{
ctx->flags |= flags;
@@ -864,7 +864,7 @@ hx509_validate_ctx_add_flags(hx509_validate_ctx ctx, int flags)
* @ingroup hx509_print
*/
void
HX509_LIB_FUNCTION void HX509_LIB_CALL
hx509_validate_ctx_free(hx509_validate_ctx ctx)
{
free(ctx);
@@ -882,7 +882,7 @@ hx509_validate_ctx_free(hx509_validate_ctx ctx)
* @ingroup hx509_print
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_validate_cert(hx509_context context,
hx509_validate_ctx ctx,
hx509_cert cert)