cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: a bug in the curl cofigure script?: curl-7.18.1 with c-ares-1.5.1 and a debug option

From: Yuriy Sosov <yusosov_at_gmail.com>
Date: Sat, 3 May 2008 17:06:23 -0400

Hi Daniel,

"> Is this a bug in the curl cofigure script or I am missing something?

I think it can be seen as a limitation in its implementation, yes. But if you
really want debug mode in libcurl and c-ares, then you can just extract the
whole curl dir from CVS, run the root configure to enable c-ares (and debug)
then build c-ares and curl. Voila, everything works!

To get the c-ares debug mode more stand-alone, I think is more a c-ares issue
than a libcurl one so you should rather take that on the c-ares list instead!"

My question was not that much in depth as to wether it is a hack or
not. It is much simpler and is just that curl does not configure with
cares and a debug option because 2 dummy functions are missing from in
the configure script. I tried to upload the cvs code with the same
configure errors.

What I am trying to say is this : configure has this c-code to check
if c-ares was built with debug and is recent enough

 #include <ares.h>
 /* provide a set of dummy functions in case c-ares was built with debug */
 void curl_dofree() { }
 void curl_sclose() { }
 void curl_domalloc() { }

 int main(void)
 {
   ares_channel channel;
   ares_cancel(channel); /* added in 1.2.0 */
   ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
   return 0;
 }

But to work properly is should be

 #include <ares.h>
 /* provide a set of dummy functions in case c-ares was built with debug */
 void curl_dofree() { }
 void curl_sclose() { }
 void curl_domalloc() { }
// 2 missing dummy fuctions
void curl_docalloc() { }
void curl_socket() { }

 int main(void)
 {
   ares_channel channel;
   ares_cancel(channel); /* added in 1.2.0 */
   ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
   return 0;
 }

That's all.

Thanks,

Yuriy
Received on 2008-05-03