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

@@ -71,7 +71,7 @@
* @ingroup hx509_cms
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_wrap_ContentInfo(const heim_oid *oid,
const heim_octet_string *buf,
heim_octet_string *res)
@@ -125,7 +125,7 @@ hx509_cms_wrap_ContentInfo(const heim_oid *oid,
* @ingroup hx509_cms
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_unwrap_ContentInfo(const heim_octet_string *in,
heim_oid *oid,
heim_octet_string *out,
@@ -349,7 +349,7 @@ find_CMSIdentifier(hx509_context context,
* @ingroup hx509_cms
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_unenvelope(hx509_context context,
hx509_certs certs,
int flags,
@@ -555,7 +555,7 @@ out:
* @ingroup hx509_cms
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_envelope_1(hx509_context context,
int flags,
hx509_cert cert,
@@ -789,7 +789,7 @@ find_attribute(const CMSAttributes *attr, const heim_oid *oid)
* @ingroup hx509_cms
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_verify_signed(hx509_context context,
hx509_verify_ctx ctx,
unsigned int flags,
@@ -1158,7 +1158,7 @@ add_one_attribute(Attribute **attr,
* @ingroup hx509_cms
*/
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_create_signed_1(hx509_context context,
int flags,
const heim_oid *eContentType,
@@ -1451,7 +1451,7 @@ cmp_AlgorithmIdentifier(const AlgorithmIdentifier *p, const AlgorithmIdentifier
return der_heim_oid_cmp(&p->algorithm, &q->algorithm);
}
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_create_signed(hx509_context context,
int flags,
const heim_oid *eContentType,
@@ -1600,7 +1600,7 @@ out:
return ret;
}
int
HX509_LIB_FUNCTION int HX509_LIB_CALL
hx509_cms_decrypt_encrypted(hx509_context context,
hx509_lock lock,
const void *data,