Converted the krb5/krb directory to work under windows. Mostly added the
authorKeith Vetter <keithv@fusion.com>
Mon, 27 Feb 1995 21:32:03 +0000 (21:32 +0000)
committerKeith Vetter <keithv@fusion.com>
Mon, 27 Feb 1995 21:32:03 +0000 (21:32 +0000)
windows INTERFACE keyword to functions.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5002 dc483132-0cff-0310-8789-dd5450dbe970

70 files changed:
src/include/krb5/ChangeLog
src/include/krb5/config.h
src/include/krb5/func-proto.h
src/include/krb5/preauth.h
src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/Makefile.in
src/lib/krb5/krb/addr_comp.c
src/lib/krb5/krb/addr_order.c
src/lib/krb5/krb/addr_srch.c
src/lib/krb5/krb/bld_pr_ext.c
src/lib/krb5/krb/bld_princ.c
src/lib/krb5/krb/chk_trans.c
src/lib/krb5/krb/compat_recv.c
src/lib/krb5/krb/conv_princ.c
src/lib/krb5/krb/copy_addrs.c
src/lib/krb5/krb/copy_athctr.c
src/lib/krb5/krb/copy_auth.c
src/lib/krb5/krb/copy_cksum.c
src/lib/krb5/krb/copy_creds.c
src/lib/krb5/krb/copy_data.c
src/lib/krb5/krb/copy_key.c
src/lib/krb5/krb/copy_princ.c
src/lib/krb5/krb/copy_tick.c
src/lib/krb5/krb/cp_key_cnt.c
src/lib/krb5/krb/decode_kdc.c
src/lib/krb5/krb/decrypt_tk.c
src/lib/krb5/krb/encode_kdc.c
src/lib/krb5/krb/encrypt_tk.c
src/lib/krb5/krb/faddr_ordr.c
src/lib/krb5/krb/free_rtree.c
src/lib/krb5/krb/gc_2tgt.c
src/lib/krb5/krb/gc_frm_kdc.c
src/lib/krb5/krb/gc_via_tgt.c
src/lib/krb5/krb/gen_seqnum.c
src/lib/krb5/krb/gen_subkey.c
src/lib/krb5/krb/get_creds.c
src/lib/krb5/krb/get_fcreds.c
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/in_tkt_ktb.c
src/lib/krb5/krb/in_tkt_pwd.c
src/lib/krb5/krb/in_tkt_sky.c
src/lib/krb5/krb/init_ctx.c
src/lib/krb5/krb/int-proto.h
src/lib/krb5/krb/kdc_rep_dc.c
src/lib/krb5/krb/mk_cred.c
src/lib/krb5/krb/mk_error.c
src/lib/krb5/krb/mk_priv.c
src/lib/krb5/krb/mk_rep.c
src/lib/krb5/krb/mk_req.c
src/lib/krb5/krb/mk_req_ext.c
src/lib/krb5/krb/mk_safe.c
src/lib/krb5/krb/parse.c
src/lib/krb5/krb/pr_to_salt.c
src/lib/krb5/krb/preauth.c
src/lib/krb5/krb/princ_comp.c
src/lib/krb5/krb/rd_cred.c
src/lib/krb5/krb/rd_error.c
src/lib/krb5/krb/rd_priv.c
src/lib/krb5/krb/rd_rep.c
src/lib/krb5/krb/rd_req.c
src/lib/krb5/krb/rd_req_dec.c
src/lib/krb5/krb/rd_req_sim.c
src/lib/krb5/krb/rd_safe.c
src/lib/krb5/krb/recvauth.c
src/lib/krb5/krb/send_tgs.c
src/lib/krb5/krb/sendauth.c
src/lib/krb5/krb/srv_rcache.c
src/lib/krb5/krb/tgtname.c
src/lib/krb5/krb/unparse.c
src/lib/krb5/krb/walk_rtree.c

index 865c2b82f6c245c18000cd6ec8ae7d901917267a..92bb602de99bfadaf733724ef6270e376602a791 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 27 11:35:49 1995 Keith Vetter (keithv@fusion.com)
+
+        * config.h: added windows interface keyword for varargs functions,
+           added defines to allows <windows.h> to be stdc compliant.
+       * func-proto.h: added windows INTERFACE_C keyword for functions
+           with varargs, and fixed const in prototype for krb5_send_tgs.
+        * preauth.h: added windows INTERFACE keyword to prototypes
+
 Wed Feb 22 17:39:46 1995 Chris Provenzano (proven@mit.edu)
 
        * func-proto.h (krb5_get_credentials(), krb5_get_cred_from_kdc(),
index 0394339699de9f651001009d79e14c7dab2c50cc..3f03ddae8c68dba1ade8df3a0bc9cb35cf3351d7 100644 (file)
@@ -55,10 +55,21 @@ typedef unsigned char u_char;
 #endif 
 
 #ifndef INTERFACE
-#define INTERFACE __far __export __pascal
+#define INTERFACE   __far __export __pascal
+#define INTERFACE_C __far __export __cdecl
 #endif
 #define FAR __far
 
+/*
+ * The following defines are needed to make <windows.h> work
+ * in stdc mode (/Za flag). Winsock.h needs <windows.h>.
+ */
+#define _far    __far
+#define _near   __near
+#define _pascal __pascal
+#define _cdecl  __cdecl
+#define _huge   __huge
+
 #else          /* Rest of include file is for non-Microloss-Windows */
 
 #ifndef KRB5_AUTOCONF__
@@ -116,7 +127,9 @@ typedef unsigned char u_char;
  * just define it as NULL.
  */
 #define INTERFACE
+#define INTERFACE_C
 #define FAR
+#define labs(x) abs(x)
 
 #endif /* __windows__ */
 
index 92c7f2cec9418ea3f772f49f9a5d52632e848d4d..038b458a300ca02d6c01040f853a69b4b1f11c5c 100644 (file)
@@ -235,13 +235,13 @@ krb5_error_code INTERFACE krb5_generate_seq_number
 krb5_error_code INTERFACE krb5_get_server_rcache
        PROTOTYPE((krb5_context,
                   const krb5_data *, krb5_rcache *));
-krb5_error_code krb5_build_principal_ext
+krb5_error_code INTERFACE_C krb5_build_principal_ext
        STDARG_P((krb5_context, krb5_principal *, int, const char *, ...));
-krb5_error_code krb5_build_principal
+krb5_error_code INTERFACE_C krb5_build_principal
        STDARG_P((krb5_context, krb5_principal *, int, const char *, ...));
 #ifdef va_start
 /* XXX depending on varargs include file defining va_start... */
-krb5_error_code krb5_build_principal_va
+krb5_error_code INTERFACE_C krb5_build_principal_va
        PROTOTYPE((krb5_context,
                   krb5_principal *, int, const char *, va_list));
 #endif
@@ -439,7 +439,7 @@ krb5_error_code INTERFACE krb5_send_tgs
                   const krb5_cksumtype,
                   krb5_const_principal,
                   krb5_address * const *,
-                  krb5_authdata * const *,
+                  const krb5_authdata **,
                   krb5_pa_data * const *,
                   const krb5_data *,
                   krb5_creds *,
@@ -451,13 +451,13 @@ krb5_error_code INTERFACE krb5_get_in_tkt
                   krb5_address * const *,
                   krb5_enctype *,
                   krb5_preauthtype *,
-                  krb5_error_code (* )(krb5_context,
+                  krb5_error_code (INTERFACE * )(krb5_context,
                                        const krb5_keytype,
                                         krb5_data *,
                                         krb5_const_pointer,
                                         krb5_keyblock **),
                   krb5_const_pointer,
-                  krb5_error_code (* )(krb5_context,
+                  krb5_error_code (INTERFACE * )(krb5_context,
                                        const krb5_keyblock *,
                                        krb5_const_pointer,
                                        krb5_kdc_rep * ),
index a22e196b8f48eea6be0ba1ed222b17bd5b415de2..3a16ee5cca3063e2cb736829c789d09be3718fd1 100644 (file)
 /*
  * Note: these typedefs are subject to change.... [tytso:19920903.1609EDT]
  */
-typedef krb5_error_code (krb5_preauth_obtain_proc)
+typedef krb5_error_code (INTERFACE krb5_preauth_obtain_proc)
     PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
               krb5_pa_data *pa_data));
 
-typedef krb5_error_code (krb5_preauth_verify_proc)
+typedef krb5_error_code (INTERFACE krb5_preauth_verify_proc)
     PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
               krb5_data *data));
 
