kdc: declare calling/linkage conventions for accessors
Decorate generated accessors with KDC_LIB_FUNCTION/KDC_LIB_CALL for correct linkage on Windows.
This commit is contained in:
@@ -36,13 +36,13 @@
|
|||||||
/* read-only accessor */
|
/* read-only accessor */
|
||||||
#ifndef _KDC_REQUEST_GET_ACCESSOR
|
#ifndef _KDC_REQUEST_GET_ACCESSOR
|
||||||
#define _KDC_REQUEST_GET_ACCESSOR(R, T, f) \
|
#define _KDC_REQUEST_GET_ACCESSOR(R, T, f) \
|
||||||
T \
|
KDC_LIB_FUNCTION T KDC_LIB_CALL \
|
||||||
kdc_request_get_ ## f(R);
|
kdc_request_get_ ## f(R);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _KDC_REQUEST_SET_ACCESSOR
|
#ifndef _KDC_REQUEST_SET_ACCESSOR
|
||||||
#define _KDC_REQUEST_SET_ACCESSOR(R, T, f) \
|
#define _KDC_REQUEST_SET_ACCESSOR(R, T, f) \
|
||||||
void \
|
KDC_LIB_FUNCTION void KDC_LIB_CALL \
|
||||||
kdc_request_set_ ## f(R, T);
|
kdc_request_set_ ## f(R, T);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -69,13 +69,13 @@
|
|||||||
/* get/set accessor for pointer type */
|
/* get/set accessor for pointer type */
|
||||||
#ifndef _KDC_REQUEST_GET_ACCESSOR_PTR
|
#ifndef _KDC_REQUEST_GET_ACCESSOR_PTR
|
||||||
#define _KDC_REQUEST_GET_ACCESSOR_PTR(R, T, f) \
|
#define _KDC_REQUEST_GET_ACCESSOR_PTR(R, T, f) \
|
||||||
const T \
|
KDC_LIB_FUNCTION const T KDC_LIB_CALL \
|
||||||
kdc_request_get_ ## f(R);
|
kdc_request_get_ ## f(R);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _KDC_REQUEST_SET_ACCESSOR_PTR
|
#ifndef _KDC_REQUEST_SET_ACCESSOR_PTR
|
||||||
#define _KDC_REQUEST_SET_ACCESSOR_PTR(R, T, t, f) \
|
#define _KDC_REQUEST_SET_ACCESSOR_PTR(R, T, t, f) \
|
||||||
krb5_error_code \
|
KDC_LIB_FUNCTION krb5_error_code KDC_LIB_CALL \
|
||||||
kdc_request_set_ ## f(R, const T);
|
kdc_request_set_ ## f(R, const T);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -102,13 +102,13 @@
|
|||||||
/* get/set accessor for struct type */
|
/* get/set accessor for struct type */
|
||||||
#ifndef _KDC_REQUEST_GET_ACCESSOR_STRUCT
|
#ifndef _KDC_REQUEST_GET_ACCESSOR_STRUCT
|
||||||
#define _KDC_REQUEST_GET_ACCESSOR_STRUCT(R, T, f) \
|
#define _KDC_REQUEST_GET_ACCESSOR_STRUCT(R, T, f) \
|
||||||
const T * \
|
KDC_LIB_FUNCTION const T * KDC_LIB_CALL \
|
||||||
kdc_request_get_ ## f(R);
|
kdc_request_get_ ## f(R);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _KDC_REQUEST_SET_ACCESSOR_STRUCT
|
#ifndef _KDC_REQUEST_SET_ACCESSOR_STRUCT
|
||||||
#define _KDC_REQUEST_SET_ACCESSOR_STRUCT(R, T, t, f) \
|
#define _KDC_REQUEST_SET_ACCESSOR_STRUCT(R, T, t, f) \
|
||||||
krb5_error_code \
|
KDC_LIB_FUNCTION krb5_error_code KDC_LIB_CALL \
|
||||||
kdc_request_set_ ## f(R, const T *);
|
kdc_request_set_ ## f(R, const T *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -312,14 +312,14 @@ kdc_get_instance(const char *libname)
|
|||||||
* Plugin accessors
|
* Plugin accessors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
krb5_error_code
|
KDC_LIB_FUNCTION krb5_error_code KDC_LIB_CALL
|
||||||
kdc_request_add_reply_padata(astgs_request_t r, PA_DATA *md)
|
kdc_request_add_reply_padata(astgs_request_t r, PA_DATA *md)
|
||||||
{
|
{
|
||||||
heim_assert(r->rep.padata != NULL, "reply padata not allocated");
|
heim_assert(r->rep.padata != NULL, "reply padata not allocated");
|
||||||
return add_METHOD_DATA(r->rep.padata, md);
|
return add_METHOD_DATA(r->rep.padata, md);
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_error_code
|
KDC_LIB_FUNCTION krb5_error_code KDC_LIB_CALL
|
||||||
kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *d)
|
kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *d)
|
||||||
{
|
{
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
@@ -343,7 +343,7 @@ kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *
|
|||||||
|
|
||||||
#undef _KDC_REQUEST_GET_ACCESSOR
|
#undef _KDC_REQUEST_GET_ACCESSOR
|
||||||
#define _KDC_REQUEST_GET_ACCESSOR(R, T, f) \
|
#define _KDC_REQUEST_GET_ACCESSOR(R, T, f) \
|
||||||
T \
|
KDC_LIB_FUNCTION T KDC_LIB_CALL \
|
||||||
kdc_request_get_ ## f(R r) \
|
kdc_request_get_ ## f(R r) \
|
||||||
{ \
|
{ \
|
||||||
return r->f; \
|
return r->f; \
|
||||||
@@ -351,15 +351,15 @@ kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *
|
|||||||
|
|
||||||
#undef _KDC_REQUEST_SET_ACCESSOR
|
#undef _KDC_REQUEST_SET_ACCESSOR
|
||||||
#define _KDC_REQUEST_SET_ACCESSOR(R, T, f) \
|
#define _KDC_REQUEST_SET_ACCESSOR(R, T, f) \
|
||||||
void \
|
KDC_LIB_FUNCTION void KDC_LIB_CALL \
|
||||||
kdc_request_set_ ## f(R r, T v) \
|
kdc_request_set_ ## f(R r, T v) \
|
||||||
{ \
|
{ \
|
||||||
r->f = v; \
|
r->f = v; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef _KDC_REQUEST_GET_ACCESSOR_PTR
|
#undef _KDC_REQUEST_GET_ACCESSOR_PTR
|
||||||
#define _KDC_REQUEST_GET_ACCESSOR_PTR(R, T, f) \
|
#define _KDC_REQUEST_GET_ACCESSOR_PTR(R, T, f) \
|
||||||
const T \
|
KDC_LIB_FUNCTION const T KDC_LIB_CALL \
|
||||||
kdc_request_get_ ## f(R r) \
|
kdc_request_get_ ## f(R r) \
|
||||||
{ \
|
{ \
|
||||||
return r->f; \
|
return r->f; \
|
||||||
@@ -367,7 +367,7 @@ kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *
|
|||||||
|
|
||||||
#undef _KDC_REQUEST_SET_ACCESSOR_PTR
|
#undef _KDC_REQUEST_SET_ACCESSOR_PTR
|
||||||
#define _KDC_REQUEST_SET_ACCESSOR_PTR(R, T, t, f) \
|
#define _KDC_REQUEST_SET_ACCESSOR_PTR(R, T, t, f) \
|
||||||
krb5_error_code \
|
KDC_LIB_FUNCTION krb5_error_code KDC_LIB_CALL \
|
||||||
kdc_request_set_ ## f(R r, const T v) \
|
kdc_request_set_ ## f(R r, const T v) \
|
||||||
{ \
|
{ \
|
||||||
krb5_error_code ret; \
|
krb5_error_code ret; \
|
||||||
@@ -390,7 +390,7 @@ kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *
|
|||||||
|
|
||||||
#undef _KDC_REQUEST_GET_ACCESSOR_STRUCT
|
#undef _KDC_REQUEST_GET_ACCESSOR_STRUCT
|
||||||
#define _KDC_REQUEST_GET_ACCESSOR_STRUCT(R, T, f) \
|
#define _KDC_REQUEST_GET_ACCESSOR_STRUCT(R, T, f) \
|
||||||
const T * \
|
KDC_LIB_FUNCTION const T * KDC_LIB_CALL \
|
||||||
kdc_request_get_ ## f(R r) \
|
kdc_request_get_ ## f(R r) \
|
||||||
{ \
|
{ \
|
||||||
return &r->f; \
|
return &r->f; \
|
||||||
@@ -398,7 +398,7 @@ kdc_request_add_pac_buffer(astgs_request_t r, int32_t pactype, const krb5_data *
|
|||||||
|
|
||||||
#undef _KDC_REQUEST_SET_ACCESSOR_STRUCT
|
#undef _KDC_REQUEST_SET_ACCESSOR_STRUCT
|
||||||
#define _KDC_REQUEST_SET_ACCESSOR_STRUCT(R, T, t, f) \
|
#define _KDC_REQUEST_SET_ACCESSOR_STRUCT(R, T, t, f) \
|
||||||
krb5_error_code \
|
KDC_LIB_FUNCTION krb5_error_code KDC_LIB_CALL \
|
||||||
kdc_request_set_ ## f(R r, const T *v) \
|
kdc_request_set_ ## f(R r, const T *v) \
|
||||||
{ \
|
{ \
|
||||||
krb5_error_code ret; \
|
krb5_error_code ret; \
|
||||||
|
Reference in New Issue
Block a user