From 57a17e61e437816611b3803ab73524fcf6398a1d Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 12 Jun 1996 05:07:08 +0000 Subject: [PATCH] fcc-proto.h: Change use of PROTOTYPE to KRB5_PROTOTYPE. Change use of INTERFACE to KRB5_CALLCONV and KRB5_DLLIMP. fcc-getnam.c: Change use of INTERFACE to KRB5_CALLCONV and KRB5_DLLIMP, since fcc_getname returns a char * and the old INTERFACE method bombs out when the return type contains an indirection. fcc_read.c: fcc_ops.c: Change _WINDOWS to _MSDOS, and add check for _WIN32. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8312 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/file/ChangeLog | 15 ++++ src/lib/krb5/ccache/file/fcc-proto.h | 114 +++++++++++++------------- src/lib/krb5/ccache/file/fcc_getnam.c | 2 +- src/lib/krb5/ccache/file/fcc_ops.c | 7 +- src/lib/krb5/ccache/file/fcc_read.c | 8 +- 5 files changed, 81 insertions(+), 65 deletions(-) diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog index 17559ecf2..1bb7a2ae8 100644 --- a/src/lib/krb5/ccache/file/ChangeLog +++ b/src/lib/krb5/ccache/file/ChangeLog @@ -1,3 +1,18 @@ +Wed Jun 12 01:04:27 1996 Theodore Ts'o + + * fcc-proto.h: Change use of PROTOTYPE to KRB5_PROTOTYPE. + Change use of INTERFACE to KRB5_CALLCONV and KRB5_DLLIMP. + + * fcc-getnam.c: Change use of INTERFACE to KRB5_CALLCONV and + KRB5_DLLIMP, since fcc_getname returns a char * and the + old INTERFACE method bombs out when the return type + contains an indirection. + +Mon Jun 10 21:44:07 1996 Theodore Ts'o + + * fcc_read.c: + * fcc_ops.c: Change _WINDOWS to _MSDOS, and add check for _WIN32. + Wed Feb 14 10:44:27 1996 * fcc_read.c (krb5_fcc_read_keyblock, krb5_fcc_read_data, diff --git a/src/lib/krb5/ccache/file/fcc-proto.h b/src/lib/krb5/ccache/file/fcc-proto.h index ba73eca16..7e8f7c158 100644 --- a/src/lib/krb5/ccache/file/fcc-proto.h +++ b/src/lib/krb5/ccache/file/fcc-proto.h @@ -29,143 +29,143 @@ #define KRB5_FCC_PROTO__ /* fcc_close.c */ -krb5_error_code INTERFACE krb5_fcc_close - PROTOTYPE((krb5_context, krb5_ccache id )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_close + KRB5_PROTOTYPE((krb5_context, krb5_ccache id )); /* fcc_defnam.c */ char * krb5_fcc_default_name - PROTOTYPE((krb5_context)); + KRB5_PROTOTYPE((krb5_context)); /* fcc_destry.c */ -krb5_error_code INTERFACE krb5_fcc_destroy - PROTOTYPE((krb5_context, krb5_ccache id )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_destroy + KRB5_PROTOTYPE((krb5_context, krb5_ccache id )); /* fcc_eseq.c */ -krb5_error_code INTERFACE krb5_fcc_end_seq_get - PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_end_seq_get + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor )); /* fcc_gennew.c */ -krb5_error_code INTERFACE krb5_fcc_generate_new - PROTOTYPE((krb5_context, krb5_ccache *id )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_generate_new + KRB5_PROTOTYPE((krb5_context, krb5_ccache *id )); /* fcc_getnam.c */ -char * INTERFACE krb5_fcc_get_name - PROTOTYPE((krb5_context, krb5_ccache id )); +KRB5_DLLIMP char * KRB5_CALLCONV krb5_fcc_get_name + KRB5_PROTOTYPE((krb5_context, krb5_ccache id )); /* fcc_gprin.c */ -krb5_error_code INTERFACE krb5_fcc_get_principal - PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal *princ )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_get_principal + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal *princ )); /* fcc_init.c */ -krb5_error_code INTERFACE krb5_fcc_initialize - PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal princ )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_initialize + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal princ )); /* fcc_nseq.c */ -krb5_error_code INTERFACE krb5_fcc_next_cred - PROTOTYPE((krb5_context, +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_next_cred + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor , krb5_creds *creds )); /* fcc_read.c */ krb5_error_code krb5_fcc_read - PROTOTYPE((krb5_context, + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_pointer buf, int len)); krb5_error_code krb5_fcc_read_principal - PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal *princ )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal *princ )); krb5_error_code krb5_fcc_read_keyblock - PROTOTYPE((krb5_context, krb5_ccache id , krb5_keyblock *keyblock )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_keyblock *keyblock )); krb5_error_code krb5_fcc_read_data - PROTOTYPE((krb5_context, krb5_ccache id , krb5_data *data )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_data *data )); krb5_error_code krb5_fcc_read_int32 - PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 *i )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 *i )); krb5_error_code krb5_fcc_read_ui_2 - PROTOTYPE((krb5_context, krb5_ccache id , krb5_ui_2 *i )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_ui_2 *i )); krb5_error_code krb5_fcc_read_octet - PROTOTYPE((krb5_context, krb5_ccache id , krb5_octet *i )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_octet *i )); krb5_error_code krb5_fcc_read_times - PROTOTYPE((krb5_context, krb5_ccache id , krb5_ticket_times *t )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_ticket_times *t )); krb5_error_code krb5_fcc_read_addrs - PROTOTYPE((krb5_context, krb5_ccache, krb5_address ***)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache, krb5_address ***)); krb5_error_code krb5_fcc_read_addr - PROTOTYPE((krb5_context, krb5_ccache, krb5_address *)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache, krb5_address *)); krb5_error_code krb5_fcc_read_authdata - PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata ***)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata ***)); krb5_error_code krb5_fcc_read_authdatum - PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata *)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata *)); /* fcc_reslv.c */ -krb5_error_code INTERFACE krb5_fcc_resolve - PROTOTYPE((krb5_context, krb5_ccache *id , char *residual )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_resolve + KRB5_PROTOTYPE((krb5_context, krb5_ccache *id , char *residual )); /* fcc_retrv.c */ -krb5_error_code INTERFACE krb5_fcc_retrieve - PROTOTYPE((krb5_context, +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_retrieve + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_flags whichfields , krb5_creds *mcreds , krb5_creds *creds )); /* fcc_sseq.c */ -krb5_error_code INTERFACE krb5_fcc_start_seq_get - PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_start_seq_get + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor )); /* fcc_store.c */ -krb5_error_code INTERFACE krb5_fcc_store - PROTOTYPE((krb5_context, krb5_ccache id , krb5_creds *creds )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_store + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_creds *creds )); /* fcc_skip.c */ krb5_error_code krb5_fcc_skip_header - PROTOTYPE((krb5_context, krb5_ccache)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache)); krb5_error_code krb5_fcc_skip_principal - PROTOTYPE((krb5_context, krb5_ccache id )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id )); /* fcc_sflags.c */ -krb5_error_code INTERFACE krb5_fcc_set_flags - PROTOTYPE((krb5_context, krb5_ccache id , krb5_flags flags )); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_fcc_set_flags + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_flags flags )); /* fcc_ops.c */ extern krb5_cc_ops krb5_cc_file_ops; krb5_error_code krb5_change_cache - PROTOTYPE((void)); + KRB5_PROTOTYPE((void)); /* fcc_write.c */ krb5_error_code krb5_fcc_write - PROTOTYPE((krb5_context, krb5_ccache id , krb5_pointer buf , int len )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_pointer buf , int len )); krb5_error_code krb5_fcc_store_principal - PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal princ )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal princ )); krb5_error_code krb5_fcc_store_keyblock - PROTOTYPE((krb5_context, krb5_ccache id , krb5_keyblock *keyblock )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_keyblock *keyblock )); krb5_error_code krb5_fcc_store_data - PROTOTYPE((krb5_context, krb5_ccache id , krb5_data *data )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_data *data )); krb5_error_code krb5_fcc_store_int32 - PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 i )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 i )); krb5_error_code krb5_fcc_store_ui_2 - PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 i )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 i )); krb5_error_code krb5_fcc_store_octet - PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 i )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_int32 i )); krb5_error_code krb5_fcc_store_times - PROTOTYPE((krb5_context, krb5_ccache id , krb5_ticket_times *t )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache id , krb5_ticket_times *t )); krb5_error_code krb5_fcc_store_addrs - PROTOTYPE((krb5_context, krb5_ccache , krb5_address ** )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache , krb5_address ** )); krb5_error_code krb5_fcc_store_addr - PROTOTYPE((krb5_context, krb5_ccache , krb5_address * )); + KRB5_PROTOTYPE((krb5_context, krb5_ccache , krb5_address * )); krb5_error_code krb5_fcc_store_authdata - PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata **)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata **)); krb5_error_code krb5_fcc_store_authdatum - PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata *)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache , krb5_authdata *)); /* fcc_errs.c */ krb5_error_code krb5_fcc_interpret - PROTOTYPE((krb5_context, int )); + KRB5_PROTOTYPE((krb5_context, int )); /* fcc_maybe.c */ krb5_error_code krb5_fcc_close_file - PROTOTYPE((krb5_context, krb5_ccache)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache)); krb5_error_code krb5_fcc_open_file - PROTOTYPE((krb5_context, krb5_ccache, int)); + KRB5_PROTOTYPE((krb5_context, krb5_ccache, int)); #endif /* KRB5_FCC_PROTO__ */ diff --git a/src/lib/krb5/ccache/file/fcc_getnam.c b/src/lib/krb5/ccache/file/fcc_getnam.c index 8422ff6d2..514535957 100644 --- a/src/lib/krb5/ccache/file/fcc_getnam.c +++ b/src/lib/krb5/ccache/file/fcc_getnam.c @@ -35,7 +35,7 @@ * Returns: * The name of the file cred cache id. */ -char * INTERFACE +KRB5_DLLIMP char * KRB5_CALLCONV krb5_fcc_get_name (context, id) krb5_context context; krb5_ccache id; diff --git a/src/lib/krb5/ccache/file/fcc_ops.c b/src/lib/krb5/ccache/file/fcc_ops.c index a38ffc03b..c9ff93978 100644 --- a/src/lib/krb5/ccache/file/fcc_ops.c +++ b/src/lib/krb5/ccache/file/fcc_ops.c @@ -46,7 +46,7 @@ krb5_cc_ops krb5_fcc_ops = { krb5_fcc_set_flags, }; -#ifdef _WINDOWS +#if defined(_MSDOS) || defined(_WIN32) /* * krb5_change_cache should be called after the cache changes. @@ -73,7 +73,7 @@ krb5_get_notification_message (void) { return message; } -#else /* _WINDOWS */ +#else /* _MSDOS || _WIN32 */ krb5_error_code krb5_change_cache () @@ -86,4 +86,5 @@ krb5_get_notification_message () return 0; } -#endif /* _WINDOWS */ +#endif /* _MSDOS || _WIN32 */ + diff --git a/src/lib/krb5/ccache/file/fcc_read.c b/src/lib/krb5/ccache/file/fcc_read.c index c4ff13d20..88cb21d09 100644 --- a/src/lib/krb5/ccache/file/fcc_read.c +++ b/src/lib/krb5/ccache/file/fcc_read.c @@ -214,7 +214,7 @@ krb5_fcc_read_keyblock(context, id, keyblock) kret = krb5_fcc_read_int32(context, id, &int32); CHECK(kret); -#ifdef _WINDOWS +#if defined(_MSDOS) int32 &= VALID_INT_BITS; /* Gradient does not write correctly */ #else if ((int32 & VALID_INT_BITS) != int32) /* Overflow size_t??? */ @@ -253,7 +253,7 @@ krb5_fcc_read_data(context, id, data) kret = krb5_fcc_read_int32(context, id, &len); CHECK(kret); -#ifdef _WINDOWS +#if defined(_MSDOS) len &= VALID_INT_BITS; #else if ((len & VALID_INT_BITS) != len) @@ -300,7 +300,7 @@ krb5_fcc_read_addr(context, id, addr) kret = krb5_fcc_read_int32(context, id, &int32); CHECK(kret); -#ifdef _WINDOWS +#if defined(_MSDOS) int32 &= VALID_INT_BITS; /* Gradient DCE does this wrong */ #else if ((int32 & VALID_INT_BITS) != int32) /* Overflow int??? */ @@ -483,7 +483,7 @@ krb5_fcc_read_authdatum(context, id, a) a->ad_type = (krb5_authdatatype)ui2; kret = krb5_fcc_read_int32(context, id, &int32); CHECK(kret); -#ifdef _WINDOWS +#ifdef _MSDOS int32 &= VALID_INT_BITS; #else if ((int32 & VALID_INT_BITS) != int32) /* Overflow int??? */ -- 2.26.2