[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] On applications using GNUnet

From: Christian Grothoff
Subject: Re: [GNUnet-developers] On applications using GNUnet
Date: Tue, 6 Aug 2019 19:07:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 8/6/19 5:00 PM, Alessio Vanni wrote:
> Christian Grothoff <address@hidden> writes:
>> Have a look at the attached os_installation.c from GNU Taler. It shows
>> you how to initialize libgnunetutil to customize the --help output (at
>> least some of it).  It also demonstrates how we could easily enable
>> further customizations in the future, if necessary.
>> For the version number, you need to call
>> GNUNET_GETOPT_option_version("1.0")
>> in your option list, to get --version to show '1.0'.
> After reading the attached code I think I understand how it works.  I
> also think it should be added to gnunet-ext too, because as it is it's
> not obvious (and leads to my proposed patch...)

Makes sense, again, patches improving gnunet-ext to make it more
understandable are particularly welcome ;-).

> On the matter of the version string, I don't see why I have to redefine
> it when it's a default option.  Maybe add the version string to the
> ProjectData structure and have the getopt helper use it instead of
> hardcoding `PACKAGE_VERSION " " VCS_REVISION'?  After all, the version
> is still an information about the project.

You're talking about using this for GNUNET_PROGRAM_run and/or
GNUNET_SERVICE_run? That sounds reasonable. With this, we could simply
put the default for PACKAGE_VERSION " " VCS_REVISION into the default
ProjectData and then allow applications to override this more easily
that way. That's completely in line with how ProjectData was expected to
be used. Do you want to propose a patch? ;-)

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]