@@ -67,19 +67,19 @@ krb5_error_code verify_random_padata
               krb5_data *data));
 #endif
 
-krb5_error_code get_unixtime_padata
+krb5_error_code INTERFACE get_unixtime_padata
     PROTOTYPE((krb5_context, krb5_principal client, 
               krb5_address **src_addr, krb5_pa_data *data));
 
-krb5_error_code verify_unixtime_padata
+krb5_error_code INTERFACE verify_unixtime_padata
     PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
               krb5_data *data));
 
-krb5_error_code get_securid_padata
+krb5_error_code INTERFACE get_securid_padata
     PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
               krb5_pa_data *data));
 
-krb5_error_code verify_securid_padata
+krb5_error_code INTERFACE verify_securid_padata
     PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
               krb5_data *data));
 
index 8223b84a9a09e3654f11bafd6032380be19ccac2..a6c9e65a7dc9b346ffa5b0c06d4f78ae99a3cc95 100644 (file)
@@ -1,45 +1,18 @@
+Wed Feb 22 17:14:31 1995 Keith Vetter (keithv@fusion.com)
+
+       * walk_rtr.c (krb5_walk_realm_tree): formal parameter wasn't declared.
+        * send_tgs.c: const in wrong place in the prototype.
+        * get_in_tkt.c, preauth.c, rd_cred.c, rd_priv.c, rd_req_dec.c, 
+           rd_safe.c: needed a 32 bit abs() function.
+        * parse.c: removed call to fprintf on error the windows version
+        * send_auth.c: defined for windows the ECONNABORTED errno (will
+           be removed when the socket layer is fully implemented).
+
 Tue Feb 21 23:38:34 1995  Theodore Y. Ts'o  (tytso@dcl)
 
        * mk_cred.c (krb5_mk_cred): Fix argument type to
                krb5_free_cred_enc_part().
 
-Thu Feb 16 00:22:03 1995 Chris Provenzano  (proven@mit.edu)
-
-       * send_tgs.c (krb5_send_tgs()) Added check for a valid krb5_creds * arg.
-
-       * mk_req_ext.c (krb5_mk_req_extended()) Require caller to pass in a
-               valid krb5_creds * arg, and removed kdc_options krb5_flags
-               and krb5_ccache from arg list.
-       * send_tgs.c (krb5_send_tgs())
-       * sendauth.c (krb5_sendauth())
-               Fix calls to krb5_mk_req_extended()
-
-       * gc_frm_kdc.c (krb5_get_cred_from_kdc()) Changed krb5_creds * in/out
-               arg to be an in only arg and added krb5_creds ** out arg.
-               
-       * gc_via_tgt.c (krb5_get_cred_via_tgt()) Changed krb5_creds * in/out
-               arg to be an in only arg and added krb5_creds ** out arg.
-
-       * gc_2tgt.c (krb5_get_cred_via_2tgt()) Changed krb5_creds * in/out
-               arg to be an in only arg and added krb5_creds ** out arg.
-
-       * int-proto.h Updated prototypes for krb5_get_cred_via_tgt() and
-               krb5_get_cred_via_2tgt().
-
-       * get_creds.c (krb5_get_credentials()) Changed krb5_creds * in/out
-               arg to be an in only arg and added krb5_creds ** out arg.
-       * sendauth.c (krb5_sendauth())
-               Routines that also require krb5_creds * in/out arg to be 
-               appropriately changed because krb5_get_credentials() changed.
-       * gc_frm_kdc.c (krb5_get_cred_from_kdc())
-       * get_fcreds.c (krb5_get_for_creds())
-       * mk_req.c (krb5_mk_req())
-               Other routines that needed adjusting because 
-               krb5_get_credentials() changed but didn't need an API change.
-
-       * int-proto.h Don't prototype krb5_get_cred_via_tgt() twice. Use the
-               second to prototype krb5_get_cred_via_2tgt().
-
 Mon Feb 13 20:25:20 1995  Theodore Y. Ts'o  (tytso@dcl)
 
        * get_in_tkt.c (krb5_get_in_tkt): Fix memory leak --- the default
index 64aab2a812d4289416e6a6eb27fe9bb10f81f3c4..7ac5d079f48791017bc7427ddc34f62f960f50c2 100644 (file)
@@ -1,74 +1,74 @@
 CFLAGS = $(CCOPTS) $(DEFS)
 LDFLAGS = -g
 
-all:: $(OBJS)
-
+##DOSBUILDTOP = ..\..\..
+##DOSLIBNAME=..\libkrb5.lib
+##DOS!include $(BUILDTOP)\config\windows.in
 
