cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1177214 ] c-ares compiling on MacOSX 10.3

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 05 Apr 2005 14:03:42 -0700

Bugs item #1177214, was opened at 2005-04-05 18:42
Message generated for change (Comment added) made by atupone
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1177214&group_id=976

Category: compile or build problem
Group: portability problem
Status: Open
Resolution: None
Priority: 5
Submitted By: Tupone Alfredo (atupone)
Assigned to: Daniel Stenberg (bagder)
Summary: c-ares compiling on MacOSX 10.3

Initial Comment:
It seems that <arpa/nameser.h> does not include
<arpa/nameser_compat.h> where a lot of macro used by
c-ares are really defined.
I have in the patch also some cast to fix some warning

----------------------------------------------------------------------

>Comment By: Tupone Alfredo (atupone)
Date: 2005-04-05 23:03

Message:
Logged In: YES
user_id=76397

I make the change to check for a missing nameser_compat.h as
requested.

I did remove the cast things

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-04-05 22:24

Message:
Logged In: YES
user_id=1110

Can you please make your patch include the header like this:

#ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h>
#endif

I've just committed a configure script that checks for the
header and produces the define accordingly, so thus you
should be able to use it fine and it will work all over.

----------------------------------------------------------------------

Comment By: Tupone Alfredo (atupone)
Date: 2005-04-05 22:05

Message:
Logged In: YES
user_id=76397

on my linux nameser_compat.h is there, is included by
nameser.h and has an #ifdef protection to not be included twice.
I don't have a Mac so I based the change on someone else
reports who has a Mac and make me change our own copy of
c-ares. He has compilation problem.
I haven't checked the "cast" change so, forget it :)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-04-05 20:16

Message:
Logged In: YES
user_id=1110

I agree with the previous comment. Also, the third argument
to send() is size_t in POSIX (not int):

http://www.opengroup.org/onlinepubs/7990989775/xns/send.html

Why is the cast for socket() needed?

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-04-05 19:33

Message:
Logged In: NO

This patch tends to ignore the fact that MacOS X isn't the
only OS out there. I think we'll need configure checks to see
if nameser_compat.h exists, and also, some of your casts
are going to screw up other OSes. Just as one example,
- s = socket(AF_INET, SOCK_STREAM, 0);
+ s = (int)socket(AF_INET, SOCK_STREAM, 0);

s is an ares_socket_t, not an int. On Windows, for example,
it is a SOCKET. By casting it to an int, you might be solving
a problem on MacOS, but you're going to be adding problems
for other OSes.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1177214&group_id=976
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-tracker
Received on 2005-04-05

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET