diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-08-08 17:23:26 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-08-08 17:23:26 +0200 |
commit | d39c8087c4872094105270b193f68e191b5c6015 (patch) | |
tree | 54e3155ce7b3552524900415cac52438d2e13ab2 /src | |
parent | 6b23a8225efed99498f891b589c7c5171567192b (diff) | |
download | gnunet-d39c8087c4872094105270b193f68e191b5c6015.tar.gz gnunet-d39c8087c4872094105270b193f68e191b5c6015.zip |
pathes to better support third party extensions from ML. Thanks to Alessio Vanni
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_os_lib.h | 9 | ||||
-rw-r--r-- | src/util/Makefile.am | 2 | ||||
-rw-r--r-- | src/util/getopt_helpers.c | 7 | ||||
-rw-r--r-- | src/util/os_installation.c | 1 | ||||
-rw-r--r-- | 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 | |||
267 | */ | 267 | */ |
268 | const char *user_config_file; | 268 | const char *user_config_file; |
269 | 269 | ||
270 | /** | ||
271 | * String identifying the current project version. | ||
272 | */ | ||
273 | const char *version; | ||
274 | |||
275 | /** | ||
276 | * Non-zero means this project is part of GNU. | ||
277 | */ | ||
278 | int is_gnu; | ||
270 | }; | 279 | }; |
271 | 280 | ||
272 | 281 | ||
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 = \ | |||
161 | 161 | ||
162 | libgnunetutil_la_LDFLAGS = \ | 162 | libgnunetutil_la_LDFLAGS = \ |
163 | $(GN_LIB_LDFLAGS) \ | 163 | $(GN_LIB_LDFLAGS) \ |
164 | -version-info 13:1:0 | 164 | -version-info 13:2:0 |
165 | 165 | ||
166 | libgnunetutil_taler_wallet_la_SOURCES = \ | 166 | libgnunetutil_taler_wallet_la_SOURCES = \ |
167 | common_allocation.c \ | 167 | 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, | |||
178 | } | 178 | } |
179 | pd = GNUNET_OS_project_data_get (); | 179 | pd = GNUNET_OS_project_data_get (); |
180 | printf ("Report bugs to %s.\n" | 180 | printf ("Report bugs to %s.\n" |
181 | "GNUnet home page: %s\n" | 181 | "Home page: %s\n", |
182 | "General help using GNU software: http://www.gnu.org/gethelp/\n", | ||
183 | pd->bug_email, | 182 | pd->bug_email, |
184 | pd->homepage); | 183 | pd->homepage); |
184 | |||
185 | if (0 != pd->is_gnu) | ||
186 | printf ("General help using GNU software: http://www.gnu.org/gethelp/\n"); | ||
187 | |||
185 | return GNUNET_NO; | 188 | return GNUNET_NO; |
186 | } | 189 | } |
187 | 190 | ||
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 = { | |||
57 | .libname = "libgnunetutil", | 57 | .libname = "libgnunetutil", |
58 | .project_dirname = "gnunet", | 58 | .project_dirname = "gnunet", |
59 | .binary_name = "gnunet-arm", | 59 | .binary_name = "gnunet-arm", |
60 | .version = PACKAGE_VERSION " " VCS_VERSION, | ||
60 | .env_varname = "GNUNET_PREFIX", | 61 | .env_varname = "GNUNET_PREFIX", |
61 | .base_config_varname = "GNUNET_BASE_CONFIG", | 62 | .base_config_varname = "GNUNET_BASE_CONFIG", |
62 | .bug_email = "gnunet-developers@gnu.org", | 63 | .bug_email = "gnunet-developers@gnu.org", |
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, | |||
161 | unsigned long long skew_variance; | 161 | unsigned long long skew_variance; |
162 | long long clock_offset; | 162 | long long clock_offset; |
163 | struct GNUNET_CONFIGURATION_Handle *cfg; | 163 | struct GNUNET_CONFIGURATION_Handle *cfg; |
164 | const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get (); | ||
164 | struct GNUNET_GETOPT_CommandLineOption defoptions[] = | 165 | struct GNUNET_GETOPT_CommandLineOption defoptions[] = |
165 | {GNUNET_GETOPT_option_cfgfile (&cc.cfgfile), | 166 | {GNUNET_GETOPT_option_cfgfile (&cc.cfgfile), |
166 | GNUNET_GETOPT_option_help (binaryHelp), | 167 | GNUNET_GETOPT_option_help (binaryHelp), |
167 | GNUNET_GETOPT_option_loglevel (&loglev), | 168 | GNUNET_GETOPT_option_loglevel (&loglev), |
168 | GNUNET_GETOPT_option_logfile (&logfile), | 169 | GNUNET_GETOPT_option_logfile (&logfile), |
169 | GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION)}; | 170 | GNUNET_GETOPT_option_version (pd->version)}; |
170 | struct GNUNET_GETOPT_CommandLineOption *allopts; | 171 | struct GNUNET_GETOPT_CommandLineOption *allopts; |
171 | const char *gargs; | 172 | const char *gargs; |
172 | char *lpfx; | 173 | char *lpfx; |
@@ -231,9 +232,9 @@ GNUNET_PROGRAM_run2 (int argc, | |||
231 | "%s%s%s", | 232 | "%s%s%s", |
232 | xdg, | 233 | xdg, |
233 | DIR_SEPARATOR_STR, | 234 | DIR_SEPARATOR_STR, |
234 | GNUNET_OS_project_data_get ()->config_file); | 235 | pd->config_file); |
235 | else | 236 | else |
236 | cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); | 237 | cfg_fn = GNUNET_strdup (pd->user_config_file); |
237 | lpfx = GNUNET_strdup (binaryName); | 238 | lpfx = GNUNET_strdup (binaryName); |
238 | if (NULL != (spc = strstr (lpfx, " "))) | 239 | if (NULL != (spc = strstr (lpfx, " "))) |
239 | *spc = '\0'; | 240 | *spc = '\0'; |