diff options
author | Karl Ramm <kcr@1ts.org> | 2009-04-02 23:58:21 +0000 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2009-04-02 23:58:21 +0000 |
commit | 0371c85f2661c041bedc1a9ab21acace224b302e (patch) | |
tree | 45f67d6ac2d8e56b5afbf242270b00886d7878dd | |
parent | 4ef6b36f177c3013b292a709c401e2fa3b3dac55 (diff) |
apple error table initialization for #41
-rw-r--r-- | lib/ZInit.c | 8 | ||||
-rw-r--r-- | server/main.c | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/ZInit.c b/lib/ZInit.c index 6a9149a..2113c8d 100644 --- a/lib/ZInit.c +++ b/lib/ZInit.c @@ -59,14 +59,22 @@ ZInitialize(void) #endif #endif + /* On OS X you don't need to initialize the Kerberos error tables + as long as you link with -framework Kerberos */ +#if !(defined(__APPLE__) && defined(__MACH__)) #ifdef HAVE_KRB4 initialize_krb_error_table(); #endif #ifdef HAVE_KRB5 initialize_krb5_error_table(); #endif +#endif +#if defined(__APPLE__) && defined(__MACH__) + add_error_table(&et_zeph_error_table); +#else initialize_zeph_error_table(); +#endif (void) memset((char *)&__HM_addr, 0, sizeof(__HM_addr)); diff --git a/server/main.c b/server/main.c index deac8dd..111ae0e 100644 --- a/server/main.c +++ b/server/main.c @@ -417,7 +417,13 @@ initialize(void) if (*my_realm) strcpy(__Zephyr_realm, my_realm); #endif - init_zsrv_err_tbl(); /* set up err table */ + + /* set up err table */ +#if defined(__APPLE__) && defined(__MACH__) + add_error_table(&et_zsrv_error_table); +#else + init_zsrv_err_tbl(); +#endif ZSetFD(srv_socket); /* set up the socket as the input fildes */ |