-
-OBJS=  addr_comp.o     \
-       addr_order.o    \
-       addr_srch.o     \
-       bld_pr_ext.o    \
-       bld_princ.o     \
-       chk_trans.o     \
-       compat_recv.o   \
-       conv_princ.o    \
-       copy_addrs.o    \
-       copy_auth.o     \
-       copy_athctr.o   \
-       copy_cksum.o    \
-       copy_creds.o    \
-       copy_data.o     \
-       copy_key.o      \
-       copy_princ.o    \
-       copy_tick.o     \
-       cp_key_cnt.o    \
-       decode_kdc.o    \
-       decrypt_tk.o    \
-       encode_kdc.o    \
-       encrypt_tk.o    \
-       free_rtree.o    \
-       faddr_ordr.o    \
-       gc_frm_kdc.o    \
-       gc_via_tgt.o    \
-       gc_2tgt.o       \
-       gen_seqnum.o    \
-       gen_subkey.o    \
-       get_creds.o     \
-       get_fcreds.o    \
-       get_in_tkt.o    \
-       in_tkt_ktb.o    \
-       in_tkt_pwd.o    \
-       in_tkt_sky.o    \
-       init_ctx.o      \
-       kdc_rep_dc.o    \
-       krbconfig.o     \
-       mk_cred.o       \
-       mk_error.o      \
-       mk_priv.o       \
-       mk_rep.o        \
-       mk_req.o        \
-       mk_req_ext.o    \
-       mk_safe.o       \
-       parse.o         \
-       pr_to_salt.o    \
-       preauth.o       \
-       princ_comp.o    \
-       rd_cred.o       \
-       rd_error.o      \
-       rd_priv.o       \
-       rd_rep.o        \
-       rd_req.o        \
-       rd_req_sim.o    \
-       rd_req_dec.o    \
-       rd_safe.o       \
-       recvauth.o      \
-       sendauth.o      \
-       send_tgs.o      \
-       srv_rcache.o    \
-       tgtname.o       \
-       unparse.o       \
-       walk_rtree.o
+OBJS=  addr_comp.$(OBJEXT)     \
+       addr_order.$(OBJEXT)    \
+       addr_srch.$(OBJEXT)     \
+       bld_pr_ext.$(OBJEXT)    \
+       bld_princ.$(OBJEXT)     \
+       chk_trans.$(OBJEXT)     \
+       compat_recv.$(OBJEXT)   \
+       conv_princ.$(OBJEXT)    \
+       copy_addrs.$(OBJEXT)    \
+       copy_auth.$(OBJEXT)     \
+       copy_athctr.$(OBJEXT)   \
+       copy_cksum.$(OBJEXT)    \
+       copy_creds.$(OBJEXT)    \
+       copy_data.$(OBJEXT)     \
+       copy_key.$(OBJEXT)      \
+       copy_princ.$(OBJEXT)    \
+       copy_tick.$(OBJEXT)     \
+       cp_key_cnt.$(OBJEXT)    \
+       decode_kdc.$(OBJEXT)    \
+       decrypt_tk.$(OBJEXT)    \
+       encode_kdc.$(OBJEXT)    \
+       encrypt_tk.$(OBJEXT)    \
+       free_rtree.$(OBJEXT)    \
+       faddr_ordr.$(OBJEXT)    \
+       gc_frm_kdc.$(OBJEXT)    \
+       gc_via_tgt.$(OBJEXT)    \
+       gc_2tgt.$(OBJEXT)       \
+       gen_seqnum.$(OBJEXT)    \
+       gen_subkey.$(OBJEXT)    \
+       get_creds.$(OBJEXT)     \
+       get_fcreds.$(OBJEXT)    \
+       get_in_tkt.$(OBJEXT)    \
+       in_tkt_ktb.$(OBJEXT)    \
+       in_tkt_pwd.$(OBJEXT)    \
+       in_tkt_sky.$(OBJEXT)    \
+       init_ctx.$(OBJEXT)      \
+       kdc_rep_dc.$(OBJEXT)    \
+       krbconfig.$(OBJEXT)     \
+       mk_cred.$(OBJEXT)       \
+       mk_error.$(OBJEXT)      \
+       mk_priv.$(OBJEXT)       \
+       mk_rep.$(OBJEXT)        \
+       mk_req.$(OBJEXT)        \
+       mk_req_ext.$(OBJEXT)    \
+       mk_safe.$(OBJEXT)       \
+       parse.$(OBJEXT)         \
+       pr_to_salt.$(OBJEXT)    \
+       preauth.$(OBJEXT)       \
+       princ_comp.$(OBJEXT)    \
+       rd_cred.$(OBJEXT)       \
+       rd_error.$(OBJEXT)      \
+       rd_priv.$(OBJEXT)       \
+       rd_rep.$(OBJEXT)        \
+       rd_req.$(OBJEXT)        \
+       rd_req_sim.$(OBJEXT)    \
+       rd_req_dec.$(OBJEXT)    \
+       rd_safe.$(OBJEXT)       \
+       recvauth.$(OBJEXT)      \
+       sendauth.$(OBJEXT)      \
+       send_tgs.$(OBJEXT)      \
+       srv_rcache.$(OBJEXT)    \
+       tgtname.$(OBJEXT)       \
+       unparse.$(OBJEXT)       \
+       walk_rtree.$(OBJEXT)
 
 SRCS=  $(srcdir)/addr_comp.c   \
        $(srcdir)/addr_order.c  \
@@ -135,6 +135,8 @@ SRCS=       $(srcdir)/addr_comp.c   \
        $(srcdir)/unparse.c     \
        $(srcdir)/walk_rtree.c
 
+all:: $(OBJS)
+
 COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
 
 T_WALK_RTREE_OBJS= t_walk_rtree.o walk_rtree.o tgtname.o unparse.o \
@@ -145,7 +147,11 @@ t_walk_rtree: $(T_WALK_RTREE_OBJS)
 
 TEST_PROGS= t_walk_rtree
 
-check:: $(TEST_PROGS)
+check:: check-$(WHAT)
+
+check-unix:: $(TEST_PROGS)
+
+check-windows::
 
 clean::
-       $(RM) t_walk_rtree t_walk_rtree.o
+       $(RM) t_walk_rtree$(EXEEXT) t_walk_rtree.$(OBJEXT)
index 211648f29d7fbbf317c4d7cf729db800167d2770..76d8e91baf53f08bbc71fb2c1080ab7474818da1 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * If the two addresses are the same, return TRUE, else return FALSE
  */
-krb5_boolean
+krb5_boolean INTERFACE
 krb5_address_compare(context, addr1, addr2)
     krb5_context context;
     const krb5_address *addr1;
index 6d9f3466951ce1d0593ff2034db3b900535e4b5d..185f73f5193e66984ee8c06f962806d5246309da 100644 (file)
@@ -36,7 +36,7 @@
  * Return an ordering on two addresses:  0 if the same,
  * < 0 if first is less than 2nd, > 0 if first is greater than 2nd.
  */
-int
+int INTERFACE
 krb5_address_order(context, addr1, addr2)
     krb5_context context;
     register const krb5_address *addr1;
index cc9189f012ebd04e85c71627fc08af6172ac9964..1988d08c19bab516660e91d289d5fed4e5bc1ca7 100644 (file)
@@ -31,7 +31,7 @@
  * if addr is listed in addrlist, or addrlist is null, return TRUE.
  * if not listed, return FALSE
  */
-krb5_boolean
+krb5_boolean INTERFACE
 krb5_address_search(context, addr, addrlist)
     krb5_context context;
     const krb5_address *addr;
index 5d11e2b1924ffd62d36337a6f34b4faa01f976ec..753bbb7c7d02865f4ce89c46bfceeecc9858d6fc 100644 (file)
@@ -34,7 +34,7 @@
 #include <varargs.h>
 #endif
 
-krb5_error_code
+krb5_error_code INTERFACE_C
 #if __STDC__ || defined(STDARG_PROTOTYPES)
 krb5_build_principal_ext(krb5_context context,  krb5_principal * princ, int rlen, const char * realm, ...)
 #else
