Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51206 - GnuTLS's extra.h include has no: extern "C" {} declaration
Summary: GnuTLS's extra.h include has no: extern "C" {} declaration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: High major
Assignee: Alastair Tse (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-16 07:05 UTC by Christian Parpart (RETIRED)
Modified: 2004-08-05 04:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gnutls/extra.h patch (gnutls-extra-cxx.diff,538 bytes, patch)
2004-05-16 07:06 UTC, Christian Parpart (RETIRED)
Details | Diff
fixed version of files/PATCH-FILE (gnutls-1.0.14-extra.h.patch,479 bytes, patch)
2004-07-29 17:42 UTC, Christian Parpart (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Parpart (RETIRED) gentoo-dev 2004-05-16 07:05:34 UTC
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.
Comment 1 Christian Parpart (RETIRED) gentoo-dev 2004-05-16 07:06:53 UTC
Created attachment 31524 [details, diff]
gnutls/extra.h patch
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2004-06-15 08:07:17 UTC
which version is this for? is it still a problem in 1.0.4 ?
Comment 3 Christian Parpart (RETIRED) gentoo-dev 2004-06-18 15:11:39 UTC
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.
Comment 4 Christian Parpart (RETIRED) gentoo-dev 2004-06-18 15:14:03 UTC
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.
Comment 5 Christian Parpart (RETIRED) gentoo-dev 2004-07-20 19:05:07 UTC
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
Comment 6 Alastair Tse (RETIRED) gentoo-dev 2004-07-23 21:44:51 UTC
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
Comment 7 Christian Parpart (RETIRED) gentoo-dev 2004-07-29 17:42:23 UTC
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.
Comment 8 Alastair Tse (RETIRED) gentoo-dev 2004-08-04 15:16:19 UTC
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 :)
Comment 9 Christian Parpart (RETIRED) gentoo-dev 2004-08-05 04:39:54 UTC
no problem... thanks anyway ;)