gcc_check()
{
- TEST=`$WHICH gcc 2>/dev/null`
+ TEST=`$WHICH gcc | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
VERS=`gcc --version 2>/dev/null | head -n 1`
infomsg "gcc : $VERS"
cc_check()
{
- TEST=`$WHICH cc 2>/dev/null`
+ TEST=`$WHICH cc | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
VERS=`cc --version 2>/dev/null | head -n 1`
infomsg "cc : $VERS"
cplusplus_check()
{
- TEST=`$WHICH c++ 2>/dev/null`
+ TEST=`$WHICH c++ | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
VERS=`c++ --version 2>/dev/null | head -n 1`
infomsg "c++ : $VERS"
gmake_check()
{
- TEST=`$WHICH gmake 2>/dev/null`
+ TEST=`$WHICH gmake | grep -v "not found" 2>/dev/null`
if test -n "$TEST" ; then
- gmake --version 2>/dev/null |\
+ VER=`gmake --version 2>/dev/null |\
awk -F, '{print $1}' |\
- awk '/GNU Make/{print "GNU gmake :",$NF}'
+ awk '/GNU Make/{,$NF}'`
+ infomsg "gmake : $VER"
else
- # FIX this test.
TEST=`make --version 2>/dev/null`
if test -n "$TEST"; then
- make --version 2>/dev/null |\
+ VER=`make --version 2>/dev/null |\
awk -F, '{print $1}' |\
- awk '/GNU Make/{print "gmake :",$NF}'
+ awk '/GNU Make/{print $NF}'`
+ infomsg "gmake : $VER"
else
warningmsg "gmake : Not Found"
fi
autoconf_check()
{
- TEST=`$WHICH autoconf 2>/dev/null`
+ TEST=`$WHICH autoconf | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
autoconf --version |\
head -n 1 |\
awk '{\
if (length($4) == 0) {\
- print "autoconf : "$3\
+ print " INFO: autoconf : "$3\
} else {\
- print "autoconf : "$4\
+ print " INFO: autoconf : "$4\
}}'
else
warningmsg "autoconf : Not Found"
automake_check()
{
- TEST=`$WHICH automake 2>/dev/null`
+ TEST=`$WHICH automake | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
- automake --version 2>/dev/null |\
- head -n 1 |\
- awk '{print "automake : "$4}'
+ VER=`automake --version 2>/dev/null | head -n 1 | awk '{print $4}'`
+ infomsg "automake : $VER"
else
warningmsg "automake : Not Found"
fi
# TODO: More libtool variants.
libtool_check()
{
- TEST=`$WHICH libtool 2>/dev/null`
+ TEST=`$WHICH libtoolize | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
- libtool --version 2>/dev/null |\
- head -n 1 |\
- awk '{print "libtool : "$4}'
+ VER=`libtoolize --version 2>/dev/null | head -n 1 | awk '{print $4}'`
+ infomsg "libtool : $VER"
else
warningmsg "libtool : Not Found"
fi
libextractor_check()
{
- TEST=`$WHICH extract 2>/dev/null`
+ TEST=`$WHICH extract | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
- extract -v 2>/dev/null |\
- head -n 1 |\
- awk '{print "libextractor : "$2}'
+ VER=`extract -v 2>/dev/null | head -n 1 | awk '{print $2}'`
+ infomsg "libextractor : $VER"
else
warningmsg "libextractor : Not Found"
fi
gnunet08_check()
{
if test -x gnunetd; then
- gnunetd -v | sed -e "s/v//" 2>/dev/null |\
- awk '{print "GNUnet 0.8 : "$2 (may conflict!)}'
+ VER=`gnunetd -v | sed -e "s/v//" 2>/dev/null`
+ warningmsg "GNUnet 0.8 : $VER (may conflict!)"
else
infomsg "GNUnet 0.8 : Not Found (good)"
fi
gnunet09x_check()
{
- TEST=`$WHICH gnunet-arm 2>/dev/null`
+ TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
- gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\
- awk '{print "GNUnet 0.9 : "$2}'
+ VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'`
+ VER9=`echo $VER | grep ^0\.9\.`
+ if test -n "$VER9"; then
+ warningmsg "GNUnet 0.9 : $VER"
+ else
+ infomsg "GNUnet 0.9 : Not Found (good)"
+ fi
else
infomsg "GNUnet 0.9 : Not Found (good)"
fi
}
+gnunet010x_check()
+{
+ TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null`
+ if test -n "$TEST"; then
+ VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'`
+ VER9=`echo $VER | grep ^0\.10\.`
+ if test -n "$VER10"; then
+ warningmsg "GNUnet 0.10 : $VER"
+ else
+ infomsg "GNUnet 0.10 : Not Found (good)"
+ fi
+ else
+ infomsg "GNUnet 0.10 : Not Found (good)"
+ fi
+}
+
gnunet011x_check()
{
- TEST=`$WHICH gnunet-arm 2>/dev/null`
+ TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null`
if test -n "$TEST"; then
- gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\
- awk '{print "GNUnet 0.11.x : "$2}'
+ VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'`
+ infomsg "GNUnet 0.11 : $VER"
else
warningmsg "GNUnet 0.11.x : Not Found"
fi
gcrypt_check()
{
- TEST=`$WHICH libgcrypt-config 2> /dev/null`
+ TEST=`$WHICH libgcrypt-config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- libgcrypt-config --version 2> /dev/null | \
- awk '{print "libgcrypt : "$1}'
+ VER=`libgcrypt-config --version 2> /dev/null`
+ infomsg "libgcrypt : $VER"
else
warningmsg "libgcrypt : Not Found"
fi
mysql_check()
{
- TEST=`$WHICH mysql_config 2> /dev/null`
+ TEST=`$WHICH mysql_config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- mysql_config --version 2> /dev/null | \
- awk '{print "mysql : "$1}'
+ VER=`mysql_config --version 2> /dev/null`
+ infomsg "mysql : $VER"
else
infomsg "mysql : Not Found"
fi
pkgconf_check()
{
- TEST=`$WHICH pkgconf 2> /dev/null`
+ TEST=`$WHICH pkgconf | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
pkgconf --version 2> /dev/null | awk '{print "pkgconf : "$1}'
else
- infomsg "pkgconf : Not Found"
+ infomsg "pkgconf : Not Found"
fi
}
-
+
pkgconfig_check()
{
- TEST=`$WHICH pkg-config 2> /dev/null`
+ TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- pkg-config --version 2> /dev/null | \
- awk '{print "pkg-config : "$1}'
+ VER=`pkg-config --version 2> /dev/null | awk '{print $1}'`
+ infomsg "pkg-config : $VER"
else
infomsg "pkg-config : Not Found"
fi
glib2_check()
{
- TEST=`$WHICH pkg-config 2> /dev/null`
+ TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- pkg-config --modversion glib-2.0 2> /dev/null | \
- awk '{print "glib2 : "$1}'
+ VER=`pkg-config --modversion glib-2.0 2> /dev/null | awk '{print $1}'`
+ infomsg "glib2 : $VER"
else
infomsg "glib2 : Not Found"
fi
gtk2_check()
{
- TEST=`$WHICH pkg-config 2> /dev/null`
+ TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- pkg-config --modversion gtk+-2.0 2> /dev/null | \
- awk '{print "gtk2+ : "$1}'
+ VER=`pkg-config --modversion gtk+-2.0 2> /dev/null | awk '{print $1}'`
+ if test -n "$VER"; then
+ infomsg "gtk2+ : $VER"
+ else
+ infomsg "gtk2+ : Not found"
+ fi
else
infomsg "gtk2+ : Not Found"
fi
}
+gtk3_check()
+{
+ TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
+ if test -n "$TEST"; then
+ VER=`pkg-config --modversion gtk+-3.0 2> /dev/null | awk '{print $1}'`
+ if test -n "$VER"; then
+ infomsg "gtk3+ : $VER"
+ else
+ infomsg "gtk3+ : Not found"
+ fi
+ else
+ infomsg "gtk3+ : Not Found"
+ fi
+}
+
+gtk4_check()
+{
+ TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
+ if test -n "$TEST"; then
+ VER=`pkg-config --modversion gtk+-4.0 2> /dev/null | awk '{print $1}'`
+ if test -n "$VER"; then
+ infomsg "gtk4+ : $VER"
+ else
+ infomsg "gtk4+ : Not found"
+ fi
+ else
+ infomsg "gtk4+ : Not Found"
+ fi
+}
+
gmp_check()
{
- TEST=`$WHICH dpkg 2> /dev/null`
+ TEST=`$WHICH dpkg | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null`
if test "$LINES" = "1"
else
errormsg "GMP : dpkg: libgmp-dev not installed"
fi
- fi
- TEST=`$WHICH rpm 2> /dev/null`
- if test -n "$TEST"; then
- rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \
- awk '{print "GMP : "$1.rpm}'
else
- warningmsg "GMP : Test not available"
+ TEST=`$WHICH rpm | grep -v "not found" 2> /dev/null`
+ if test -n "$TEST"; then
+ rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \
+ infomsg "GMP : $1.rpm"
+ else
+ warningmsg "GMP : Test not available"
+ fi
fi
}
libunistring_check()
{
- TEST=`$WHICH dpkg 2> /dev/null`
+ TEST=`$WHICH dpkg | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
LINES=`dpkg -s libunistring-dev | grep Version | wc -l`
if test "$LINES" = "1"
errormsg "libunistring : dpkg: libunistring3-dev not installed"
fi
else
- TEST=`$WHICH rpm 2> /dev/null`
+ TEST=`$WHICH rpm | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \
awk '{print "libunistring : "$1.rpm}'
pkgadd_check()
{
- TEST=`$WHICH pkg_add 2> /dev/null`
+ TEST=`$WHICH pkg_add | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
VERSION_UNISTRING=`pkg_info -Nb libunistring`
VERSION_GMP=`pkg_info -Nb gmp`
gettext_check()
{
- TEST=`$WHICH gettext 2> /dev/null`
+ TEST=`$WHICH gettext | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- gettext --version | head -n1 2> /dev/null | \
- awk '{print "GNU gettext : "$4}'
+ VER=`gettext --version | head -n1 2> /dev/null | awk '{print $4}'`
+ infomsg "GNU gettext : $VER"
else
errormsg "GNU gettext : Not found"
fi
# found (yes those systems exist)
curl_check()
{
- TEST=`$WHICH curl-config 2> /dev/null`
+ TEST=`$WHICH curl-config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- curl-config --version | head -n1 2> /dev/null | \
- awk '{print "libcurl : "$2}'
+ VER=`curl-config --version | head -n1 2> /dev/null | awk '{print $2}'`
+ infomsg "libcurl : $VER"
else
infomsg "libcurl : Not found"
fi
gnurl_check()
{
- TEST=`$WHICH gnurl-config 2> /dev/null`
+ TEST=`$WHICH gnurl-config | grep -v "not found" 2> /dev/null`
if test -n "$TEST"; then
- gnurl-config --version | head -n1 2> /dev/null | \
- awk '{print "libgnurl : "$2}'
+ VER=`gnurl-config --version | head -n1 2> /dev/null | awk '{print "$2}'`
+ infomsg "libgnurl : $VER"
else
infomsg "libgnurl : Not found"
fi
libmicrohttpd_check()
{
- echo -n "libmicrohttpd : "
TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX`
cat - >$TMPFILE.c <<EOF
#include <microhttpd.h>
return 0;
}
EOF
-
- gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
- cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
+ VER="Not found"
+ gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
+ cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
rm -f $TMPFILE $TMPFILE.bin
+ infomsg "libmicrohttpd : $VER"
}
glpk_check()
{
- echo -n "GNU GLPK : "
TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX`
cat - >$TMPFILE.c <<EOF
#include <glpk.h>
return 0;
}
EOF
-
- gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
- cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
+ VER="Not found"
+ gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
+ cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
rm -f $TMPFILE $TMPFILE.bin
+ infomsg "GNU GLPK : $VER"
}
gnutls_check()
{
- echo -n "GnuTLS : "
TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX`
cat - >$TMPFILE.c <<EOF
#include <gnutls/gnutls.h>
return 0;
}
EOF
-
- gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
- cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
+ VER="Not found"
+ gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
+ cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
rm -f $TMPFILE $TMPFILE.bin
+ infomsg "GnuTLS : $VER"
}
main()
{
infomsg "${progname} 0.11.0"
- infomsg
+ infomsg
infomsg "Please submit the following"
infomsg "information with your bug report:"
linemsg
libextractor_check
gnunet08_check
gnunet09x_check
+ gnunet010x_check
gnunet011x_check
gcrypt_check
mysql_check
pkgconfig_check
glib2_check
gtk2_check
+ gtk3_check
+ gtk4_check
gmp_check
libunistring_check
pkgadd_check
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
* @param scratch_length number of entries left in @a scratch
* @return -1 on error, number of offsets used in @a scratch otherwise
*/
-typedef int
-(*GNUNET_PQ_QueryConverter)(void *cls,
- const void *data,
- size_t data_len,
- void *param_values[],
- int param_lengths[],
- int param_formats[],
- unsigned int param_length,
- void *scratch[],
- unsigned int scratch_length);
+typedef int (*GNUNET_PQ_QueryConverter) (void *cls,
+ const void *data,
+ size_t data_len,
+ void *param_values[],
+ int param_lengths[],
+ int param_formats[],
+ unsigned int param_length,
+ void *scratch[],
+ unsigned int scratch_length);
/**
/**
* End of query parameter specification.
*/
-#define GNUNET_PQ_query_param_end { NULL, NULL, NULL, 0, 0 }
+#define GNUNET_PQ_query_param_end \
+ { \
+ NULL, NULL, NULL, 0, 0 \
+ }
/**
* @oaran ptr_size number of bytes in @a ptr
*/
struct GNUNET_PQ_QueryParam
-GNUNET_PQ_query_param_fixed_size (const void *ptr,
- size_t ptr_size);
-
+GNUNET_PQ_query_param_fixed_size (const void *ptr, size_t ptr_size);
/**
*
* @param x pointer to the query parameter to pass.
*/
-#define GNUNET_PQ_query_param_auto_from_type(x) GNUNET_PQ_query_param_fixed_size ((x), sizeof (*(x)))
+#define GNUNET_PQ_query_param_auto_from_type(x) \
+ GNUNET_PQ_query_param_fixed_size ((x), sizeof (*(x)))
/**
* @param x the query parameter to pass.
*/
struct GNUNET_PQ_QueryParam
-GNUNET_PQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x);
+GNUNET_PQ_query_param_rsa_public_key (
+ const struct GNUNET_CRYPTO_RsaPublicKey *x);
/**
* @param x the query parameter to pass
*/
struct GNUNET_PQ_QueryParam
-GNUNET_PQ_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x);
+GNUNET_PQ_query_param_rsa_signature (
+ const struct GNUNET_CRYPTO_RsaSignature *x);
/**
* @param x pointer to the query parameter to pass
*/
struct GNUNET_PQ_QueryParam
-GNUNET_PQ_query_param_absolute_time_nbo (const struct GNUNET_TIME_AbsoluteNBO *x);
+GNUNET_PQ_query_param_absolute_time_nbo (
+ const struct GNUNET_TIME_AbsoluteNBO *x);
/**
* #GNUNET_YES if all results could be extracted
* #GNUNET_SYSERR if a result was invalid (non-existing field or NULL)
*/
-typedef int
-(*GNUNET_PQ_ResultConverter)(void *cls,
- PGresult *result,
- int row,
- const char *fname,
- size_t *dst_size,
- void *dst);
+typedef int (*GNUNET_PQ_ResultConverter) (void *cls,
+ PGresult *result,
+ int row,
+ const char *fname,
+ size_t *dst_size,
+ void *dst);
/**
* @param cls closure
* @param rd result data to clean up
*/
-typedef void
-(*GNUNET_PQ_ResultCleanup)(void *cls,
- void *rd);
+typedef void (*GNUNET_PQ_ResultCleanup) (void *cls, void *rd);
/**
* Where to store actual size of the result.
*/
size_t *result_size;
-
};
*
* @return array last entry for the result specification to use
*/
-#define GNUNET_PQ_result_spec_end { NULL, NULL, NULL, NULL, 0, NULL, NULL }
+#define GNUNET_PQ_result_spec_end \
+ { \
+ NULL, NULL, NULL, NULL, 0, NULL, NULL \
+ }
/**
*/
struct GNUNET_PQ_ResultSpec
GNUNET_PQ_result_spec_variable_size (const char *name,
- void **dst,
- size_t *sptr);
+ void **dst,
+ size_t *sptr);
/**
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
-GNUNET_PQ_result_spec_fixed_size (const char *name,
- void *dst,
- size_t dst_size);
-
+GNUNET_PQ_result_spec_fixed_size (const char *name, void *dst, size_t dst_size);
/**
* @param dst point to where to store the result, type fits expected result size
* @return array entry for the result specification to use
*/
-#define GNUNET_PQ_result_spec_auto_from_type(name, dst) GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof (*(dst)))
+#define GNUNET_PQ_result_spec_auto_from_type(name, dst) \
+ GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof (*(dst)))
/**
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
-GNUNET_PQ_result_spec_string (const char *name,
- char **dst);
+GNUNET_PQ_result_spec_string (const char *name, char **dst);
/**
*/
struct GNUNET_PQ_ResultSpec
GNUNET_PQ_result_spec_rsa_public_key (const char *name,
- struct GNUNET_CRYPTO_RsaPublicKey **rsa);
+ struct GNUNET_CRYPTO_RsaPublicKey **rsa);
/**
*/
struct GNUNET_PQ_ResultSpec
GNUNET_PQ_result_spec_rsa_signature (const char *name,
- struct GNUNET_CRYPTO_RsaSignature **sig);
+ struct GNUNET_CRYPTO_RsaSignature **sig);
/**
*/
struct GNUNET_PQ_ResultSpec
GNUNET_PQ_result_spec_absolute_time (const char *name,
- struct GNUNET_TIME_Absolute *at);
+ struct GNUNET_TIME_Absolute *at);
/**
*/
struct GNUNET_PQ_ResultSpec
GNUNET_PQ_result_spec_absolute_time_nbo (const char *name,
- struct GNUNET_TIME_AbsoluteNBO *at);
+ struct GNUNET_TIME_AbsoluteNBO *at);
/**
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
-GNUNET_PQ_result_spec_uint16 (const char *name,
- uint16_t *u16);
+GNUNET_PQ_result_spec_uint16 (const char *name, uint16_t *u16);
/**
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
-GNUNET_PQ_result_spec_uint32 (const char *name,
- uint32_t *u32);
+GNUNET_PQ_result_spec_uint32 (const char *name, uint32_t *u32);
/**
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
-GNUNET_PQ_result_spec_uint64 (const char *name,
- uint64_t *u64);
+GNUNET_PQ_result_spec_uint64 (const char *name, uint64_t *u64);
/* ************************* pq.c functions ************************ */
*/
PGresult *
GNUNET_PQ_exec_prepared (PGconn *db_conn,
- const char *name,
- const struct GNUNET_PQ_QueryParam *params);
+ const char *name,
+ const struct GNUNET_PQ_QueryParam *params);
/**
*/
int
GNUNET_PQ_extract_result (PGresult *result,
- struct GNUNET_PQ_ResultSpec *rs,
- int row);
+ struct GNUNET_PQ_ResultSpec *rs,
+ int row);
/**
* @param result the postgres result
* @param num_result the number of results in @a result
*/
-typedef void
-(*GNUNET_PQ_PostgresResultHandler)(void *cls,
- PGresult *result,
- unsigned int num_results);
+typedef void (*GNUNET_PQ_PostgresResultHandler) (void *cls,
+ PGresult *result,
+ unsigned int num_results);
/**
* codes to `enum GNUNET_DB_QueryStatus`.
*/
enum GNUNET_DB_QueryStatus
-GNUNET_PQ_eval_prepared_singleton_select (PGconn *connection,
- const char *statement_name,
- const struct GNUNET_PQ_QueryParam *params,
- struct GNUNET_PQ_ResultSpec *rs);
+GNUNET_PQ_eval_prepared_singleton_select (
+ PGconn *connection,
+ const char *statement_name,
+ const struct GNUNET_PQ_QueryParam *params,
+ struct GNUNET_PQ_ResultSpec *rs);
/* ******************** pq_prepare.c functions ************** */
* Information needed to prepare a list of SQL statements using
* #GNUNET_PQ_prepare_statements().
*/
-struct GNUNET_PQ_PreparedStatement {
+struct GNUNET_PQ_PreparedStatement
+{
/**
* Name of the statement.
* Number of arguments included in @e sql.
*/
unsigned int num_arguments;
-
};
/**
* Terminator for prepared statement list.
*/
-#define GNUNET_PQ_PREPARED_STATEMENT_END { NULL, NULL, 0 }
+#define GNUNET_PQ_PREPARED_STATEMENT_END \
+ { \
+ NULL, NULL, 0 \
+ }
/**
* Information needed to run a list of SQL statements using
* #GNUNET_PQ_exec_statements().
*/
-struct GNUNET_PQ_ExecuteStatement {
+struct GNUNET_PQ_ExecuteStatement
+{
/**
* Actual SQL statement.
* Should we ignore errors?
*/
int ignore_errors;
-
};
/**
* Terminator for executable statement list.
*/
-#define GNUNET_PQ_EXECUTE_STATEMENT_END { NULL, GNUNET_SYSERR }
+#define GNUNET_PQ_EXECUTE_STATEMENT_END \
+ { \
+ NULL, GNUNET_SYSERR \
+ }
/**
const char *section);
-
-#endif /* GNUNET_PQ_LIB_H_ */
+#endif /* GNUNET_PQ_LIB_H_ */
/* end of include/gnunet_pq_lib.h */