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: Sun, 23 Aug 2015 10:21:12 +0200

Il 14/Ago/2015 00:19, "Daniel Stenberg" <daniel_at_haxx.se> ha scritto:
>
> 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
Look the best solution. Thank you very much.

Best regards
>
> --
>
> / 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-08-23