diff --git a/dist/sqlconf b/dist/sqlconf index 8b47fa8..7adca12 100644 --- a/dist/sqlconf +++ b/dist/sqlconf @@ -18,7 +18,7 @@ args="" #args="--disable-shared $args" #args="--disable-static $args" args="--enable-vacuum $args" -args="--enable-datetime $args" +#args="--enable-datetime $args" args="--enable-authentication $args" args="--enable-incore-databases $args" args="--enable-incore-temp-databases $args" @@ -28,8 +28,7 @@ args="--enable-test $args" args="--enable-tcl $args" #args="--enable-sqlite-compat $args" args="--enable-soundex-sqlfn $args" -args="--enable-posix-mutexes $args" -args="--with-tcl=/usr/lib/tcl8.4 $args" +args="--with-tcl=/usr/lib/tcl8.5 $args" args="--with-berkeleydb=/usr/local/db $args" #args="--with-db-uniquename=FOO $args" #args="LD_TWOLEVEL_NAMESPACE=1 LIBTSO_LIBS=-ltcl8.4 $args" # Mac OS/X @@ -44,20 +43,17 @@ env $cppflags $ldflags $libs sh ../dist/configure -C $args # echo "end" && # echo "define dc" && # echo 'print __db_dump(dbc->dbp, "a", "/tmp/o")' && -# echo "set breakpoint pending on" && # echo "end") > .gdbinit (echo "set environment LD_LIBRARY_PATH=.:.libs" && echo "dir ../src" && echo "dir ../src/dbsql" && - echo "dir /usr/local/db/src" && + echo "dir ../src/dbsql/rl/src" && + echo "dir /usr/local/db/src/dist" && echo "path /usr/local/db/lib" && - echo "set breakpoint pending on" && echo "path .") > .gdbinit rm -f tags ln -s ../dist/tags tags mkdir .libs && /bin/true -ln -s .gdbinit .libs/.gdbinit -ln -s ./.libs/dbsql dbsql-bin && /bin/true diff --git a/src/dbsql.in b/src/dbsql.in index 530a36b..89abce2 100644 --- a/src/dbsql.in +++ b/src/dbsql.in @@ -26,7 +26,7 @@ #include /* Needed for drand48 */ #include /* Needed for the definition of va_list */ -@inttypes_decl@ +@inttypes_h_decl@ #include #endif @@ -75,7 +75,6 @@ extern "C" { @u_int_decl@ @u_long_decl@ @ssize_t_decl@ -@long_double_decl@ /* * Forward structure declarations, so we can declare pointers and diff --git a/src/inc/dbsql_int.in b/src/inc/dbsql_int.in index 294a15d..bf42977 100644 --- a/src/inc/dbsql_int.in +++ b/src/inc/dbsql_int.in @@ -247,7 +247,7 @@ struct __dbsql_db { /* * Aligning items to particular sizes or in pages or memory. * - * db_align_t -- + * uintmax_t -- * Largest integral type, used to align structures in memory. We don't store * floating point types in structures, so integral types should be sufficient * (and we don't have to worry about systems that store floats in other than @@ -256,26 +256,29 @@ struct __dbsql_db { * that happen to require alignment. Note: this alignment isn't sufficient for * mutexes, which depend on things like cache line alignment. Mutex alignment * is handled separately, in mutex.h. + */ +@uintmax_t_decl@ + +/* * - * db_alignp_t -- + * uint_ptr_t -- * Integral type that's the same size as a pointer. There are places where * DB modifies pointers by discarding the bottom bits to guarantee alignment. - * We can't use db_align_t, it may be larger than the pointer, and compilers + * We can't use uintmax_t, it may be larger than the pointer, and compilers * get upset about that. So far we haven't run on any machine where there * isn't an integral type the same size as a pointer -- here's hoping. */ -@db_align_t_decl@ -@db_alignp_t_decl@ +@uint_ptr_t_decl@ /* * Convert a pointer to a small integral value. * - * The (u_int16_t)(db_alignp_t) cast avoids warnings: the (db_alignp_t) cast + * The (u_int16_t)(uint_ptr_t) cast avoids warnings: the (uint_ptr_t) cast * converts the value to an integral type, and the (u_int16_t) cast converts * it to a small integral type so we don't get complaints when we assign the - * final result to an integral type smaller than db_alignp_t. + * final result to an integral type smaller than uint_ptr_t. */ -#define P_TO_UINT32(p) ((u_int32_t)(db_alignp_t)(p)) +#define P_TO_UINT32(p) ((u_int32_t)(uint_ptr_t)(p)) #define PATH_SEPARATOR "@PATH_SEPARATOR@" @@ -289,10 +292,10 @@ struct func_def { void (*xFunc)(dbsql_func_t*,int,const char**); /* Regular fn */ void (*xStep)(dbsql_func_t*,int,const char**); /* Aggregate fn step */ void (*xFinalize)(dbsql_func_t*); /* Aggregate fn finializer */ - int nArg; /* Number of arguments */ - int dataType; /* Datatype of the result */ - void *pUserData; /* User data parameter */ - func_def_t *pNext; /* Next function with same name. */ + int nArg; /* Number of arguments */ + int dataType; /* Datatype of the result */ + void *pUserData; /* User data parameter */ + func_def_t *pNext; /* Next function with same name. */ }; /*