Hi Martin, On 08.12.22 16:38, marty1885 wrote: > Hi, > > Nice for releasing GNUnet 0.19.0. I've upgraded and find my C++ programs > fails to compile against the new headers. After some debugging the root cause > is a (I assume) failed attempt at completing removing `extern "C"` guards in > `gnunet_container_lib.h`. Seems the top half of the guard is removed but the > bottom half isn't. Leading to an error when including any headers that uses > that file from C++. For example the following simple program fails to compile. > > I have scanned through the GNUnet website and not sure how to contribute my > fix. The "development tutorial" page > (https://docs.gnunet.org/tutorial/tutorial.html) is broken on the website. > The website also mentioned needing to sign copyright assignment? What exactly > should I do? >
The correct link is https://docs.gnunet.org/developers/tutorial.html. I will fix that. Regarding the copyright assignment: Yes, in order to get git privileges in order to contribute significant functionality and code you need to sign the CA PDF: https://www.gnunet.org/en/copyright.html And then send the original to GNUnet e.V. (you can get the address by emailing vorst...@gnunet.org). For minor contributions such as your fix below you can simply post it to gnunet-develop...@gnunet.org . I already fixed the issue the issue now so that is for future patches. > #include <gnunet/gnunet_core_service.h> > > int main() > { > reutrn 0; > } > > Compiling with g++ leads to the following error: > > ❯ g++ simple.cpp > In file included from simple.cpp:1: > /usr/include/gnunet/gnunet_core_service.h:440:1: error: expected declaration > before ‘}’ token > 440 | } > | ^ > > And following patch fixes it. > > --- /usr/include/gnunet/gnunet_container_lib.h.old 2022-12-09 > 00:29:44.746504181 +0800 > +++ /usr/include/gnunet/gnunet_container_lib.h 2022-12-09 00:29:58.554055321 > +0800 > @@ -2328,15 +2328,6 @@ > GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_HeapNode *node, > GNUNET_CONTAINER_HeapCostType new_cost); > > - > -#if 0 /* keep Emacsens' auto-indent happy */ > -{ > -#endif > -#ifdef __cplusplus > -} > -#endif > - > - > /* ifndef GNUNET_CONTAINER_LIB_H */ > #endif > You are right that fixes it. But it was never my intention to remove the guard anyway. I added it back. Thanks for spotting this! Will release .1 soon (TM). BR Martin > Best, > Martin >
signature.asc
Description: PGP signature