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

@@ -68,6 +68,23 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
#endif
#ifdef BUILD_HX509_LIB
#ifndef HX509_LIB
#ifdef _WIN32
#define HX509_LIB_FUNCTION
#define HX509_LIB_NORETURN_FUNCTION __declspec(noreturn)
#define HX509_LIB_CALL __stdcall
#define HX509_LIB_VARIABLE
#else
#define HX509_LIB_FUNCTION
#define HX509_LIB_NORETURN_FUNCTION
#define HX509_LIB_CALL
#define HX509_LIB_VARIABLE
#endif
#endif
#endif
#ifdef BUILD_ROKEN_LIB
#ifndef ROKEN_LIB
#ifdef _WIN32