curl-library
Re: Welcome to the "curl-library" mailing list
Date: Thu, 13 Aug 2015 18:20:05 +0200
2015-08-13 18:11 GMT+02:00 Aaron Meriwether <me_at_ameriwether.com>:
>
>> On Aug 13, 2015, at 8:37 AM, Elia Pinto <gitter.spiros_at_gmail.com> 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.
>>
>
> Something like your example works fine in my compiler (gcc 4.7.2).
> You just have a minor syntax error - you missed a comma here:
>
>> {"SSLv2"_ , _ CURL_SSLVERSION_SSLv2},
For the C standard is not possible to use #if or #ifdef with an enum
like CURL_SSLVERSION_SSLv2. The code compile but it is borken (the
compiler skip the #ifdef with the CURL_SSLVERSION_xxx)
Best
>
> -Aaron
> -------------------------------------------------------------------
> 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-13