diff options
author | Tom Yu <tlyu@mit.edu> | 2002-06-15 00:37:58 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2002-06-15 00:37:58 +0000 |
commit | 7a8bb97527b57514a600dc8a091e2846dad9c4cd (patch) | |
tree | d5517b73138c732df63d734efafa490d4e6c3728 | |
parent | f90cf39eb4efae7e8a8307012d9f3d853d651f40 (diff) | |
download | krb5-7a8bb97527b57514a600dc8a091e2846dad9c4cd.tar.gz krb5-7a8bb97527b57514a600dc8a091e2846dad9c4cd.tar.xz krb5-7a8bb97527b57514a600dc8a091e2846dad9c4cd.zip |
* krb524.h: Updated C++ protection to not interfere with emacs
auto indentation and added KRB524_PRIVATE macro for Mac OS X to
control visibility of function prototypes
* krb524.h: Added C++ protection and Mac pragmas
* krb524.h, cnv_tkt_skey.c, conv_creds.c, conv_princ.c, encode.c,
misc.c, sendmsg.c: Updated header paths on Mac OS X so that we
correctly include the autogenerated krb524.h
* conv_creds.c, cnv_tkt_skey.c: added cast to remove warning.
* krb524.h: Updated to new Mac OS header layout.
* sendmsg.c: k5-int.h should be included as a local header
[pullups from 1-2-2-branch]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14507 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/krb524/ChangeLog | 20 | ||||
-rw-r--r-- | src/krb524/cnv_tkt_skey.c | 9 | ||||
-rw-r--r-- | src/krb524/conv_creds.c | 8 | ||||
-rw-r--r-- | src/krb524/conv_princ.c | 5 | ||||
-rw-r--r-- | src/krb524/encode.c | 6 | ||||
-rw-r--r-- | src/krb524/krb524.h | 48 | ||||
-rw-r--r-- | src/krb524/sendmsg.c | 5 |
7 files changed, 94 insertions, 7 deletions
diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 02109c0b4e..4fa5f572f6 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,23 @@ +2002-06-14 Alexandra Ellwood <lxs@mit.edu> + + * krb524.h: Updated C++ protection to not interfere with emacs + auto indentation and added KRB524_PRIVATE macro for Mac OS X to + control visibility of function prototypes + + * krb524.h: Added C++ protection and Mac pragmas + + * krb524.h, cnv_tkt_skey.c, conv_creds.c, conv_princ.c, encode.c, + misc.c, sendmsg.c: Updated header paths on Mac OS X so that we + correctly include the autogenerated krb524.h + + * conv_creds.c, cnv_tkt_skey.c: added cast to remove warning. + + * krb524.h: Updated to new Mac OS header layout. + + * sendmsg.c: k5-int.h should be included as a local header + + [pullups from 1-2-2-branch] + 2002-06-13 Ken Raeburn <raeburn@mit.edu> * Makefile.in (WINLIBS): Use ws2_32.lib instead of wsock32.lib. diff --git a/src/krb524/cnv_tkt_skey.c b/src/krb524/cnv_tkt_skey.c index 00452eeeac..f34ea6f440 100644 --- a/src/krb524/cnv_tkt_skey.c +++ b/src/krb524/cnv_tkt_skey.c @@ -30,9 +30,14 @@ #include <sys/time.h> #include <netinet/in.h> #endif - +#if TARGET_OS_MAC +#include <Kerberos/krb.h> +#include <Kerberos/krb524.h> +#include "cr_tkt.h" +#else #include <krb.h> #include "krb524.h" +#endif static int krb524int_krb_create_ticket(KTEXT, unsigned int, char *, char *, char *, long, @@ -109,7 +114,7 @@ int krb524_convert_tkt_skey(context, v5tkt, v4tkt, v5_skey, v4_skey, fprintf(stderr, "v5 session keyblock type %d length %d != C_Block size %d\n", v5etkt->session->enctype, v5etkt->session->length, - sizeof(C_Block)); + (int) sizeof(C_Block)); krb5_free_enc_tkt_part(context, v5etkt); v5tkt->enc_part2 = NULL; return KRB524_BADKEY; diff --git a/src/krb524/conv_creds.c b/src/krb524/conv_creds.c index 582733ebe2..01e91bb449 100644 --- a/src/krb524/conv_creds.c +++ b/src/krb524/conv_creds.c @@ -29,9 +29,13 @@ #else #include <netinet/in.h> #endif +#if TARGET_OS_MAC +#include <Kerberos/krb.h> +#include <Kerberos/krb524.h> +#else #include <krb.h> - #include "krb524.h" +#endif krb5_error_code krb524_convert_creds_plain (krb5_context context, krb5_creds *v5creds, @@ -99,7 +103,7 @@ krb524_convert_creds_plain(context, v5creds, v4creds) if (krb524_debug) fprintf(stderr, "v5 session keyblock length %d != C_Block size %d\n", v5creds->keyblock.length, - sizeof(C_Block)); + (int) sizeof(C_Block)); return KRB524_BADKEY; } else memcpy(v4creds->session, (char *) v5creds->keyblock.contents, diff --git a/src/krb524/conv_princ.c b/src/krb524/conv_princ.c index f52c0dd133..83447317a1 100644 --- a/src/krb524/conv_princ.c +++ b/src/krb524/conv_princ.c @@ -21,8 +21,13 @@ */ #include "krb5.h" +#if TARGET_OS_MAC +#include <Kerberos/krb.h> +#include <Kerberos/krb524.h> +#else #include <krb.h> #include "krb524.h" +#endif int krb524_convert_princs(context, client, server, pname, pinst, prealm, sname, sinst, srealm) diff --git a/src/krb524/encode.c b/src/krb524/encode.c index 448efd9938..c20c2281b6 100644 --- a/src/krb524/encode.c +++ b/src/krb524/encode.c @@ -34,9 +34,13 @@ #include <netinet/in.h> #endif - +#if TARGET_OS_MAC +#include <Kerberos/krb.h> +#include <Kerberos/krb524.h> +#else #include <krb.h> #include "krb524.h" +#endif /* * I'm sure that this is reinventing the wheel, but I don't know where diff --git a/src/krb524/krb524.h b/src/krb524/krb524.h index cf9d62e824..4c6a07eac7 100644 --- a/src/krb524/krb524.h +++ b/src/krb524/krb524.h @@ -26,8 +26,39 @@ #define KRB524_SERVICE "krb524" #define KRB524_PORT 4444 -#include "krb524_err.h" - +#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) + #include <TargetConditionals.h> + #include <Kerberos/krb5.h> + #include <Kerberos/krb.h> + #ifndef KRB524_PRIVATE /* Allow e.g. build system to override */ + #define KRB524_PRIVATE 0 + #endif +#else + #include "krb524_err.h" + #ifndef KRB524_PRIVATE + #define KRB524_PRIVATE 1 + #endif +#endif + +#if defined(__cplusplus) && !defined(KRB524INT_BEGIN_DECLS) +#define KRB524INT_BEGIN_DECLS extern "C" { +#define KRB524INT_END_DECLS } +#else +#define KRB524INT_BEGIN_DECLS +#define KRB524INT_END_DECLS +#endif + +#if TARGET_OS_MAC + #if defined(__MWERKS__) + #pragma import on + #pragma enumsalwaysint on + #endif + #pragma options align=mac68k +#endif + +KRB524INT_BEGIN_DECLS + +#if KRB524_PRIVATE extern int krb524_debug; int krb524_convert_tkt_skey @@ -47,11 +78,13 @@ int krb524_convert_princs int krb524_convert_creds_addr (krb5_context context, krb5_creds *v5creds, CREDENTIALS *v4creds, struct sockaddr *saddr); +#endif /* KRB524_PRIVATE */ int krb524_convert_creds_kdc (krb5_context context, krb5_creds *v5creds, CREDENTIALS *v4creds); +#if KRB524_PRIVATE /* conv_tkt.c */ int krb524_convert_tkt @@ -77,5 +110,16 @@ void krb524_init_ets int krb524_sendto_kdc (krb5_context context, const krb5_data * message, const krb5_data * realm, krb5_data * reply); +#endif /* KRB524_PRIVATE */ + +#if TARGET_OS_MAC + #if defined(__MWERKS__) + #pragma enumsalwaysint reset + #pragma import reset + #endif + #pragma options align=reset +#endif + +KRB524INT_END_DECLS #endif /* __KRB524_H__ */ diff --git a/src/krb524/sendmsg.c b/src/krb524/sendmsg.c index aac8f915ef..ef6e996dc1 100644 --- a/src/krb524/sendmsg.c +++ b/src/krb524/sendmsg.c @@ -39,8 +39,13 @@ #include <stdlib.h> #include <string.h> +#if TARGET_OS_MAC +#include <Kerberos/krb.h> +#include <Kerberos/krb524.h> +#else #include <krb.h> #include "krb524.h" +#endif /* * krb524_sendto_kdc: |