index 94dbb723d6cb1fe9d27a8b600bbe0e7b21f4010d..b82c43a037346a01fd1aef830139cd04f7e82964 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <krb5/ext-proto.h>
 
-krb5_error_code
+krb5_error_code INTERFACE_C
 krb5_build_principal_va(context, princ, rlen, realm, ap)
     krb5_context context;
     krb5_principal princ;
@@ -99,7 +99,7 @@ krb5_build_principal_va(context, princ, rlen, realm, ap)
     return 0;
 }
 
-krb5_error_code
+krb5_error_code INTERFACE_C
 #if __STDC__ || defined(STDARG_PROTOTYPES)
 krb5_build_principal(krb5_context context,  krb5_principal * princ, int rlen,
     const char * realm, ...)
index 9b2d5b9cd0653b3eb01e84fa6754ce459f4448dd..b3264318f3034b2a06f1f007f9112f3f5cb40941 100644 (file)
@@ -25,7 +25,8 @@
 
 #define MAX_REALM_LN 500
 
-krb5_error_code krb5_check_transited_list(context, trans, realm1, realm2)
+krb5_error_code INTERFACE
+krb5_check_transited_list(context, trans, realm1, realm2)
     krb5_context context;
 krb5_data      *trans;
 krb5_data      *realm1;
index e0276b3cc4f94f4be828c778e4c3e67fb7a6bae9..9e986c002563a812c06816a57b0f8601dd6712a9 100644 (file)
@@ -35,6 +35,7 @@
 
 
 #include <krb5/krb5.h>
+#ifndef _MSDOS
 #include <krb5/osconf.h>
 #include <krb5/kdb.h>
 #include <krb5/kdb_dbm.h>
@@ -314,3 +315,4 @@ mutual_fail:
     return(rem);
 }
 #endif
+#endif
index 2ed3ccf0381607c1b496e1c54334cdae51cf5013..001308041955e2ab740044aa297b5c15ca5fe0e1 100644 (file)
@@ -99,7 +99,8 @@ static char *strnchr(s, c, n)
 /* XXX This calls for a new error code */
 #define KRB5_INVALID_PRINCIPAL KRB5_LNAME_BADFORMAT
 
-krb5_error_code krb5_524_conv_principal(context, princ, name, inst, realm)
+krb5_error_code INTERFACE
+krb5_524_conv_principal(context, princ, name, inst, realm)
     krb5_context context;
     const krb5_principal princ;
     char *name;
@@ -166,7 +167,8 @@ krb5_error_code krb5_524_conv_principal(context, princ, name, inst, realm)
      return 0;
 }
 
-krb5_error_code krb5_425_conv_principal(context, name, instance, realm, princ)
+krb5_error_code INTERFACE
+krb5_425_conv_principal(context, name, instance, realm, princ)
    krb5_context context;
    const char  *name;
    const char  *instance;
index 1bb0ba6829954167a641c1d825ac179079ed0659..ad21082b39fbe55f6ce1236e085284d27b6c656f 100644 (file)
@@ -52,7 +52,7 @@ krb5_address **outad;
 /*
  * Copy an address array, with fresh allocation.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_addresses(context, inaddr, outaddr)
     krb5_context context;
     krb5_address * const * inaddr;
@@ -90,7 +90,7 @@ krb5_copy_addresses(context, inaddr, outaddr)
  * Note that this function may change the value of *outaddr even if it
  * returns failure, but it will not change the contents of the list.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_append_addresses(context, inaddr, outaddr)
     krb5_context context;
        krb5_address * const * inaddr;
index 82bb8d79fda09c533ace16bbaf010d0e8afa14c8..c303af5c8bccf149a35f96569cdf81407ec0c6dd 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <krb5/ext-proto.h>
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_authenticator(context, authfrom, authto)
     krb5_context context;
 const krb5_authenticator *authfrom;
index 830af3a8a1f318575a87159e67ed5f953a8be3a4..62b0b610e0afa1054f57d3cdcf933631b8bd5929 100644 (file)
@@ -52,7 +52,7 @@ krb5_authdata **outad;
 /*
  * Copy an authdata array, with fresh allocation.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_authdata(context, inauthdat, outauthdat)
     krb5_context context;
 krb5_authdata * const * inauthdat;
index cf04f48408eaaeb70251b5238fd2853eb7b80197..0e1a25082ccd7c4af4c111c46fe7b0830be810bd 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <krb5/ext-proto.h>
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_checksum(context, ckfrom, ckto)
     krb5_context context;
     const krb5_checksum *ckfrom;
index 5c14be0754db5022b30ebe1e81c8862da4207681..7ac47cc98b64fe8216f3206fed2a4d148dbf4193 100644 (file)
@@ -33,7 +33,7 @@
  * Copy credentials, allocating fresh storage where needed.
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_creds(context, incred, outcred)
     krb5_context context;
     const krb5_creds *incred;
index 669ed3e8a9a4b35d4a875d8d69b6b832815c0faf..97010673d244c02a5719e0a5c15e30fa4c12eec5 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * Copy a data structure, with fresh allocation.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_data(context, indata, outdata)
     krb5_context context;
     const krb5_data *indata;
index 305d80d4057b0e015a33094322ab33f5e927bce9..f714d86d86e81aad5870c0905120e823d0b31b8d 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * Copy a keyblock, including alloc'ed storage.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_keyblock(context, from, to)
     krb5_context context;
     const krb5_keyblock *from;
index 4ccfa2568cf878f89ba13c88f612e5e478306ae9..11dee84f4e39d3c7af6583b9dbb03c70dbf1ab09 100644 (file)
@@ -32,7 +32,7 @@
 /*
  * Copy a principal structure, with fresh allocation.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_principal(context, inprinc, outprinc)
     krb5_context context;
     krb5_const_principal inprinc;
index c4d512b84b1a5a4272a81c740a82df40a1df3023..7ee83f08a55cbec2deec278b829ad50826d57361 100644 (file)
@@ -94,7 +94,7 @@ krb5_copy_enc_tkt_part(context, partfrom, partto)
     return 0;
 }
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_ticket(context, from, pto)
     krb5_context context;
     const krb5_ticket *from;
index 6b4db985d92eacc01837494d785b29fbf6e4a99c..541562bd83368cafa7ba8373d135f818e2fed1bd 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * Copy a keyblock, including alloc'ed storage.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_copy_keyblock_contents(context, from, to)
     krb5_context context;
     const krb5_keyblock *from;
index dc24be99af9ee1e86a7c0eb0efab64dd71d609c8..a611ea378bedc0b5a7692b9ed045bb1c4e4db52b 100644 (file)
@@ -44,7 +44,7 @@
  returns errors from encryption routines, system errors
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_decode_kdc_rep(context, enc_rep, key, etype, dec_rep)
     krb5_context context;
     krb5_data * enc_rep;
index cd93328067eedb5ca06ed9980f0289a583922843..9a31a0b00139c7f6627d0dcadbba71483e31a47d 100644 (file)
@@ -40,7 +40,7 @@
 
 */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_decrypt_tkt_part(context, srv_key, ticket)
     krb5_context context;
     const krb5_keyblock *srv_key;
