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:

committed by
Nico Williams

parent
bec4818943
commit
1dd38cc3de
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "hx_locl.h"
|
||||
|
||||
int
|
||||
HX509_LIB_FUNCTION int HX509_LIB_CALL
|
||||
_hx509_map_file_os(const char *fn, heim_octet_string *os)
|
||||
{
|
||||
size_t length;
|
||||
@@ -48,13 +48,13 @@ _hx509_map_file_os(const char *fn, heim_octet_string *os)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
HX509_LIB_FUNCTION void HX509_LIB_CALL
|
||||
_hx509_unmap_file_os(heim_octet_string *os)
|
||||
{
|
||||
rk_xfree(os->data);
|
||||
}
|
||||
|
||||
int
|
||||
HX509_LIB_FUNCTION int HX509_LIB_CALL
|
||||
_hx509_write_file(const char *fn, const void *data, size_t length)
|
||||
{
|
||||
rk_dumpdata(fn, data, length);
|
||||
@@ -71,7 +71,7 @@ print_pem_stamp(FILE *f, const char *type, const char *str)
|
||||
fprintf(f, "-----%s %s-----\n", type, str);
|
||||
}
|
||||
|
||||
int
|
||||
HX509_LIB_FUNCTION int HX509_LIB_CALL
|
||||
hx509_pem_write(hx509_context context, const char *type,
|
||||
hx509_pem_header *headers, FILE *f,
|
||||
const void *data, size_t size)
|
||||
@@ -119,7 +119,7 @@ hx509_pem_write(hx509_context context, const char *type,
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
HX509_LIB_FUNCTION int HX509_LIB_CALL
|
||||
hx509_pem_add_header(hx509_pem_header **headers,
|
||||
const char *header, const char *value)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ hx509_pem_add_header(hx509_pem_header **headers,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
HX509_LIB_FUNCTION void HX509_LIB_CALL
|
||||
hx509_pem_free_header(hx509_pem_header *headers)
|
||||
{
|
||||
hx509_pem_header *h;
|
||||
@@ -163,7 +163,7 @@ hx509_pem_free_header(hx509_pem_header *headers)
|
||||
*
|
||||
*/
|
||||
|
||||
const char *
|
||||
HX509_LIB_FUNCTION const char * HX509_LIB_CALL
|
||||
hx509_pem_find_header(const hx509_pem_header *h, const char *header)
|
||||
{
|
||||
while(h) {
|
||||
@@ -179,7 +179,7 @@ hx509_pem_find_header(const hx509_pem_header *h, const char *header)
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
HX509_LIB_FUNCTION int HX509_LIB_CALL
|
||||
hx509_pem_read(hx509_context context,
|
||||
FILE *f,
|
||||
hx509_pem_read_func func,
|
||||
|
Reference in New Issue
Block a user