Believe it or not; both solutions seem to work and compilation succeeds ! #define GET_HOST_BY_NAME(NAME, HP, ERR, TMP) \ { \ (HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data) \ ? 0 \ : &TMP.data); \ (ERR) = h_errno; \ }
Worked and so did... #define GET_HOST_BY_NAME(NAME, HP, ERR, TMP) \ { \ struct hostent my_h_ent; \ (HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data) \ ? 0 \ : &my_h_ent); \ (ERR) = h_errno; \ } Thanks for the help ! I will continue testing with my current install base on AIX. I really appreciate the rapid responses and solutions ! Lamar -----Original Message----- From: Ken Raeburn [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 5:13 PM To: Marcus Watts Cc: Saxon, Lamar; kerberos@mit.edu Subject: Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3 On Sep 18, 2006, at 17:56, Marcus Watts wrote: > [EMAIL PROTECTED] writes: > ... >> making all in util... >> making all in util/support... >> cc -I../../include -I./../../include -I. -I. >> -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 -D_LARGE_FILES -DLA >> L -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE -c fake-addrinfo.c >> "fake-addrinfo.c", line 1212.9: 1506-045 (S) Undeclared identifier >> my_h_ent. >> make: 1254-004 The error code from the last command is 1. > ... > > I hesitate to recommend this as the totally right answer, but > it looks like the "#ifdef _AIX" case in util/support/fake-addrinfo.c > defines a GET_HOST_BY_NAME which doesn't declare any local storage. > It should probably have a line that reads > struct hostent my_h_ent; \ > inserted immediately before the line that reads > (HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data) \ > (on or around line 178). I think "&my_h_ent" was supposed to be changed to "&TMP.ent" in that macro. (The "TMP" stuff was because making such narrowly-scoped automatic variables may not guarantee that the storage is still live when the pointer gets used. Instead, now the caller has to supply a variable of a type controlled in this header, system-specific, that holds all the longer-lived storage we need.) Lamar, could you let me know if that works for you? Ken Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited. ________________________________________________ Kerberos mailing list Kerberos@mit.edu https://mailman.mit.edu/mailman/listinfo/kerberos