From 454530d542a4388cd8d62e40ea391e9033b4a3d5 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 27 Mar 1996 23:48:41 +0000 Subject: [PATCH] Use universal procedure pointers (UPP), which are required on the Mac Power PC. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7722 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 6 ++++++ src/lib/krb5/os/macsock.c | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index b8fa4c2fe..46f4f013e 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +Wed Mar 27 18:31:44 1996 Theodore Y. Ts'o + + * macsock.c (gethostbyname, gethostbyaddr): Use universal + procedure pointers (UPP), which are required on the Mac + Power PC. + Mon Mar 18 21:49:39 1996 Ezra Peisach * configure.in: Add KRB5_RUN_FLAGS diff --git a/src/lib/krb5/os/macsock.c b/src/lib/krb5/os/macsock.c index 523d4e218..37b3e3c33 100644 --- a/src/lib/krb5/os/macsock.c +++ b/src/lib/krb5/os/macsock.c @@ -68,6 +68,9 @@ Cygnus Support (email info@cygnus.com).", for Kerberos, which is all that we care about right now. */ static struct timeval last_timeout; +/* IH 04.03.96: Need UPP for PPC port */ +static ResultUPP gDNRresultupp = NULL; + /* Forward declarations of static functions */ @@ -555,7 +558,11 @@ gethostbyname (char *hostname) if (err = OpenResolver(NULL)) return(0); // make sure resolver is open - err = StrToAddr(hostname, &host, DNRresultproc, &done); + + // IH 04.03.96: Need UPP when running on PPC + if (gDNRresultupp == NULL) + gDNRresultupp = NewResultProc(DNRresultproc); + err = StrToAddr(hostname, &host, gDNRresultupp, &done); if (err == cacheFault) { while(!done) ; /* LOOP UNTIL CALLBACK IS RUN */ @@ -608,7 +615,10 @@ gethostbyaddr (char *addr, int len, int type) if (err = OpenResolver(NULL)) return 0; // make sure resolver is open - err = AddrToName(macaddr, &host, DNRresultproc, &done); + // IH 04.03.96: Need UPP when running on PPC + if (gDNRresultupp == NULL) + gDNRresultupp = NewResultProc(DNRresultproc); + err = AddrToName(macaddr, &host, gDNRresultupp, &done); if (err == cacheFault) { while(!done) ; /* LOOP UNTIL CALLBACK IS RUN */ -- 2.26.2