[gnutls-devel] Moving defines (3.4) to enum (3.5.) in header files needs discussion...
tim.ruehsen at gmx.de
Wed Jul 20 12:30:29 CEST 2016
I just realized that you turned several defines into enums with GnuTLS 3.5.x.
This simply breaks existing code (e.g. wget2) and took me a while to find out.
gnutls_init(&session, GNUTLS_CLIENT | GNUTLS_NONBLOCK);
// very old gnutls version, likely to not work.
Of course you might say, I should test this in ./configure ... but basically
lot's of code uses this kind of checks (e.g. the new TCP fastopen code has
things like #ifdef MSG_FASTOPEN etc.). I just pray that glibc maintainers
don't do the same one day...
Personally, I don't see the point in using enums for flags in C. AFAIK, gcc
doesn't check types for enums at all. Using any value for an enum variable or
function parameter is allowed (no warning). Do I miss something here ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: This is a digitally signed message part.
More information about the Gnutls-devel