[kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux
Dalibor Topic
robilad at yahoo.com
Fri May 30 07:41:01 PDT 2003
Hi Ito, hi Tim,
--- Timothy Stack <stack at cs.utah.edu> wrote:
>
> hi,
>
> On Thursday, May 29, 2003, at 10:00 PM, Ito Kazumitsu wrote:
>
> > The current libraries/clib/net/InetAddressImpl.c and some others
> > cannot be compiled on my poor old Linux (2.0.38) machine.
> >
> > What is wrong:
> >
> > (1) InetAddressImpl.c checks whether AF_INET6 and PF_INET6 are
> > defined. Yes, they are defined in /usr/include/socketbits.h
> > even on my old Linux host. But it does not support IPv6, so
> > struct in6_addr is not defined.
>
> argh
The dummy implementation that Ito used in his patch provides those definitions,
according to the docs. It requires some configure.in macro calls to get them.
from the docs on http://www.sra.co.jp/people/m-kasahr/getaddrinfo/:
2. IPv6 programming supplement
You may want more macros related to IPv6 such as PF_INET6. For
example, your source might contain a code like this:
if (getaddrinfo(NULL, port_string, &hints, &res) == 0) {
for (r = res; r != NULL; r = r->ai_next) {
if (r->ai_family != PF_INET && r->ai_family != PF_INET6)
continue;
/* ... */
}
}
`dummyin6.h' provides macros including PF_INET6, types and external
variables used for basic IPv6 programming. See `dummyin6.h' to know
what it defines.
To use `dummyin6.h', add the following code to `configure.ac' or
`configure.in' of your application.
AC_STRUCT_IN6_ADDR
AC_STRUCT_SOCKADDR_IN6
AC_STRUCT_SOCKADDR_STORAGE
AC_DECL_IN6ADDR_ANY
AC_DECL_IN6ADDR_LOOPBACK
AC_TYPE_SA_FAMILY_T
cheers,
dalibor topic
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
More information about the kaffe
mailing list