cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Welcome to the "curl-library" mailing list

From: Elia Pinto <gitter.spiros_at_gmail.com>
Date: Wed, 2 Sep 2015 15:49:04 +0200

2015-08-14 0:15 GMT+02:00 Daniel Stenberg <daniel_at_haxx.se>:
> On Thu, 13 Aug 2015, Elia Pinto wrote:
>
>> I'm making a program that would declare an array of structures like this,
>> to associate a name to a curl constant curl used for the particular SSL
>> version. But these symbols are constants enum and you can not do it. There
>> is a different technique? The idea would be not to bind the control to the
>> runtime version of curl for easy maintenance.
>
>
> One option is to use a script like symbols.pl[1] that generates defines out
> of the symbols-in-versions file.
>
> Then you can write your code like this:
>
> #if LIBCURL_HAS(CURL_SSLVERSION_TLSv1_0)
> /* version has the symbol */
> #else
> /* no such symbol in this version */
> #endif
>
> [1] = https://github.com/bagder/curl/blob/master/docs/libcurl/symbols.pl

I thought about the possible implementation of this solution but I see
some problems.

For example it introduces external dependencies on curl’s symbol-ver
that is not part of the public interface of libcurl and is not
(generally) distro distributed with this. In fact, the question is:
why the libcurl-symbol-version.h is not part of the libcurl
development header?

In fact this file, being generated from symbols-in-versions, will be
updated possibly with new releases of curl, and so need periodic
maintenance for other program. I think this it would be very helpful.

I miss something ?

Thanks again

>
> --
>
> / daniel.haxx.se
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-09-02