index 0918c2c7c365fae53c4074f30b83516be797a825..6550cb4cab45c6da51ca5109ba0ecd85568945b9 100644 (file)
@@ -43,7 +43,7 @@
 */
 /* due to argument promotion rules, we need to use the DECLARG/OLDDECLARG
    stuff... */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_encode_kdc_rep(context, type, encpart, eblock, client_key, dec_rep, enc_rep)
     krb5_context context;
     const krb5_msgtype type;
index 80095b4b45a7fa4dc3ec0a84a34b4d25ddbbc4ac..a363cac48406a74ae063d4db038a912d7b243c20 100644 (file)
@@ -43,7 +43,7 @@
  enc_part->ciphertext.data allocated & filled in with encrypted stuff
 */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_encrypt_tkt_part(context, eblock, srv_key, dec_ticket)
     krb5_context context;
     krb5_encrypt_block *eblock;
index e6870d9bb34c9d7cf81aab7ab553e19450f45eb3..f0f10938112da45075be93ba2cb89b4680d2cfa6 100644 (file)
@@ -36,7 +36,7 @@
  * Return an ordering on the two full addresses:  0 if the same,
  * < 0 if first is less than 2nd, > 0 if first is greater than 2nd.
  */
-int
+int INTERFACE
 krb5_fulladdr_order(context, addr1, addr2)
     krb5_context context;
     register const krb5_fulladdr *addr1;
index fca10b034a7fc1e6a206117b8d66f7492c7ad094..7206bc3149fd648f2f4fc219b975dbca54671a44 100644 (file)
@@ -28,7 +28,7 @@
 #include <krb5/krb5.h>
 #include <krb5/ext-proto.h>
 
-void
+void INTERFACE
 krb5_free_realm_tree(context, realms)
     krb5_context context;
     krb5_principal *realms;
index 7503ee76fcd462118a29b780f3cc351b0481b92e..88f493a9f70560dc44744cf1e7dbff2362d59a21 100644 (file)
@@ -31,7 +31,7 @@
 #include <krb5/ext-proto.h>
 #include "int-proto.h"
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_cred_via_2tgt (context, tgt, kdcoptions, sumtype, in_cred, out_cred)
     krb5_context context;
     krb5_creds *tgt;
index 865d0739563e8a1a549d8db2163bca5140026f66..72a4578431387d092ffe7eb04b5a5e09eafeda4e 100644 (file)
@@ -65,7 +65,8 @@ extern krb5_cksumtype krb5_kdc_req_sumtype;
 #define TGT_ETYPE \
       krb5_keytype_array[tgt.keyblock.keytype]->system->proto_enctype;
 
-krb5_error_code krb5_get_cred_from_kdc(context, ccache, in_cred, out_cred, tgts)
+krb5_error_code INTERFACE
+krb5_get_cred_from_kdc(context, ccache, in_cred, out_cred, tgts)
     krb5_context context;
     krb5_ccache ccache;
     krb5_creds  *in_cred;
index 620a50db261be6370d884dc19ce5d896dd8efa45..11d4dfa543246c4d9586db084cc1f9a36ecdba11 100644 (file)
@@ -33,7 +33,7 @@
 #include <krb5/ext-proto.h>
 #include "int-proto.h"
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_cred_via_tgt (context, tgt, kdcoptions, sumtype, in_cred, out_cred)
     krb5_context context;
     krb5_creds * tgt;
index f5ead423acc28120c6425b7bba0437e0fccc9716..c8d702bc58aca2733d64cdb905012a88482fda76 100644 (file)
@@ -35,7 +35,7 @@
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_generate_seq_number(context, key, seqno)
     krb5_context context;
     const krb5_keyblock *key;
index 68425b2c98e5ec37a2a6ab062852581e217dff10..763c909a56c00d18fdefef8ab100fe3cf5c19306 100644 (file)
@@ -28,7 +28,7 @@
 #include <krb5/krb5.h>
 #include <krb5/ext-proto.h>
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_generate_subkey(context, key, subkey)
     krb5_context context;
     const krb5_keyblock *key;
index 14f44b2333193953a3ae4a542d5c19b5be9bdce5..a6c08fe533f68d752e21523a4bf11fa89d6d6b72 100644 (file)
@@ -43,7 +43,7 @@
 #include <krb5/krb5.h>
 #include <krb5/ext-proto.h>
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_credentials(context, options, ccache, in_creds, out_creds)
     krb5_context context;
     const krb5_flags options;
index b5fea089dd9295ab7230b22aeea970f4a230e438..3a88e77c98e8b26fb9c282c5788eea35fe0908c6 100644 (file)
@@ -31,6 +31,7 @@
 /* libkrb5.a to allow widespread use */ 
 
 #include <stdio.h>
+#ifndef _MSDOS
 #include <pwd.h>
 #include <netdb.h>
 
@@ -44,7 +45,7 @@
 #define flags2options(flags) (flags & KDC_TKT_COMMON_MASK)
 
 /* Get a TGT for use at the remote host */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_for_creds(context, sumtype, rhost, client, enc_key, 
                   forwardable, outbuf)
     krb5_context context;
@@ -226,4 +227,4 @@ errout:
        krb5_free_kdc_rep(context, dec_rep); 
     return retval;
 }
-
+#endif
index 0e72579da24c142d3f3732609b2d989ef00b5fd6..6b4762253daf1ebf2a40958014de4d10678a1609 100644 (file)
 
 
 extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-request.nonce) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-request.nonce) < krb5_clockskew)
 
 /* some typedef's for the function args to make things look a bit cleaner */
 
