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 -- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html