Use KRB5_CALLCONV for all gss mechanism functions. Also wrap #include <unistd.h>...
authorSam Hartman <hartmans@mit.edu>
Tue, 9 Aug 2011 20:07:23 +0000 (20:07 +0000)
committerSam Hartman <hartmans@mit.edu>
Tue, 9 Aug 2011 20:07:23 +0000 (20:07 +0000)
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
Signed-off-by: Sam Hartman <hartmans@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25087 dc483132-0cff-0310-8789-dd5450dbe970

43 files changed:
src/lib/gssapi/krb5/accept_sec_context.c
src/lib/gssapi/krb5/acquire_cred.c
src/lib/gssapi/krb5/compare_name.c
src/lib/gssapi/krb5/context_time.c
src/lib/gssapi/krb5/delete_sec_context.c
src/lib/gssapi/krb5/disp_name.c
src/lib/gssapi/krb5/disp_status.c
src/lib/gssapi/krb5/duplicate_name.c
src/lib/gssapi/krb5/export_name.c
src/lib/gssapi/krb5/export_sec_context.c
src/lib/gssapi/krb5/gssapiP_krb5.h
src/lib/gssapi/krb5/gssapi_err_krb5.c [new file with mode: 0644]
src/lib/gssapi/krb5/gssapi_err_krb5.h [new file with mode: 0644]
src/lib/gssapi/krb5/gssapi_krb5.c
src/lib/gssapi/krb5/iakerb.c
src/lib/gssapi/krb5/import_name.c
src/lib/gssapi/krb5/import_sec_context.c
src/lib/gssapi/krb5/indicate_mechs.c
src/lib/gssapi/krb5/init_sec_context.c
src/lib/gssapi/krb5/inq_context.c
src/lib/gssapi/krb5/inq_cred.c
src/lib/gssapi/krb5/inq_names.c
src/lib/gssapi/krb5/k5seal.c
src/lib/gssapi/krb5/k5sealiov.c
src/lib/gssapi/krb5/k5unseal.c
src/lib/gssapi/krb5/k5unsealiov.c
src/lib/gssapi/krb5/naming_exts.c
src/lib/gssapi/krb5/prf.c
src/lib/gssapi/krb5/process_context_token.c
src/lib/gssapi/krb5/rel_cred.c
src/lib/gssapi/krb5/rel_name.c
src/lib/gssapi/krb5/rel_oid.c
src/lib/gssapi/krb5/s4u_gss_glue.c
src/lib/gssapi/krb5/store_cred.c
src/lib/gssapi/krb5/wrap_size_limit.c
src/lib/gssapi/mechglue/g_authorize_localname.c
src/lib/gssapi/mechglue/g_decapsulate_token.c
src/lib/gssapi/mechglue/g_encapsulate_token.c
src/lib/gssapi/mechglue/g_oid_ops.c
src/lib/gssapi/mechglue/gssd_pname_to_uid.c
src/lib/gssapi/mechglue/mglueP.h
src/lib/gssapi/spnego/gssapiP_spnego.h
src/lib/gssapi/spnego/spnego_mech.c

index e45c6711c971b28c4bfa21666b518530cd524042..ef2316e60aa29327f939beba843ab919c8942252 100644 (file)
@@ -1296,7 +1296,7 @@ done:
 #endif /* LEAN_CLIENT */
 
 OM_uint32
