diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-09 14:18:01 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-09 14:18:10 +0200 |
commit | f531d06a9d64d627034c2220769c1af63fb72297 (patch) | |
tree | 25eb2a39209beff39406e0fd5ca869df62fefa06 | |
parent | 839139eb858c01bbba6a25062e32916f2689e252 (diff) | |
download | gnunet-f531d06a9d64d627034c2220769c1af63fb72297.tar.gz gnunet-f531d06a9d64d627034c2220769c1af63fb72297.zip |
fix gnunet-bugreport output issues
-rwxr-xr-x | contrib/scripts/gnunet-bugreport | 221 | ||||
-rw-r--r-- | src/gns/Makefile.am | 11 | ||||
-rw-r--r-- | src/gns/gnunet-gns-proxy-setup-ca.in | 2 | ||||
-rw-r--r-- | src/include/gnunet_pq_lib.h | 142 |
4 files changed, 222 insertions, 154 deletions
diff --git a/contrib/scripts/gnunet-bugreport b/contrib/scripts/gnunet-bugreport index 0e268bba7..a62ee107f 100755 --- a/contrib/scripts/gnunet-bugreport +++ b/contrib/scripts/gnunet-bugreport | |||
@@ -59,7 +59,7 @@ awk_check() | |||
59 | 59 | ||
60 | gcc_check() | 60 | gcc_check() |
61 | { | 61 | { |
62 | TEST=`$WHICH gcc 2>/dev/null` | 62 | TEST=`$WHICH gcc | grep -v "not found" 2>/dev/null` |
63 | if test -n "$TEST"; then | 63 | if test -n "$TEST"; then |
64 | VERS=`gcc --version 2>/dev/null | head -n 1` | 64 | VERS=`gcc --version 2>/dev/null | head -n 1` |
65 | infomsg "gcc : $VERS" | 65 | infomsg "gcc : $VERS" |
@@ -74,7 +74,7 @@ gcc_check() | |||
74 | 74 | ||
75 | cc_check() | 75 | cc_check() |
76 | { | 76 | { |
77 | TEST=`$WHICH cc 2>/dev/null` | 77 | TEST=`$WHICH cc | grep -v "not found" 2>/dev/null` |
78 | if test -n "$TEST"; then | 78 | if test -n "$TEST"; then |
79 | VERS=`cc --version 2>/dev/null | head -n 1` | 79 | VERS=`cc --version 2>/dev/null | head -n 1` |
80 | infomsg "cc : $VERS" | 80 | infomsg "cc : $VERS" |
@@ -85,7 +85,7 @@ cc_check() | |||
85 | 85 | ||
86 | cplusplus_check() | 86 | cplusplus_check() |
87 | { | 87 | { |
88 | TEST=`$WHICH c++ 2>/dev/null` | 88 | TEST=`$WHICH c++ | grep -v "not found" 2>/dev/null` |
89 | if test -n "$TEST"; then | 89 | if test -n "$TEST"; then |
90 | VERS=`c++ --version 2>/dev/null | head -n 1` | 90 | VERS=`c++ --version 2>/dev/null | head -n 1` |
91 | infomsg "c++ : $VERS" | 91 | infomsg "c++ : $VERS" |
@@ -96,18 +96,19 @@ cplusplus_check() | |||
96 | 96 | ||
97 | gmake_check() | 97 | gmake_check() |
98 | { | 98 | { |
99 | TEST=`$WHICH gmake 2>/dev/null` | 99 | TEST=`$WHICH gmake | grep -v "not found" 2>/dev/null` |
100 | if test -n "$TEST" ; then | 100 | if test -n "$TEST" ; then |
101 | gmake --version 2>/dev/null |\ | 101 | VER=`gmake --version 2>/dev/null |\ |
102 | awk -F, '{print $1}' |\ | 102 | awk -F, '{print $1}' |\ |
103 | awk '/GNU Make/{print "GNU gmake :",$NF}' | 103 | awk '/GNU Make/{,$NF}'` |
104 | infomsg "gmake : $VER" | ||
104 | else | 105 | else |
105 | # FIX this test. | ||
106 | TEST=`make --version 2>/dev/null` | 106 | TEST=`make --version 2>/dev/null` |
107 | if test -n "$TEST"; then | 107 | if test -n "$TEST"; then |
108 | make --version 2>/dev/null |\ | 108 | VER=`make --version 2>/dev/null |\ |
109 | awk -F, '{print $1}' |\ | 109 | awk -F, '{print $1}' |\ |
110 | awk '/GNU Make/{print "gmake :",$NF}' | 110 | awk '/GNU Make/{print $NF}'` |
111 | infomsg "gmake : $VER" | ||
111 | else | 112 | else |
112 | warningmsg "gmake : Not Found" | 113 | warningmsg "gmake : Not Found" |
113 | fi | 114 | fi |
@@ -126,15 +127,15 @@ make_check() | |||
126 | 127 | ||
127 | autoconf_check() | 128 | autoconf_check() |
128 | { | 129 | { |
129 | TEST=`$WHICH autoconf 2>/dev/null` | 130 | TEST=`$WHICH autoconf | grep -v "not found" 2>/dev/null` |
130 | if test -n "$TEST"; then | 131 | if test -n "$TEST"; then |
131 | autoconf --version |\ | 132 | autoconf --version |\ |
132 | head -n 1 |\ | 133 | head -n 1 |\ |
133 | awk '{\ | 134 | awk '{\ |
134 | if (length($4) == 0) {\ | 135 | if (length($4) == 0) {\ |
135 | print "autoconf : "$3\ | 136 | print " INFO: autoconf : "$3\ |
136 | } else {\ | 137 | } else {\ |
137 | print "autoconf : "$4\ | 138 | print " INFO: autoconf : "$4\ |
138 | }}' | 139 | }}' |
139 | else | 140 | else |
140 | warningmsg "autoconf : Not Found" | 141 | warningmsg "autoconf : Not Found" |
@@ -143,11 +144,10 @@ autoconf_check() | |||
143 | 144 | ||
144 | automake_check() | 145 | automake_check() |
145 | { | 146 | { |
146 | TEST=`$WHICH automake 2>/dev/null` | 147 | TEST=`$WHICH automake | grep -v "not found" 2>/dev/null` |
147 | if test -n "$TEST"; then | 148 | if test -n "$TEST"; then |
148 | automake --version 2>/dev/null |\ | 149 | VER=`automake --version 2>/dev/null | head -n 1 | awk '{print $4}'` |
149 | head -n 1 |\ | 150 | infomsg "automake : $VER" |
150 | awk '{print "automake : "$4}' | ||
151 | else | 151 | else |
152 | warningmsg "automake : Not Found" | 152 | warningmsg "automake : Not Found" |
153 | fi | 153 | fi |
@@ -156,11 +156,10 @@ automake_check() | |||
156 | # TODO: More libtool variants. | 156 | # TODO: More libtool variants. |
157 | libtool_check() | 157 | libtool_check() |
158 | { | 158 | { |
159 | TEST=`$WHICH libtool 2>/dev/null` | 159 | TEST=`$WHICH libtoolize | grep -v "not found" 2>/dev/null` |
160 | if test -n "$TEST"; then | 160 | if test -n "$TEST"; then |
161 | libtool --version 2>/dev/null |\ | 161 | VER=`libtoolize --version 2>/dev/null | head -n 1 | awk '{print $4}'` |
162 | head -n 1 |\ | 162 | infomsg "libtool : $VER" |
163 | awk '{print "libtool : "$4}' | ||
164 | else | 163 | else |
165 | warningmsg "libtool : Not Found" | 164 | warningmsg "libtool : Not Found" |
166 | fi | 165 | fi |
@@ -168,11 +167,10 @@ libtool_check() | |||
168 | 167 | ||
169 | libextractor_check() | 168 | libextractor_check() |
170 | { | 169 | { |
171 | TEST=`$WHICH extract 2>/dev/null` | 170 | TEST=`$WHICH extract | grep -v "not found" 2>/dev/null` |
172 | if test -n "$TEST"; then | 171 | if test -n "$TEST"; then |
173 | extract -v 2>/dev/null |\ | 172 | VER=`extract -v 2>/dev/null | head -n 1 | awk '{print $2}'` |
174 | head -n 1 |\ | 173 | infomsg "libextractor : $VER" |
175 | awk '{print "libextractor : "$2}' | ||
176 | else | 174 | else |
177 | warningmsg "libextractor : Not Found" | 175 | warningmsg "libextractor : Not Found" |
178 | fi | 176 | fi |
@@ -181,8 +179,8 @@ libextractor_check() | |||
181 | gnunet08_check() | 179 | gnunet08_check() |
182 | { | 180 | { |
183 | if test -x gnunetd; then | 181 | if test -x gnunetd; then |
184 | gnunetd -v | sed -e "s/v//" 2>/dev/null |\ | 182 | VER=`gnunetd -v | sed -e "s/v//" 2>/dev/null` |
185 | awk '{print "GNUnet 0.8 : "$2 (may conflict!)}' | 183 | warningmsg "GNUnet 0.8 : $VER (may conflict!)" |
186 | else | 184 | else |
187 | infomsg "GNUnet 0.8 : Not Found (good)" | 185 | infomsg "GNUnet 0.8 : Not Found (good)" |
188 | fi | 186 | fi |
@@ -190,21 +188,42 @@ gnunet08_check() | |||
190 | 188 | ||
191 | gnunet09x_check() | 189 | gnunet09x_check() |
192 | { | 190 | { |
193 | TEST=`$WHICH gnunet-arm 2>/dev/null` | 191 | TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null` |
194 | if test -n "$TEST"; then | 192 | if test -n "$TEST"; then |
195 | gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\ | 193 | VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'` |
196 | awk '{print "GNUnet 0.9 : "$2}' | 194 | VER9=`echo $VER | grep ^0\.9\.` |
195 | if test -n "$VER9"; then | ||
196 | warningmsg "GNUnet 0.9 : $VER" | ||
197 | else | ||
198 | infomsg "GNUnet 0.9 : Not Found (good)" | ||
199 | fi | ||
197 | else | 200 | else |
198 | infomsg "GNUnet 0.9 : Not Found (good)" | 201 | infomsg "GNUnet 0.9 : Not Found (good)" |
199 | fi | 202 | fi |
200 | } | 203 | } |
201 | 204 | ||
205 | gnunet010x_check() | ||
206 | { | ||
207 | TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null` | ||
208 | if test -n "$TEST"; then | ||
209 | VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'` | ||
210 | VER9=`echo $VER | grep ^0\.10\.` | ||
211 | if test -n "$VER10"; then | ||
212 | warningmsg "GNUnet 0.10 : $VER" | ||
213 | else | ||
214 | infomsg "GNUnet 0.10 : Not Found (good)" | ||
215 | fi | ||
216 | else | ||
217 | infomsg "GNUnet 0.10 : Not Found (good)" | ||
218 | fi | ||
219 | } | ||
220 | |||
202 | gnunet011x_check() | 221 | gnunet011x_check() |
203 | { | 222 | { |
204 | TEST=`$WHICH gnunet-arm 2>/dev/null` | 223 | TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null` |
205 | if test -n "$TEST"; then | 224 | if test -n "$TEST"; then |
206 | gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\ | 225 | VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'` |
207 | awk '{print "GNUnet 0.11.x : "$2}' | 226 | infomsg "GNUnet 0.11 : $VER" |
208 | else | 227 | else |
209 | warningmsg "GNUnet 0.11.x : Not Found" | 228 | warningmsg "GNUnet 0.11.x : Not Found" |
210 | fi | 229 | fi |
@@ -212,10 +231,10 @@ gnunet011x_check() | |||
212 | 231 | ||
213 | gcrypt_check() | 232 | gcrypt_check() |
214 | { | 233 | { |
215 | TEST=`$WHICH libgcrypt-config 2> /dev/null` | 234 | TEST=`$WHICH libgcrypt-config | grep -v "not found" 2> /dev/null` |
216 | if test -n "$TEST"; then | 235 | if test -n "$TEST"; then |
217 | libgcrypt-config --version 2> /dev/null | \ | 236 | VER=`libgcrypt-config --version 2> /dev/null` |
218 | awk '{print "libgcrypt : "$1}' | 237 | infomsg "libgcrypt : $VER" |
219 | else | 238 | else |
220 | warningmsg "libgcrypt : Not Found" | 239 | warningmsg "libgcrypt : Not Found" |
221 | fi | 240 | fi |
@@ -223,10 +242,10 @@ gcrypt_check() | |||
223 | 242 | ||
224 | mysql_check() | 243 | mysql_check() |
225 | { | 244 | { |
226 | TEST=`$WHICH mysql_config 2> /dev/null` | 245 | TEST=`$WHICH mysql_config | grep -v "not found" 2> /dev/null` |
227 | if test -n "$TEST"; then | 246 | if test -n "$TEST"; then |
228 | mysql_config --version 2> /dev/null | \ | 247 | VER=`mysql_config --version 2> /dev/null` |
229 | awk '{print "mysql : "$1}' | 248 | infomsg "mysql : $VER" |
230 | else | 249 | else |
231 | infomsg "mysql : Not Found" | 250 | infomsg "mysql : Not Found" |
232 | fi | 251 | fi |
@@ -234,20 +253,20 @@ mysql_check() | |||
234 | 253 | ||
235 | pkgconf_check() | 254 | pkgconf_check() |
236 | { | 255 | { |
237 | TEST=`$WHICH pkgconf 2> /dev/null` | 256 | TEST=`$WHICH pkgconf | grep -v "not found" 2> /dev/null` |
238 | if test -n "$TEST"; then | 257 | if test -n "$TEST"; then |
239 | pkgconf --version 2> /dev/null | awk '{print "pkgconf : "$1}' | 258 | pkgconf --version 2> /dev/null | awk '{print "pkgconf : "$1}' |
240 | else | 259 | else |
241 | infomsg "pkgconf : Not Found" | 260 | infomsg "pkgconf : Not Found" |
242 | fi | 261 | fi |
243 | } | 262 | } |
244 | 263 | ||
245 | pkgconfig_check() | 264 | pkgconfig_check() |
246 | { | 265 | { |
247 | TEST=`$WHICH pkg-config 2> /dev/null` | 266 | TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` |
248 | if test -n "$TEST"; then | 267 | if test -n "$TEST"; then |
249 | pkg-config --version 2> /dev/null | \ | 268 | VER=`pkg-config --version 2> /dev/null | awk '{print $1}'` |
250 | awk '{print "pkg-config : "$1}' | 269 | infomsg "pkg-config : $VER" |
251 | else | 270 | else |
252 | infomsg "pkg-config : Not Found" | 271 | infomsg "pkg-config : Not Found" |
253 | fi | 272 | fi |
@@ -255,10 +274,10 @@ pkgconfig_check() | |||
255 | 274 | ||
256 | glib2_check() | 275 | glib2_check() |
257 | { | 276 | { |
258 | TEST=`$WHICH pkg-config 2> /dev/null` | 277 | TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` |
259 | if test -n "$TEST"; then | 278 | if test -n "$TEST"; then |
260 | pkg-config --modversion glib-2.0 2> /dev/null | \ | 279 | VER=`pkg-config --modversion glib-2.0 2> /dev/null | awk '{print $1}'` |
261 | awk '{print "glib2 : "$1}' | 280 | infomsg "glib2 : $VER" |
262 | else | 281 | else |
263 | infomsg "glib2 : Not Found" | 282 | infomsg "glib2 : Not Found" |
264 | fi | 283 | fi |
@@ -266,18 +285,52 @@ glib2_check() | |||
266 | 285 | ||
267 | gtk2_check() | 286 | gtk2_check() |
268 | { | 287 | { |
269 | TEST=`$WHICH pkg-config 2> /dev/null` | 288 | TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` |
270 | if test -n "$TEST"; then | 289 | if test -n "$TEST"; then |
271 | pkg-config --modversion gtk+-2.0 2> /dev/null | \ | 290 | VER=`pkg-config --modversion gtk+-2.0 2> /dev/null | awk '{print $1}'` |
272 | awk '{print "gtk2+ : "$1}' | 291 | if test -n "$VER"; then |
292 | infomsg "gtk2+ : $VER" | ||
293 | else | ||
294 | infomsg "gtk2+ : Not found" | ||
295 | fi | ||
273 | else | 296 | else |
274 | infomsg "gtk2+ : Not Found" | 297 | infomsg "gtk2+ : Not Found" |
275 | fi | 298 | fi |
276 | } | 299 | } |
277 | 300 | ||
301 | gtk3_check() | ||
302 | { | ||
303 | TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` | ||
304 | if test -n "$TEST"; then | ||
305 | VER=`pkg-config --modversion gtk+-3.0 2> /dev/null | awk '{print $1}'` | ||
306 | if test -n "$VER"; then | ||
307 | infomsg "gtk3+ : $VER" | ||
308 | else | ||
309 | infomsg "gtk3+ : Not found" | ||
310 | fi | ||
311 | else | ||
312 | infomsg "gtk3+ : Not Found" | ||
313 | fi | ||
314 | } | ||
315 | |||
316 | gtk4_check() | ||
317 | { | ||
318 | TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` | ||
319 | if test -n "$TEST"; then | ||
320 | VER=`pkg-config --modversion gtk+-4.0 2> /dev/null | awk '{print $1}'` | ||
321 | if test -n "$VER"; then | ||
322 | infomsg "gtk4+ : $VER" | ||
323 | else | ||
324 | infomsg "gtk4+ : Not found" | ||
325 | fi | ||
326 | else | ||
327 | infomsg "gtk4+ : Not Found" | ||
328 | fi | ||
329 | } | ||
330 | |||
278 | gmp_check() | 331 | gmp_check() |
279 | { | 332 | { |
280 | TEST=`$WHICH dpkg 2> /dev/null` | 333 | TEST=`$WHICH dpkg | grep -v "not found" 2> /dev/null` |
281 | if test -n "$TEST"; then | 334 | if test -n "$TEST"; then |
282 | LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null` | 335 | LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null` |
283 | if test "$LINES" = "1" | 336 | if test "$LINES" = "1" |
@@ -287,19 +340,20 @@ gmp_check() | |||
287 | else | 340 | else |
288 | errormsg "GMP : dpkg: libgmp-dev not installed" | 341 | errormsg "GMP : dpkg: libgmp-dev not installed" |
289 | fi | 342 | fi |
290 | fi | ||
291 | TEST=`$WHICH rpm 2> /dev/null` | ||
292 | if test -n "$TEST"; then | ||
293 | rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \ | ||
294 | awk '{print "GMP : "$1.rpm}' | ||
295 | else | 343 | else |
296 | warningmsg "GMP : Test not available" | 344 | TEST=`$WHICH rpm | grep -v "not found" 2> /dev/null` |
345 | if test -n "$TEST"; then | ||
346 | rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \ | ||
347 | infomsg "GMP : $1.rpm" | ||
348 | else | ||
349 | warningmsg "GMP : Test not available" | ||
350 | fi | ||
297 | fi | 351 | fi |
298 | } | 352 | } |
299 | 353 | ||
300 | libunistring_check() | 354 | libunistring_check() |
301 | { | 355 | { |
302 | TEST=`$WHICH dpkg 2> /dev/null` | 356 | TEST=`$WHICH dpkg | grep -v "not found" 2> /dev/null` |
303 | if test -n "$TEST"; then | 357 | if test -n "$TEST"; then |
304 | LINES=`dpkg -s libunistring-dev | grep Version | wc -l` | 358 | LINES=`dpkg -s libunistring-dev | grep Version | wc -l` |
305 | if test "$LINES" = "1" | 359 | if test "$LINES" = "1" |
@@ -310,7 +364,7 @@ libunistring_check() | |||
310 | errormsg "libunistring : dpkg: libunistring3-dev not installed" | 364 | errormsg "libunistring : dpkg: libunistring3-dev not installed" |
311 | fi | 365 | fi |
312 | else | 366 | else |
313 | TEST=`$WHICH rpm 2> /dev/null` | 367 | TEST=`$WHICH rpm | grep -v "not found" 2> /dev/null` |
314 | if test -n "$TEST"; then | 368 | if test -n "$TEST"; then |
315 | rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \ | 369 | rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \ |
316 | awk '{print "libunistring : "$1.rpm}' | 370 | awk '{print "libunistring : "$1.rpm}' |
@@ -322,7 +376,7 @@ libunistring_check() | |||
322 | 376 | ||
323 | pkgadd_check() | 377 | pkgadd_check() |
324 | { | 378 | { |
325 | TEST=`$WHICH pkg_add 2> /dev/null` | 379 | TEST=`$WHICH pkg_add | grep -v "not found" 2> /dev/null` |
326 | if test -n "$TEST"; then | 380 | if test -n "$TEST"; then |
327 | VERSION_UNISTRING=`pkg_info -Nb libunistring` | 381 | VERSION_UNISTRING=`pkg_info -Nb libunistring` |
328 | VERSION_GMP=`pkg_info -Nb gmp` | 382 | VERSION_GMP=`pkg_info -Nb gmp` |
@@ -335,10 +389,10 @@ pkgadd_check() | |||
335 | 389 | ||
336 | gettext_check() | 390 | gettext_check() |
337 | { | 391 | { |
338 | TEST=`$WHICH gettext 2> /dev/null` | 392 | TEST=`$WHICH gettext | grep -v "not found" 2> /dev/null` |
339 | if test -n "$TEST"; then | 393 | if test -n "$TEST"; then |
340 | gettext --version | head -n1 2> /dev/null | \ | 394 | VER=`gettext --version | head -n1 2> /dev/null | awk '{print $4}'` |
341 | awk '{print "GNU gettext : "$4}' | 395 | infomsg "GNU gettext : $VER" |
342 | else | 396 | else |
343 | errormsg "GNU gettext : Not found" | 397 | errormsg "GNU gettext : Not found" |
344 | fi | 398 | fi |
@@ -348,10 +402,10 @@ gettext_check() | |||
348 | # found (yes those systems exist) | 402 | # found (yes those systems exist) |
349 | curl_check() | 403 | curl_check() |
350 | { | 404 | { |
351 | TEST=`$WHICH curl-config 2> /dev/null` | 405 | TEST=`$WHICH curl-config | grep -v "not found" 2> /dev/null` |
352 | if test -n "$TEST"; then | 406 | if test -n "$TEST"; then |
353 | curl-config --version | head -n1 2> /dev/null | \ | 407 | VER=`curl-config --version | head -n1 2> /dev/null | awk '{print $2}'` |
354 | awk '{print "libcurl : "$2}' | 408 | infomsg "libcurl : $VER" |
355 | else | 409 | else |
356 | infomsg "libcurl : Not found" | 410 | infomsg "libcurl : Not found" |
357 | fi | 411 | fi |
@@ -359,10 +413,10 @@ curl_check() | |||
359 | 413 | ||
360 | gnurl_check() | 414 | gnurl_check() |
361 | { | 415 | { |
362 | TEST=`$WHICH gnurl-config 2> /dev/null` | 416 | TEST=`$WHICH gnurl-config | grep -v "not found" 2> /dev/null` |
363 | if test -n "$TEST"; then | 417 | if test -n "$TEST"; then |
364 | gnurl-config --version | head -n1 2> /dev/null | \ | 418 | VER=`gnurl-config --version | head -n1 2> /dev/null | awk '{print "$2}'` |
365 | awk '{print "libgnurl : "$2}' | 419 | infomsg "libgnurl : $VER" |
366 | else | 420 | else |
367 | infomsg "libgnurl : Not found" | 421 | infomsg "libgnurl : Not found" |
368 | fi | 422 | fi |
@@ -370,7 +424,6 @@ gnurl_check() | |||
370 | 424 | ||
371 | libmicrohttpd_check() | 425 | libmicrohttpd_check() |
372 | { | 426 | { |
373 | echo -n "libmicrohttpd : " | ||
374 | TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX` | 427 | TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX` |
375 | cat - >$TMPFILE.c <<EOF | 428 | cat - >$TMPFILE.c <<EOF |
376 | #include <microhttpd.h> | 429 | #include <microhttpd.h> |
@@ -381,15 +434,15 @@ int main() | |||
381 | return 0; | 434 | return 0; |
382 | } | 435 | } |
383 | EOF | 436 | EOF |
384 | 437 | VER="Not found" | |
385 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 438 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE` |
386 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 439 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE` |
387 | rm -f $TMPFILE $TMPFILE.bin | 440 | rm -f $TMPFILE $TMPFILE.bin |
441 | infomsg "libmicrohttpd : $VER" | ||
388 | } | 442 | } |
389 | 443 | ||
390 | glpk_check() | 444 | glpk_check() |
391 | { | 445 | { |
392 | echo -n "GNU GLPK : " | ||
393 | TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX` | 446 | TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX` |
394 | cat - >$TMPFILE.c <<EOF | 447 | cat - >$TMPFILE.c <<EOF |
395 | #include <glpk.h> | 448 | #include <glpk.h> |
@@ -400,15 +453,15 @@ int main() | |||
400 | return 0; | 453 | return 0; |
401 | } | 454 | } |
402 | EOF | 455 | EOF |
403 | 456 | VER="Not found" | |
404 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 457 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE` |
405 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 458 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE` |
406 | rm -f $TMPFILE $TMPFILE.bin | 459 | rm -f $TMPFILE $TMPFILE.bin |
460 | infomsg "GNU GLPK : $VER" | ||
407 | } | 461 | } |
408 | 462 | ||
409 | gnutls_check() | 463 | gnutls_check() |
410 | { | 464 | { |
411 | echo -n "GnuTLS : " | ||
412 | TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX` | 465 | TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX` |
413 | cat - >$TMPFILE.c <<EOF | 466 | cat - >$TMPFILE.c <<EOF |
414 | #include <gnutls/gnutls.h> | 467 | #include <gnutls/gnutls.h> |
@@ -419,16 +472,17 @@ int main() | |||
419 | return 0; | 472 | return 0; |
420 | } | 473 | } |
421 | EOF | 474 | EOF |
422 | 475 | VER="Not found" | |
423 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 476 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE` |
424 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 477 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE` |
425 | rm -f $TMPFILE $TMPFILE.bin | 478 | rm -f $TMPFILE $TMPFILE.bin |
479 | infomsg "GnuTLS : $VER" | ||
426 | } | 480 | } |
427 | 481 | ||
428 | main() | 482 | main() |
429 | { | 483 | { |
430 | infomsg "${progname} 0.11.0" | 484 | infomsg "${progname} 0.11.0" |
431 | infomsg | 485 | infomsg |
432 | infomsg "Please submit the following" | 486 | infomsg "Please submit the following" |
433 | infomsg "information with your bug report:" | 487 | infomsg "information with your bug report:" |
434 | linemsg | 488 | linemsg |
@@ -445,6 +499,7 @@ main() | |||
445 | libextractor_check | 499 | libextractor_check |
446 | gnunet08_check | 500 | gnunet08_check |
447 | gnunet09x_check | 501 | gnunet09x_check |
502 | gnunet010x_check | ||
448 | gnunet011x_check | 503 | gnunet011x_check |
449 | gcrypt_check | 504 | gcrypt_check |
450 | mysql_check | 505 | mysql_check |
@@ -452,6 +507,8 @@ main() | |||
452 | pkgconfig_check | 507 | pkgconfig_check |
453 | glib2_check | 508 | glib2_check |
454 | gtk2_check | 509 | gtk2_check |
510 | gtk3_check | ||
511 | gtk4_check | ||
455 | gmp_check | 512 | gmp_check |
456 | libunistring_check | 513 | libunistring_check |
457 | pkgadd_check | 514 | pkgadd_check |
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index bd8311d70..0a68e7cba 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -297,8 +297,17 @@ check_SCRIPTS = \ | |||
297 | test_gns_rel_expiration.sh\ | 297 | test_gns_rel_expiration.sh\ |
298 | test_gns_soa_lookup.sh\ | 298 | test_gns_soa_lookup.sh\ |
299 | test_gns_revocation.sh\ | 299 | test_gns_revocation.sh\ |
300 | test_gns_cname_lookup.sh \ | 300 | test_gns_cname_lookup.sh |
301 | |||
302 | if HAVE_MHD | ||
303 | if HAVE_GNUTLS | ||
304 | if HAVE_LIBGNURL | ||
305 | check_SCRIPTS += \ | ||
301 | test_proxy.sh | 306 | test_proxy.sh |
307 | endif | ||
308 | endif | ||
309 | endif | ||
310 | |||
302 | 311 | ||
303 | if ENABLE_TEST_RUN | 312 | if ENABLE_TEST_RUN |
304 | if HAVE_SQLITE | 313 | if HAVE_SQLITE |
diff --git a/src/gns/gnunet-gns-proxy-setup-ca.in b/src/gns/gnunet-gns-proxy-setup-ca.in index 184da4853..cd5d8c70f 100644 --- a/src/gns/gnunet-gns-proxy-setup-ca.in +++ b/src/gns/gnunet-gns-proxy-setup-ca.in | |||
@@ -61,7 +61,7 @@ statusmsg() | |||
61 | 61 | ||
62 | infomsg() | 62 | infomsg() |
63 | { | 63 | { |
64 | if [ $verbosity = 1 ]; then | 64 | if [ x$verbosity = x1 ]; then |
65 | statusmsg "INFO: $@" | 65 | statusmsg "INFO: $@" |
66 | fi | 66 | fi |
67 | } | 67 | } |
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index 492491e94..1734fb94d 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.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 | ||
@@ -46,16 +46,15 @@ | |||
46 | * @param scratch_length number of entries left in @a scratch | 46 | * @param scratch_length number of entries left in @a scratch |
47 | * @return -1 on error, number of offsets used in @a scratch otherwise | 47 | * @return -1 on error, number of offsets used in @a scratch otherwise |
48 | */ | 48 | */ |
49 | typedef int | 49 | typedef int (*GNUNET_PQ_QueryConverter) (void *cls, |
50 | (*GNUNET_PQ_QueryConverter)(void *cls, | 50 | const void *data, |
51 | const void *data, | 51 | size_t data_len, |
52 | size_t data_len, | 52 | void *param_values[], |
53 | void *param_values[], | 53 | int param_lengths[], |
54 | int param_lengths[], | 54 | int param_formats[], |
55 | int param_formats[], | 55 | unsigned int param_length, |
56 | unsigned int param_length, | 56 | void *scratch[], |
57 | void *scratch[], | 57 | unsigned int scratch_length); |
58 | unsigned int scratch_length); | ||
59 | 58 | ||
60 | 59 | ||
61 | /** | 60 | /** |
@@ -94,7 +93,10 @@ struct GNUNET_PQ_QueryParam | |||
94 | /** | 93 | /** |
95 | * End of query parameter specification. | 94 | * End of query parameter specification. |
96 | */ | 95 | */ |
97 | #define GNUNET_PQ_query_param_end { NULL, NULL, NULL, 0, 0 } | 96 | #define GNUNET_PQ_query_param_end \ |
97 | { \ | ||
98 | NULL, NULL, NULL, 0, 0 \ | ||
99 | } | ||
98 | 100 | ||
99 | 101 | ||
100 | /** | 102 | /** |
@@ -105,9 +107,7 @@ struct GNUNET_PQ_QueryParam | |||
105 | * @oaran ptr_size number of bytes in @a ptr | 107 | * @oaran ptr_size number of bytes in @a ptr |
106 | */ | 108 | */ |
107 | struct GNUNET_PQ_QueryParam | 109 | struct GNUNET_PQ_QueryParam |
108 | GNUNET_PQ_query_param_fixed_size (const void *ptr, | 110 | GNUNET_PQ_query_param_fixed_size (const void *ptr, size_t ptr_size); |
109 | size_t ptr_size); | ||
110 | |||
111 | 111 | ||
112 | 112 | ||
113 | /** | 113 | /** |
@@ -125,7 +125,8 @@ GNUNET_PQ_query_param_string (const char *ptr); | |||
125 | * | 125 | * |
126 | * @param x pointer to the query parameter to pass. | 126 | * @param x pointer to the query parameter to pass. |
127 | */ | 127 | */ |
128 | #define GNUNET_PQ_query_param_auto_from_type(x) GNUNET_PQ_query_param_fixed_size ((x), sizeof (*(x))) | 128 | #define GNUNET_PQ_query_param_auto_from_type(x) \ |
129 | GNUNET_PQ_query_param_fixed_size ((x), sizeof (*(x))) | ||
129 | 130 | ||
130 | 131 | ||
131 | /** | 132 | /** |
@@ -135,7 +136,8 @@ GNUNET_PQ_query_param_string (const char *ptr); | |||
135 | * @param x the query parameter to pass. | 136 | * @param x the query parameter to pass. |
136 | */ | 137 | */ |
137 | struct GNUNET_PQ_QueryParam | 138 | struct GNUNET_PQ_QueryParam |
138 | GNUNET_PQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x); | 139 | GNUNET_PQ_query_param_rsa_public_key ( |
140 | const struct GNUNET_CRYPTO_RsaPublicKey *x); | ||
139 | 141 | ||
140 | 142 | ||
141 | /** | 143 | /** |
@@ -145,7 +147,8 @@ GNUNET_PQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x | |||
145 | * @param x the query parameter to pass | 147 | * @param x the query parameter to pass |
146 | */ | 148 | */ |
147 | struct GNUNET_PQ_QueryParam | 149 | struct GNUNET_PQ_QueryParam |
148 | GNUNET_PQ_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x); | 150 | GNUNET_PQ_query_param_rsa_signature ( |
151 | const struct GNUNET_CRYPTO_RsaSignature *x); | ||
149 | 152 | ||
150 | 153 | ||
151 | /** | 154 | /** |
@@ -165,7 +168,8 @@ GNUNET_PQ_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x); | |||
165 | * @param x pointer to the query parameter to pass | 168 | * @param x pointer to the query parameter to pass |
166 | */ | 169 | */ |
167 | struct GNUNET_PQ_QueryParam | 170 | struct GNUNET_PQ_QueryParam |
168 | GNUNET_PQ_query_param_absolute_time_nbo (const struct GNUNET_TIME_AbsoluteNBO *x); | 171 | GNUNET_PQ_query_param_absolute_time_nbo ( |
172 | const struct GNUNET_TIME_AbsoluteNBO *x); | ||
169 | 173 | ||
170 | 174 | ||
171 | /** | 175 | /** |
@@ -211,13 +215,12 @@ GNUNET_PQ_query_param_uint64 (const uint64_t *x); | |||
211 | * #GNUNET_YES if all results could be extracted | 215 | * #GNUNET_YES if all results could be extracted |
212 | * #GNUNET_SYSERR if a result was invalid (non-existing field or NULL) | 216 | * #GNUNET_SYSERR if a result was invalid (non-existing field or NULL) |
213 | */ | 217 | */ |
214 | typedef int | 218 | typedef int (*GNUNET_PQ_ResultConverter) (void *cls, |
215 | (*GNUNET_PQ_ResultConverter)(void *cls, | 219 | PGresult *result, |
216 | PGresult *result, | 220 | int row, |
217 | int row, | 221 | const char *fname, |
218 | const char *fname, | 222 | size_t *dst_size, |
219 | size_t *dst_size, | 223 | void *dst); |
220 | void *dst); | ||
221 | 224 | ||
222 | 225 | ||
223 | /** | 226 | /** |
@@ -227,9 +230,7 @@ typedef int | |||
227 | * @param cls closure | 230 | * @param cls closure |
228 | * @param rd result data to clean up | 231 | * @param rd result data to clean up |
229 | */ | 232 | */ |
230 | typedef void | 233 | typedef void (*GNUNET_PQ_ResultCleanup) (void *cls, void *rd); |
231 | (*GNUNET_PQ_ResultCleanup)(void *cls, | ||
232 | void *rd); | ||
233 | 234 | ||
234 | 235 | ||
235 | /** | 236 | /** |
@@ -275,7 +276,6 @@ struct GNUNET_PQ_ResultSpec | |||
275 | * Where to store actual size of the result. | 276 | * Where to store actual size of the result. |
276 | */ | 277 | */ |
277 | size_t *result_size; | 278 | size_t *result_size; |
278 | |||
279 | }; | 279 | }; |
280 | 280 | ||
281 | 281 | ||
@@ -284,7 +284,10 @@ struct GNUNET_PQ_ResultSpec | |||
284 | * | 284 | * |
285 | * @return array last entry for the result specification to use | 285 | * @return array last entry for the result specification to use |
286 | */ | 286 | */ |
287 | #define GNUNET_PQ_result_spec_end { NULL, NULL, NULL, NULL, 0, NULL, NULL } | 287 | #define GNUNET_PQ_result_spec_end \ |
288 | { \ | ||
289 | NULL, NULL, NULL, NULL, 0, NULL, NULL \ | ||
290 | } | ||
288 | 291 | ||
289 | 292 | ||
290 | /** | 293 | /** |
@@ -297,8 +300,8 @@ struct GNUNET_PQ_ResultSpec | |||
297 | */ | 300 | */ |
298 | struct GNUNET_PQ_ResultSpec | 301 | struct GNUNET_PQ_ResultSpec |
299 | GNUNET_PQ_result_spec_variable_size (const char *name, | 302 | GNUNET_PQ_result_spec_variable_size (const char *name, |
300 | void **dst, | 303 | void **dst, |
301 | size_t *sptr); | 304 | size_t *sptr); |
302 | 305 | ||
303 | 306 | ||
304 | /** | 307 | /** |
@@ -310,10 +313,7 @@ GNUNET_PQ_result_spec_variable_size (const char *name, | |||
310 | * @return array entry for the result specification to use | 313 | * @return array entry for the result specification to use |
311 | */ | 314 | */ |
312 | struct GNUNET_PQ_ResultSpec | 315 | struct GNUNET_PQ_ResultSpec |
313 | GNUNET_PQ_result_spec_fixed_size (const char *name, | 316 | GNUNET_PQ_result_spec_fixed_size (const char *name, void *dst, size_t dst_size); |
314 | void *dst, | ||
315 | size_t dst_size); | ||
316 | |||
317 | 317 | ||
318 | 318 | ||
319 | /** | 319 | /** |
@@ -323,7 +323,8 @@ GNUNET_PQ_result_spec_fixed_size (const char *name, | |||
323 | * @param dst point to where to store the result, type fits expected result size | 323 | * @param dst point to where to store the result, type fits expected result size |
324 | * @return array entry for the result specification to use | 324 | * @return array entry for the result specification to use |
325 | */ | 325 | */ |
326 | #define GNUNET_PQ_result_spec_auto_from_type(name, dst) GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof (*(dst))) | 326 | #define GNUNET_PQ_result_spec_auto_from_type(name, dst) \ |
327 | GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof (*(dst))) | ||
327 | 328 | ||
328 | 329 | ||
329 | /** | 330 | /** |
@@ -334,8 +335,7 @@ GNUNET_PQ_result_spec_fixed_size (const char *name, | |||
334 | * @return array entry for the result specification to use | 335 | * @return array entry for the result specification to use |
335 | */ | 336 | */ |
336 | struct GNUNET_PQ_ResultSpec | 337 | struct GNUNET_PQ_ResultSpec |
337 | GNUNET_PQ_result_spec_string (const char *name, | 338 | GNUNET_PQ_result_spec_string (const char *name, char **dst); |
338 | char **dst); | ||
339 | 339 | ||
340 | 340 | ||
341 | /** | 341 | /** |
@@ -347,7 +347,7 @@ GNUNET_PQ_result_spec_string (const char *name, | |||
347 | */ | 347 | */ |
348 | struct GNUNET_PQ_ResultSpec | 348 | struct GNUNET_PQ_ResultSpec |
349 | GNUNET_PQ_result_spec_rsa_public_key (const char *name, | 349 | GNUNET_PQ_result_spec_rsa_public_key (const char *name, |
350 | struct GNUNET_CRYPTO_RsaPublicKey **rsa); | 350 | struct GNUNET_CRYPTO_RsaPublicKey **rsa); |
351 | 351 | ||
352 | 352 | ||
353 | /** | 353 | /** |
@@ -359,7 +359,7 @@ GNUNET_PQ_result_spec_rsa_public_key (const char *name, | |||
359 | */ | 359 | */ |
360 | struct GNUNET_PQ_ResultSpec | 360 | struct GNUNET_PQ_ResultSpec |
361 | GNUNET_PQ_result_spec_rsa_signature (const char *name, | 361 | GNUNET_PQ_result_spec_rsa_signature (const char *name, |
362 | struct GNUNET_CRYPTO_RsaSignature **sig); | 362 | struct GNUNET_CRYPTO_RsaSignature **sig); |
363 | 363 | ||
364 | 364 | ||
365 | /** | 365 | /** |
@@ -371,7 +371,7 @@ GNUNET_PQ_result_spec_rsa_signature (const char *name, | |||
371 | */ | 371 | */ |
372 | struct GNUNET_PQ_ResultSpec | 372 | struct GNUNET_PQ_ResultSpec |
373 | GNUNET_PQ_result_spec_absolute_time (const char *name, | 373 | GNUNET_PQ_result_spec_absolute_time (const char *name, |
374 | struct GNUNET_TIME_Absolute *at); | 374 | struct GNUNET_TIME_Absolute *at); |
375 | 375 | ||
376 | 376 | ||
377 | /** | 377 | /** |
@@ -383,7 +383,7 @@ GNUNET_PQ_result_spec_absolute_time (const char *name, | |||
383 | */ | 383 | */ |
384 | struct GNUNET_PQ_ResultSpec | 384 | struct GNUNET_PQ_ResultSpec |
385 | GNUNET_PQ_result_spec_absolute_time_nbo (const char *name, | 385 | GNUNET_PQ_result_spec_absolute_time_nbo (const char *name, |
386 | struct GNUNET_TIME_AbsoluteNBO *at); | 386 | struct GNUNET_TIME_AbsoluteNBO *at); |
387 | 387 | ||
388 | 388 | ||
389 | /** | 389 | /** |
@@ -394,8 +394,7 @@ GNUNET_PQ_result_spec_absolute_time_nbo (const char *name, | |||
394 | * @return array entry for the result specification to use | 394 | * @return array entry for the result specification to use |
395 | */ | 395 | */ |
396 | struct GNUNET_PQ_ResultSpec | 396 | struct GNUNET_PQ_ResultSpec |
397 | GNUNET_PQ_result_spec_uint16 (const char *name, | 397 | GNUNET_PQ_result_spec_uint16 (const char *name, uint16_t *u16); |
398 | uint16_t *u16); | ||
399 | 398 | ||
400 | 399 | ||
401 | /** | 400 | /** |
@@ -406,8 +405,7 @@ GNUNET_PQ_result_spec_uint16 (const char *name, | |||
406 | * @return array entry for the result specification to use | 405 | * @return array entry for the result specification to use |
407 | */ | 406 | */ |
408 | struct GNUNET_PQ_ResultSpec | 407 | struct GNUNET_PQ_ResultSpec |
409 | GNUNET_PQ_result_spec_uint32 (const char *name, | 408 | GNUNET_PQ_result_spec_uint32 (const char *name, uint32_t *u32); |
410 | uint32_t *u32); | ||
411 | 409 | ||
412 | 410 | ||
413 | /** | 411 | /** |
@@ -418,8 +416,7 @@ GNUNET_PQ_result_spec_uint32 (const char *name, | |||
418 | * @return array entry for the result specification to use | 416 | * @return array entry for the result specification to use |
419 | */ | 417 | */ |
420 | struct GNUNET_PQ_ResultSpec | 418 | struct GNUNET_PQ_ResultSpec |
421 | GNUNET_PQ_result_spec_uint64 (const char *name, | 419 | GNUNET_PQ_result_spec_uint64 (const char *name, uint64_t *u64); |
422 | uint64_t *u64); | ||
423 | 420 | ||
424 | 421 | ||
425 | /* ************************* pq.c functions ************************ */ | 422 | /* ************************* pq.c functions ************************ */ |
@@ -435,8 +432,8 @@ GNUNET_PQ_result_spec_uint64 (const char *name, | |||
435 | */ | 432 | */ |
436 | PGresult * | 433 | PGresult * |
437 | GNUNET_PQ_exec_prepared (PGconn *db_conn, | 434 | GNUNET_PQ_exec_prepared (PGconn *db_conn, |
438 | const char *name, | 435 | const char *name, |
439 | const struct GNUNET_PQ_QueryParam *params); | 436 | const struct GNUNET_PQ_QueryParam *params); |
440 | 437 | ||
441 | 438 | ||
442 | /** | 439 | /** |
@@ -452,8 +449,8 @@ GNUNET_PQ_exec_prepared (PGconn *db_conn, | |||
452 | */ | 449 | */ |
453 | int | 450 | int |
454 | GNUNET_PQ_extract_result (PGresult *result, | 451 | GNUNET_PQ_extract_result (PGresult *result, |
455 | struct GNUNET_PQ_ResultSpec *rs, | 452 | struct GNUNET_PQ_ResultSpec *rs, |
456 | int row); | 453 | int row); |
457 | 454 | ||
458 | 455 | ||
459 | /** | 456 | /** |
@@ -518,10 +515,9 @@ GNUNET_PQ_eval_prepared_non_select (PGconn *connection, | |||
518 | * @param result the postgres result | 515 | * @param result the postgres result |
519 | * @param num_result the number of results in @a result | 516 | * @param num_result the number of results in @a result |
520 | */ | 517 | */ |
521 | typedef void | 518 | typedef void (*GNUNET_PQ_PostgresResultHandler) (void *cls, |
522 | (*GNUNET_PQ_PostgresResultHandler)(void *cls, | 519 | PGresult *result, |
523 | PGresult *result, | 520 | unsigned int num_results); |
524 | unsigned int num_results); | ||
525 | 521 | ||
526 | 522 | ||
527 | /** | 523 | /** |
@@ -563,10 +559,11 @@ GNUNET_PQ_eval_prepared_multi_select (PGconn *connection, | |||
563 | * codes to `enum GNUNET_DB_QueryStatus`. | 559 | * codes to `enum GNUNET_DB_QueryStatus`. |
564 | */ | 560 | */ |
565 | enum GNUNET_DB_QueryStatus | 561 | enum GNUNET_DB_QueryStatus |
566 | GNUNET_PQ_eval_prepared_singleton_select (PGconn *connection, | 562 | GNUNET_PQ_eval_prepared_singleton_select ( |
567 | const char *statement_name, | 563 | PGconn *connection, |
568 | const struct GNUNET_PQ_QueryParam *params, | 564 | const char *statement_name, |
569 | struct GNUNET_PQ_ResultSpec *rs); | 565 | const struct GNUNET_PQ_QueryParam *params, |
566 | struct GNUNET_PQ_ResultSpec *rs); | ||
570 | 567 | ||
571 | 568 | ||
572 | /* ******************** pq_prepare.c functions ************** */ | 569 | /* ******************** pq_prepare.c functions ************** */ |
@@ -576,7 +573,8 @@ GNUNET_PQ_eval_prepared_singleton_select (PGconn *connection, | |||
576 | * Information needed to prepare a list of SQL statements using | 573 | * Information needed to prepare a list of SQL statements using |
577 | * #GNUNET_PQ_prepare_statements(). | 574 | * #GNUNET_PQ_prepare_statements(). |
578 | */ | 575 | */ |
579 | struct GNUNET_PQ_PreparedStatement { | 576 | struct GNUNET_PQ_PreparedStatement |
577 | { | ||
580 | 578 | ||
581 | /** | 579 | /** |
582 | * Name of the statement. | 580 | * Name of the statement. |
@@ -592,14 +590,16 @@ struct GNUNET_PQ_PreparedStatement { | |||
592 | * Number of arguments included in @e sql. | 590 | * Number of arguments included in @e sql. |
593 | */ | 591 | */ |
594 | unsigned int num_arguments; | 592 | unsigned int num_arguments; |
595 | |||
596 | }; | 593 | }; |
597 | 594 | ||
598 | 595 | ||
599 | /** | 596 | /** |
600 | * Terminator for prepared statement list. | 597 | * Terminator for prepared statement list. |
601 | */ | 598 | */ |
602 | #define GNUNET_PQ_PREPARED_STATEMENT_END { NULL, NULL, 0 } | 599 | #define GNUNET_PQ_PREPARED_STATEMENT_END \ |
600 | { \ | ||
601 | NULL, NULL, 0 \ | ||
602 | } | ||
603 | 603 | ||
604 | 604 | ||
605 | /** | 605 | /** |
@@ -637,7 +637,8 @@ GNUNET_PQ_prepare_statements (PGconn *connection, | |||
637 | * Information needed to run a list of SQL statements using | 637 | * Information needed to run a list of SQL statements using |
638 | * #GNUNET_PQ_exec_statements(). | 638 | * #GNUNET_PQ_exec_statements(). |
639 | */ | 639 | */ |
640 | struct GNUNET_PQ_ExecuteStatement { | 640 | struct GNUNET_PQ_ExecuteStatement |
641 | { | ||
641 | 642 | ||
642 | /** | 643 | /** |
643 | * Actual SQL statement. | 644 | * Actual SQL statement. |
@@ -648,14 +649,16 @@ struct GNUNET_PQ_ExecuteStatement { | |||
648 | * Should we ignore errors? | 649 | * Should we ignore errors? |
649 | */ | 650 | */ |
650 | int ignore_errors; | 651 | int ignore_errors; |
651 | |||
652 | }; | 652 | }; |
653 | 653 | ||
654 | 654 | ||
655 | /** | 655 | /** |
656 | * Terminator for executable statement list. | 656 | * Terminator for executable statement list. |
657 | */ | 657 | */ |
658 | #define GNUNET_PQ_EXECUTE_STATEMENT_END { NULL, GNUNET_SYSERR } | 658 | #define GNUNET_PQ_EXECUTE_STATEMENT_END \ |
659 | { \ | ||
660 | NULL, GNUNET_SYSERR \ | ||
661 | } | ||
659 | 662 | ||
660 | 663 | ||
661 | /** | 664 | /** |
@@ -721,7 +724,6 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
721 | const char *section); | 724 | const char *section); |
722 | 725 | ||
723 | 726 | ||
724 | 727 | #endif /* GNUNET_PQ_LIB_H_ */ | |
725 | #endif /* GNUNET_PQ_LIB_H_ */ | ||
726 | 728 | ||
727 | /* end of include/gnunet_pq_lib.h */ | 729 | /* end of include/gnunet_pq_lib.h */ |