move getaddrinfo hacks into support lib for easier maintenance
authorKen Raeburn <raeburn@mit.edu>
Wed, 3 Nov 2004 08:40:53 +0000 (08:40 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 3 Nov 2004 08:40:53 +0000 (08:40 +0000)
commit7264a49524aef6b91a0c16760b55c22c1dca063e
treef27775fb98891b98c60d0b5b8bd84c730f1ee70b
parent8fe6fc7b6eace6a1cae442f3b06cc15a6c4e6423
move getaddrinfo hacks into support lib for easier maintenance

With the cache on Mac OS X, and likely to be enabled eventually on other
platforms, this is going to wind up being a non-trivial amount of code on most
platforms, and updating the cache code to work on other configurations is
likely to take a few rounds.  Rather than recompile the world and add a bunch
of code to each object file doing name lookups, moving the code into the
support library that already defines the static data (list head, mutex) should
make things simpler.

(TODO: Fix calling conventions for Windows?)

* include/fake-addrinfo.h: Move most of code content into
util/support/fake-addrinfo.c.
(krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo,
krb5int_gai_strerror): Declare.
(getaddrinfo, freeaddrinfo, getnameinfo, gai_strerror): Define as macros
mapping to the krb5int_ function names.
* util/support/fake-addrinfo.c: Import most of the contents of
include/fake-addrinfo.h, so we only compile it once.
(krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo,
krb5int_gai_strerror): New functions, always defined and exported.
* util/support/libkrb5support.exports: Export the new functions, not the old
_fac symbols.

ticket: new
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16854 dc483132-0cff-0310-8789-dd5450dbe970
src/include/ChangeLog
src/include/fake-addrinfo.h
src/util/support/ChangeLog
src/util/support/fake-addrinfo.c
src/util/support/libkrb5support.exports