cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ares portability patch

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 3 Aug 2003 00:30:59 +0200 (CEST)

On Fri, 1 Aug 2003, Duncan Wilcox wrote:

Thanks a lot for this!

> Here I'm on 10.2.6 with the latest developer tools update and gcc 3.3
> (also tested with gcc 3.1), the first problem is with the provided
> configure:
>
> checking host system type... configure: error: can not guess host type;
> you must specify one
>
> Getting updated config.guess and config.sub fixes that.

Right, the ones included with ares seem to be from 1998...

> A number of sources have this kind of problem:
>
> ares_expand_name.c:82: error: `INDIR_MASK' undeclared (first use in
> this function)
>
> I'm not sure what the problem is, my system does have
> /usr/include/arpa/nameser.h, but the guard HAVE_... around the #include
> <arpa/nameser.h> is preventing inclusion, maybe there's some configure
> problem (there's no config.h with HAVE_ stuff and no HAVE_ seems to be
> passed on the command line).

Oh. This contradicts what David Remahl reported
(http://curl.haxx.se/mail/lib-2003-07/0112.html), which was the whole reason I
added those #ifdefs around those #include lines.

Was this an artifact due to David using a beta? I'll get rid of those #ifdefs
again if we don't need them.

The reason there's no config.h made is that you need to run 'autoheader' first
to produce a config.h.in file and you need to rerun autoconf to produce a new
configure. With that done, you should be getting a proper define if you have
that header file.

> Adding a -DHAVE_ARPA_NAMESER_H to the makefile gets it to compile
> correctly.
>
> In adig.c:
>
> adig.c:105: `T_SRV' undeclared here (not in a function)
>
> T_SRV is only defined in arpa/nameser_compat.h, but including it
> instead or in addition to arpa/nameser.h causes more trouble. Don't
> know what to make of this.
>
> Commenting out the T_SRV stuff just to get it to build shows no other
> problems.

The adig.c source is only used for the adig tool, not for the ares library so
it isn't that important.

A more clever fix would probably be to add something like:

#ifndef T_SRV
#define T_SRV 33 /* server selection */
#endif

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-03