cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Ares: socklen_t problem

From: Yang Tse <yangsita_at_gmail.com>
Date: Tue, 19 Feb 2013 12:00:16 +0100

On Mon, Feb 18, Tor Arntsen <tor_at_spacetec.no> wrote:

> c-ares commit cf7ad9758dd792 includes the following change to ares.h:
>
> +CARES_EXTERN const char *ares_inet_ntop(int af, const void *src, char *dst,
> + socklen_t size);
>
> socklen_t in a public header file is potentially problematic.. there
> used to be one in <curl/curl.h> until 7.18 I think, but it got too
> troublesome to maintain so it got removed.

When it was mentioned if ares_inet_ntop and ares_inet_ntop were to
become fully documented or removed. I didn't realize function
arguments data types would be modified. I know these didn't actually
belong to the official public API, but their interfaces have been
stable for more than 8 years, up to now.

If socklen_t is the way to go, then we should instead use
ares_socklen_t, which has been publicly available through ares.h for
more than 4 years now.

-- 
-=[Yang]=-
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-19