gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: pathes to better support th


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: pathes to better support third party extensions from ML. Thanks to Alessio Vanni
Date: Thu, 08 Aug 2019 17:24:55 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new d39c8087c pathes to better support third party extensions from ML. 
Thanks to Alessio Vanni
d39c8087c is described below

commit d39c8087c4872094105270b193f68e191b5c6015
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Thu Aug 8 17:23:26 2019 +0200

    pathes to better support third party extensions from ML. Thanks to Alessio 
Vanni
---
 src/include/gnunet_os_lib.h | 9 +++++++++
 src/util/Makefile.am        | 2 +-
 src/util/getopt_helpers.c   | 7 +++++--
 src/util/os_installation.c  | 1 +
 src/util/program.c          | 7 ++++---
 5 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index 6eb4ce5eb..d43711a99 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -267,6 +267,15 @@ struct GNUNET_OS_ProjectData
    */
   const char *user_config_file;
 
+  /**
+   * String identifying the current project version.
+   */
+  const char *version;
+
+  /**
+   * Non-zero means this project is part of GNU.
+   */
+  int is_gnu;
 };
 
 
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index fe5cc6e72..647f09224 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -161,7 +161,7 @@ libgnunetutil_la_LIBADD = \
 
 libgnunetutil_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) \
-  -version-info 13:1:0
+  -version-info 13:2:0
 
 libgnunetutil_taler_wallet_la_SOURCES = \
   common_allocation.c \
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c
index 05856beee..80d1037bb 100644
--- a/src/util/getopt_helpers.c
+++ b/src/util/getopt_helpers.c
@@ -178,10 +178,13 @@ format_help (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   }
   pd = GNUNET_OS_project_data_get ();
   printf ("Report bugs to %s.\n"
-          "GNUnet home page: %s\n"
-          "General help using GNU software: http://www.gnu.org/gethelp/\n";,
+          "Home page: %s\n",
           pd->bug_email,
           pd->homepage);
+
+  if (0 != pd->is_gnu)
+    printf ("General help using GNU software: http://www.gnu.org/gethelp/\n";);
+  
   return GNUNET_NO;
 }
 
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index d2ce7fd9b..9dcfa5ef1 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -57,6 +57,7 @@ static const struct GNUNET_OS_ProjectData default_pd = {
   .libname = "libgnunetutil",
   .project_dirname = "gnunet",
   .binary_name = "gnunet-arm",
+  .version = PACKAGE_VERSION " " VCS_VERSION,
   .env_varname = "GNUNET_PREFIX",
   .base_config_varname = "GNUNET_BASE_CONFIG",
   .bug_email = "address@hidden",
diff --git a/src/util/program.c b/src/util/program.c
index 8a5b1c414..1462a03a8 100644
--- a/src/util/program.c
+++ b/src/util/program.c
@@ -161,12 +161,13 @@ GNUNET_PROGRAM_run2 (int argc,
   unsigned long long skew_variance;
   long long clock_offset;
   struct GNUNET_CONFIGURATION_Handle *cfg;
+  const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get ();
   struct GNUNET_GETOPT_CommandLineOption defoptions[] =
     {GNUNET_GETOPT_option_cfgfile (&cc.cfgfile),
      GNUNET_GETOPT_option_help (binaryHelp),
      GNUNET_GETOPT_option_loglevel (&loglev),
      GNUNET_GETOPT_option_logfile (&logfile),
-     GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION)};
+     GNUNET_GETOPT_option_version (pd->version)};
   struct GNUNET_GETOPT_CommandLineOption *allopts;
   const char *gargs;
   char *lpfx;
@@ -231,9 +232,9 @@ GNUNET_PROGRAM_run2 (int argc,
                      "%s%s%s",
                      xdg,
                      DIR_SEPARATOR_STR,
-                     GNUNET_OS_project_data_get ()->config_file);
+                     pd->config_file);
   else
-    cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
+    cfg_fn = GNUNET_strdup (pd->user_config_file);
   lpfx = GNUNET_strdup (binaryName);
   if (NULL != (spc = strstr (lpfx, " ")))
     *spc = '\0';

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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