well, this is really ugly to c++ developers, and very odd to GnuTLS itself. Because its gnutls/gnutls.h contains a extern "C" declaration, but their gnutls/extra.h not. Unfortunately, their m4 script tests both files, which makes it impossible to c++ developers to use this m4 script without patching either gnutls.m4 or the extra.h - I propose the second ;) Greets, Christian Parpart.
Created attachment 31524 [details, diff] gnutls/extra.h patch
which version is this for? is it still a problem in 1.0.4 ?
sws root # qpkg -mc gnutls -v net-libs/gnutls-1.0.4 * /usr/include/gnutls/extra.h !md5! 1/56 well, that is, I had still to fix this in 1.0.4, too. so, we probably should send them the patch, too ;) Greets, Christian Parpart.
Well, I maybe need to say, that this is surely something, the real developers just forgot to do, since they're present in their gnutls.h, but *NOT* in their extra.h. I guess, they're just C programmers, not C++. Unfortunetely, their autoconf .m4 macro also checks their extra.h which makes impossible for C++ developers to include this macro without having patched the extra.h on targeted systems. You just can't expect this from each and little client admin to do so.
hi, is it that damn hard to fix? --- extra.h-orig 2004-07-21 04:03:41.031604820 +0200 +++ extra.h 2004-07-21 04:03:52.080621979 +0200 @@ -27,6 +27,10 @@ #define LIBGNUTLS_EXTRA_VERSION LIBGNUTLS_VERSION +#ifdef __cplusplus +extern "C" { +#endif + /* SRP */ typedef struct DSTRUCT* gnutls_srp_server_credentials; @@ -120,4 +124,8 @@ gnutls_datum* result); +#ifdef __cplusplus +} +#endif + #endif
not exactly a major bug, thats why it was given a low priority. but seeing you've made the effort to report it and provide a patch, i'll gladly put it in portage. thanks for your report! its now in 1.0.14
Created attachment 36445 [details, diff] fixed version of files/PATCH-FILE huh, I'm sorry for reopening, but there came a little bug along the patch gnutls-1.0.40-extra.h.patch. well, I already provided a (working) patch in #1, but the one committet to CVS is a little different. So, I corrected it, and submit again. greets, Christian Parpart.
ahh .. sorry .. the original patch didn't work properly, so i made a new patch, and obviously, nothing works for me the first time around. now, it is really fixed. will be in portage very shortly oh, and i didn't notice this bug because it wasn't reopened :)
no problem... thanks anyway ;)