-typedef krb5_error_code (*git_key_proc) PROTOTYPE((krb5_context,
+typedef krb5_error_code (INTERFACE *git_key_proc) PROTOTYPE((krb5_context,
                                                   const krb5_keytype,
                                                   krb5_data *,
                                                   krb5_const_pointer,
                                                   krb5_keyblock **));
 
-typedef krb5_error_code (*git_decrypt_proc) PROTOTYPE((krb5_context,
+typedef krb5_error_code (INTERFACE *git_decrypt_proc) PROTOTYPE((krb5_context,
                                                       const krb5_keyblock *,
                                                       krb5_const_pointer,
                                                       krb5_kdc_rep * ));
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_in_tkt(context, options, addrs, etypes, ptypes, key_proc, keyseed,
                decrypt_proc, decryptarg, creds, ccache, ret_as_reply)
     krb5_context context;
index 47fd8a9d6b5da0e9c8d20a6f7a26d6580fca2231..20df47c194809340d222bee90e9a01c1daa7392c 100644 (file)
@@ -38,7 +38,15 @@ struct keytab_keyproc_arg {
  * "keyseed" is actually a krb5_keytab, or NULL if we should fetch
  * from system area.
  */
-static keytab_keyproc(context, type, salt, keyseed, key)
+krb5_error_code INTERFACE keytab_keyproc
+    PROTOTYPE((krb5_context,
+               const krb5_keytype,
+               krb5_data *,
+               krb5_const_pointer,
+               krb5_keyblock **));
+
+krb5_error_code INTERFACE
+keytab_keyproc(context, type, salt, keyseed, key)
     krb5_context context;
     const krb5_keytype type;
     krb5_data * salt;
@@ -100,7 +108,7 @@ static keytab_keyproc(context, type, salt, keyseed, key)
  returns system errors, encryption errors
 
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_in_tkt_with_keytab(context, options, addrs, etypes, pre_auth_types, 
                            keytab, ccache, creds, ret_as_reply)
     krb5_context context;
index 1fb3b41ff6ac99882bfe40f2141bf2ab8bb0c7e3..02ea384d9ba49ff179a35602ca7f14f59dd348e4 100644 (file)
@@ -34,8 +34,14 @@ extern char *krb5_default_pwd_prompt1;
 /* 
  * key-producing procedure for use by krb5_get_in_tkt_with_password.
  */
-
-static krb5_error_code
+krb5_error_code INTERFACE pwd_keyproc
+    PROTOTYPE((krb5_context,
+               const krb5_keytype,
+               krb5_data *,
+               krb5_const_pointer,
+               krb5_keyblock **));
+
+krb5_error_code INTERFACE
 pwd_keyproc(context, type, salt, keyseed, key)
     krb5_context context;
     const krb5_keytype type;
@@ -93,7 +99,7 @@ pwd_keyproc(context, type, salt, keyseed, key)
 
  returns system errors, encryption errors
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_in_tkt_with_password(context, options, addrs, etypes, pre_auth_types, 
                              password, ccache, creds, ret_as_reply)
     krb5_context context;
index a0ccb151d0e055b2dc3bdb587f608812dea3e770..54c4a2b90ba5019b7efbb9a45e55c874e12700f6 100644 (file)
@@ -40,6 +40,14 @@ struct skey_keyproc_arg {
  * "keyseed" is actually a krb5_keyblock *, or NULL if we should fetch
  * from system area.
  */
+krb5_error_code INTERFACE skey_keyproc
+    PROTOTYPE((krb5_context,
+               const krb5_keytype,
+               krb5_data *,
+               krb5_const_pointer,
+               krb5_keyblock **));
+
+krb5_error_code INTERFACE
 skey_keyproc(context, type, salt, keyseed, key)
     krb5_context context;
     const krb5_keytype type;
@@ -92,7 +100,7 @@ skey_keyproc(context, type, salt, keyseed, key)
  returns system errors, encryption errors
 
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_in_tkt_with_skey(context, options, addrs, etypes, pre_auth_types, 
                          key, ccache, creds, ret_as_reply)
     krb5_context context;
index e3debf0d3ecb89ea720a103d11df01a0e0c0623b..50c6dacd6446bc4528e17d74b0d057663275a22c 100644 (file)
@@ -27,7 +27,7 @@
 #include <krb5/los-proto.h>
 #include <krb5/ext-proto.h>
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_init_context(context)
        krb5_context *context;
 {
@@ -57,7 +57,7 @@ cleanup:
        return retval;
 }
 
-void
+void INTERFACE
 krb5_free_context(ctx)
        krb5_context    ctx;
 {
@@ -73,7 +73,7 @@ krb5_free_context(ctx)
 /*
  * Set the desired default etypes, making sure they are valid.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_set_default_in_tkt_etypes(context, etypes)
        krb5_context context;
        const krb5_enctype *etypes;
@@ -112,7 +112,7 @@ krb5_set_default_in_tkt_etypes(context, etypes)
     return 0;
 }
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_default_in_tkt_etypes(context, etypes)
     krb5_context context;
     krb5_enctype **etypes;
@@ -124,7 +124,7 @@ krb5_get_default_in_tkt_etypes(context, etypes)
                                (context->etype_count + 1))) {
        memcpy(old_etypes, context->etypes, sizeof(krb5_enctype) * 
                                context->etype_count);
-       old_etypes[context->etype_count] = NULL;
+       old_etypes[context->etype_count] = 0;
     } else {
        return ENOMEM;
     }
index 0a08e39cdc866fe48255db31741327a881a1106f..e8dafaf00e5a1dd0b87739452da4257bef8a0adc 100644 (file)
 #ifndef KRB5_INT_FUNC_PROTO__
 #define KRB5_INT_FUNC_PROTO__
 
-krb5_error_code krb5_tgtname
+krb5_error_code INTERFACE krb5_tgtname
        PROTOTYPE((krb5_context context,
                   const krb5_data *,
                   const krb5_data *,
                   krb5_principal *));
-krb5_error_code krb5_get_cred_via_tgt
+krb5_error_code INTERFACE krb5_get_cred_via_tgt
        PROTOTYPE((krb5_context context,
                   krb5_creds *,
                   const krb5_flags,
                   const krb5_cksumtype,
                   krb5_creds *,
                   krb5_creds **));
-krb5_error_code krb5_get_cred_via_2tgt
+krb5_error_code INTERFACE krb5_get_cred_via_2tgt
        PROTOTYPE((krb5_context context,
                   krb5_creds *,
                   const krb5_flags,
index 569e08821b03073d23b1c535857f926453286881..f8cdc687738bbd1ec4892294e354a8f4073ae0b5 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 /*ARGSUSED*/
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_kdc_rep_decrypt_proc(context, key, decryptarg, dec_rep)
     krb5_context context;
     const krb5_keyblock * key;
index 211437f0bbf66e328e84e24465ae4542f99e1817..668c91f8d712b533f9fcfec5819e29b873afaaa3 100644 (file)
@@ -34,7 +34,7 @@
 #include <krb5/asn1.h>
 
 /* Create asn.1 encoded KRB-CRED message from the kdc reply. */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_cred(context, dec_rep, etype, key, sender_addr, recv_addr, outbuf)
     krb5_context context;
     krb5_kdc_rep *dec_rep;
index 5a92a16ecd5f5f1838d5810b0d4723b992ba9d3a..0d924aaa99298ec360da0696947879f2512374f5 100644 (file)
@@ -38,7 +38,7 @@
 
  returns system errors
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_error(context, dec_err, enc_err)
     krb5_context context;
     const krb5_error *dec_err;
index df762b27a62ec4da3497b7f5d7a2ddcb82cb5838..39832bb2c3669b2dd4abdf09f70d73fccc0510f0 100644 (file)
@@ -47,7 +47,7 @@
 
  returns system errors
 */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_priv(context, userdata, etype, key, sender_addr, recv_addr,
             seq_number, priv_flags, rcache, i_vector, outbuf)
     krb5_context context;
index 504d9ca4962398eb58c8e9237d28e09e07267f77..d76e042a448a228144d0b81498673a6b32ffc6e1 100644 (file)
@@ -45,7 +45,7 @@
  returns system errors
 */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_rep(context, repl, kblock, outbuf)
     krb5_context context;
     const krb5_ap_rep_enc_part *repl;
index 178b2dd29576a77b7a7d7fd30d11ab1d4bd5a15a..2bb89bc69f659f36b13652bae0c6d54bb4eed7c1 100644 (file)
@@ -50,7 +50,7 @@
 
 extern krb5_flags krb5_kdc_default_options;
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_req(context, server, ap_req_options, checksum, ccache, outbuf)
     krb5_context context;
     krb5_const_principal server;
index 9b5c060ec8e675adf541ada0a8fb003d3d138555..1f8c98eb66b02de42fe6279c16caae1102fbf16a 100644 (file)
@@ -72,7 +72,7 @@ krb5_generate_authenticator PROTOTYPE((krb5_context,
                                       const krb5_checksum *, krb5_keyblock *,
                                       krb5_int32, krb5_authdata ** ));
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_req_extended(context, ap_req_options, checksum, sequence, 
                     newkey, in_creds, authentp, outbuf)
     krb5_context context;
index e50d92477593ba9d81760c6443be75491ba36dbe..b5b691b98ea84b68e174457f7508faa2d73cd30b 100644 (file)
@@ -45,7 +45,7 @@
 
  returns system errors
 */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_mk_safe(context, userdata, sumtype, key, sender_addr, recv_addr,
             seq_number, safe_flags, rcache, outbuf)
     krb5_context context;
index fe051ae6836d3f37992900f9546b0feb7421e630..60aea42e5838c12bc1111f8375f89c0763b9667b 100644 (file)
@@ -64,7 +64,7 @@
  * May the fleas of a thousand camels infest the ISO, they who think
  * that arbitrarily large multi-component names are a Good Thing.....
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_parse_name(context, name, nprincipal)
        krb5_context context;
        const char      *name;
@@ -190,8 +190,10 @@ krb5_parse_name(context, name, nprincipal)
                else
                        krb5_princ_component(context, principal, i)->length = size;
                if (i + 1 != components) {
+                        #ifndef _WINDOWS
                        fprintf(stderr,
                                "Programming error in krb5_parse_name!");
+                        #endif
                        exit(1);
                }
        } else {
index f920621f0da341113994914a1f019dc3d3c7ccd5..2f7beb8da7e74c2d883dfeaf39b4f30618402aba 100644 (file)
@@ -32,7 +32,7 @@
 /*
  * Convert a krb5_principal into the default salt for that principal.
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_principal2salt_internal(context, pr, ret, use_realm)
     krb5_context context;
     register krb5_const_principal pr;
@@ -74,7 +74,7 @@ krb5_principal2salt_internal(context, pr, ret, use_realm)
     return 0;
 }
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_principal2salt(context, pr, ret)
     krb5_context context;
     register krb5_const_principal pr;
@@ -83,7 +83,7 @@ krb5_principal2salt(context, pr, ret)
        return krb5_principal2salt_internal(context, pr, ret, 1);
 }
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_principal2salt_norealm(context, pr, ret)
     krb5_context context;
     register krb5_const_principal pr;
index e03d24cedf092e02c3a9530c39f68ef7acf0707a..e4992a4ba08d0deff0b5a922d6be9df30a2b2f1c 100644 (file)
@@ -76,7 +76,7 @@ static krb5_error_code find_preauthenticator
  *
  *   Note: This is a first crack at what any preauthentication will need...
  */
-krb5_error_code 
+krb5_error_code INTERFACE
 krb5_obtain_padata(context, type, client, src_addr, encrypt_key, ret_data)
     krb5_context context;
     int type;                          /*IN:  Preauth type */
@@ -182,7 +182,7 @@ error_out:
  *   Note: This is a first crack at what any preauthentication will need...
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_verify_padata(context, data,client,src_addr, decrypt_key, req_id, flags)
     krb5_context context;
     krb5_pa_data *data;                 /*IN: padata */
@@ -307,7 +307,7 @@ find_preauthenticator(type, preauth)
  */
 int seeded = 0 ; /* Used by srand below */
 
-krb5_error_code
+krb5_error_code INTERFACE
 get_unixtime_padata(context, client, src_addr, pa_data)
     krb5_context context;
     krb5_principal client;
@@ -344,7 +344,7 @@ get_unixtime_padata(context, client, src_addr, pa_data)
     return(0);
 }
 
-krb5_error_code
+krb5_error_code INTERFACE
 verify_unixtime_padata(context, client, src_addr, data)
     krb5_context context;
     krb5_principal client;
@@ -355,7 +355,7 @@ verify_unixtime_padata(context, client, src_addr, data)
     krb5_error_code     retval;
     krb5_timestamp      currenttime, patime;
     extern krb5_deltat  krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
 
     tmp = (unsigned char *) data->data;
     if (tmp[8] != 0)
@@ -379,7 +379,7 @@ verify_unixtime_padata(context, client, src_addr, data)
 #include "sdcli.h"
 #include "sdconf.c"
 
-krb5_error_code
+krb5_error_code INTERFACE
 verify_securid_padata(client, src_addr, data)
     krb5_principal client;
     krb5_address **src_addr;
@@ -427,7 +427,7 @@ verify_securid_padata(client, src_addr, data)
     }
 }
 #else
-krb5_error_code
+krb5_error_code INTERFACE
 verify_securid_padata(context, client, src_addr, data)
     krb5_context context;
     krb5_principal client;
@@ -451,7 +451,7 @@ static char *krb5_SecureId_prompt = "\nEnter Your SecurId Access Code Prepended
  */
 static char *krb5_SecureId_prompt = "\nEnter Your SecurId Access Code Prepended with Your PIN\n (or a \'#\'if Your PIN is entered on the card keypad): ";
 
-krb5_error_code
+krb5_error_code INTERFACE
 get_securid_padata(context, client,src_addr,pa_data)
     krb5_context context;
     krb5_principal client;
index 7697707f38014e24eaa8a16a6537b05d056d1d5d..7000ed8f1754668264f3f4d2a57955f3871f5a2f 100644 (file)
@@ -29,7 +29,7 @@
 #include <krb5/krb5.h>
 #include <krb5/ext-proto.h>
 
-krb5_boolean
+krb5_boolean INTERFACE
 krb5_realm_compare(context, princ1, princ2)
     krb5_context context;
     krb5_const_principal princ1;
@@ -45,7 +45,7 @@ krb5_realm_compare(context, princ1, princ2)
     return TRUE;
 }
 
-krb5_boolean
+krb5_boolean INTERFACE
 krb5_principal_compare(context, princ1, princ2)
     krb5_context context;
     krb5_const_principal princ1;
index dd7b3a629c2043b8728e0b17ca70bedce97818b0..1316be8096663734755174b24a942d0e067897be 100644 (file)
 #include <krb5/asn1.h>
 
 extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
 
 /* Decode the KRB-CRED message, and return creds */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_cred(context, inbuf, key, creds, sender_addr, recv_addr)
     krb5_context context;
     const krb5_data *inbuf;
index c30310d94886d84c79ebad7758e08d768d635d78..29a3723707513a563c405d9826a335d591c8ad55 100644 (file)
@@ -41,7 +41,7 @@
  *  returns system errors
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_error(context,  enc_errbuf, dec_error)
     krb5_context context;
     const krb5_data *enc_errbuf;
index 08cda457e46bfa72f28cd38fedc3039b5c3f2317..199d46d9e00e91de49eccd58e7f8f7f63fa9a0d7 100644 (file)
@@ -32,7 +32,7 @@
 #include <krb5/ext-proto.h>
 
 extern krb5_deltat krb5_clockskew;   
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
 
 /*
 
@@ -55,7 +55,7 @@ Returns system errors, integrity errors.
 
 */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_priv(context, inbuf, key, sender_addr, recv_addr, seq_number,
             priv_flags, i_vector, rcache, outbuf)
     krb5_context context;
index 13a49c7409514b17af7ab6e34f115c82c577f36a..779fbad949ea3a810a8f0938de699463843dc97b 100644 (file)
@@ -41,7 +41,7 @@
  *  returns system errors, encryption errors, replay errors
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_rep(context, inbuf, kblock, repl)
     krb5_context context;
     const krb5_data *inbuf;
index 467f0e088cd808e7f45f791a4e9009b49d3438b9..97e5a38398c11de199400ae443b390ff4706bf87 100644 (file)
@@ -54,7 +54,7 @@
  *  returns system errors, encryption errors, replay errors
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_req(context, inbuf, server, sender_addr, fetchfrom, keyproc, 
            keyprocarg, rcache, authdat)
     krb5_context context;
index 21aee095632ad37a0b53c281b62d3a34222ac0f5..19631268cc4d5182607f2e579015dddf8a146811 100644 (file)
@@ -66,9 +66,9 @@ static krb5_error_code decrypt_authenticator
        PROTOTYPE((krb5_context, const krb5_ap_req *, krb5_authenticator **));
 
 extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_req_decoded(context, req, server, sender_addr, fetchfrom, keyproc,
                    keyprocarg, rcache, authdat)
     krb5_context context;
index 24a2515c78bb5752fe098121849e9b2dcd175ea1..f2db248f93fea9bc8aea58394f0e4b973c586966 100644 (file)
@@ -48,7 +48,7 @@
  *  returns system errors, encryption errors, replay errors
  */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_req_simple(context, inbuf, server, sender_addr, authdat)
     krb5_context context;
     const krb5_data *inbuf;
index 1844a6735efe15c0d15d8dd1382978f63f286876..2bdcdf4d166e920b6a016bc83a55d6058417a76f 100644 (file)
@@ -31,7 +31,7 @@
 #include <krb5/ext-proto.h>
 
 extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
 
 /*
  parses a KRB_SAFE message from inbuf, placing the integrity-protected user
@@ -46,7 +46,7 @@ extern krb5_deltat krb5_clockskew;
 
  returns system errors, integrity errors
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_rd_safe(context, inbuf, key, sender_addr, recv_addr, seq_number, 
             safe_flags, rcache, outbuf)
     krb5_context context;
index 3f682d36cc9915c39357e78d20497692de6df95a..2cd87c9cada1a7b50869e686e5fba54da89d80cf 100644 (file)
@@ -26,6 +26,7 @@
 
 
 #include <krb5/krb5.h>
+#ifndef _MSDOS
 #include <krb5/osconf.h>
 #include <krb5/kdb.h>
 #include <krb5/kdb_dbm.h>
@@ -42,7 +43,7 @@ extern krb5_flags     krb5_kdc_default_options;
 
 static char *sendauth_version = "KRB5_SENDAUTH_V1.0";
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_recvauth(context, 
              /* IN */
              fd, appl_version, server, sender_addr, fetch_from,
@@ -322,4 +323,4 @@ krb5_recvauth(context,
        return 0;
 }
 
-
+#endif
index a5e118d389cea6b13df137e3c4759885cc5a9e8e..8b2d8d47a872210592865d3fcf17ab7ff03b7409 100644 (file)
@@ -48,7 +48,7 @@
 
  returns system errors
  */
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_send_tgs(context, kdcoptions, timestruct, etypes, sumtype, sname, addrs,
              authorization_data, padata, second_ticket, in_cred, rep)
     krb5_context context;
@@ -58,7 +58,7 @@ krb5_send_tgs(context, kdcoptions, timestruct, etypes, sumtype, sname, addrs,
     const krb5_cksumtype sumtype;
     krb5_const_principal sname;
     krb5_address * const * addrs;
-    krb5_authdata * const * authorization_data;
+    const krb5_authdata ** authorization_data;
     krb5_pa_data * const * padata;
     const krb5_data * second_ticket;
     krb5_creds * in_cred;
index f5a1394249e7aecbac60d8ab5d41702dea1d3f19..2f67f30d26117b9c1af5ed5ae5f6615a1f36ddd2 100644 (file)
@@ -36,7 +36,9 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <netinet/in.h>
+#ifdef _MSDOS
+#define ECONNABORTED 53
+#endif
 
 #define WORKING_RCACHE
 
@@ -44,7 +46,7 @@ extern krb5_flags     krb5_kdc_default_options;
 
 static char *sendauth_version = "KRB5_SENDAUTH_V1.0";
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_sendauth(context,
              /* IN */
              fd, appl_version, client, server, ap_req_options, checksump,
index 63f5478658abc2b8e2c6cbf8bb62aa43c4eaec88..39bb229ae2125a59cf68ef5b0d6d58f66bb5efe2 100644 (file)
@@ -30,7 +30,7 @@
 #include <ctype.h>
 #include <stdio.h>
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_get_server_rcache(context, piece, rcptr)
     krb5_context context;
     const krb5_data *piece;
index 7b342a1b861de05e6a8c26468e58105f8131c75f..e6cf43c889ce0b19655a6d8c508ba668618dbe29 100644 (file)
@@ -30,7 +30,7 @@
 
 /* This is an internal-only function, used by krb5_get_cred_from_kdc() */
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_tgtname(context, server, client, tgtprinc)
     krb5_context context;
     const krb5_data *server, *client;
index 7c29f84bada069a665503d54a3592aed6d47af33..f8174503580547765c1ecdbf7aa90bcdc2f3f518 100644 (file)
@@ -55,7 +55,7 @@
 #define REALM_SEP      '@'
 #define        COMPONENT_SEP   '/'
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_unparse_name_ext(context, principal, name, size)
     krb5_context context;
     krb5_const_principal principal;
@@ -174,7 +174,7 @@ krb5_unparse_name_ext(context, principal, name, size)
     return 0;
 }
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_unparse_name(context, principal, name)
     krb5_context context;
     krb5_const_principal principal;
index c3170d200161d2099db32036b9c81b3035c5fb33..38fa355250220359e8f70d79cf284706d4514b8c 100644 (file)
 #define max(x,y) ((x) > (y) ? (x) : (y))
 #endif
 
-krb5_error_code
+krb5_error_code INTERFACE
 krb5_walk_realm_tree(context, client, server, tree, realm_branch_char)
     krb5_context context;
     const krb5_data *client, *server;
     krb5_principal **tree;
+    int realm_branch_char;
 {
     krb5_error_code retval;
     krb5_principal *rettree;