aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/datacache/perf_datacache.c4
-rw-r--r--src/datacache/test_datacache.c4
-rw-r--r--src/datacache/test_datacache_quota.c4
-rw-r--r--src/datastore/perf_datastore_api.c4
-rw-r--r--src/datastore/perf_plugin_datastore.c6
-rw-r--r--src/datastore/test_datastore_api.c10
-rw-r--r--src/datastore/test_datastore_api_management.c6
-rw-r--r--src/datastore/test_plugin_datastore.c6
-rw-r--r--src/include/platform.h12
-rw-r--r--src/namecache/test_plugin_namecache.c4
-rw-r--r--src/namestore/test_plugin_namestore.c8
-rw-r--r--src/peerstore/test_plugin_peerstore.c4
12 files changed, 37 insertions, 35 deletions
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index f33e62bae..4381171c5 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -132,7 +132,7 @@ FAILURE:
132int 132int
133main (int argc, char *argv[]) 133main (int argc, char *argv[])
134{ 134{
135 char cfg_name[128]; 135 char cfg_name[PATH_MAX];
136 char *const xargv[] = { 136 char *const xargv[] = {
137 "perf-datacache", 137 "perf-datacache",
138 "-c", 138 "-c",
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index e647ae833..d62a31c27 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -155,7 +155,7 @@ FAILURE:
155int 155int
156main (int argc, char *argv[]) 156main (int argc, char *argv[])
157{ 157{
158 char cfg_name[128]; 158 char cfg_name[PATH_MAX];
159 char *const xargv[] = { 159 char *const xargv[] = {
160 "test-datacache", 160 "test-datacache",
161 "-c", 161 "-c",
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c
index 117d8be4e..7c4e56ea5 100644
--- a/src/datacache/test_datacache_quota.c
+++ b/src/datacache/test_datacache_quota.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -123,7 +123,7 @@ int
123main (int argc, 123main (int argc,
124 char *argv[]) 124 char *argv[])
125{ 125{
126 char cfg_name[128]; 126 char cfg_name[PATH_MAX];
127 char *const xargv[] = { 127 char *const xargv[] = {
128 "test-datacache-quota", 128 "test-datacache-quota",
129 "-c", 129 "-c",
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 939e60e4d..2c261b155 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -595,7 +595,7 @@ int
595main (int argc, 595main (int argc,
596 char *argv[]) 596 char *argv[])
597{ 597{
598 char cfg_name[128]; 598 char cfg_name[PATH_MAX];
599 599
600 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); 600 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
601 GNUNET_snprintf (cfg_name, 601 GNUNET_snprintf (cfg_name,
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 9ba8fa1b0..f68d1f389 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -519,8 +519,8 @@ run (void *cls, char *const *args, const char *cfgfile,
519int 519int
520main (int argc, char *argv[]) 520main (int argc, char *argv[])
521{ 521{
522 char dir_name[128]; 522 char dir_name[PATH_MAX];
523 char cfg_name[128]; 523 char cfg_name[PATH_MAX];
524 char *const xargv[] = { 524 char *const xargv[] = {
525 "perf-plugin-datastore", 525 "perf-plugin-datastore",
526 "-c", 526 "-c",
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index fa96ea9b7..daf6cccb3 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -635,7 +635,7 @@ duc_dummy (void *cls,
635 635
636 636
637/** 637/**
638 * check if plugin is actually working 638 * check if plugin is actually working
639 */ 639 */
640static int 640static int
641test_plugin (const char *cfg_name) 641test_plugin (const char *cfg_name)
@@ -644,7 +644,7 @@ test_plugin (const char *cfg_name)
644 struct GNUNET_CONFIGURATION_Handle *cfg; 644 struct GNUNET_CONFIGURATION_Handle *cfg;
645 struct GNUNET_DATASTORE_PluginFunctions *api; 645 struct GNUNET_DATASTORE_PluginFunctions *api;
646 struct GNUNET_DATASTORE_PluginEnvironment env; 646 struct GNUNET_DATASTORE_PluginEnvironment env;
647 647
648 cfg = GNUNET_CONFIGURATION_create (); 648 cfg = GNUNET_CONFIGURATION_create ();
649 if (GNUNET_OK != 649 if (GNUNET_OK !=
650 GNUNET_CONFIGURATION_load (cfg, 650 GNUNET_CONFIGURATION_load (cfg,
@@ -691,9 +691,9 @@ int
691main (int argc, 691main (int argc,
692 char *argv[]) 692 char *argv[])
693{ 693{
694 char cfg_name[128]; 694 char cfg_name[PATH_MAX];
695 int ret; 695 int ret;
696 696
697 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); 697 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
698 GNUNET_snprintf (cfg_name, 698 GNUNET_snprintf (cfg_name,
699 sizeof (cfg_name), 699 sizeof (cfg_name),
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index d592ccc80..d91fe748b 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -337,7 +337,7 @@ ignore_payload_cb (void *cls,
337static int 337static int
338test_plugin (const char *cfg_name) 338test_plugin (const char *cfg_name)
339{ 339{
340 char libname[128]; 340 char libname[PATH_MAX];
341 struct GNUNET_CONFIGURATION_Handle *cfg; 341 struct GNUNET_CONFIGURATION_Handle *cfg;
342 struct GNUNET_DATASTORE_PluginFunctions *api; 342 struct GNUNET_DATASTORE_PluginFunctions *api;
343 struct GNUNET_DATASTORE_PluginEnvironment env; 343 struct GNUNET_DATASTORE_PluginEnvironment env;
@@ -378,7 +378,7 @@ test_plugin (const char *cfg_name)
378int 378int
379main (int argc, char *argv[]) 379main (int argc, char *argv[])
380{ 380{
381 char cfg_name[128]; 381 char cfg_name[PATH_MAX];
382 int ret; 382 int ret;
383 383
384 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); 384 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index 4b054314c..c37b8ddb9 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -436,8 +436,8 @@ run (void *cls, char *const *args, const char *cfgfile,
436int 436int
437main (int argc, char *argv[]) 437main (int argc, char *argv[])
438{ 438{
439 char dir_name[128]; 439 char dir_name[PATH_MAX];
440 char cfg_name[128]; 440 char cfg_name[PATH_MAX];
441 char *const xargv[] = { 441 char *const xargv[] = {
442 "test-plugin-datastore", 442 "test-plugin-datastore",
443 "-c", 443 "-c",
diff --git a/src/include/platform.h b/src/include/platform.h
index 1bae7ca44..01b0bcf9e 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -281,4 +281,14 @@ atoll (const char *nptr);
281 */ 281 */
282#define GNUNET_TERM_SIG SIGTERM 282#define GNUNET_TERM_SIG SIGTERM
283 283
284
285#ifndef PATH_MAX
286/**
287 * Assumed maximum path length.
288 */
289#define PATH_MAX 4096
290#endif
291
292
293
284#endif 294#endif
diff --git a/src/namecache/test_plugin_namecache.c b/src/namecache/test_plugin_namecache.c
index c2a630a46..20900a3f6 100644
--- a/src/namecache/test_plugin_namecache.c
+++ b/src/namecache/test_plugin_namecache.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -102,7 +102,7 @@ run (void *cls, char *const *args, const char *cfgfile,
102int 102int
103main (int argc, char *argv[]) 103main (int argc, char *argv[])
104{ 104{
105 char cfg_name[128]; 105 char cfg_name[PATH_MAX];
106 char *const xargv[] = { 106 char *const xargv[] = {
107 "test-plugin-namecache", 107 "test-plugin-namecache",
108 "-c", 108 "-c",
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c
index ff1f83780..30778ed69 100644
--- a/src/namestore/test_plugin_namestore.c
+++ b/src/namestore/test_plugin_namestore.c
@@ -194,14 +194,6 @@ run (void *cls,
194} 194}
195 195
196 196
197#ifndef PATH_MAX
198/**
199 * Assumed maximum path length (for the configuration file name).
200 */
201#define PATH_MAX 4096
202#endif
203
204
205int 197int
206main (int argc, 198main (int argc,
207 char *argv[]) 199 char *argv[])
diff --git a/src/peerstore/test_plugin_peerstore.c b/src/peerstore/test_plugin_peerstore.c
index 5f18d1532..d6be5f06d 100644
--- a/src/peerstore/test_plugin_peerstore.c
+++ b/src/peerstore/test_plugin_peerstore.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -188,7 +188,7 @@ run (void *cls,
188int 188int
189main (int argc, char *argv[]) 189main (int argc, char *argv[])
190{ 190{
191 char cfg_name[128]; 191 char cfg_name[PATH_MAX];
192 char *const xargv[] = { 192 char *const xargv[] = {
193 "test-plugin-peerstore", 193 "test-plugin-peerstore",
194 "-c", 194 "-c",