cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: status of CMake support in 7.19.5

From: Bill Hoffman <bill.hoffman_at_kitware.com>
Date: Tue, 09 Jun 2009 15:07:37 -0400

Yang Tse wrote:

> But I can tell you that if you want to remain compatible and generate
> libraries which are equally built as when using configure. In the end
> you will have to learn the autotools to be able to achieve the same
> result using cmake. Or even learn more and make a true 'configure'
> script interpreter for cmake. Eeeek!
I don't think there will ever be a configure script interpreter for
cmake, there is just too much flexibility in configure scripts and too
many tools can be used (sed, awk, grep, and many others). For now, it
will have to be hand converted.

>
> For this specific stuff...
>
> curl_socklen_t should be the data type pointed by the third argument
> of getpeername.
>

What about using the accept function:
from curl/lib/ftp.c
    s=accept(sock, (struct sockaddr *) &add, &size);

arg1 type = curl_socket_t
arg2 type = (struct sockaddr *)
size type = curl_socklen_t

So, this could be done by only looping over these once:

socklen_t int size_t 'unsigned int' long 'unsigned long' void

It could be done after curl_socket_t is figured out.

> Anything else is a shortcut that sometimes might work and others not.
>
I was just hoping to avoid the big loop of types, if you have a slow
compiler it can make a difference. I was hoping another function with
less options could be used to figure out the right type of socklen_t.

Thanks.

-Bill
Received on 2009-06-09