diff options
Diffstat (limited to 'src')
49 files changed, 141 insertions, 86 deletions
diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am index 7b022fe5d..238a463ec 100644 --- a/src/arm/Makefile.am +++ b/src/arm/Makefile.am | |||
@@ -72,7 +72,7 @@ check_SCRIPTS = \ | |||
72 | endif | 72 | endif |
73 | 73 | ||
74 | if ENABLE_TEST_RUN | 74 | if ENABLE_TEST_RUN |
75 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 75 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
76 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) | 76 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) |
77 | endif | 77 | endif |
78 | 78 | ||
diff --git a/src/ats-tests/Makefile.am b/src/ats-tests/Makefile.am index 237acf879..20b7784fe 100644 --- a/src/ats-tests/Makefile.am +++ b/src/ats-tests/Makefile.am | |||
@@ -45,7 +45,7 @@ check_PROGRAMS = \ | |||
45 | $(TESTING_TESTS) | 45 | $(TESTING_TESTS) |
46 | 46 | ||
47 | if ENABLE_TEST_RUN | 47 | if ENABLE_TEST_RUN |
48 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 48 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
49 | TESTS = $(check_PROGRAMS) | 49 | TESTS = $(check_PROGRAMS) |
50 | endif | 50 | endif |
51 | 51 | ||
diff --git a/src/ats/Makefile.am b/src/ats/Makefile.am index 2e4e1651e..8be619980 100644 --- a/src/ats/Makefile.am +++ b/src/ats/Makefile.am | |||
@@ -145,7 +145,7 @@ check_PROGRAMS = \ | |||
145 | $(TESTING_TESTS) | 145 | $(TESTING_TESTS) |
146 | 146 | ||
147 | if ENABLE_TEST_RUN | 147 | if ENABLE_TEST_RUN |
148 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 148 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
149 | TESTS = $(check_PROGRAMS) | 149 | TESTS = $(check_PROGRAMS) |
150 | endif | 150 | endif |
151 | 151 | ||
diff --git a/src/consensus/Makefile.am b/src/consensus/Makefile.am index b14be5681..bd2c94d09 100644 --- a/src/consensus/Makefile.am +++ b/src/consensus/Makefile.am | |||
@@ -77,7 +77,7 @@ check_PROGRAMS = \ | |||
77 | test_consensus_api | 77 | test_consensus_api |
78 | 78 | ||
79 | if ENABLE_TEST_RUN | 79 | if ENABLE_TEST_RUN |
80 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 80 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
81 | TESTS = $(check_PROGRAMS) | 81 | TESTS = $(check_PROGRAMS) |
82 | endif | 82 | endif |
83 | 83 | ||
diff --git a/src/conversation/Makefile.am b/src/conversation/Makefile.am index af3b96655..04bf707e5 100644 --- a/src/conversation/Makefile.am +++ b/src/conversation/Makefile.am | |||
@@ -94,7 +94,7 @@ libexec_PROGRAMS += \ | |||
94 | $(AUDIO_HELPER_RECD) \ | 94 | $(AUDIO_HELPER_RECD) \ |
95 | $(AUDIO_HELPER_PLAY) | 95 | $(AUDIO_HELPER_PLAY) |
96 | 96 | ||
97 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 97 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
98 | TESTS = $(AUDIO_TESTS) | 98 | TESTS = $(AUDIO_TESTS) |
99 | 99 | ||
100 | if BUILD_PULSE_HELPERS | 100 | if BUILD_PULSE_HELPERS |
diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 8d9faf2c7..b013db6b3 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am | |||
@@ -73,7 +73,7 @@ check_PROGRAMS = \ | |||
73 | $(TESTING_TESTS) | 73 | $(TESTING_TESTS) |
74 | 74 | ||
75 | if ENABLE_TEST_RUN | 75 | if ENABLE_TEST_RUN |
76 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 76 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
77 | TESTS = $(check_PROGRAMS) | 77 | TESTS = $(check_PROGRAMS) |
78 | endif | 78 | endif |
79 | 79 | ||
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am index f9af4610b..a66395772 100644 --- a/src/datacache/Makefile.am +++ b/src/datacache/Makefile.am | |||
@@ -122,7 +122,7 @@ check_PROGRAMS = \ | |||
122 | $(POSTGRES_TESTS) | 122 | $(POSTGRES_TESTS) |
123 | 123 | ||
124 | if ENABLE_TEST_RUN | 124 | if ENABLE_TEST_RUN |
125 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 125 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
126 | TESTS = $(check_PROGRAMS) | 126 | TESTS = $(check_PROGRAMS) |
127 | endif | 127 | endif |
128 | 128 | ||
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am index 092f0ede5..2c0aec7a6 100644 --- a/src/datastore/Makefile.am +++ b/src/datastore/Makefile.am | |||
@@ -170,7 +170,7 @@ check_PROGRAMS = \ | |||
170 | $(POSTGRES_TESTS) | 170 | $(POSTGRES_TESTS) |
171 | 171 | ||
172 | if ENABLE_TEST_RUN | 172 | if ENABLE_TEST_RUN |
173 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 173 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
174 | TESTS = $(check_PROGRAMS) | 174 | TESTS = $(check_PROGRAMS) |
175 | endif | 175 | endif |
176 | 176 | ||
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index f35e1e18c..2a4bb7d29 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am | |||
@@ -158,7 +158,7 @@ if HAVE_EXPERIMENTAL | |||
158 | endif | 158 | endif |
159 | 159 | ||
160 | if ENABLE_TEST_RUN | 160 | if ENABLE_TEST_RUN |
161 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 161 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
162 | TESTS = test_dht_api $(check_SCRIPTS) \ | 162 | TESTS = test_dht_api $(check_SCRIPTS) \ |
163 | test_dht_twopeer \ | 163 | test_dht_twopeer \ |
164 | test_dht_line \ | 164 | test_dht_line \ |
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index c2a432ca6..041fc67b2 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am | |||
@@ -115,7 +115,7 @@ libgnunet_plugin_block_dns_la_LDFLAGS = \ | |||
115 | 115 | ||
116 | 116 | ||
117 | if ENABLE_TEST_RUN | 117 | if ENABLE_TEST_RUN |
118 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 118 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
119 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) | 119 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) |
120 | endif | 120 | endif |
121 | 121 | ||
diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am index a4b1c4b04..37bd77046 100644 --- a/src/dv/Makefile.am +++ b/src/dv/Makefile.am | |||
@@ -76,7 +76,7 @@ check_PROGRAMS = \ | |||
76 | endif | 76 | endif |
77 | 77 | ||
78 | if ENABLE_TEST_RUN | 78 | if ENABLE_TEST_RUN |
79 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 79 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
80 | TESTS = $(check_PROGRAMS) | 80 | TESTS = $(check_PROGRAMS) |
81 | endif | 81 | endif |
82 | 82 | ||
diff --git a/src/env/Makefile.am b/src/env/Makefile.am index c3f2aee02..4a79940b2 100644 --- a/src/env/Makefile.am +++ b/src/env/Makefile.am | |||
@@ -32,7 +32,7 @@ check_PROGRAMS = \ | |||
32 | endif | 32 | endif |
33 | 33 | ||
34 | if ENABLE_TEST_RUN | 34 | if ENABLE_TEST_RUN |
35 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 35 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
36 | TESTS = $(check_PROGRAMS) | 36 | TESTS = $(check_PROGRAMS) |
37 | endif | 37 | endif |
38 | 38 | ||
diff --git a/src/experimentation/Makefile.am b/src/experimentation/Makefile.am index 0c6a96936..a1bc93722 100644 --- a/src/experimentation/Makefile.am +++ b/src/experimentation/Makefile.am | |||
@@ -25,7 +25,7 @@ check_PROGRAMS = \ | |||
25 | $(TEXT_EXP_CLIQUE) | 25 | $(TEXT_EXP_CLIQUE) |
26 | 26 | ||
27 | if ENABLE_TEST_RUN | 27 | if ENABLE_TEST_RUN |
28 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 28 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
29 | TESTS = \ | 29 | TESTS = \ |
30 | $(TEXT_EXP_CLIQUE) | 30 | $(TEXT_EXP_CLIQUE) |
31 | endif | 31 | endif |
diff --git a/src/fragmentation/Makefile.am b/src/fragmentation/Makefile.am index d85373a10..9b7369aff 100644 --- a/src/fragmentation/Makefile.am +++ b/src/fragmentation/Makefile.am | |||
@@ -25,7 +25,7 @@ check_PROGRAMS = \ | |||
25 | test_fragmentation | 25 | test_fragmentation |
26 | 26 | ||
27 | if ENABLE_TEST_RUN | 27 | if ENABLE_TEST_RUN |
28 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 28 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
29 | TESTS = $(check_PROGRAMS) | 29 | TESTS = $(check_PROGRAMS) |
30 | endif | 30 | endif |
31 | 31 | ||
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index a04591ab2..79637e930 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am | |||
@@ -279,7 +279,7 @@ endif | |||
279 | 279 | ||
280 | 280 | ||
281 | if ENABLE_TEST_RUN | 281 | if ENABLE_TEST_RUN |
282 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;\ | 282 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;\ |
283 | export PATH=@prefix@/bin:$$PATH;\ | 283 | export PATH=@prefix@/bin:$$PATH;\ |
284 | $(MONKEY) | 284 | $(MONKEY) |
285 | TESTS = \ | 285 | TESTS = \ |
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 41c9032f0..226657e4f 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -277,7 +277,7 @@ check_SCRIPTS = \ | |||
277 | 277 | ||
278 | if ENABLE_TEST_RUN | 278 | if ENABLE_TEST_RUN |
279 | if HAVE_SQLITE | 279 | if HAVE_SQLITE |
280 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 280 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
281 | TESTS = $(check_SCRIPTS) | 281 | TESTS = $(check_SCRIPTS) |
282 | endif | 282 | endif |
283 | endif | 283 | endif |
diff --git a/src/gnsrecord/Makefile.am b/src/gnsrecord/Makefile.am index a5a698e2f..d0d8f3e89 100644 --- a/src/gnsrecord/Makefile.am +++ b/src/gnsrecord/Makefile.am | |||
@@ -21,7 +21,7 @@ check_PROGRAMS = \ | |||
21 | test_gnsrecord_block_expiration | 21 | test_gnsrecord_block_expiration |
22 | 22 | ||
23 | if ENABLE_TEST_RUN | 23 | if ENABLE_TEST_RUN |
24 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 24 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
25 | TESTS = \ | 25 | TESTS = \ |
26 | $(check_PROGRAMS) \ | 26 | $(check_PROGRAMS) \ |
27 | $(check_SCRIPTS) | 27 | $(check_SCRIPTS) |
diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am index 328a88a48..8f16219e8 100644 --- a/src/hello/Makefile.am +++ b/src/hello/Makefile.am | |||
@@ -28,7 +28,7 @@ check_PROGRAMS = \ | |||
28 | test_friend_hello | 28 | test_friend_hello |
29 | 29 | ||
30 | if ENABLE_TEST_RUN | 30 | if ENABLE_TEST_RUN |
31 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 31 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
32 | TESTS = $(check_PROGRAMS) | 32 | TESTS = $(check_PROGRAMS) |
33 | endif | 33 | endif |
34 | 34 | ||
diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am index 887355d9b..b1c05596b 100644 --- a/src/hostlist/Makefile.am +++ b/src/hostlist/Makefile.am | |||
@@ -48,7 +48,7 @@ check_PROGRAMS = \ | |||
48 | 48 | ||
49 | if HAVE_MHD | 49 | if HAVE_MHD |
50 | if ENABLE_TEST_RUN | 50 | if ENABLE_TEST_RUN |
51 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 51 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
52 | TESTS = \ | 52 | TESTS = \ |
53 | test_gnunet_daemon_hostlist \ | 53 | test_gnunet_daemon_hostlist \ |
54 | test_gnunet_daemon_hostlist_reconnect \ | 54 | test_gnunet_daemon_hostlist_reconnect \ |
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am index 616f0b5b0..b14ae57f8 100644 --- a/src/identity/Makefile.am +++ b/src/identity/Makefile.am | |||
@@ -68,7 +68,7 @@ check_PROGRAMS = \ | |||
68 | endif | 68 | endif |
69 | 69 | ||
70 | if ENABLE_TEST_RUN | 70 | if ENABLE_TEST_RUN |
71 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 71 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
72 | TESTS = $(check_PROGRAMS) | 72 | TESTS = $(check_PROGRAMS) |
73 | endif | 73 | endif |
74 | 74 | ||
diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h index 0cade7902..a8ebaae3e 100644 --- a/src/include/gnunet_bandwidth_lib.h +++ b/src/include/gnunet_bandwidth_lib.h | |||
@@ -94,7 +94,7 @@ struct GNUNET_BANDWIDTH_Tracker | |||
94 | /** | 94 | /** |
95 | * Maximum number of seconds over which bandwidth may "accumulate". | 95 | * Maximum number of seconds over which bandwidth may "accumulate". |
96 | * Note that additionally, we also always allow at least | 96 | * Note that additionally, we also always allow at least |
97 | * GNUNET_SERVER_MAX_MESSAGE_SIZE to accumulate. | 97 | * #GNUNET_SERVER_MAX_MESSAGE_SIZE to accumulate. |
98 | */ | 98 | */ |
99 | uint32_t max_carry_s__; | 99 | uint32_t max_carry_s__; |
100 | }; | 100 | }; |
diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index 2a106d381..2bb97770c 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am | |||
@@ -26,7 +26,7 @@ endif | |||
26 | 26 | ||
27 | if HAVE_MHD | 27 | if HAVE_MHD |
28 | if ENABLE_TEST_RUN | 28 | if ENABLE_TEST_RUN |
29 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 29 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
30 | TESTS = \ | 30 | TESTS = \ |
31 | $(check_SCRIPTS) | 31 | $(check_SCRIPTS) |
32 | endif | 32 | endif |
diff --git a/src/mesh/Makefile.am b/src/mesh/Makefile.am index 455d45a46..1dda635e3 100644 --- a/src/mesh/Makefile.am +++ b/src/mesh/Makefile.am | |||
@@ -184,7 +184,7 @@ test_mesh_small_speed_reliable_backwards_DEPENDENCIES = $(dep_mesh_test_lib) | |||
184 | 184 | ||
185 | 185 | ||
186 | if ENABLE_TEST_RUN | 186 | if ENABLE_TEST_RUN |
187 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 187 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
188 | TESTS = \ | 188 | TESTS = \ |
189 | $(check_PROGRAMS) | 189 | $(check_PROGRAMS) |
190 | endif | 190 | endif |
diff --git a/src/multicast/Makefile.am b/src/multicast/Makefile.am index b65bd65cd..948575804 100644 --- a/src/multicast/Makefile.am +++ b/src/multicast/Makefile.am | |||
@@ -51,7 +51,7 @@ check_PROGRAMS = \ | |||
51 | test_multicast_api | 51 | test_multicast_api |
52 | 52 | ||
53 | if ENABLE_TEST_RUN | 53 | if ENABLE_TEST_RUN |
54 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 54 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
55 | TESTS = $(check_PROGRAMS) | 55 | TESTS = $(check_PROGRAMS) |
56 | endif | 56 | endif |
57 | 57 | ||
diff --git a/src/namecache/Makefile.am b/src/namecache/Makefile.am index 41c27e413..c22c20085 100644 --- a/src/namecache/Makefile.am +++ b/src/namecache/Makefile.am | |||
@@ -47,7 +47,7 @@ check_PROGRAMS = \ | |||
47 | endif | 47 | endif |
48 | 48 | ||
49 | if ENABLE_TEST_RUN | 49 | if ENABLE_TEST_RUN |
50 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 50 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
51 | TESTS = \ | 51 | TESTS = \ |
52 | $(check_PROGRAMS) | 52 | $(check_PROGRAMS) |
53 | endif | 53 | endif |
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index 32d29ebca..e97f74ee7 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -63,7 +63,7 @@ check_PROGRAMS = \ | |||
63 | endif | 63 | endif |
64 | 64 | ||
65 | if ENABLE_TEST_RUN | 65 | if ENABLE_TEST_RUN |
66 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 66 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
67 | TESTS = \ | 67 | TESTS = \ |
68 | $(check_PROGRAMS) \ | 68 | $(check_PROGRAMS) \ |
69 | $(check_SCRIPTS) | 69 | $(check_SCRIPTS) |
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index a7424b8dc..0111cd5b1 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am | |||
@@ -80,7 +80,7 @@ check_PROGRAMS = \ | |||
80 | test_nat_test | 80 | test_nat_test |
81 | 81 | ||
82 | if ENABLE_TEST_RUN | 82 | if ENABLE_TEST_RUN |
83 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 83 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
84 | TESTS = $(check_PROGRAMS) | 84 | TESTS = $(check_PROGRAMS) |
85 | endif | 85 | endif |
86 | 86 | ||
diff --git a/src/nse/Makefile.am b/src/nse/Makefile.am index 44c187739..513642423 100644 --- a/src/nse/Makefile.am +++ b/src/nse/Makefile.am | |||
@@ -80,7 +80,7 @@ check_PROGRAMS = \ | |||
80 | endif | 80 | endif |
81 | 81 | ||
82 | if ENABLE_TEST_RUN | 82 | if ENABLE_TEST_RUN |
83 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 83 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
84 | TESTS = $(check_PROGRAMS) | 84 | TESTS = $(check_PROGRAMS) |
85 | endif | 85 | endif |
86 | 86 | ||
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am index 1bca57678..bead00989 100644 --- a/src/peerinfo-tool/Makefile.am +++ b/src/peerinfo-tool/Makefile.am | |||
@@ -29,7 +29,7 @@ check_SCRIPTS = \ | |||
29 | endif | 29 | endif |
30 | 30 | ||
31 | if ENABLE_TEST_RUN | 31 | if ENABLE_TEST_RUN |
32 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 32 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
33 | TESTS = $(check_SCRIPTS) | 33 | TESTS = $(check_SCRIPTS) |
34 | endif | 34 | endif |
35 | 35 | ||
diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am index 7dd1581c4..054d5ce13 100644 --- a/src/peerinfo/Makefile.am +++ b/src/peerinfo/Makefile.am | |||
@@ -57,7 +57,7 @@ endif | |||
57 | 57 | ||
58 | 58 | ||
59 | if ENABLE_TEST_RUN | 59 | if ENABLE_TEST_RUN |
60 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 60 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
61 | TESTS = $(check_PROGRAMS) | 61 | TESTS = $(check_PROGRAMS) |
62 | endif | 62 | endif |
63 | 63 | ||
diff --git a/src/psyc/Makefile.am b/src/psyc/Makefile.am index d199bd3a2..d6901922f 100644 --- a/src/psyc/Makefile.am +++ b/src/psyc/Makefile.am | |||
@@ -59,7 +59,7 @@ check_PROGRAMS = \ | |||
59 | endif | 59 | endif |
60 | 60 | ||
61 | if ENABLE_TEST_RUN | 61 | if ENABLE_TEST_RUN |
62 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 62 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
63 | TESTS = $(check_PROGRAMS) | 63 | TESTS = $(check_PROGRAMS) |
64 | endif | 64 | endif |
65 | 65 | ||
diff --git a/src/psycstore/Makefile.am b/src/psycstore/Makefile.am index 44ac5bb49..d87cd25f0 100644 --- a/src/psycstore/Makefile.am +++ b/src/psycstore/Makefile.am | |||
@@ -81,7 +81,7 @@ check_PROGRAMS = \ | |||
81 | endif | 81 | endif |
82 | 82 | ||
83 | if ENABLE_TEST_RUN | 83 | if ENABLE_TEST_RUN |
84 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 84 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
85 | TESTS = $(check_PROGRAMS) | 85 | TESTS = $(check_PROGRAMS) |
86 | endif | 86 | endif |
87 | 87 | ||
diff --git a/src/pt/Makefile.am b/src/pt/Makefile.am index ebd662851..816484377 100644 --- a/src/pt/Makefile.am +++ b/src/pt/Makefile.am | |||
@@ -57,7 +57,7 @@ endif | |||
57 | check_PROGRAMS = $(VPN_TEST) | 57 | check_PROGRAMS = $(VPN_TEST) |
58 | 58 | ||
59 | if ENABLE_TEST_RUN | 59 | if ENABLE_TEST_RUN |
60 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 60 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
61 | TESTS = $(check_PROGRAMS) | 61 | TESTS = $(check_PROGRAMS) |
62 | endif | 62 | endif |
63 | 63 | ||
diff --git a/src/regex/Makefile.am b/src/regex/Makefile.am index dd02afa19..90b9df7e4 100644 --- a/src/regex/Makefile.am +++ b/src/regex/Makefile.am | |||
@@ -170,7 +170,7 @@ check_PROGRAMS = \ | |||
170 | test_regex_api | 170 | test_regex_api |
171 | 171 | ||
172 | if ENABLE_TEST_RUN | 172 | if ENABLE_TEST_RUN |
173 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 173 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
174 | TESTS = $(check_PROGRAMS) | 174 | TESTS = $(check_PROGRAMS) |
175 | endif | 175 | endif |
176 | 176 | ||
diff --git a/src/revocation/Makefile.am b/src/revocation/Makefile.am index c1aef65cb..14cc11494 100644 --- a/src/revocation/Makefile.am +++ b/src/revocation/Makefile.am | |||
@@ -74,7 +74,7 @@ check_SCRIPTS = \ | |||
74 | test_local_revocation.py | 74 | test_local_revocation.py |
75 | 75 | ||
76 | if ENABLE_TEST_RUN | 76 | if ENABLE_TEST_RUN |
77 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 77 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
78 | TESTS = \ | 78 | TESTS = \ |
79 | $(check_SCRIPTS) \ | 79 | $(check_SCRIPTS) \ |
80 | $(check_PROGRAMS) | 80 | $(check_PROGRAMS) |
diff --git a/src/scalarproduct/Makefile.am b/src/scalarproduct/Makefile.am index b167bacb1..010d7ebfa 100644 --- a/src/scalarproduct/Makefile.am +++ b/src/scalarproduct/Makefile.am | |||
@@ -67,6 +67,6 @@ check_SCRIPTS = \ | |||
67 | test_scalarproduct_negativezero.sh | 67 | test_scalarproduct_negativezero.sh |
68 | 68 | ||
69 | if ENABLE_TEST_RUN | 69 | if ENABLE_TEST_RUN |
70 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 70 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
71 | TESTS = $(check_SCRIPTS) | 71 | TESTS = $(check_SCRIPTS) |
72 | endif | 72 | endif |
diff --git a/src/secretsharing/Makefile.am b/src/secretsharing/Makefile.am index 556356b6f..fb519f4b1 100644 --- a/src/secretsharing/Makefile.am +++ b/src/secretsharing/Makefile.am | |||
@@ -63,7 +63,7 @@ check_PROGRAMS = \ | |||
63 | test_secretsharing_api | 63 | test_secretsharing_api |
64 | 64 | ||
65 | if ENABLE_TEST_RUN | 65 | if ENABLE_TEST_RUN |
66 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 66 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
67 | TESTS = $(check_PROGRAMS) | 67 | TESTS = $(check_PROGRAMS) |
68 | endif | 68 | endif |
69 | 69 | ||
diff --git a/src/set/Makefile.am b/src/set/Makefile.am index a02d80b9e..32eb3317c 100644 --- a/src/set/Makefile.am +++ b/src/set/Makefile.am | |||
@@ -70,7 +70,7 @@ check_PROGRAMS = \ | |||
70 | endif | 70 | endif |
71 | 71 | ||
72 | if ENABLE_TEST_RUN | 72 | if ENABLE_TEST_RUN |
73 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 73 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
74 | TESTS = $(check_PROGRAMS) | 74 | TESTS = $(check_PROGRAMS) |
75 | endif | 75 | endif |
76 | 76 | ||
diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am index 3baea5580..991a6156f 100644 --- a/src/statistics/Makefile.am +++ b/src/statistics/Makefile.am | |||
@@ -58,7 +58,7 @@ check_PROGRAMS = \ | |||
58 | test_statistics_api_watch_zero_value | 58 | test_statistics_api_watch_zero_value |
59 | 59 | ||
60 | if ENABLE_TEST_RUN | 60 | if ENABLE_TEST_RUN |
61 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 61 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
62 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) | 62 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) |
63 | endif | 63 | endif |
64 | 64 | ||
diff --git a/src/template/Makefile.am b/src/template/Makefile.am index 8d8acccea..42d6a95a0 100644 --- a/src/template/Makefile.am +++ b/src/template/Makefile.am | |||
@@ -38,7 +38,7 @@ check_PROGRAMS = \ | |||
38 | test_template_api | 38 | test_template_api |
39 | 39 | ||
40 | if ENABLE_TEST_RUN | 40 | if ENABLE_TEST_RUN |
41 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 41 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
42 | TESTS = $(check_PROGRAMS) | 42 | TESTS = $(check_PROGRAMS) |
43 | endif | 43 | endif |
44 | 44 | ||
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index d088b1107..e9e537515 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -193,7 +193,7 @@ check_PROGRAMS = \ | |||
193 | $(underlay_testcases) | 193 | $(underlay_testcases) |
194 | 194 | ||
195 | if ENABLE_TEST_RUN | 195 | if ENABLE_TEST_RUN |
196 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 196 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
197 | TESTS = \ | 197 | TESTS = \ |
198 | test_testbed_api \ | 198 | test_testbed_api \ |
199 | test_testbed_logger_api \ | 199 | test_testbed_logger_api \ |
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index c1b41c265..6b229b6fe 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am | |||
@@ -57,7 +57,7 @@ check_PROGRAMS = \ | |||
57 | test_testing_sharedservices | 57 | test_testing_sharedservices |
58 | 58 | ||
59 | if ENABLE_TEST_RUN | 59 | if ENABLE_TEST_RUN |
60 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 60 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
61 | TESTS = \ | 61 | TESTS = \ |
62 | test_testing_portreservation \ | 62 | test_testing_portreservation \ |
63 | test_testing_peerstartup \ | 63 | test_testing_peerstartup \ |
diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am index 4f354a141..b8b534a0a 100644 --- a/src/topology/Makefile.am +++ b/src/topology/Makefile.am | |||
@@ -46,7 +46,7 @@ check_PROGRAMS = \ | |||
46 | endif | 46 | endif |
47 | 47 | ||
48 | if ENABLE_TEST_RUN | 48 | if ENABLE_TEST_RUN |
49 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 49 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
50 | TESTS = $(check_PROGRAMS) | 50 | TESTS = $(check_PROGRAMS) |
51 | endif | 51 | endif |
52 | 52 | ||
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 699899b2b..bbd811bb8 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -440,7 +440,7 @@ check_PROGRAMS = \ | |||
440 | endif | 440 | endif |
441 | 441 | ||
442 | if ENABLE_TEST_RUN | 442 | if ENABLE_TEST_RUN |
443 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 443 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
444 | TESTS = \ | 444 | TESTS = \ |
445 | test_transport_testing_startstop \ | 445 | test_transport_testing_startstop \ |
446 | test_transport_testing_restart \ | 446 | test_transport_testing_restart \ |
diff --git a/src/tun/Makefile.am b/src/tun/Makefile.am index a27d192cb..ffe58136f 100644 --- a/src/tun/Makefile.am +++ b/src/tun/Makefile.am | |||
@@ -27,7 +27,7 @@ check_PROGRAMS = \ | |||
27 | test_regex | 27 | test_regex |
28 | 28 | ||
29 | if ENABLE_TEST_RUN | 29 | if ENABLE_TEST_RUN |
30 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 30 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
31 | TESTS = $(check_PROGRAMS) | 31 | TESTS = $(check_PROGRAMS) |
32 | endif | 32 | endif |
33 | 33 | ||
diff --git a/src/util/Makefile.am b/src/util/Makefile.am index a2c55d5c3..f520d1cb4 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am | |||
@@ -279,7 +279,7 @@ check_PROGRAMS = \ | |||
279 | test_common_logging_runtime_loglevels | 279 | test_common_logging_runtime_loglevels |
280 | 280 | ||
281 | if ENABLE_TEST_RUN | 281 | if ENABLE_TEST_RUN |
282 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH; | 282 | TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH; |
283 | TESTS = $(check_PROGRAMS) | 283 | TESTS = $(check_PROGRAMS) |
284 | endif | 284 | endif |
285 | 285 | ||
diff --git a/src/util/configuration.c b/src/util/configuration.c index ca27b5aef..3d9281e8d 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -1632,7 +1632,7 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1632 | char *ipath; | 1632 | char *ipath; |
1633 | 1633 | ||
1634 | ipath = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); | 1634 | ipath = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); |
1635 | if (ipath == NULL) | 1635 | if (NULL == ipath) |
1636 | return GNUNET_SYSERR; | 1636 | return GNUNET_SYSERR; |
1637 | baseconfig = NULL; | 1637 | baseconfig = NULL; |
1638 | GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d"); | 1638 | GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d"); |
@@ -1644,7 +1644,7 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1644 | return GNUNET_SYSERR; /* no configuration at all found */ | 1644 | return GNUNET_SYSERR; /* no configuration at all found */ |
1645 | } | 1645 | } |
1646 | GNUNET_free (baseconfig); | 1646 | GNUNET_free (baseconfig); |
1647 | if ((filename != NULL) && | 1647 | if ((NULL != filename) && |
1648 | (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, filename))) | 1648 | (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, filename))) |
1649 | { | 1649 | { |
1650 | /* specified configuration not found */ | 1650 | /* specified configuration not found */ |
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 30e729dc6..02d23688c 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2006 Christian Grothoff (and other contributing authors) | 3 | (C) 2006-2014 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -65,7 +65,7 @@ get_path_from_proc_maps () | |||
65 | while (NULL != fgets (line, sizeof (line), f)) | 65 | while (NULL != fgets (line, sizeof (line), f)) |
66 | { | 66 | { |
67 | if ((1 == | 67 | if ((1 == |
68 | SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%1023s", dir)) && | 68 | SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2x:%*2x %*u%*[ ]%1023s", dir)) && |
69 | (NULL != (lgu = strstr (dir, "libgnunetutil")))) | 69 | (NULL != (lgu = strstr (dir, "libgnunetutil")))) |
70 | { | 70 | { |
71 | lgu[0] = '\0'; | 71 | lgu[0] = '\0'; |
@@ -101,7 +101,7 @@ get_path_from_proc_exe () | |||
101 | lnk[size] = '\0'; | 101 | lnk[size] = '\0'; |
102 | while ((lnk[size] != '/') && (size > 0)) | 102 | while ((lnk[size] != '/') && (size > 0)) |
103 | size--; | 103 | size--; |
104 | /* test for being in lib/gnunet/libexec/ */ | 104 | /* test for being in lib/gnunet/libexec/ or lib/MULTIARCH/gnunet/libexec */ |
105 | if ( (size > strlen ("/gnunet/libexec/")) && | 105 | if ( (size > strlen ("/gnunet/libexec/")) && |
106 | (0 == strcmp ("/gnunet/libexec/", | 106 | (0 == strcmp ("/gnunet/libexec/", |
107 | &lnk[size - strlen ("/gnunet/libexec/")])) ) | 107 | &lnk[size - strlen ("/gnunet/libexec/")])) ) |
@@ -465,6 +465,8 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
465 | const char *dirname; | 465 | const char *dirname; |
466 | char *execpath = NULL; | 466 | char *execpath = NULL; |
467 | char *tmp; | 467 | char *tmp; |
468 | char *multiarch; | ||
469 | char *libdir; | ||
468 | int isbasedir; | 470 | int isbasedir; |
469 | 471 | ||
470 | /* if wanted, try to get the current app's bin/ */ | 472 | /* if wanted, try to get the current app's bin/ */ |
@@ -513,6 +515,17 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
513 | execpath[n - 4] = '\0'; | 515 | execpath[n - 4] = '\0'; |
514 | n -= 4; | 516 | n -= 4; |
515 | } | 517 | } |
518 | multiarch = NULL; | ||
519 | if (NULL != (libdir = strstr (execpath, "/lib/"))) | ||
520 | { | ||
521 | /* test for multi-arch path of the form "PREFIX/lib/MULTIARCH/"; | ||
522 | here we need to re-add 'multiarch' to lib and libexec paths later! */ | ||
523 | multiarch = &libdir[5]; | ||
524 | if (NULL == strchr (multiarch, '/')) | ||
525 | libdir[0] = '\0'; /* Debian multiarch format, cut of from 'execpath' but preserve in multicarch */ | ||
526 | else | ||
527 | multiarch = NULL; /* maybe not, multiarch still has a '/', which is not OK */ | ||
528 | } | ||
516 | /* in case this was a directory named foo-bin, remove "foo-" */ | 529 | /* in case this was a directory named foo-bin, remove "foo-" */ |
517 | while ((n > 1) && (execpath[n - 1] == DIR_SEPARATOR)) | 530 | while ((n > 1) && (execpath[n - 1] == DIR_SEPARATOR)) |
518 | execpath[--n] = '\0'; | 531 | execpath[--n] = '\0'; |
@@ -530,29 +543,48 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
530 | { | 543 | { |
531 | dirname = | 544 | dirname = |
532 | DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; | 545 | DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; |
533 | tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1); | 546 | GNUNET_asprintf (&tmp, |
534 | sprintf (tmp, "%s%s", execpath, dirname); | 547 | "%s%s%s", |
535 | if ( (GNUNET_YES != | 548 | execpath, |
536 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) && | 549 | dirname, |
537 | (4 == sizeof (void *)) ) | 550 | (NULL != multiarch) ? multiarch : ""); |
551 | if (GNUNET_YES == | ||
552 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) | ||
553 | { | ||
554 | GNUNET_free (execpath); | ||
555 | return tmp; | ||
556 | } | ||
557 | GNUNET_free (tmp); | ||
558 | tmp = NULL; | ||
559 | if (4 == sizeof (void *)) | ||
538 | { | 560 | { |
539 | GNUNET_free (tmp); | ||
540 | dirname = | 561 | dirname = |
541 | DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; | 562 | DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; |
542 | tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1); | 563 | GNUNET_asprintf (&tmp, |
543 | sprintf (tmp, "%s%s", execpath, dirname); | 564 | "%s%s", |
565 | execpath, | ||
566 | dirname); | ||
544 | } | 567 | } |
545 | if ( (GNUNET_YES != | 568 | if (8 == sizeof (void *)) |
546 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) && | ||
547 | (8 == sizeof (void *)) ) | ||
548 | { | 569 | { |
549 | dirname = | 570 | dirname = |
550 | DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; | 571 | DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; |
572 | GNUNET_asprintf (&tmp, | ||
573 | "%s%s", | ||
574 | execpath, | ||
575 | dirname); | ||
576 | } | ||
577 | |||
578 | if ( (NULL != tmp) && | ||
579 | (GNUNET_YES == | ||
580 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) ) | ||
581 | { | ||
582 | GNUNET_free (execpath); | ||
583 | return tmp; | ||
551 | } | 584 | } |
552 | GNUNET_free (tmp); | 585 | GNUNET_free (tmp); |
553 | } | 586 | } |
554 | else | 587 | dirname = DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; |
555 | dirname = DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR; | ||
556 | break; | 588 | break; |
557 | case GNUNET_OS_IPK_DATADIR: | 589 | case GNUNET_OS_IPK_DATADIR: |
558 | dirname = | 590 | dirname = |
@@ -575,42 +607,63 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
575 | if (isbasedir) | 607 | if (isbasedir) |
576 | { | 608 | { |
577 | dirname = | 609 | dirname = |
578 | DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ | 610 | DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR "libexec" DIR_SEPARATOR_STR; |
579 | "libexec" DIR_SEPARATOR_STR; | 611 | GNUNET_asprintf (&tmp, |
580 | tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1); | 612 | "%s%s%s%s", |
581 | sprintf (tmp, "%s%s", execpath, dirname); | 613 | execpath, |
582 | if ( (GNUNET_YES != | 614 | DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR, |
583 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) && | 615 | (NULL != multiarch) ? multiarch : "", |
584 | (4 == sizeof (void *)) ) | 616 | dirname); |
617 | if (GNUNET_YES == | ||
618 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) | ||
619 | { | ||
620 | GNUNET_free (execpath); | ||
621 | return tmp; | ||
622 | } | ||
623 | GNUNET_free (tmp); | ||
624 | tmp = NULL; | ||
625 | if (4 == sizeof (void *)) | ||
585 | { | 626 | { |
586 | GNUNET_free (tmp); | ||
587 | dirname = | 627 | dirname = |
588 | DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ | 628 | DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ |
589 | "libexec" DIR_SEPARATOR_STR; | 629 | "libexec" DIR_SEPARATOR_STR; |
590 | tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1); | 630 | GNUNET_asprintf (&tmp, |
591 | sprintf (tmp, "%s%s", execpath, dirname); | 631 | "%s%s", |
632 | execpath, | ||
633 | dirname); | ||
592 | } | 634 | } |
593 | if ( (GNUNET_YES != | 635 | if (8 == sizeof (void *)) |
594 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) && | ||
595 | (8 == sizeof (void *)) ) | ||
596 | { | 636 | { |
597 | dirname = | 637 | dirname = |
598 | DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ | 638 | DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ |
599 | "libexec" DIR_SEPARATOR_STR; | 639 | "libexec" DIR_SEPARATOR_STR; |
640 | GNUNET_asprintf (&tmp, | ||
641 | "%s%s", | ||
642 | execpath, | ||
643 | dirname); | ||
644 | } | ||
645 | if ( (NULL != tmp) && | ||
646 | (GNUNET_YES == | ||
647 | GNUNET_DISK_directory_test (tmp, GNUNET_YES)) ) | ||
648 | { | ||
649 | GNUNET_free (execpath); | ||
650 | return tmp; | ||
600 | } | 651 | } |
652 | |||
601 | GNUNET_free (tmp); | 653 | GNUNET_free (tmp); |
602 | } | 654 | } |
603 | else | 655 | dirname = |
604 | dirname = | 656 | DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ |
605 | DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \ | 657 | "libexec" DIR_SEPARATOR_STR; |
606 | "libexec" DIR_SEPARATOR_STR; | ||
607 | break; | 658 | break; |
608 | default: | 659 | default: |
609 | GNUNET_free (execpath); | 660 | GNUNET_free (execpath); |
610 | return NULL; | 661 | return NULL; |
611 | } | 662 | } |
612 | tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1); | 663 | GNUNET_asprintf (&tmp, |
613 | sprintf (tmp, "%s%s", execpath, dirname); | 664 | "%s%s", |
665 | execpath, | ||
666 | dirname); | ||
614 | GNUNET_free (execpath); | 667 | GNUNET_free (execpath); |
615 | return tmp; | 668 | return tmp; |
616 | } | 669 | } |
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 220f4bdac..c94990415 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -199,7 +199,9 @@ check_rootserver_name (void *cls, const char *hostname) | |||
199 | else | 199 | else |
200 | { | 200 | { |
201 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 201 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
202 | "Received invalid rootserver hostname `%s'.\n", hostname); | 202 | "Received invalid rootserver hostname `%s', expected `%s'\n", |
203 | hostname, | ||
204 | ROOTSERVER_NAME); | ||
203 | GNUNET_break (0); | 205 | GNUNET_break (0); |
204 | } | 206 | } |
205 | } | 207 | } |
@@ -292,11 +294,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
292 | 294 | ||
293 | rootserver = | 295 | rootserver = |
294 | gethostbyaddr (&rootserver_addr, sizeof (rootserver_addr), AF_INET); | 296 | gethostbyaddr (&rootserver_addr, sizeof (rootserver_addr), AF_INET); |
295 | if (rootserver == NULL) | 297 | if (NULL == rootserver) |
296 | { | 298 | { |
297 | /* Error: resolving IP addresses does not work */ | 299 | /* Error: resolving IP addresses does not work */ |
298 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 300 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
299 | _("gethostbyaddr() could not lookup hostname: %s\n"), | 301 | "gethostbyaddr() could not lookup hostname: %s\n", |
300 | hstrerror (h_errno)); | 302 | hstrerror (h_errno)); |
301 | GNUNET_break (0); | 303 | GNUNET_break (0); |
302 | } | 304 | } |