> On Jul 18, 2024, at 6:50 PM, Wietse Venema via Postfix-users 
> <postfix-users@postfix.org> wrote:
> 
>> Unfortunately, it doesn't work as is, b/c one can't use the C
>> preprocessor "defined()" operator on enum symbols, which the various
>> MYSQL_OPT_SSL_* symbols all are. You can basically only reference
>> preprocessor macro symbols in the #if-test.
>> 
>> (BTW, the patch you inlined didn't have a leading space on the
>> common-context lines, so `patch` barfed on it until I fixed that.)
> 
> This is "diff -u" output which has +, -,  or space prepended to
> each source line. If MacOS email mis-handles leading space, then
> that is too bad.

> I couldn't find a suitable "capability macro", i.e., something
>> that signals at the preprocessor level that the new options API
>> is available.
>> 
>> Instead, I replaced the #if-test in your patch with just:
>> 
>> #if MYSQL_VERSION_ID >= 80035
> 
> Where does that number come from? It needs to be a version that
> introduces all the the MYSQL_OPT_SSL_XXX features that Postfix
> needs. This is the preferred API, and it won't be removed in another
> 10 years.

The format of MYSQL_VERSION_ID seems to be Mmmss (“M” == “major”, “mm” == 
“minor version”, “ss” == “sub-version”).

According to the doc page 
<https://dev.mysql.com/doc/c-api/8.4/en/mysql-ssl-set.html> I linked, the 
preferred API was introduced in v8.0.35.

It might be more hygienic to define a macro symbol like 
MYSQL_TLS_NEW_OPTIONS_API_VERSION, whose value is 80035. Of course that would 
have to be done in the PostFix source, but it might make clear what the #if 
test is dependent on.

>       Wietse
> _______________________________________________
> Postfix-users mailing list -- postfix-users@postfix.org
> To unsubscribe send an email to postfix-users-le...@postfix.org


Cheers,
 - Bob

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to