Fix BDB and SQLite build problems
libgda currently doesn't build with autotools on FreeBSD because of the following two problems:
-
BDB_CURRENT_BUILDDIR
is not defined for autotools build.
gmake[2]: Entering directory '/home/lantw44/gnome/build/libgda/providers/bdb'
CC gda-bdb-test.o
/home/lantw44/gnome/source/libgda/providers/bdb/gda-bdb-test.c:31:10: warning: initializing 'GList *' (aka 'struct _GList *') with an expression of type 'const GList *' (aka 'const struct _GList *') discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
GList *events = gda_connection_get_events (cnc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lantw44/gnome/source/libgda/providers/bdb/gda-bdb-test.c:185:30: error: use of undeclared identifier 'BDB_CURRENT_BUILDDIR'
dbp = g_file_new_for_path (BDB_CURRENT_BUILDDIR);
^
1 warning and 1 error generated.
- FreeBSD libc does not define
uint
type:
gmake[2]: Entering directory '/home/lantw44/gnome/build/libgda/libgda/sqlite'
clang -B/home/lantw44/.local/bin -o mkkeywordhash /home/lantw44/gnome/source/libgda/libgda/sqlite/mkkeywordhash.c
/home/lantw44/gnome/source/libgda/libgda/sqlite/mkkeywordhash.c:264:12: error: use of undeclared identifier 'uint'; did you mean 'int'?
assert( (uint) p->len < sizeof(p->zOrigName) );
^~~~
int
/usr/include/assert.h:54:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
/home/lantw44/gnome/source/libgda/libgda/sqlite/mkkeywordhash.c:264:18: error: expected ')'
assert( (uint) p->len < sizeof(p->zOrigName) );
^
/home/lantw44/gnome/source/libgda/libgda/sqlite/mkkeywordhash.c:264:3: note: to match this '('
assert( (uint) p->len < sizeof(p->zOrigName) );
^
/usr/include/assert.h:54:20: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
/home/lantw44/gnome/source/libgda/libgda/sqlite/mkkeywordhash.c:264:11: error: reference to overloaded function could not be resolved; did you mean to call it?
assert( (uint) p->len < sizeof(p->zOrigName) );
^~~~~~
/usr/include/assert.h:54:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
3 errors generated.