-krb5_gss_accept_sec_context_ext(
+KRB5_CALLCONV krb5_gss_accept_sec_context_ext(
     OM_uint32 *minor_status,
     gss_ctx_id_t *context_handle,
     gss_cred_id_t verifier_cred_handle,
@@ -1340,7 +1340,7 @@ krb5_gss_accept_sec_context_ext(
 }
 
 OM_uint32
-krb5_gss_accept_sec_context(minor_status, context_handle,
+KRB5_CALLCONV krb5_gss_accept_sec_context(minor_status, context_handle,
                             verifier_cred_handle, input_token,
                             input_chan_bindings, src_name, mech_type,
                             output_token, ret_flags, time_rec,
index 055b3eb4c59d7317db67f9944dc3aa7da544b110..731a0ab07bbdaed8d04058137329b3f459815412 100644 (file)
@@ -186,7 +186,7 @@ cleanup:
 */
 
 static OM_uint32
-acquire_accept_cred(krb5_context context,
+KRB5_CALLCONV acquire_accept_cred(krb5_context context,
                     OM_uint32 *minor_status,
                     krb5_gss_name_t desired_name,
                     krb5_keytab req_keytab,
@@ -727,7 +727,7 @@ gss_krb5int_set_cred_rcache(OM_uint32 *minor_status,
  */
 
 OM_uint32
-krb5_gss_acquire_cred(minor_status, desired_name, time_req,
+KRB5_CALLCONV krb5_gss_acquire_cred(minor_status, desired_name, time_req,
                       desired_mechs, cred_usage, output_cred_handle,
                       actual_mechs, time_rec)
     OM_uint32 *minor_status;
@@ -752,7 +752,7 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req,
 }
 
 OM_uint32
-iakerb_gss_acquire_cred(minor_status, desired_name, time_req,
+KRB5_CALLCONV iakerb_gss_acquire_cred(minor_status, desired_name, time_req,
                         desired_mechs, cred_usage, output_cred_handle,
                         actual_mechs, time_rec)
     OM_uint32 *minor_status;
@@ -777,7 +777,7 @@ iakerb_gss_acquire_cred(minor_status, desired_name, time_req,
 }
 
 OM_uint32
-krb5_gss_acquire_cred_with_password(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_acquire_cred_with_password(OM_uint32 *minor_status,
                                     const gss_name_t desired_name,
                                     const gss_buffer_t password,
                                     OM_uint32 time_req,
@@ -801,7 +801,7 @@ krb5_gss_acquire_cred_with_password(OM_uint32 *minor_status,
 }
 
 OM_uint32
-iakerb_gss_acquire_cred_with_password(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_acquire_cred_with_password(OM_uint32 *minor_status,
                                       const gss_name_t desired_name,
                                       const gss_buffer_t password,
                                       OM_uint32 time_req,
index 6071923628b128daebc9a0887e35a1ad4f3b03b3..0ea0e671f9e153d56eac05463123e35a0419506b 100644 (file)
@@ -28,7 +28,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_compare_name(minor_status, name1, name2, name_equal)
+KRB5_CALLCONV krb5_gss_compare_name(minor_status, name1, name2, name_equal)
     OM_uint32 *minor_status;
     gss_name_t name1;
     gss_name_t name2;
index 48d2c85216833845f9f2eb88958e022763967d1c..5c68ff20d094a9fdf61fe882481e9d31907ce047 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 OM_uint32
-krb5_gss_context_time(minor_status, context_handle, time_rec)
+KRB5_CALLCONV krb5_gss_context_time(minor_status, context_handle, time_rec)
     OM_uint32 *minor_status;
     gss_ctx_id_t context_handle;
     OM_uint32 *time_rec;
index c9b6840eaea36426ec8f198c7c166dcb588d56ec..36718cad5315be51f2bcf44aebb90e3e774657cf 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 OM_uint32
-krb5_gss_delete_sec_context(minor_status, context_handle, output_token)
+KRB5_CALLCONV krb5_gss_delete_sec_context(minor_status, context_handle, output_token)
     OM_uint32 *minor_status;
     gss_ctx_id_t *context_handle;
     gss_buffer_t output_token;
index a19f50246f90413fcc0945aba37d9ed7e8f65a26..aeb9baa25b143474c47f38617f6503b4769dd036 100644 (file)
@@ -24,7 +24,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_display_name(minor_status, input_name, output_name_buffer,
+KRB5_CALLCONV krb5_gss_display_name(minor_status, input_name, output_name_buffer,
                       output_name_type)
     OM_uint32 *minor_status;
     gss_name_t input_name;
index 95fc3d3de4636efcf16b87f601254ab24093c9c5..c654011ebecc272e9c568b7e8f6685575b155723 100644 (file)
@@ -154,7 +154,7 @@ void krb5_gss_delete_error_info(void *p)
 /**/
 
 OM_uint32
-krb5_gss_display_status(minor_status, status_value, status_type,
+KRB5_CALLCONV krb5_gss_display_status(minor_status, status_value, status_type,
                         mech_type, message_context, status_string)
     OM_uint32 *minor_status;
     OM_uint32 status_value;
index 488f14821c1f053b4ff86451e687acd11300c69f..e3a1a383fd1ebf51394d07a69d4c52fbd06d856d 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "gssapiP_krb5.h"
 
-OM_uint32 krb5_gss_duplicate_name(OM_uint32  *minor_status,
+OM_uint32 KRB5_CALLCONV krb5_gss_duplicate_name(OM_uint32  *minor_status,
                                   const gss_name_t input_name,
                                   gss_name_t *dest_name)
 {
index 424d9266c1b881300c83d0c9808f4e0899a25a15..9029e595cd2c28f4405eadf1f8c429b9d9172474 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "gssapiP_krb5.h"
 
-OM_uint32 krb5_gss_export_name(OM_uint32  *minor_status,
+OM_uint32 KRB5_CALLCONV krb5_gss_export_name(OM_uint32  *minor_status,
                                const gss_name_t input_name,
                                gss_buffer_t exported_name)
 {
index 2036352e8f03f8b3a70062857c9e116e6a2f0660..2bf273f5b80d078568ad8a3ed4ebe9384df449bf 100644 (file)
@@ -27,7 +27,7 @@
 #include "gssapiP_krb5.h"
 #ifndef LEAN_CLIENT
 OM_uint32
-krb5_gss_export_sec_context(minor_status, context_handle, interprocess_token)
+KRB5_CALLCONV krb5_gss_export_sec_context(minor_status, context_handle, interprocess_token)
     OM_uint32           *minor_status;
     gss_ctx_id_t        *context_handle;
     gss_buffer_t        interprocess_token;
index 79a429d0d6433c9a631c76c4b37036c574123507..6d6f89b37a68c1cefa160257f6ac642ff8c4ef3f 100644 (file)
@@ -480,7 +480,8 @@ krb5_to_gss_cred(krb5_context context,
 
 /** declarations of internal name mechanism functions **/
 
-OM_uint32 krb5_gss_acquire_cred
+OM_uint32
+KRB5_CALLCONV krb5_gss_acquire_cred
 (OM_uint32*,       /* minor_status */
  gss_name_t,       /* desired_name */
  OM_uint32,        /* time_req */
@@ -492,7 +493,7 @@ OM_uint32 krb5_gss_acquire_cred
 );
 
 OM_uint32
-iakerb_gss_acquire_cred
+KRB5_CALLCONV iakerb_gss_acquire_cred
 (OM_uint32*,       /* minor_status */
  gss_name_t,       /* desired_name */
  OM_uint32,        /* time_req */
@@ -504,7 +505,7 @@ iakerb_gss_acquire_cred
 );
 
 OM_uint32
-krb5_gss_acquire_cred_with_password(
+KRB5_CALLCONV krb5_gss_acquire_cred_with_password(
     OM_uint32 *minor_status,
     const gss_name_t desired_name,
     const gss_buffer_t password,
@@ -516,7 +517,7 @@ krb5_gss_acquire_cred_with_password(
     OM_uint32 *time_rec);
 
 OM_uint32
-iakerb_gss_acquire_cred_with_password(
+KRB5_CALLCONV iakerb_gss_acquire_cred_with_password(
     OM_uint32 *minor_status,
     const gss_name_t desired_name,
     const gss_buffer_t password,
@@ -527,12 +528,13 @@ iakerb_gss_acquire_cred_with_password(
     gss_OID_set *actual_mechs,
     OM_uint32 *time_rec);
 
-OM_uint32 krb5_gss_release_cred
+OM_uint32
+KRB5_CALLCONV krb5_gss_release_cred
 (OM_uint32*,       /* minor_status */
  gss_cred_id_t*    /* cred_handle */
 );
 
-OM_uint32 krb5_gss_init_sec_context
+OM_uint32 KRB5_CALLCONV krb5_gss_init_sec_context
 (OM_uint32*,       /* minor_status */
  gss_cred_id_t,    /* claimant_cred_handle */
  gss_ctx_id_t*,    /* context_handle */
@@ -568,7 +570,7 @@ OM_uint32 krb5_gss_init_sec_context_ext
 );
 
 #ifndef LEAN_CLIENT
-OM_uint32 krb5_gss_accept_sec_context
+OM_uint32 KRB5_CALLCONV krb5_gss_accept_sec_context
 (OM_uint32*,       /* minor_status */
  gss_ctx_id_t*,    /* context_handle */
  gss_cred_id_t,    /* verifier_cred_handle */
@@ -583,7 +585,7 @@ OM_uint32 krb5_gss_accept_sec_context
  gss_cred_id_t*    /* delegated_cred_handle */
 );
 
-OM_uint32 krb5_gss_accept_sec_context_ext
+OM_uint32 KRB5_CALLCONV krb5_gss_accept_sec_context_ext
 (OM_uint32*,       /* minor_status */
  gss_ctx_id_t*,    /* context_handle */
  gss_cred_id_t,    /* verifier_cred_handle */
@@ -600,25 +602,25 @@ OM_uint32 krb5_gss_accept_sec_context_ext
 );
 #endif /* LEAN_CLIENT */
 
-OM_uint32 krb5_gss_process_context_token
+OM_uint32 KRB5_CALLCONV krb5_gss_process_context_token
 (OM_uint32*,       /* minor_status */
  gss_ctx_id_t,     /* context_handle */
  gss_buffer_t      /* token_buffer */
 );
 
-OM_uint32 krb5_gss_delete_sec_context
+OM_uint32 KRB5_CALLCONV krb5_gss_delete_sec_context
 (OM_uint32*,       /* minor_status */
  gss_ctx_id_t*,    /* context_handle */
  gss_buffer_t      /* output_token */
 );
 
-OM_uint32 krb5_gss_context_time
+OM_uint32 KRB5_CALLCONV krb5_gss_context_time
 (OM_uint32*,       /* minor_status */
  gss_ctx_id_t,     /* context_handle */
  OM_uint32*        /* time_rec */
 );
 
-OM_uint32 krb5_gss_display_status
+OM_uint32 KRB5_CALLCONV krb5_gss_display_status
 (OM_uint32*,       /* minor_status */
  OM_uint32,        /* status_value */
  int,              /* status_type */
@@ -627,19 +629,19 @@ OM_uint32 krb5_gss_display_status
  gss_buffer_t      /* status_string */
 );
 
-OM_uint32 krb5_gss_indicate_mechs
+OM_uint32 KRB5_CALLCONV krb5_gss_indicate_mechs
 (OM_uint32*,       /* minor_status */
  gss_OID_set*      /* mech_set */
 );
 
-OM_uint32 krb5_gss_compare_name
+OM_uint32 KRB5_CALLCONV krb5_gss_compare_name
 (OM_uint32*,       /* minor_status */
  gss_name_t,       /* name1 */
  gss_name_t,       /* name2 */
  int*              /* name_equal */
 );
 
-OM_uint32 krb5_gss_display_name
+OM_uint32 KRB5_CALLCONV krb5_gss_display_name
 (OM_uint32*,      /* minor_status */
  gss_name_t,      /* input_name */
  gss_buffer_t,    /* output_name_buffer */
@@ -647,19 +649,19 @@ OM_uint32 krb5_gss_display_name
 );
 
 
-OM_uint32 krb5_gss_import_name
+OM_uint32 KRB5_CALLCONV krb5_gss_import_name
 (OM_uint32*,       /* minor_status */
  gss_buffer_t,     /* input_name_buffer */
  gss_OID,          /* input_name_type */
  gss_name_t*       /* output_name */
 );
 
-OM_uint32 krb5_gss_release_name
+OM_uint32 KRB5_CALLCONV krb5_gss_release_name
 (OM_uint32*,       /* minor_status */
  gss_name_t*       /* input_name */
 );
 
-OM_uint32 krb5_gss_inquire_cred
+OM_uint32 KRB5_CALLCONV krb5_gss_inquire_cred
 (OM_uint32 *,      /* minor_status */
  gss_cred_id_t,    /* cred_handle */
  gss_name_t *,     /* name */
@@ -668,7 +670,7 @@ OM_uint32 krb5_gss_inquire_cred
  gss_OID_set *     /* mechanisms */
 );
 
-OM_uint32 krb5_gss_inquire_context
+OM_uint32 KRB5_CALLCONV krb5_gss_inquire_context
 (OM_uint32*,       /* minor_status */
  gss_ctx_id_t,     /* context_handle */
  gss_name_t*,      /* initiator_name */
@@ -681,7 +683,7 @@ OM_uint32 krb5_gss_inquire_context
 );
 
 /* New V2 entry points */
-OM_uint32 krb5_gss_get_mic
+OM_uint32 KRB5_CALLCONV krb5_gss_get_mic
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,               /* context_handle */
  gss_qop_t,                  /* qop_req */
@@ -689,7 +691,7 @@ OM_uint32 krb5_gss_get_mic
  gss_buffer_t                /* message_token */
 );
 
-OM_uint32 krb5_gss_verify_mic
+OM_uint32 KRB5_CALLCONV krb5_gss_verify_mic
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,               /* context_handle */
  gss_buffer_t,               /* message_buffer */
@@ -697,7 +699,7 @@ OM_uint32 krb5_gss_verify_mic
  gss_qop_t *                 /* qop_state */
 );
 
-OM_uint32 krb5_gss_wrap
+OM_uint32 KRB5_CALLCONV krb5_gss_wrap
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,               /* context_handle */
  int,                        /* conf_req_flag */
@@ -707,7 +709,7 @@ OM_uint32 krb5_gss_wrap
  gss_buffer_t                /* output_message_buffer */
 );
 
-OM_uint32 krb5_gss_wrap_iov
+OM_uint32 KRB5_CALLCONV krb5_gss_wrap_iov
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,              /* context_handle */
  int,                       /* conf_req_flag */
@@ -718,7 +720,7 @@ OM_uint32 krb5_gss_wrap_iov
 );
 
 OM_uint32
-krb5_gss_wrap_iov_length
+KRB5_CALLCONV krb5_gss_wrap_iov_length
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,              /* context_handle */
  int,                       /* conf_req_flag */
@@ -728,7 +730,7 @@ krb5_gss_wrap_iov_length
  int                        /* iov_count */
 );
 
-OM_uint32 krb5_gss_unwrap
+OM_uint32 KRB5_CALLCONV krb5_gss_unwrap
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,               /* context_handle */
  gss_buffer_t,               /* input_message_buffer */
@@ -737,7 +739,7 @@ OM_uint32 krb5_gss_unwrap
  gss_qop_t *                 /* qop_state */
 );
 
-OM_uint32 krb5_gss_unwrap_iov
+OM_uint32 KRB5_CALLCONV krb5_gss_unwrap_iov
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,              /* context_handle */
  int *,                     /* conf_state */
@@ -746,7 +748,7 @@ OM_uint32 krb5_gss_unwrap_iov
  int                        /* iov_count */
 );
 
-OM_uint32 krb5_gss_wrap_size_limit
+OM_uint32 KRB5_CALLCONV krb5_gss_wrap_size_limit
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t,               /* context_handle */
  int,                        /* conf_req_flag */
@@ -755,21 +757,21 @@ OM_uint32 krb5_gss_wrap_size_limit
  OM_uint32 *                 /* max_input_size */
 );
 
-OM_uint32 krb5_gss_import_name_object
+OM_uint32 KRB5_CALLCONV krb5_gss_import_name_object
 (OM_uint32 *,           /* minor_status */
  void *,                     /* input_name */
  gss_OID,                    /* input_name_type */
  gss_name_t *                /* output_name */
 );
 
-OM_uint32 krb5_gss_export_name_object
+OM_uint32 KRB5_CALLCONV krb5_gss_export_name_object
 (OM_uint32 *,           /* minor_status */
  gss_name_t,                 /* input_name */
  gss_OID,                    /* desired_name_type */
  void * *                    /* output_name */
 );
 
-OM_uint32 krb5_gss_inquire_cred_by_mech
+OM_uint32 KRB5_CALLCONV krb5_gss_inquire_cred_by_mech
 (OM_uint32  *,          /* minor_status */
  gss_cred_id_t,              /* cred_handle */
  gss_OID,                    /* mech_type */
@@ -779,13 +781,13 @@ OM_uint32 krb5_gss_inquire_cred_by_mech
  gss_cred_usage_t *          /* cred_usage */
 );
 #ifndef LEAN_CLIENT
-OM_uint32 krb5_gss_export_sec_context
+OM_uint32 KRB5_CALLCONV krb5_gss_export_sec_context
 (OM_uint32 *,           /* minor_status */
  gss_ctx_id_t *,             /* context_handle */
  gss_buffer_t                /* interprocess_token */
 );
 
-OM_uint32 krb5_gss_import_sec_context
+OM_uint32 KRB5_CALLCONV krb5_gss_import_sec_context
 (OM_uint32 *,           /* minor_status */
  gss_buffer_t,               /* interprocess_token */
  gss_ctx_id_t *              /* context_handle */
@@ -799,12 +801,12 @@ OM_uint32 krb5_gss_release_oid
  gss_OID *                   /* oid */
 );
 
-OM_uint32 krb5_gss_internal_release_oid
+OM_uint32 KRB5_CALLCONV krb5_gss_internal_release_oid
 (OM_uint32 *,           /* minor_status */
  gss_OID *                   /* oid */
 );
 
-OM_uint32 krb5_gss_inquire_names_for_mech
+OM_uint32 KRB5_CALLCONV krb5_gss_inquire_names_for_mech
 (OM_uint32 *,           /* minor_status */
  gss_OID,                    /* mechanism */
  gss_OID_set *               /* name_types */
@@ -817,13 +819,13 @@ OM_uint32 krb5_gss_canonicalize_name
  gss_name_t *                /* output_name */
 );
 
-OM_uint32 krb5_gss_export_name
+OM_uint32 KRB5_CALLCONV krb5_gss_export_name
 (OM_uint32  *,          /* minor_status */
  const gss_name_t,           /* input_name */
  gss_buffer_t                /* exported_name */
 );
 
-OM_uint32 krb5_gss_duplicate_name
+OM_uint32 KRB5_CALLCONV krb5_gss_duplicate_name
 (OM_uint32  *,          /* minor_status */
  const gss_name_t,           /* input_name */
  gss_name_t *                /* dest_name */
@@ -834,7 +836,7 @@ OM_uint32 krb5_gss_validate_cred
  gss_cred_id_t               /* cred */
 );
 
-OM_uint32 krb5_gss_acquire_cred_impersonate_name(
+OM_uint32 KRB5_CALLCONV krb5_gss_acquire_cred_impersonate_name(
     OM_uint32 *,            /* minor_status */
     const gss_cred_id_t,    /* impersonator_cred_handle */
     const gss_name_t,       /* desired_name */
@@ -894,20 +896,20 @@ kg_acceptor_princ(krb5_context context, krb5_gss_name_t name,
                   krb5_principal *princ_out);
 
 OM_uint32
-krb5_gss_display_name_ext(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_display_name_ext(OM_uint32 *minor_status,
                           gss_name_t name,
                           gss_OID display_as_name_type,
                           gss_buffer_t display_name);
 
 OM_uint32
-krb5_gss_inquire_name(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_name(OM_uint32 *minor_status,
                       gss_name_t name,
                       int *name_is_MN,
                       gss_OID *MN_mech,
                       gss_buffer_set_t *attrs);
 
 OM_uint32
-krb5_gss_get_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_get_name_attribute(OM_uint32 *minor_status,
                             gss_name_t name,
                             gss_buffer_t attr,
                             int *authenticated,
@@ -917,37 +919,37 @@ krb5_gss_get_name_attribute(OM_uint32 *minor_status,
                             int *more);
 
 OM_uint32
-krb5_gss_set_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_set_name_attribute(OM_uint32 *minor_status,
                             gss_name_t name,
                             int complete,
                             gss_buffer_t attr,
                             gss_buffer_t value);
 
 OM_uint32
-krb5_gss_delete_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_delete_name_attribute(OM_uint32 *minor_status,
                                gss_name_t name,
                                gss_buffer_t attr);
 
 OM_uint32
-krb5_gss_export_name_composite(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_export_name_composite(OM_uint32 *minor_status,
                                gss_name_t name,
                                gss_buffer_t exp_composite_name);
 
 OM_uint32
-krb5_gss_map_name_to_any(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_map_name_to_any(OM_uint32 *minor_status,
                          gss_name_t name,
                          int authenticated,
                          gss_buffer_t type_id,
                          gss_any_t *output);
 
 OM_uint32
-krb5_gss_release_any_name_mapping(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_release_any_name_mapping(OM_uint32 *minor_status,
                                   gss_name_t name,
                                   gss_buffer_t type_id,
                                   gss_any_t *input);
 
 OM_uint32
-krb5_gss_pseudo_random(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_pseudo_random(OM_uint32 *minor_status,
                        gss_ctx_id_t context,
                        int prf_key,
                        const gss_buffer_t prf_in,
@@ -955,7 +957,7 @@ krb5_gss_pseudo_random(OM_uint32 *minor_status,
                        gss_buffer_t prf_out);
 
 OM_uint32
-krb5_gss_store_cred(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_store_cred(OM_uint32 *minor_status,
                     gss_cred_id_t input_cred_handle,
                     gss_cred_usage_t cred_usage,
                     const gss_OID desired_mech,
@@ -1140,7 +1142,7 @@ extern void krb5_gss_delete_error_info(void *p);
 /* IAKERB */
 
 OM_uint32
-iakerb_gss_init_sec_context(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_init_sec_context(OM_uint32 *minor_status,
                             gss_cred_id_t claimant_cred_handle,
                             gss_ctx_id_t *context_handle,
                             gss_name_t target_name,
@@ -1155,7 +1157,7 @@ iakerb_gss_init_sec_context(OM_uint32 *minor_status,
                             OM_uint32 *time_rec);
 
 OM_uint32
-iakerb_gss_accept_sec_context(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_accept_sec_context(OM_uint32 *minor_status,
                               gss_ctx_id_t *context_handler,
                               gss_cred_id_t verifier_cred_handle,
                               gss_buffer_t input_token,
@@ -1168,7 +1170,7 @@ iakerb_gss_accept_sec_context(OM_uint32 *minor_status,
                               gss_cred_id_t *delegated_cred_handle);
 
 OM_uint32
-iakerb_gss_delete_sec_context(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_delete_sec_context(OM_uint32 *minor_status,
                               gss_ctx_id_t *context_handle,
                               gss_buffer_t output_token);
 
diff --git a/src/lib/gssapi/krb5/gssapi_err_krb5.c b/src/lib/gssapi/krb5/gssapi_err_krb5.c
new file mode 100644 (file)
index 0000000..c17eb4b
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * lib/gssapi/krb5/gssapi_err_krb5.c:
+ * This file is automatically generated; please do not edit it.
+ */
+#if defined(_WIN32)
+# include "win-mac.h"
+#endif
+
+#if !defined(_WIN32)
+extern void initialize_k5g_error_table (void);
+#endif
+
+#define N_(x) (x)
+
+/* Lclint doesn't handle null annotations on arrays
+   properly, so we need this typedef in each
+   generated .c file.  */
+/*@-redef@*/
+typedef /*@null@*/ const char *ncptr;
+/*@=redef@*/
+
+static ncptr const text[] = {
+       N_("Principal in credential cache does not match desired name"),
+       N_("No principal in keytab matches desired name"),
+       N_("Credential cache has no TGT"),
+       N_("Authenticator has no subkey"),
+       N_("Context is already fully established"),
+       N_("Unknown signature type in token"),
+       N_("Invalid field length in token"),
+       N_("Attempt to use incomplete security context"),
+       N_("Bad magic number for krb5_gss_ctx_id_t"),
+       N_("Bad magic number for krb5_gss_cred_id_t"),
+       N_("Bad magic number for krb5_gss_enc_desc"),
+       N_("Sequence number in token is corrupt"),
+       N_("Credential cache is empty"),
+       N_("Acceptor and Initiator share no checksum types"),
+       N_("Requested lucid context version not supported"),
+       N_("PRF input too long"),
+       N_("Bad magic number for iakerb_ctx_id_t"),
+    0
+};
+
+#include <com_err.h>
+
+const struct error_table et_k5g_error_table = { text, 39756032L, 17 };
+
+#if !defined(_WIN32)
+void initialize_k5g_error_table (void)
+    /*@modifies internalState@*/
+{
+    (void) add_error_table (&et_k5g_error_table);
+}
+#endif
diff --git a/src/lib/gssapi/krb5/gssapi_err_krb5.h b/src/lib/gssapi/krb5/gssapi_err_krb5.h
new file mode 100644 (file)
index 0000000..d2fcaaf
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * lib/gssapi/krb5/gssapi_err_krb5.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <com_err.h>
+
+#define KG_CCACHE_NOMATCH                        (39756032L)
+#define KG_KEYTAB_NOMATCH                        (39756033L)
+#define KG_TGT_MISSING                           (39756034L)
+#define KG_NO_SUBKEY                             (39756035L)
+#define KG_CONTEXT_ESTABLISHED                   (39756036L)
+#define KG_BAD_SIGN_TYPE                         (39756037L)
+#define KG_BAD_LENGTH                            (39756038L)
+#define KG_CTX_INCOMPLETE                        (39756039L)
+#define KG_CONTEXT                               (39756040L)
+#define KG_CRED                                  (39756041L)
+#define KG_ENC_DESC                              (39756042L)
+#define KG_BAD_SEQ                               (39756043L)
+#define KG_EMPTY_CCACHE                          (39756044L)
+#define KG_NO_CTYPES                             (39756045L)
+#define KG_LUCID_VERSION                         (39756046L)
+#define KG_INPUT_TOO_LONG                        (39756047L)
+#define KG_IAKERB_CONTEXT                        (39756048L)
+#define ERROR_TABLE_BASE_k5g (39756032L)
+
+extern const struct error_table et_k5g_error_table;
+
+#if !defined(_WIN32)
+/* for compatibility with older versions... */
+extern void initialize_k5g_error_table (void) /*@modifies internalState@*/;
+#else
+#define initialize_k5g_error_table()
+#endif
+
+#if !defined(_WIN32)
+#define init_k5g_err_tbl initialize_k5g_error_table
+#define k5g_err_base ERROR_TABLE_BASE_k5g
+#endif
index a89235396e0cd92067c1d851ccdfd0d0cb1cb0c9..87b642b1e1972e10a6e39cae64195d6d32eb7c3b 100644 (file)
@@ -346,7 +346,7 @@ static struct {
 };
 
 static OM_uint32
-krb5_gss_inquire_sec_context_by_oid (OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_sec_context_by_oid (OM_uint32 *minor_status,
                                      const gss_ctx_id_t context_handle,
                                      const gss_OID desired_object,
                                      gss_buffer_set_t *data_set)
@@ -399,7 +399,7 @@ static struct {
 #endif
 
 static OM_uint32
-krb5_gss_inquire_cred_by_oid(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_cred_by_oid(OM_uint32 *minor_status,
                              const gss_cred_id_t cred_handle,
                              const gss_OID desired_object,
                              gss_buffer_set_t *data_set)
@@ -463,7 +463,7 @@ static struct {
 #endif
 
 static OM_uint32
-krb5_gss_set_sec_context_option (OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_set_sec_context_option (OM_uint32 *minor_status,
                                  gss_ctx_id_t *context_handle,
                                  const gss_OID desired_object,
                                  const gss_buffer_t value)
@@ -526,7 +526,7 @@ static struct {
 };
 
 static OM_uint32
-krb5_gssspi_set_cred_option(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gssspi_set_cred_option(OM_uint32 *minor_status,
                             gss_cred_id_t *cred_handle,
                             const gss_OID desired_object,
                             const gss_buffer_t value)
@@ -594,7 +594,7 @@ static struct {
 };
 
 static OM_uint32
-krb5_gssspi_mech_invoke (OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gssspi_mech_invoke (OM_uint32 *minor_status,
                          const gss_OID desired_mech,
                          const gss_OID desired_object,
                          gss_buffer_t value)
@@ -634,7 +634,7 @@ krb5_gssspi_mech_invoke (OM_uint32 *minor_status,
 #define GS2_IAKERB_SASL_NAME_LEN  (sizeof(GS2_IAKERB_SASL_NAME) - 1)
 
 static OM_uint32
-krb5_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
                                    const gss_buffer_t sasl_mech_name,
                                    gss_OID *mech_type)
 {
@@ -658,7 +658,7 @@ krb5_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
 }
 
 static OM_uint32
-krb5_gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
                                    const gss_OID desired_mech,
                                    gss_buffer_t sasl_mech_name,
                                    gss_buffer_t mech_name,
@@ -687,7 +687,7 @@ fail:
 }
 
 static OM_uint32
-krb5_gss_inquire_attrs_for_mech(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_attrs_for_mech(OM_uint32 *minor_status,
                                 gss_const_OID mech,
                                 gss_OID_set *mech_attrs,
                                 gss_OID_set *known_mech_attrs)
@@ -739,7 +739,7 @@ cleanup:
 
 #ifndef NO_PASSWORD
 static OM_uint32
-krb5_gss_pname_to_uid(OM_uint32 *minor,
+KRB5_CALLCONV krb5_gss_pname_to_uid(OM_uint32 *minor,
                       const gss_name_t pname,
                       const gss_OID mech_type,
                       uid_t *uid)
@@ -779,7 +779,7 @@ krb5_gss_pname_to_uid(OM_uint32 *minor,
 #endif /* !NO_PASSWORD */
 
 static OM_uint32
-krb5_gss_authorize_localname(OM_uint32 *minor,
+KRB5_CALLCONV krb5_gss_authorize_localname(OM_uint32 *minor,
                              const gss_name_t pname,
                              gss_const_buffer_t local_user,
                              gss_const_OID name_type)
index deef9cb426897eb01a96a4d40f0a9246b468be67..576f340990ac9619515aa8d1126fd35267702eca 100644 (file)
@@ -733,7 +733,7 @@ cleanup:
  * handles. The heuristic is similar to SPNEGO's delete_sec_context.
  */
 OM_uint32
-iakerb_gss_delete_sec_context(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_delete_sec_context(OM_uint32 *minor_status,
                               gss_ctx_id_t *context_handle,
                               gss_buffer_t output_token)
 {
@@ -789,7 +789,7 @@ iakerb_make_exts(iakerb_ctx_id_t ctx, krb5_gss_ctx_ext_rec *exts)
 }
 
 OM_uint32
-iakerb_gss_accept_sec_context(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_accept_sec_context(OM_uint32 *minor_status,
                               gss_ctx_id_t *context_handle,
                               gss_cred_id_t verifier_cred_handle,
                               gss_buffer_t input_token,
@@ -879,7 +879,7 @@ cleanup:
 }
 
 OM_uint32
-iakerb_gss_init_sec_context(OM_uint32 *minor_status,
+KRB5_CALLCONV iakerb_gss_init_sec_context(OM_uint32 *minor_status,
                             gss_cred_id_t claimant_cred_handle,
                             gss_ctx_id_t *context_handle,
                             gss_name_t target_name,
index af6182218c00d6af1c55d5e1828a74225193e58c..34017e312a410567205b62b1a7c0879adadb600e 100644 (file)
@@ -117,7 +117,7 @@ parse_hostbased(const char *str, size_t len,
 }
 
 OM_uint32
-krb5_gss_import_name(minor_status, input_name_buffer,
+KRB5_CALLCONV krb5_gss_import_name(minor_status, input_name_buffer,
                      input_name_type, output_name)
     OM_uint32 *minor_status;
     gss_buffer_t input_name_buffer;
index 144f5689a212a144ca5ebb538e9a5e53f09c1500..1202f5c83c1de2ec0be4ae77f61d40bf5595e7d5 100644 (file)
@@ -65,7 +65,7 @@ krb5_gss_ser_init (krb5_context context)
 }
 
 OM_uint32
-krb5_gss_import_sec_context(minor_status, interprocess_token, context_handle)
+KRB5_CALLCONV krb5_gss_import_sec_context(minor_status, interprocess_token, context_handle)
     OM_uint32           *minor_status;
     gss_buffer_t        interprocess_token;
     gss_ctx_id_t        *context_handle;
index 7707f65148ede51e2a755bea68f6d3de356c4290..32a1e7c1e97492bda1ecbec4badb62663e8c36b6 100644 (file)
@@ -29,7 +29,7 @@
 #include "mglueP.h"
 
 OM_uint32
-krb5_gss_indicate_mechs(minor_status, mech_set)
+KRB5_CALLCONV krb5_gss_indicate_mechs(minor_status, mech_set)
     OM_uint32 *minor_status;
     gss_OID_set *mech_set;
 {
index bc945b13165bdd9c2632d19e23473970bd75a46a..9ec4f1fae4aa97cce2410d7125292bd53b79e241 100644 (file)
@@ -1097,7 +1097,7 @@ krb5int_gss_use_kdc_context(OM_uint32 *minor_status,
 #endif
 
 OM_uint32
-krb5_gss_init_sec_context(minor_status, claimant_cred_handle,
+KRB5_CALLCONV krb5_gss_init_sec_context(minor_status, claimant_cred_handle,
                           context_handle, target_name, mech_type,
                           req_flags, time_req, input_chan_bindings,
                           input_token, actual_mech_type, output_token,
index 94d1c2745e15f1e1e3c42e62ca31ac04aafb6bb4..abcf91a2ef8c463b432d13780d541efbc95ca7f6 100644 (file)
@@ -78,7 +78,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_inquire_context(minor_status, context_handle, initiator_name,
+KRB5_CALLCONV krb5_gss_inquire_context(minor_status, context_handle, initiator_name,
                          acceptor_name, lifetime_rec, mech_type, ret_flags,
                          locally_initiated, opened)
     OM_uint32 *minor_status;
index 20df617138572dc8e785cdc1194e1e654d7c37a5..9366a5f753d0f9caf0c2368e9ed5c84452a55e37 100644 (file)
@@ -73,7 +73,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret,
+KRB5_CALLCONV krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret,
                       cred_usage, mechanisms)
     OM_uint32 *minor_status;
     gss_cred_id_t cred_handle;
@@ -221,7 +221,7 @@ fail:
 
 /* V2 interface */
 OM_uint32
-krb5_gss_inquire_cred_by_mech(minor_status, cred_handle,
+KRB5_CALLCONV krb5_gss_inquire_cred_by_mech(minor_status, cred_handle,
                               mech_type, name, initiator_lifetime,
                               acceptor_lifetime, cred_usage)
     OM_uint32           *minor_status;
index 3980062cd6464e5c07f6b97cdecb939f35508264..37fd29f2b54be41d822538149f038c3fd74036a7 100644 (file)
@@ -27,7 +27,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_inquire_names_for_mech(minor_status, mechanism, name_types)
+KRB5_CALLCONV krb5_gss_inquire_names_for_mech(minor_status, mechanism, name_types)
     OM_uint32   *minor_status;
     gss_OID     mechanism;
     gss_OID_set *name_types;
index 814f9eed525cadc5e5c53291b1cb413a0c31c500..e06d454e79e4f8b877584c4b9d28a3fa4dcf16d5 100644 (file)
@@ -388,7 +388,7 @@ kg_seal(minor_status, context_handle, conf_req_flag, qop_req,
 }
 
 OM_uint32
-krb5_gss_wrap(minor_status, context_handle, conf_req_flag,
+KRB5_CALLCONV krb5_gss_wrap(minor_status, context_handle, conf_req_flag,
               qop_req, input_message_buffer, conf_state,
               output_message_buffer)
     OM_uint32           *minor_status;
@@ -405,7 +405,7 @@ krb5_gss_wrap(minor_status, context_handle, conf_req_flag,
 }
 
 OM_uint32
-krb5_gss_get_mic(minor_status, context_handle, qop_req,
+KRB5_CALLCONV krb5_gss_get_mic(minor_status, context_handle, qop_req,
                  message_buffer, message_token)
     OM_uint32           *minor_status;
     gss_ctx_id_t        context_handle;
index 5f6eb222198070d092cb9e4e53e757364c070904..291661c990b1511b858ddaeb864583f9eff424fa 100644 (file)
@@ -491,7 +491,7 @@ kg_seal_iov_length(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_wrap_iov(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_wrap_iov(OM_uint32 *minor_status,
                   gss_ctx_id_t context_handle,
                   int conf_req_flag,
                   gss_qop_t qop_req,
@@ -509,7 +509,7 @@ krb5_gss_wrap_iov(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_wrap_iov_length(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_wrap_iov_length(OM_uint32 *minor_status,
                          gss_ctx_id_t context_handle,
                          int conf_req_flag,
                          gss_qop_t qop_req,
index 908f76899ef27805af692a08c759e9df0f4ee1cf..31ccf7a95f772907c03dd72debe317a28db24c6b 100644 (file)
@@ -546,7 +546,7 @@ kg_unseal(minor_status, context_handle, input_token_buffer,
 }
 
 OM_uint32
-krb5_gss_unwrap(minor_status, context_handle,
+KRB5_CALLCONV krb5_gss_unwrap(minor_status, context_handle,
                 input_message_buffer, output_message_buffer,
                 conf_state, qop_state)
     OM_uint32           *minor_status;
@@ -565,7 +565,7 @@ krb5_gss_unwrap(minor_status, context_handle,
 }
 
 OM_uint32
-krb5_gss_verify_mic(minor_status, context_handle,
+KRB5_CALLCONV krb5_gss_verify_mic(minor_status, context_handle,
                     message_buffer, token_buffer,
                     qop_state)
     OM_uint32           *minor_status;
index 6ca57bc6c0e3dca07d43d7643003ebeca0d240fc..2c4da5f23116af00be09301d4c904c09c4d3b228 100644 (file)
@@ -641,7 +641,7 @@ kg_unseal_iov(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_unwrap_iov(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_unwrap_iov(OM_uint32 *minor_status,
                     gss_ctx_id_t context_handle,
                     int *conf_state,
                     gss_qop_t *qop_state,
index 61723423896b43e7b5e85c92362fcc239f12135e..0831dc5573bc5a0748c3e7025bdc2f7a1903e360 100644 (file)
@@ -251,7 +251,7 @@ kg_data_list_to_buffer_set_nocopy(krb5_data **pdata,
 }
 
 OM_uint32
-krb5_gss_inquire_name(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_inquire_name(OM_uint32 *minor_status,
                       gss_name_t name,
                       int *name_is_MN,
                       gss_OID *MN_mech,
@@ -308,7 +308,7 @@ cleanup:
 }
 
 OM_uint32
-krb5_gss_get_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_get_name_attribute(OM_uint32 *minor_status,
                             gss_name_t name,
                             gss_buffer_t attr,
                             int *authenticated,
@@ -392,7 +392,7 @@ krb5_gss_get_name_attribute(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_set_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_set_name_attribute(OM_uint32 *minor_status,
                             gss_name_t name,
                             int complete,
                             gss_buffer_t attr,
@@ -450,7 +450,7 @@ krb5_gss_set_name_attribute(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_delete_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_delete_name_attribute(OM_uint32 *minor_status,
                                gss_name_t name,
                                gss_buffer_t attr)
 {
@@ -500,7 +500,7 @@ krb5_gss_delete_name_attribute(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_map_name_to_any(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_map_name_to_any(OM_uint32 *minor_status,
                          gss_name_t name,
                          int authenticated,
                          gss_buffer_t type_id,
@@ -558,7 +558,7 @@ krb5_gss_map_name_to_any(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_release_any_name_mapping(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_release_any_name_mapping(OM_uint32 *minor_status,
                                   gss_name_t name,
                                   gss_buffer_t type_id,
                                   gss_any_t *input)
@@ -617,7 +617,7 @@ krb5_gss_release_any_name_mapping(OM_uint32 *minor_status,
 }
 
 OM_uint32
-krb5_gss_export_name_composite(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_export_name_composite(OM_uint32 *minor_status,
                                gss_name_t name,
                                gss_buffer_t exp_composite_name)
 {
index 0aa3e3dfd0a6f4227efe7605f26bd6249701051e..104016d212c64fb0f0e2a3b7c19fdcbb9012f92c 100644 (file)
@@ -34,7 +34,7 @@
 #endif
 
 OM_uint32
-krb5_gss_pseudo_random(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_pseudo_random(OM_uint32 *minor_status,
                        gss_ctx_id_t context,
                        int prf_key,
                        const gss_buffer_t prf_in,
index fd6364cc0161ff1babb0612a6564f3539a9cec89..0bf6715c883cfbc52ecc6f27b5e707b3fdbed303 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 OM_uint32
-krb5_gss_process_context_token(minor_status, context_handle,
+KRB5_CALLCONV krb5_gss_process_context_token(minor_status, context_handle,
                                token_buffer)
     OM_uint32 *minor_status;
     gss_ctx_id_t context_handle;
index dc0b832566ba09cc800884bdf89ed12f4b914dd1..e3d0fb102cfed09d03e212b504645f39a87d58a0 100644 (file)
@@ -24,7 +24,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_release_cred(minor_status, cred_handle)
+KRB5_CALLCONV krb5_gss_release_cred(minor_status, cred_handle)
     OM_uint32 *minor_status;
     gss_cred_id_t *cred_handle;
 {
index 5696de3fdbfc7c4c61618c459fcf6c1547b01a8e..69e0ed1f1dba9b632cdd1eacd997133335a5cc56 100644 (file)
@@ -24,7 +24,7 @@
 #include "gssapiP_krb5.h"
 
 OM_uint32
-krb5_gss_release_name(minor_status, input_name)
+KRB5_CALLCONV krb5_gss_release_name(minor_status, input_name)
     OM_uint32 *minor_status;
     gss_name_t *input_name;
 {
index e5720e587811b4bdafa16db779dc494d7707c805..d3ba35638de4431307d3048705e52d675cfd2abc 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "gssapiP_krb5.h"
 
-OM_uint32 krb5_gss_internal_release_oid (OM_uint32 *, /* minor_status */
+OM_uint32 KRB5_CALLCONV krb5_gss_internal_release_oid (OM_uint32 *, /* minor_status */
                                          gss_OID * /* oid */
 );
 
@@ -56,7 +56,7 @@ krb5_gss_release_oid(minor_status, oid)
 }
 
 OM_uint32
-krb5_gss_internal_release_oid(minor_status, oid)
+KRB5_CALLCONV krb5_gss_internal_release_oid(minor_status, oid)
     OM_uint32   *minor_status;
     gss_OID     *oid;
 {
index 8406c3df920ec63d2acacf2a514f75a9f208f75b..abb0d80a565a1f4bb85cc64157f57bc4d0e65747 100644 (file)
@@ -105,7 +105,7 @@ kg_impersonate_name(OM_uint32 *minor_status,
 
 /* The mechglue always passes null desired_mechs and actual_mechs. */
 OM_uint32
-krb5_gss_acquire_cred_impersonate_name(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_acquire_cred_impersonate_name(OM_uint32 *minor_status,
                                        const gss_cred_id_t impersonator_cred_handle,
                                        const gss_name_t desired_name,
                                        OM_uint32 time_req,
index 7cae1b86d8575adbfaf8d6c552b70592f3d1c9d6..a2d708098edaf564cfd943594dbaf548204f9b01 100644 (file)
@@ -131,7 +131,7 @@ cleanup:
 }
 
 OM_uint32
-krb5_gss_store_cred(OM_uint32 *minor_status,
+KRB5_CALLCONV krb5_gss_store_cred(OM_uint32 *minor_status,
                     gss_cred_id_t input_cred_handle,
                     gss_cred_usage_t cred_usage,
                     const gss_OID desired_mech,
index 31d1427db9cc49941d0e4b291a89de7c813f2218..9d0bf1cd89986eafda225fa7c99fd05f45b69ab6 100644 (file)
@@ -74,7 +74,7 @@
 
 /* V2 interface */
 OM_uint32
-krb5_gss_wrap_size_limit(minor_status, context_handle, conf_req_flag,
+KRB5_CALLCONV krb5_gss_wrap_size_limit(minor_status, context_handle, conf_req_flag,
                          qop_req, req_output_size, max_input_size)
     OM_uint32           *minor_status;
     gss_ctx_id_t        context_handle;
index eec42f739c76fcf6347479d7cb3d7b5a442db7a0..373332d714456b9362ae86a46302b467fdd8e8dd 100644 (file)
@@ -39,7 +39,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <mglueP.h>
 #include <gssapi/gssapi.h>
 
@@ -154,7 +156,7 @@ compare_names_authorize_localname(OM_uint32 *minor,
        return (status);
 }
 
-OM_uint32
+OM_uint32 KRB5_CALLCONV
 gss_authorize_localname(OM_uint32 *minor,
                        const gss_name_t name,
                        const gss_name_t user)
@@ -203,7 +205,7 @@ gss_authorize_localname(OM_uint32 *minor,
 }
 
 int
-gss_userok(const gss_name_t name,
+KRB5_CALLCONV gss_userok(const gss_name_t name,
           const char *user)
 {
        OM_uint32 major, minor;
index 42b9e0798424f2ce776e40ee3551bce8370bf44d..934d2607cc6c2d03533fb939e65e9fd520a454c1 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 KRB5_CALLCONV
 gss_decapsulate_token(gss_const_buffer_t input_token,
                       gss_const_OID token_oid,
                       gss_buffer_t output_token)
index b26e14704861755bedfc1827a84e5e8139f6901c..6ce0eeb0f5d0dabf421d8e9220f65b71bc2dc677 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 KRB5_CALLCONV
 gss_encapsulate_token(gss_const_buffer_t input_token,
                       gss_const_OID token_oid,
                       gss_buffer_t output_token)
index e0be538cca502e12d88f15824dcf5749281e2d60..69437898fc098bab83238017801f177b8b1d00ec 100644 (file)
@@ -103,7 +103,7 @@ gssint_copy_oid_set(
     return generic_gss_copy_oid_set(minor_status, oidset, new_oidset);
 }
 
-int
+int KRB5_CALLCONV
 gss_oid_equal(
     gss_const_OID first_oid,
     gss_const_OID second_oid)
index 1f5e99e174283334940205f37877b0b581893691..13ba1f0ca87ab85daa8a409c2ce7854d5eabc323 100644 (file)
@@ -130,7 +130,7 @@ attr_pname_to_uid(OM_uint32 *minor,
     return major;
 }
 
-OM_uint32
+OM_uint32 KRB5_CALLCONV
 gss_pname_to_uid(OM_uint32 *minor,
                  const gss_name_t pname,
                  const gss_OID mech_type,
index 426b70c952e2a19ed52962cbde093662e0b2628f..a0b3673f770f3b95cdbda64443094b59925d6585 100644 (file)
@@ -76,7 +76,7 @@ typedef struct gss_cred_id_struct {
        gss_union_cred_auxinfo  auxinfo;
 } gss_union_cred_desc, *gss_union_cred_t;
 
-typedef        OM_uint32           (*gss_acquire_cred_with_password_sfct)(
+typedef        OM_uint32           (KRB5_CALLCONV *gss_acquire_cred_with_password_sfct)(
                    OM_uint32 *,        /* minor_status */
                    const gss_name_t,   /* desired_name */
                    const gss_buffer_t, /* password */
@@ -119,7 +119,7 @@ OM_uint32 gssint_get_mech_type_oid(gss_OID OID, gss_buffer_t token);
 typedef struct gss_config {
     gss_OID_desc    mech_type;
     void *         context;
-    OM_uint32       (*gss_acquire_cred)
+    OM_uint32       (KRB5_CALLCONV *gss_acquire_cred)
        (
                    OM_uint32*,         /* minor_status */
                    gss_name_t,         /* desired_name */
@@ -130,12 +130,12 @@ typedef struct gss_config {
                    gss_OID_set*,       /* actual_mechs */
                    OM_uint32*          /* time_rec */
                    );
-    OM_uint32       (*gss_release_cred)
+    OM_uint32       (KRB5_CALLCONV *gss_release_cred)
        (
                    OM_uint32*,         /* minor_status */
                    gss_cred_id_t*      /* cred_handle */
                    );
-    OM_uint32       (*gss_init_sec_context)
+    OM_uint32       (KRB5_CALLCONV *gss_init_sec_context)
        (
                    OM_uint32*,                 /* minor_status */
                    gss_cred_id_t,              /* claimant_cred_handle */
@@ -151,7 +151,7 @@ typedef struct gss_config {
                    OM_uint32*,                 /* ret_flags */
                    OM_uint32*                  /* time_rec */
                    );
-    OM_uint32       (*gss_accept_sec_context)
+    OM_uint32       (KRB5_CALLCONV *gss_accept_sec_context)
        (
                    OM_uint32*,                 /* minor_status */
                    gss_ctx_id_t*,              /* context_handle */
@@ -165,25 +165,25 @@ typedef struct gss_config {
                    OM_uint32*,                 /* time_rec */
                    gss_cred_id_t*              /* delegated_cred_handle */
                    );
-    OM_uint32       (*gss_process_context_token)
+    OM_uint32       (KRB5_CALLCONV *gss_process_context_token)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
                    gss_buffer_t        /* token_buffer */
                    );
-    OM_uint32       (*gss_delete_sec_context)
+    OM_uint32       (KRB5_CALLCONV *gss_delete_sec_context)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t*,      /* context_handle */
                    gss_buffer_t        /* output_token */
                    );
-    OM_uint32       (*gss_context_time)
+    OM_uint32       (KRB5_CALLCONV *gss_context_time)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
                    OM_uint32*          /* time_rec */
                    );
-    OM_uint32       (*gss_get_mic)
+    OM_uint32       (KRB5_CALLCONV *gss_get_mic)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
@@ -191,7 +191,7 @@ typedef struct gss_config {
                    gss_buffer_t,       /* message_buffer */
                    gss_buffer_t        /* message_token */
                    );
-    OM_uint32       (*gss_verify_mic)
+    OM_uint32       (KRB5_CALLCONV *gss_verify_mic)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
@@ -199,7 +199,7 @@ typedef struct gss_config {
                    gss_buffer_t,       /* token_buffer */
                    gss_qop_t*          /* qop_state */
                    );
-    OM_uint32       (*gss_wrap)
+    OM_uint32       (KRB5_CALLCONV *gss_wrap)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
@@ -209,7 +209,7 @@ typedef struct gss_config {
                    int*,               /* conf_state */
                    gss_buffer_t        /* output_message_buffer */
                    );
-    OM_uint32       (*gss_unwrap)
+    OM_uint32       (KRB5_CALLCONV *gss_unwrap)
        (
                    OM_uint32*,         /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
@@ -218,7 +218,7 @@ typedef struct gss_config {
                    int*,               /* conf_state */
                    gss_qop_t*          /* qop_state */
                    );
-    OM_uint32       (*gss_display_status)
+    OM_uint32       (KRB5_CALLCONV *gss_display_status)
        (
                    OM_uint32*,         /* minor_status */
                    OM_uint32,          /* status_value */
@@ -227,38 +227,38 @@ typedef struct gss_config {
                    OM_uint32*,         /* message_context */
                    gss_buffer_t        /* status_string */
                    );
-    OM_uint32       (*gss_indicate_mechs)
+    OM_uint32       (KRB5_CALLCONV *gss_indicate_mechs)
        (
                    OM_uint32*,         /* minor_status */
                    gss_OID_set*        /* mech_set */
                    );
-    OM_uint32       (*gss_compare_name)
+    OM_uint32       (KRB5_CALLCONV *gss_compare_name)
        (
                    OM_uint32*,         /* minor_status */
                    gss_name_t,         /* name1 */
                    gss_name_t,         /* name2 */
                    int*                /* name_equal */
                    );
-    OM_uint32       (*gss_display_name)
+    OM_uint32       (KRB5_CALLCONV *gss_display_name)
        (
                    OM_uint32*,         /* minor_status */
                    gss_name_t,         /* input_name */
                    gss_buffer_t,       /* output_name_buffer */
                    gss_OID*            /* output_name_type */
                    );
-    OM_uint32       (*gss_import_name)
+    OM_uint32       (KRB5_CALLCONV *gss_import_name)
        (
                    OM_uint32*,         /* minor_status */
                    gss_buffer_t,       /* input_name_buffer */
                    gss_OID,            /* input_name_type */
                    gss_name_t*         /* output_name */
                    );
-    OM_uint32       (*gss_release_name)
+    OM_uint32       (KRB5_CALLCONV *gss_release_name)
        (
                    OM_uint32*,         /* minor_status */
                    gss_name_t*         /* input_name */
                    );
-    OM_uint32       (*gss_inquire_cred)
+    OM_uint32       (KRB5_CALLCONV *gss_inquire_cred)
        (
                    OM_uint32 *,                /* minor_status */
                    gss_cred_id_t,              /* cred_handle */
@@ -267,7 +267,7 @@ typedef struct gss_config {
                    int *,                      /* cred_usage */
                    gss_OID_set *               /* mechanisms */
                    );
-    OM_uint32      (*gss_add_cred)
+    OM_uint32      (KRB5_CALLCONV *gss_add_cred)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_cred_id_t,      /* input_cred_handle */
@@ -281,19 +281,19 @@ typedef struct gss_config {
                    OM_uint32 *,        /* initiator_time_rec */
                    OM_uint32 *         /* acceptor_time_rec */
                    );
-    OM_uint32      (*gss_export_sec_context)
+    OM_uint32      (KRB5_CALLCONV *gss_export_sec_context)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_ctx_id_t *,     /* context_handle */
                    gss_buffer_t        /* interprocess_token */
                    );
-    OM_uint32      (*gss_import_sec_context)
+    OM_uint32      (KRB5_CALLCONV *gss_import_sec_context)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_buffer_t,       /* interprocess_token */
                    gss_ctx_id_t *      /* context_handle */
                    );
-    OM_uint32      (*gss_inquire_cred_by_mech)
+    OM_uint32      (KRB5_CALLCONV *gss_inquire_cred_by_mech)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_cred_id_t,      /* cred_handle */
@@ -303,13 +303,13 @@ typedef struct gss_config {
                    OM_uint32 *,        /* acceptor_lifetime */
                    gss_cred_usage_t *  /* cred_usage */
                    );
-    OM_uint32      (*gss_inquire_names_for_mech)
+    OM_uint32      (KRB5_CALLCONV *gss_inquire_names_for_mech)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_OID,            /* mechanism */
                    gss_OID_set *       /* name_types */
                    );
-    OM_uint32  (*gss_inquire_context)
+    OM_uint32  (KRB5_CALLCONV *gss_inquire_context)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
@@ -321,12 +321,12 @@ typedef struct gss_config {
                    int *,              /* locally_initiated */
                    int *               /* open */
                    );
-    OM_uint32      (*gss_internal_release_oid)
+    OM_uint32      (KRB5_CALLCONV *gss_internal_release_oid)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_OID *           /* OID */
         );
-    OM_uint32       (*gss_wrap_size_limit)
+    OM_uint32       (KRB5_CALLCONV *gss_wrap_size_limit)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_ctx_id_t,       /* context_handle */
@@ -335,33 +335,33 @@ typedef struct gss_config {
                    OM_uint32,          /* req_output_size */
                    OM_uint32 *         /* max_input_size */
         );
-    OM_uint32       (*gss_pname_to_uid)
+    OM_uint32       (KRB5_CALLCONV *gss_pname_to_uid)
        (
                    OM_uint32 *,        /* minor */
                    const gss_name_t,   /* name */
                    const gss_OID,      /* mech_type */
                    uid_t *             /* uid */
            );
-       OM_uint32               (*gssspi_authorize_localname)
+       OM_uint32               (KRB5_CALLCONV *gssspi_authorize_localname)
        (
                    OM_uint32 *,        /* minor_status */
                    const gss_name_t,   /* pname */
                    gss_const_buffer_t, /* local user */
                    gss_const_OID       /* local nametype */
        /* */);
-       OM_uint32               (*gss_export_name)
+       OM_uint32               (KRB5_CALLCONV *gss_export_name)
        (
                OM_uint32 *,            /* minor_status */
                const gss_name_t,       /* input_name */
                gss_buffer_t            /* exported_name */
        /* */);
-        OM_uint32       (*gss_duplicate_name)
+        OM_uint32       (KRB5_CALLCONV *gss_duplicate_name)
        (
                    OM_uint32*,         /* minor_status */
                    const gss_name_t,   /* input_name */
                    gss_name_t *        /* output_name */
        /* */);
-       OM_uint32       (*gss_store_cred)
+       OM_uint32       (KRB5_CALLCONV *gss_store_cred)
        (
                OM_uint32 *,            /* minor_status */
                const gss_cred_id_t,    /* input_cred */
@@ -376,35 +376,35 @@ typedef struct gss_config {
 
        /* GGF extensions */
 
-       OM_uint32       (*gss_inquire_sec_context_by_oid)
+       OM_uint32       (KRB5_CALLCONV *gss_inquire_sec_context_by_oid)
        (
                    OM_uint32 *,        /* minor_status */
                    const gss_ctx_id_t, /* context_handle */
                    const gss_OID,      /* OID */
                    gss_buffer_set_t *  /* data_set */
                    );
-       OM_uint32       (*gss_inquire_cred_by_oid)
+       OM_uint32       (KRB5_CALLCONV *gss_inquire_cred_by_oid)
        (
                    OM_uint32 *,        /* minor_status */
                    const gss_cred_id_t, /* cred_handle */
                    const gss_OID,      /* OID */
                    gss_buffer_set_t *  /* data_set */
                    );
-       OM_uint32       (*gss_set_sec_context_option)
+       OM_uint32       (KRB5_CALLCONV *gss_set_sec_context_option)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_ctx_id_t *,     /* context_handle */
                    const gss_OID,      /* OID */
                    const gss_buffer_t  /* value */
                    );
-       OM_uint32       (*gssspi_set_cred_option)
+       OM_uint32       (KRB5_CALLCONV *gssspi_set_cred_option)
        (
                    OM_uint32 *,        /* minor_status */
                    gss_cred_id_t *,    /* cred_handle */
                    const gss_OID,      /* OID */
                    const gss_buffer_t  /* value */
                    );
-       OM_uint32       (*gssspi_mech_invoke)
+       OM_uint32       (KRB5_CALLCONV *gssspi_mech_invoke)
        (
                    OM_uint32*,         /* minor_status */
                    const gss_OID,      /* mech OID */
@@ -413,7 +413,7 @@ typedef struct gss_config {
                    );
 
        /* AEAD extensions */
-       OM_uint32       (*gss_wrap_aead)
+       OM_uint32       (KRB5_CALLCONV *gss_wrap_aead)
        (
            OM_uint32 *,                /* minor_status */
            gss_ctx_id_t,               /* context_handle */
@@ -425,7 +425,7 @@ typedef struct gss_config {
            gss_buffer_t                /* output_message_buffer */
        /* */);
 
-       OM_uint32       (*gss_unwrap_aead)
+       OM_uint32       (KRB5_CALLCONV *gss_unwrap_aead)
        (
            OM_uint32 *,                /* minor_status */
            gss_ctx_id_t,               /* context_handle */
@@ -437,7 +437,7 @@ typedef struct gss_config {
        /* */);
 
        /* SSPI extensions */
-       OM_uint32       (*gss_wrap_iov)
+       OM_uint32       (KRB5_CALLCONV *gss_wrap_iov)
        (
            OM_uint32 *,                /* minor_status */
            gss_ctx_id_t,               /* context_handle */
@@ -448,7 +448,7 @@ typedef struct gss_config {
            int                         /* iov_count */
        /* */);
 
-       OM_uint32       (*gss_unwrap_iov)
+       OM_uint32       (KRB5_CALLCONV *gss_unwrap_iov)
        (
            OM_uint32 *,                /* minor_status */
            gss_ctx_id_t,               /* context_handle */
@@ -458,7 +458,7 @@ typedef struct gss_config {
            int                         /* iov_count */
        /* */);
 
-       OM_uint32       (*gss_wrap_iov_length)
+       OM_uint32       (KRB5_CALLCONV *gss_wrap_iov_length)
        (
            OM_uint32 *,                /* minor_status */
            gss_ctx_id_t,               /* context_handle */
@@ -469,7 +469,7 @@ typedef struct gss_config {
            int                         /* iov_count */
        /* */);
 
-       OM_uint32       (*gss_complete_auth_token)
+       OM_uint32       (KRB5_CALLCONV *gss_complete_auth_token)
        (
                    OM_uint32*,         /* minor_status */
                    const gss_ctx_id_t, /* context_handle */
@@ -478,7 +478,7 @@ typedef struct gss_config {
 
        /* New for 1.8 */
 
-       OM_uint32       (*gss_acquire_cred_impersonate_name)
+       OM_uint32       (KRB5_CALLCONV *gss_acquire_cred_impersonate_name)
        (
            OM_uint32 *,                /* minor_status */
            const gss_cred_id_t,        /* impersonator_cred_handle */
@@ -491,7 +491,7 @@ typedef struct gss_config {
            OM_uint32 *                 /* time_rec */
        /* */);
 
-       OM_uint32       (*gss_add_cred_impersonate_name)
+       OM_uint32       (KRB5_CALLCONV *gss_add_cred_impersonate_name)
        (
            OM_uint32 *,                /* minor_status */
            gss_cred_id_t,              /* input_cred_handle */
@@ -507,7 +507,7 @@ typedef struct gss_config {
            OM_uint32 *                 /* acceptor_time_rec */
        /* */);
 
-       OM_uint32       (*gss_display_name_ext)
+       OM_uint32       (KRB5_CALLCONV *gss_display_name_ext)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
@@ -515,7 +515,7 @@ typedef struct gss_config {
            gss_buffer_t                /* display_name */
        /* */);
 
-       OM_uint32       (*gss_inquire_name)
+       OM_uint32       (KRB5_CALLCONV *gss_inquire_name)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
@@ -524,7 +524,7 @@ typedef struct gss_config {
            gss_buffer_set_t *          /* attrs */
        /* */);
 
-       OM_uint32       (*gss_get_name_attribute)
+       OM_uint32       (KRB5_CALLCONV *gss_get_name_attribute)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
@@ -536,7 +536,7 @@ typedef struct gss_config {
            int *                       /* more */
        /* */);
 
-       OM_uint32       (*gss_set_name_attribute)
+       OM_uint32       (KRB5_CALLCONV *gss_set_name_attribute)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
@@ -545,21 +545,21 @@ typedef struct gss_config {
            gss_buffer_t                /* value */
        /* */);
 
-       OM_uint32       (*gss_delete_name_attribute)
+       OM_uint32       (KRB5_CALLCONV *gss_delete_name_attribute)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
            gss_buffer_t                /* attr */
        /* */);
 
-       OM_uint32       (*gss_export_name_composite)
+       OM_uint32       (KRB5_CALLCONV *gss_export_name_composite)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
            gss_buffer_t                /* exp_composite_name */
        /* */);
 
-       OM_uint32       (*gss_map_name_to_any)
+       OM_uint32       (KRB5_CALLCONV *gss_map_name_to_any)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
@@ -568,7 +568,7 @@ typedef struct gss_config {
            gss_any_t *                 /* output */
        /* */);
 
-       OM_uint32       (*gss_release_any_name_mapping)
+       OM_uint32       (KRB5_CALLCONV *gss_release_any_name_mapping)
        (
            OM_uint32 *,                /* minor_status */
            gss_name_t,                 /* name */
@@ -576,7 +576,7 @@ typedef struct gss_config {
            gss_any_t *                 /* input */
        /* */);
 
-        OM_uint32       (*gss_pseudo_random)
+        OM_uint32       (KRB5_CALLCONV *gss_pseudo_random)
         (
             OM_uint32 *,                /* minor_status */
             gss_ctx_id_t,               /* context */
@@ -586,14 +586,14 @@ typedef struct gss_config {
             gss_buffer_t                /* prf_out */
         /* */);
 
-       OM_uint32       (*gss_set_neg_mechs)
+       OM_uint32       (KRB5_CALLCONV *gss_set_neg_mechs)
        (
            OM_uint32 *,                /* minor_status */
            gss_cred_id_t,              /* cred_handle */
            const gss_OID_set           /* mech_set */
        /* */);
 
-       OM_uint32       (*gss_inquire_saslname_for_mech)
+       OM_uint32       (KRB5_CALLCONV *gss_inquire_saslname_for_mech)
        (
            OM_uint32 *,                /* minor_status */
            const gss_OID,              /* desired_mech */
@@ -602,14 +602,14 @@ typedef struct gss_config {
            gss_buffer_t                /* mech_description */
        /* */);
 
-       OM_uint32       (*gss_inquire_mech_for_saslname)
+       OM_uint32       (KRB5_CALLCONV *gss_inquire_mech_for_saslname)
        (
            OM_uint32 *,                /* minor_status */
            const gss_buffer_t,         /* sasl_mech_name */
            gss_OID *                   /* mech_type */
        /* */);
 
-       OM_uint32       (*gss_inquire_attrs_for_mech)
+       OM_uint32       (KRB5_CALLCONV *gss_inquire_attrs_for_mech)
        (
            OM_uint32 *,                /* minor_status */
            gss_const_OID,              /* mech */
index 29eabbb3c82a4e73e181912371309479d26f196e..c2996a3e602604a7fa470677c388df345e86b6d8 100644 (file)
@@ -127,7 +127,7 @@ extern const gss_OID_set_desc * const gss_mech_set_spnego;
  * declarations of internal name mechanism functions
  */
 
-OM_uint32 spnego_gss_acquire_cred
+OM_uint32 KRB5_CALLCONV spnego_gss_acquire_cred
 (
        OM_uint32 *,            /* minor_status */
        gss_name_t,             /* desired_name */
@@ -139,14 +139,14 @@ OM_uint32 spnego_gss_acquire_cred
        OM_uint32 *             /* time_rec */
 );
 
-OM_uint32 spnego_gss_release_cred
+OM_uint32 KRB5_CALLCONV spnego_gss_release_cred
 (
        OM_uint32 *,            /* minor_status */
        /* CSTYLED */
        gss_cred_id_t   *       /* cred_handle */
 );
 
-OM_uint32 spnego_gss_init_sec_context
+OM_uint32 KRB5_CALLCONV spnego_gss_init_sec_context
 (
        OM_uint32 *,            /* minor_status */
        gss_cred_id_t,          /* claimant_cred_handle */
@@ -164,7 +164,7 @@ OM_uint32 spnego_gss_init_sec_context
 );
 
 #ifndef LEAN_CLIENT
-OM_uint32 spnego_gss_accept_sec_context
+OM_uint32 KRB5_CALLCONV spnego_gss_accept_sec_context
 (
        OM_uint32 *,            /* minor_status */
        gss_ctx_id_t *,         /* context_handle */
@@ -181,7 +181,7 @@ OM_uint32 spnego_gss_accept_sec_context
 );
 #endif /* LEAN_CLIENT */
 
-OM_uint32 spnego_gss_compare_name
+OM_uint32 KRB5_CALLCONV spnego_gss_compare_name
 (
        OM_uint32 *,            /* minor_status */
        const gss_name_t,       /* name1 */
@@ -189,7 +189,7 @@ OM_uint32 spnego_gss_compare_name
        int *                   /* name_equal */
 );
 
-OM_uint32 spnego_gss_display_name
+OM_uint32 KRB5_CALLCONV spnego_gss_display_name
 (
        OM_uint32 *,            /* minor_status */
        gss_name_t,             /*  input_name */
@@ -197,7 +197,7 @@ OM_uint32 spnego_gss_display_name
        gss_OID *               /* output_name_type */
 );
 
-OM_uint32 spnego_gss_display_status
+OM_uint32 KRB5_CALLCONV spnego_gss_display_status
 (
        OM_uint32 *,            /* minor_status */
        OM_uint32,              /* status_value */
@@ -207,7 +207,7 @@ OM_uint32 spnego_gss_display_status
        gss_buffer_t            /* status_string */
 );
 
-OM_uint32 spnego_gss_import_name
+OM_uint32 KRB5_CALLCONV spnego_gss_import_name
 (
        OM_uint32 *,            /* minor_status */
        gss_buffer_t,           /* input_name_buffer */
@@ -216,14 +216,14 @@ OM_uint32 spnego_gss_import_name
        gss_name_t *            /* output_name */
 );
 
-OM_uint32 spnego_gss_release_name
+OM_uint32 KRB5_CALLCONV spnego_gss_release_name
 (
        OM_uint32 *,            /* minor_status */
        /* CSTYLED */
        gss_name_t *            /* input_name */
 );
 
-OM_uint32 spnego_gss_duplicate_name
+OM_uint32 KRB5_CALLCONV spnego_gss_duplicate_name
 (
        OM_uint32 *,            /* minor_status */
        /* CSTYLED */
@@ -231,7 +231,7 @@ OM_uint32 spnego_gss_duplicate_name
        gss_name_t *            /* output_name */
 );
 
-OM_uint32 spnego_gss_inquire_cred
+OM_uint32 KRB5_CALLCONV spnego_gss_inquire_cred
 (
        OM_uint32 *,            /* minor_status */
        gss_cred_id_t,          /* cred_handle */
@@ -241,14 +241,14 @@ OM_uint32 spnego_gss_inquire_cred
        gss_OID_set *           /* mechanisms */
 );
 
-OM_uint32 spnego_gss_inquire_names_for_mech
+OM_uint32 KRB5_CALLCONV spnego_gss_inquire_names_for_mech
 (
        OM_uint32 *,            /* minor_status */
        gss_OID,                /* mechanism */
        gss_OID_set *           /* name_types */
 );
 
-OM_uint32 spnego_gss_unwrap
+OM_uint32 KRB5_CALLCONV spnego_gss_unwrap
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -258,7 +258,7 @@ OM_uint32 spnego_gss_unwrap
        gss_qop_t *qop_state
 );
 
-OM_uint32 spnego_gss_wrap
+OM_uint32 KRB5_CALLCONV spnego_gss_wrap
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -269,35 +269,35 @@ OM_uint32 spnego_gss_wrap
        gss_buffer_t output_message_buffer
 );
 
-OM_uint32 spnego_gss_process_context_token
+OM_uint32 KRB5_CALLCONV spnego_gss_process_context_token
 (
        OM_uint32       *minor_status,
        const gss_ctx_id_t context_handle,
        const gss_buffer_t token_buffer
 );
 
-OM_uint32 spnego_gss_delete_sec_context
+OM_uint32 KRB5_CALLCONV spnego_gss_delete_sec_context
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t *context_handle,
        gss_buffer_t output_token
 );
 
-OM_uint32 spnego_gss_context_time
+OM_uint32 KRB5_CALLCONV spnego_gss_context_time
 (
        OM_uint32       *minor_status,
        const gss_ctx_id_t context_handle,
        OM_uint32       *time_rec
 );
 #ifndef LEAN_CLIENT
-OM_uint32 spnego_gss_export_sec_context
+OM_uint32 KRB5_CALLCONV spnego_gss_export_sec_context
 (
        OM_uint32       *minor_status,
        gss_ctx_id_t    *context_handle,
        gss_buffer_t    interprocess_token
 );
 
-OM_uint32 spnego_gss_import_sec_context
+OM_uint32 KRB5_CALLCONV spnego_gss_import_sec_context
 (
        OM_uint32               *minor_status,
        const gss_buffer_t      interprocess_token,
@@ -305,7 +305,7 @@ OM_uint32 spnego_gss_import_sec_context
 );
 #endif /* LEAN_CLIENT */
 
-OM_uint32 spnego_gss_inquire_context
+OM_uint32 KRB5_CALLCONV spnego_gss_inquire_context
 (
        OM_uint32       *minor_status,
        const gss_ctx_id_t context_handle,
@@ -318,7 +318,7 @@ OM_uint32 spnego_gss_inquire_context
        int             *opened
 );
 
-OM_uint32 spnego_gss_wrap_size_limit
+OM_uint32 KRB5_CALLCONV spnego_gss_wrap_size_limit
 (
        OM_uint32       *minor_status,
        const gss_ctx_id_t context_handle,
@@ -328,7 +328,7 @@ OM_uint32 spnego_gss_wrap_size_limit
        OM_uint32       *max_input_size
 );
 
-OM_uint32 spnego_gss_get_mic
+OM_uint32 KRB5_CALLCONV spnego_gss_get_mic
 (
        OM_uint32 *minor_status,
        const gss_ctx_id_t context_handle,
@@ -337,7 +337,7 @@ OM_uint32 spnego_gss_get_mic
        gss_buffer_t message_token
 );
 
-OM_uint32 spnego_gss_verify_mic
+OM_uint32 KRB5_CALLCONV spnego_gss_verify_mic
 (
        OM_uint32 *minor_status,
        const gss_ctx_id_t context_handle,
@@ -347,7 +347,7 @@ OM_uint32 spnego_gss_verify_mic
 );
 
 OM_uint32
-spnego_gss_inquire_sec_context_by_oid
+KRB5_CALLCONV spnego_gss_inquire_sec_context_by_oid
 (
        OM_uint32 *minor_status,
        const gss_ctx_id_t context_handle,
@@ -356,7 +356,7 @@ spnego_gss_inquire_sec_context_by_oid
 );
 
 OM_uint32
-spnego_gss_inquire_cred_by_oid
+KRB5_CALLCONV spnego_gss_inquire_cred_by_oid
 (
        OM_uint32 *minor_status,
        const gss_cred_id_t cred_handle,
@@ -365,7 +365,7 @@ spnego_gss_inquire_cred_by_oid
 );
 
 OM_uint32
-spnego_gss_set_cred_option
+KRB5_CALLCONV spnego_gss_set_cred_option
 (
        OM_uint32 *minor_status,
        gss_cred_id_t *cred_handle,
@@ -374,7 +374,7 @@ spnego_gss_set_cred_option
 );
 
 OM_uint32
-spnego_gss_set_sec_context_option
+KRB5_CALLCONV spnego_gss_set_sec_context_option
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t *context_handle,
@@ -389,7 +389,7 @@ void gss_spnegoint_lib_fini(void);
 gss_mechanism KRB5_CALLCONV gss_mech_initialize(void);
 #endif /* _GSS_STATIC_LINK */
 
-OM_uint32 spnego_gss_wrap_aead
+OM_uint32 KRB5_CALLCONV spnego_gss_wrap_aead
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -401,7 +401,7 @@ OM_uint32 spnego_gss_wrap_aead
        gss_buffer_t output_message_buffer
 );
 
-OM_uint32 spnego_gss_unwrap_aead
+OM_uint32 KRB5_CALLCONV spnego_gss_unwrap_aead
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -412,7 +412,7 @@ OM_uint32 spnego_gss_unwrap_aead
        gss_qop_t *qop_state
 );
 
-OM_uint32 spnego_gss_wrap_iov
+OM_uint32 KRB5_CALLCONV spnego_gss_wrap_iov
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -423,7 +423,7 @@ OM_uint32 spnego_gss_wrap_iov
        int iov_count
 );
 
-OM_uint32 spnego_gss_unwrap_iov
+OM_uint32 KRB5_CALLCONV spnego_gss_unwrap_iov
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -433,7 +433,7 @@ OM_uint32 spnego_gss_unwrap_iov
        int iov_count
 );
 
-OM_uint32 spnego_gss_wrap_iov_length
+OM_uint32 KRB5_CALLCONV spnego_gss_wrap_iov_length
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context_handle,
@@ -445,7 +445,7 @@ OM_uint32 spnego_gss_wrap_iov_length
 );
 
 OM_uint32
-spnego_gss_complete_auth_token
+KRB5_CALLCONV spnego_gss_complete_auth_token
 (
        OM_uint32 *minor_status,
        const gss_ctx_id_t context_handle,
@@ -453,7 +453,7 @@ spnego_gss_complete_auth_token
 );
 
 OM_uint32
-spnego_gss_acquire_cred_impersonate_name(
+KRB5_CALLCONV spnego_gss_acquire_cred_impersonate_name(
     OM_uint32 *,           /* minor_status */
     const gss_cred_id_t,    /* impersonator_cred_handle */
     const gss_name_t,      /* desired_name */
@@ -465,7 +465,7 @@ spnego_gss_acquire_cred_impersonate_name(
     OM_uint32 *);          /* time_rec */
 
 OM_uint32
-spnego_gss_acquire_cred_with_password(
+KRB5_CALLCONV spnego_gss_acquire_cred_with_password(
     OM_uint32 *minor_status,
     const gss_name_t desired_name,
     const gss_buffer_t password,
@@ -477,7 +477,7 @@ spnego_gss_acquire_cred_with_password(
     OM_uint32 *time_rec);
 
 OM_uint32
-spnego_gss_display_name_ext
+KRB5_CALLCONV spnego_gss_display_name_ext
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -486,7 +486,7 @@ spnego_gss_display_name_ext
 );
 
 OM_uint32
-spnego_gss_inquire_name
+KRB5_CALLCONV spnego_gss_inquire_name
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -496,7 +496,7 @@ spnego_gss_inquire_name
 );
 
 OM_uint32
-spnego_gss_get_name_attribute
+KRB5_CALLCONV spnego_gss_get_name_attribute
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -509,7 +509,7 @@ spnego_gss_get_name_attribute
 );
 
 OM_uint32
-spnego_gss_set_name_attribute
+KRB5_CALLCONV spnego_gss_set_name_attribute
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -519,7 +519,7 @@ spnego_gss_set_name_attribute
 );
 
 OM_uint32
-spnego_gss_delete_name_attribute
+KRB5_CALLCONV spnego_gss_delete_name_attribute
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -527,7 +527,7 @@ spnego_gss_delete_name_attribute
 );
 
 OM_uint32
-spnego_gss_export_name_composite
+KRB5_CALLCONV spnego_gss_export_name_composite
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -535,7 +535,7 @@ spnego_gss_export_name_composite
 );
 
 OM_uint32
-spnego_gss_map_name_to_any
+KRB5_CALLCONV spnego_gss_map_name_to_any
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -545,7 +545,7 @@ spnego_gss_map_name_to_any
 );
 
 OM_uint32
-spnego_gss_release_any_name_mapping
+KRB5_CALLCONV spnego_gss_release_any_name_mapping
 (
        OM_uint32 *minor_status,
        gss_name_t name,
@@ -554,7 +554,7 @@ spnego_gss_release_any_name_mapping
 );
 
 OM_uint32
-spnego_gss_pseudo_random
+KRB5_CALLCONV spnego_gss_pseudo_random
 (
        OM_uint32 *minor_status,
        gss_ctx_id_t context,
@@ -565,7 +565,7 @@ spnego_gss_pseudo_random
 );
 
 OM_uint32
-spnego_gss_set_neg_mechs
+KRB5_CALLCONV spnego_gss_set_neg_mechs
 (
        OM_uint32 *minor_status,
        gss_cred_id_t cred_handle,
@@ -573,7 +573,7 @@ spnego_gss_set_neg_mechs
 );
 
 OM_uint32
-spnego_gss_inquire_mech_for_saslname
+KRB5_CALLCONV spnego_gss_inquire_mech_for_saslname
 (
        OM_uint32 *minor_status,
        const gss_buffer_t sasl_mech_name,
@@ -581,7 +581,7 @@ spnego_gss_inquire_mech_for_saslname
 );
 
 OM_uint32
-spnego_gss_inquire_saslname_for_mech
+KRB5_CALLCONV spnego_gss_inquire_saslname_for_mech
 (
        OM_uint32 *minor_status,
        const gss_OID desired_mech,
@@ -591,7 +591,7 @@ spnego_gss_inquire_saslname_for_mech
 );
 
 OM_uint32
-spnego_gss_inquire_attrs_for_mech
+KRB5_CALLCONV spnego_gss_inquire_attrs_for_mech
 (
        OM_uint32 *minor_status,
        gss_const_OID mech,
index 3beb93ec40690cc9d6a6baa4d5c21a938b179750..8364acc37460c5497e434d8a2a0697836393f8e7 100644 (file)
@@ -323,7 +323,7 @@ void gss_spnegoint_lib_fini(void)
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_acquire_cred(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_acquire_cred(OM_uint32 *minor_status,
                        gss_name_t desired_name,
                        OM_uint32 time_req,
                        gss_OID_set desired_mechs,
@@ -394,7 +394,7 @@ spnego_gss_acquire_cred(OM_uint32 *minor_status,
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_release_cred(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_release_cred(OM_uint32 *minor_status,
                        gss_cred_id_t *cred_handle)
 {
        spnego_gss_cred_id_t spcred = NULL;
@@ -888,7 +888,7 @@ init_ctx_call_init(OM_uint32 *minor_status,
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_init_sec_context(
+KRB5_CALLCONV spnego_gss_init_sec_context(
                        OM_uint32 *minor_status,
                        gss_cred_id_t claimant_cred_handle,
                        gss_ctx_id_t *context_handle,
@@ -1584,7 +1584,7 @@ acc_ctx_call_acc(OM_uint32 *minor_status, spnego_gss_ctx_id_t sc,
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_accept_sec_context(
+KRB5_CALLCONV spnego_gss_accept_sec_context(
                            OM_uint32 *minor_status,
                            gss_ctx_id_t *context_handle,
                            gss_cred_id_t verifier_cred_handle,
@@ -1778,7 +1778,7 @@ cleanup:
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_display_status(
+KRB5_CALLCONV spnego_gss_display_status(
                OM_uint32 *minor_status,
                OM_uint32 status_value,
                int status_type,
@@ -1828,7 +1828,7 @@ spnego_gss_display_status(
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_import_name(
+KRB5_CALLCONV spnego_gss_import_name(
                    OM_uint32 *minor_status,
                    gss_buffer_t input_name_buffer,
                    gss_OID input_name_type,
@@ -1847,7 +1847,7 @@ spnego_gss_import_name(
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_release_name(
+KRB5_CALLCONV spnego_gss_release_name(
                        OM_uint32 *minor_status,
                        gss_name_t *input_name)
 {
@@ -1863,7 +1863,7 @@ spnego_gss_release_name(
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_duplicate_name(
+KRB5_CALLCONV spnego_gss_duplicate_name(
                        OM_uint32 *minor_status,
                        const gss_name_t input_name,
                        gss_name_t *output_name)
@@ -1879,7 +1879,7 @@ spnego_gss_duplicate_name(
 }
 
 OM_uint32
-spnego_gss_inquire_cred(
+KRB5_CALLCONV spnego_gss_inquire_cred(
                        OM_uint32 *minor_status,
                        gss_cred_id_t cred_handle,
                        gss_name_t *name,
@@ -1952,7 +1952,7 @@ spnego_gss_inquire_cred(
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_compare_name(
+KRB5_CALLCONV spnego_gss_compare_name(
                        OM_uint32 *minor_status,
                        const gss_name_t name1,
                        const gss_name_t name2,
@@ -1970,7 +1970,7 @@ spnego_gss_compare_name(
 /*ARGSUSED*/
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_display_name(
+KRB5_CALLCONV spnego_gss_display_name(
                        OM_uint32 *minor_status,
                        gss_name_t input_name,
                        gss_buffer_t output_name_buffer,
@@ -1989,7 +1989,7 @@ spnego_gss_display_name(
 
 /*ARGSUSED*/
 OM_uint32
-spnego_gss_inquire_names_for_mech(
+KRB5_CALLCONV spnego_gss_inquire_names_for_mech(
                                OM_uint32       *minor_status,
                                gss_OID         mechanism,
                                gss_OID_set     *name_types)
@@ -2032,7 +2032,7 @@ spnego_gss_inquire_names_for_mech(
 }
 
 OM_uint32
-spnego_gss_unwrap(
+KRB5_CALLCONV spnego_gss_unwrap(
                OM_uint32 *minor_status,
                gss_ctx_id_t context_handle,
                gss_buffer_t input_message_buffer,
@@ -2052,7 +2052,7 @@ spnego_gss_unwrap(
 }
 
 OM_uint32
-spnego_gss_wrap(
+KRB5_CALLCONV spnego_gss_wrap(
                OM_uint32 *minor_status,
                gss_ctx_id_t context_handle,
                int conf_req_flag,
@@ -2074,7 +2074,7 @@ spnego_gss_wrap(
 }
 
 OM_uint32
-spnego_gss_process_context_token(
+KRB5_CALLCONV spnego_gss_process_context_token(
                                OM_uint32       *minor_status,
                                const gss_ctx_id_t context_handle,
                                const gss_buffer_t token_buffer)
@@ -2088,7 +2088,7 @@ spnego_gss_process_context_token(
 }
 
 OM_uint32
-spnego_gss_delete_sec_context(
+KRB5_CALLCONV spnego_gss_delete_sec_context(
                            OM_uint32 *minor_status,
                            gss_ctx_id_t *context_handle,
                            gss_buffer_t output_token)
@@ -2123,7 +2123,7 @@ spnego_gss_delete_sec_context(
 }
 
 OM_uint32
-spnego_gss_context_time(
+KRB5_CALLCONV spnego_gss_context_time(
                        OM_uint32       *minor_status,
                        const gss_ctx_id_t context_handle,
                        OM_uint32       *time_rec)
@@ -2136,7 +2136,7 @@ spnego_gss_context_time(
 }
 #ifndef LEAN_CLIENT
 OM_uint32
-spnego_gss_export_sec_context(
+KRB5_CALLCONV spnego_gss_export_sec_context(
                            OM_uint32     *minor_status,
                            gss_ctx_id_t *context_handle,
                            gss_buffer_t interprocess_token)
@@ -2149,7 +2149,7 @@ spnego_gss_export_sec_context(
 }
 
 OM_uint32
-spnego_gss_import_sec_context(
+KRB5_CALLCONV spnego_gss_import_sec_context(
        OM_uint32               *minor_status,
        const gss_buffer_t      interprocess_token,
        gss_ctx_id_t            *context_handle)
@@ -2163,7 +2163,7 @@ spnego_gss_import_sec_context(
 #endif /* LEAN_CLIENT */
 
 OM_uint32
-spnego_gss_inquire_context(
+KRB5_CALLCONV spnego_gss_inquire_context(
                        OM_uint32       *minor_status,
                        const gss_ctx_id_t context_handle,
                        gss_name_t      *src_name,
@@ -2190,7 +2190,7 @@ spnego_gss_inquire_context(
 }
 
 OM_uint32
-spnego_gss_wrap_size_limit(
+KRB5_CALLCONV spnego_gss_wrap_size_limit(
        OM_uint32       *minor_status,
        const gss_ctx_id_t context_handle,
        int             conf_req_flag,
@@ -2209,7 +2209,7 @@ spnego_gss_wrap_size_limit(
 }
 
 OM_uint32
-spnego_gss_get_mic(
+KRB5_CALLCONV spnego_gss_get_mic(
                OM_uint32 *minor_status,
                const gss_ctx_id_t context_handle,
                gss_qop_t  qop_req,
@@ -2226,7 +2226,7 @@ spnego_gss_get_mic(
 }
 
 OM_uint32
-spnego_gss_verify_mic(
+KRB5_CALLCONV spnego_gss_verify_mic(
                OM_uint32 *minor_status,
                const gss_ctx_id_t context_handle,
                const gss_buffer_t msg_buffer,
@@ -2243,7 +2243,7 @@ spnego_gss_verify_mic(
 }
 
 OM_uint32
-spnego_gss_inquire_sec_context_by_oid(
+KRB5_CALLCONV spnego_gss_inquire_sec_context_by_oid(
                OM_uint32 *minor_status,
                const gss_ctx_id_t context_handle,
                const gss_OID desired_object,
@@ -2258,7 +2258,7 @@ spnego_gss_inquire_sec_context_by_oid(
 }
 
 OM_uint32
-spnego_gss_inquire_cred_by_oid(
+KRB5_CALLCONV spnego_gss_inquire_cred_by_oid(
                OM_uint32 *minor_status,
                const gss_cred_id_t cred_handle,
                const gss_OID desired_object,
@@ -2276,7 +2276,7 @@ spnego_gss_inquire_cred_by_oid(
 }
 
 OM_uint32
-spnego_gss_set_cred_option(
+KRB5_CALLCONV spnego_gss_set_cred_option(
                OM_uint32 *minor_status,
                gss_cred_id_t *cred_handle,
                const gss_OID desired_object,
@@ -2313,7 +2313,7 @@ spnego_gss_set_cred_option(
 }
 
 OM_uint32
-spnego_gss_set_sec_context_option(
+KRB5_CALLCONV spnego_gss_set_sec_context_option(
                OM_uint32 *minor_status,
                gss_ctx_id_t *context_handle,
                const gss_OID desired_object,
@@ -2328,7 +2328,7 @@ spnego_gss_set_sec_context_option(
 }
 
 OM_uint32
-spnego_gss_wrap_aead(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_wrap_aead(OM_uint32 *minor_status,
                     gss_ctx_id_t context_handle,
                     int conf_req_flag,
                     gss_qop_t qop_req,
@@ -2351,7 +2351,7 @@ spnego_gss_wrap_aead(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_unwrap_aead(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_unwrap_aead(OM_uint32 *minor_status,
                       gss_ctx_id_t context_handle,
                       gss_buffer_t input_message_buffer,
                       gss_buffer_t input_assoc_buffer,
@@ -2371,7 +2371,7 @@ spnego_gss_unwrap_aead(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_wrap_iov(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_wrap_iov(OM_uint32 *minor_status,
                    gss_ctx_id_t context_handle,
                    int conf_req_flag,
                    gss_qop_t qop_req,
@@ -2391,7 +2391,7 @@ spnego_gss_wrap_iov(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_unwrap_iov(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_unwrap_iov(OM_uint32 *minor_status,
                      gss_ctx_id_t context_handle,
                      int *conf_state,
                      gss_qop_t *qop_state,
@@ -2409,7 +2409,7 @@ spnego_gss_unwrap_iov(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_wrap_iov_length(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_wrap_iov_length(OM_uint32 *minor_status,
                           gss_ctx_id_t context_handle,
                           int conf_req_flag,
                           gss_qop_t qop_req,
@@ -2430,7 +2430,7 @@ spnego_gss_wrap_iov_length(OM_uint32 *minor_status,
 
 
 OM_uint32
-spnego_gss_complete_auth_token(
+KRB5_CALLCONV spnego_gss_complete_auth_token(
                OM_uint32 *minor_status,
                const gss_ctx_id_t context_handle,
                gss_buffer_t input_message_buffer)
@@ -2443,7 +2443,7 @@ spnego_gss_complete_auth_token(
 }
 
 OM_uint32
-spnego_gss_acquire_cred_impersonate_name(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_acquire_cred_impersonate_name(OM_uint32 *minor_status,
                                         const gss_cred_id_t impersonator_cred_handle,
                                         const gss_name_t desired_name,
                                         OM_uint32 time_req,
@@ -2503,7 +2503,7 @@ spnego_gss_acquire_cred_impersonate_name(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_acquire_cred_with_password(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_acquire_cred_with_password(OM_uint32 *minor_status,
                                      const gss_name_t desired_name,
                                      const gss_buffer_t password,
                                      OM_uint32 time_req,
@@ -2561,7 +2561,7 @@ cleanup:
 }
 
 OM_uint32
-spnego_gss_display_name_ext(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_display_name_ext(OM_uint32 *minor_status,
                            gss_name_t name,
                            gss_OID display_as_name_type,
                            gss_buffer_t display_name)
@@ -2576,7 +2576,7 @@ spnego_gss_display_name_ext(OM_uint32 *minor_status,
 
 
 OM_uint32
-spnego_gss_inquire_name(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_inquire_name(OM_uint32 *minor_status,
                        gss_name_t name,
                        int *name_is_MN,
                        gss_OID *MN_mech,
@@ -2592,7 +2592,7 @@ spnego_gss_inquire_name(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_get_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_get_name_attribute(OM_uint32 *minor_status,
                              gss_name_t name,
                              gss_buffer_t attr,
                              int *authenticated,
@@ -2614,7 +2614,7 @@ spnego_gss_get_name_attribute(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_set_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_set_name_attribute(OM_uint32 *minor_status,
                              gss_name_t name,
                              int complete,
                              gss_buffer_t attr,
@@ -2630,7 +2630,7 @@ spnego_gss_set_name_attribute(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_delete_name_attribute(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_delete_name_attribute(OM_uint32 *minor_status,
                                 gss_name_t name,
                                 gss_buffer_t attr)
 {
@@ -2642,7 +2642,7 @@ spnego_gss_delete_name_attribute(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_export_name_composite(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_export_name_composite(OM_uint32 *minor_status,
                                 gss_name_t name,
                                 gss_buffer_t exp_composite_name)
 {
@@ -2654,7 +2654,7 @@ spnego_gss_export_name_composite(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_map_name_to_any(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_map_name_to_any(OM_uint32 *minor_status,
                           gss_name_t name,
                           int authenticated,
                           gss_buffer_t type_id,
@@ -2670,7 +2670,7 @@ spnego_gss_map_name_to_any(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_release_any_name_mapping(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_release_any_name_mapping(OM_uint32 *minor_status,
                                    gss_name_t name,
                                    gss_buffer_t type_id,
                                    gss_any_t *input)
@@ -2684,7 +2684,7 @@ spnego_gss_release_any_name_mapping(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_pseudo_random(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_pseudo_random(OM_uint32 *minor_status,
                         gss_ctx_id_t context,
                         int prf_key,
                         const gss_buffer_t prf_in,
@@ -2702,7 +2702,7 @@ spnego_gss_pseudo_random(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_set_neg_mechs(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_set_neg_mechs(OM_uint32 *minor_status,
                         gss_cred_id_t cred_handle,
                         const gss_OID_set mech_list)
 {
@@ -2720,7 +2720,7 @@ spnego_gss_set_neg_mechs(OM_uint32 *minor_status,
 #define SPNEGO_SASL_NAME_LEN   (sizeof(SPNEGO_SASL_NAME) - 1)
 
 OM_uint32
-spnego_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
                                      const gss_buffer_t sasl_mech_name,
                                      gss_OID *mech_type)
 {
@@ -2736,7 +2736,7 @@ spnego_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
 }
 
 OM_uint32
-spnego_gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
                                      const gss_OID desired_mech,
                                      gss_buffer_t sasl_mech_name,
                                      gss_buffer_t mech_name,
@@ -2761,7 +2761,7 @@ fail:
 }
 
 OM_uint32
-spnego_gss_inquire_attrs_for_mech(OM_uint32 *minor_status,
+KRB5_CALLCONV spnego_gss_inquire_attrs_for_mech(OM_uint32 *minor_status,
                                  gss_const_OID mech,
                                  gss_OID_set *mech_attrs,
                                  gss_OID_set *known_mech_attrs)